O'Reilly logo

Beginning SQL Server 2008 Administration by Carmen Taglienti, Grant Fritchey, Robert E. Walters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Automation Through SQLCMD and PowerShell

In Chapter 10, you learned about the most common maintenance tasks that you'll be called upon to perform as a database administrator. Many of those tasks are routine and also tedious. They are great candidates for automation, and one way to automate is through scripting.

You have two scripting environments at your disposal. One is SQLCMD, a command-line utility that has been around since the introduction of SQL Server 2005. The other is PowerShell, a newer and more expressive scripting environment that addresses the needs of DBAs, system administrators, and even power users.

Scripting in SQLCMD

SQLCMD is a Win32 command prompt utility that allows the interactive execution of Transact-SQL statements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required