Skip to Content
SQL Server® 2008 Administration: Real World Skills for MCITP Certification and Beyond
book

SQL Server® 2008 Administration: Real World Skills for MCITP Certification and Beyond

by Tom Carpenter
May 2010
Intermediate to advanced
815 pages
21h 55m
English
Sybex
Content preview from SQL Server® 2008 Administration: Real World Skills for MCITP Certification and Beyond

Windows Scripting Host

If the command prompt and Windows PowerShell are not enough for you, the Windows Scripting Host (WSH) engine may do the trick. It is beyond the scope of this book to attempt a tackle of WSH in its entirety, but Microsoft's website is filled with valuable information about WSH and scripting options. This section will provide one example with some comments, but it won't try to teach you WSH scripting here because that is a multi-hundred-page topic by itself.

The following example code can be saved to a file, such as checkspace.vbs, and executed:

strServerName = "." strDBName = "AdventureWorks" Set objSQLSrv = CreateObject("SQLDMO.SQLServer") objSQLSrv.LoginSecure = True objSQLSrv.Connect strServerName Set objDB = objSQLServer.Databases(strDBName) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft SQL Server 2012 Administration: Real-World Skills for MCSA Certification and Beyond (Exams 70-461, 70-462, and 70-463)

Microsoft SQL Server 2012 Administration: Real-World Skills for MCSA Certification and Beyond (Exams 70-461, 70-462, and 70-463)

Tom Carpenter
Microsoft® SQL Server™ 2005 Administrator's Companion

Microsoft® SQL Server™ 2005 Administrator's Companion

Edward Whalen, Marcilina Garcia, Burzin Patel, Stacia Misner, Victor Isakov

Publisher Resources

ISBN: 9780470554203Purchase book