Randy

Randy

POWERSHELL – RUN INVOKE-SQLCMD

The Code

The Analysis This code is written in PowerShell to execute a stored procedure on a Microsoft SQL Server and save the results to an XML file. The first line of code invokes the Invoke-Sqlcmd cmdlet, which allows…

MANAGING SQL ROLES AND PERMISSIONS

Server-level roles There are database-level roles and server-level roles. Server-level roles lets you manage the permissions on a server. The following are fixed server-level roles:sysadmin, serveradmin, securityadmin, processadmin, bulkadmin diskadmin, dbcreator, and public. Every SQL server login belongs to the…

CREATING A SQL USER

Creating a new user in Microsoft SQL Server is a common task that can be accomplished using a variety of methods, including Transact-SQL statements, SQL Server Management Studio, and the SQL Server Management Objects (SMO) .NET library. To create a…

ADDING SYNTAX HIGHLIGHTER TO WORDPRESS

With Urvanov Syntax Highlighter, you can add code to your wordpress site. It supports multiple languages such as PowerShell and T-SQL. Urvanov Syntax Highlighter is a plugin for your wordpress site. Below is an example of how it works:

INSTALLING INVOKE-SQLCMD

The Invoke-Sqlcmd module is a PowerShell module that will allow you to execute T-SQL statements. In order to install the Invoke-Sqlcmd module, you will need to open PowerShell. Before installing the module, you need to set the execution policy to…