Scripting SQL Management Objects in Windows PowerShell by Willis Johnson

BUY THIS ITEM

  • Add To List uiAction=GetAllLists&page=List&pageType=list&ean=9780470279359&productCode=BK&maxCount=100&threshold=3

(Other Format)

  • Pub. Date: January 2008
  • 33pp
     
    • Overview
    • Editorial Reviews
    • Features

    Product Details

    • Pub. Date: January 2008
    • Publisher: Wrox Press, Inc.
    • Format: Other Format, 33pp

    Synopsis

    This Wrox Blox shows how to communicate with SQL Server using SQL Management Objects instantiated on-the-fly in Windows PowerShell scripts. Topics include how to create Windows PowerShell scripts that use SQL Management Objects (SMO) to manage and program SQL Server. In addition, you will learn about areas of potential difficulty and see how to avoid them—for example, the use of '$' in instance name, quote nesting rules, connection pooling, and schemata. The explanations in this Wrox Blox are focused on numerous code examples, and show you how to do the following: load SMO; create a server object; get a user’s credentials from the UI into a safestring; connect to SQL Server using SQL Server authentication; connect to SQL Server using Windows authentication; profile a server instance by examining its properties; use WMI to examine and configure a server’s Windows service; use PowerShell cmdlets to start, stop, and restart a service; check for the existence of a database; verify a file path; save data in a csv file; retrieve data from a csv file; create a database; create a schema; create a table; insert data in a table; execute ad hoc T-SQL queries; retrieve information about views; create reports in HTML format; display HTML reports in a browser window; launch a Windows process; and tweak data format. A downloadable ZIP archive is included which contains all the example scripts, as well as additional scripts.

    More Reviews and Recommendations

    Biography

    Willis Johnson is a consultant specializing in data security and privacy. He worked as a programmer–writer in Microsoft’s SQL Server product group for the 5+-year duration of the SQL Server 2005 product cycle, writing sample code, white papers, and documentation for a variety of SQL technologies. He claims to have read (skimmed) the SQL Server 2005 RTM Books Online in its entirety. He has taught classes on data security, networking, distributed file systems, and C# at Microsoft and at the U.C. Berkeley Haas Business School. He has a Ph.D. in Near Eastern Studies from U.C. Berkeley, an M.Phil. in History from Cambridge (UK), and a B.A. in English from Reed College. He lives in Evanston, Illinois.
    The author also gratefully acknowledges Joe Brinkman for his insightful technical edit of this article.

    Customer Reviews

    • Reader Rating:
    Be the first to write a review!