それでは、PowerShellを使ったSQL Server 2008の操作方法について見ていこう。 PowerShellを単体で起動して、SQL Serverに接続することももちろん可能(詳細はこちらを参照)だが、SQL Server Management Studioから、そのままPowerShellを起動することもできる。まずSQL Server ...
他にも、PowerShellで可能な処理をいくつか見ていこう。まずはSMOを使用した少し複雑な例として、インデックスを作成してみよう。まず、SQL Server Management Studioで「インデックス」を右クリックし、「PowerShellの起動」をクリックする。 SMOを使用して ...
Use PowerShell to script objects on a schedule or in a special order. Use PowerShell if you need to switch between windows and SQL commands or even share data between the two. It’s much easier in ...
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 ...
A couple of months ago, I wrote an article on how to use PowerShell to back up a database within SQL Server Express Edition. Even though the technique that I described in that post works, the script ...