To wrap up this series of PowerShell articles, let's take a look at a few tips and tricks for working with PowerShell in SQL Server on a regular basis. To wrap up this series of PowerShell articles, ...
When I (along with many other people) had a lot of trouble trying to install SQL Server Management Studio in an attempt to switch from the SQL Server 2008 R2 evaluation to the free Express version, I ...
Use PowerShell when you have many scripts to deploy. Use PowerShell if you have a hard time remembering the SQL cursor syntax or think it’s just too much trouble to manage for simple ops, such as ...
There are lots of ways to create MSSQL databases via PowerShell. We could invoke a T-SQL query using the CREATE DATABASE term, we could write some code to use the [Create() method with SMO] or, if ...
In a previous article, I talked about getting started with managing SQL server using PowerShell and the Server Management Objects (SMO). While that was mostly spent making the connection and doing ...
I’ve created a script that monitors a table in a SQL Server database. I’m only interested in one column in the table: TimeStamp. If the maximum (newest) value in TimeStamp is more than 30 minutes ...
Another good example is adding user permissions to all the schemas in a database. You can code this in T-SQL, but T-SQL requires the inclusion of unsafe dynamic SQL code inside a cursor. You can ...
Although spanking new in Katmai, Policy-Based Management already seems mature. The inclusion of PowerShell will reinvent the way DBAs manage their environments by taking complicated cursors out of ...
$con = New-Object System.Data.SqlClient.SqlConnection("Server=10.110.0.251;Database=BackupDB;User ID=sa;Password=P@ssword1!;connect Timeout=30") $con.open() $instance ...