Free Newsletters:
DatabaseJournal  
DBANews
Search Database Journal:
 
HOME News MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc Scripts Links Discussion
internet.com

» HOME
» NEWS
» FEATURES
» SERIES
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Products
Scripts
Links
» DISCUSSION
» TECH JOBS

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner


















Web Doomsday Averted: Kaminsky

Microsoft Serves Up SQL 2008

For Search Engine Use, Glass Almost Half Full

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers



Wintel/Citrix System Adminsitrator
The Computer Merchant, Ltd
US-CT-Stratford

Justtechjobs.com Post A Job | Post A Resume
MS SQL
June 6, 2007
Microsoft Windows PowerShell and SQL Server 2005 SMO – Part I
By Muthusamy Anantha Kumar aka The MAK

As you probably know, Windows PowerShell is the new command shell and scripting language that provides a command line environment for interactive exploration and administration of computers. In addition, it provides an opportunity to script these commands so that we can schedule and run these scripts multiple times.

Windows PowerShell depends on .NET framework 2.0.

SQL Server Management Objects, known as SMO, is an object model for SQL Server and its configuration settings. SMO-based applications use .NET Framework languages to program against this in-memory object model, rather than sending Transact-SQL (T-SQL) commands to SQL Server to do so.

In this article series, I am going to illustrate the power of Windows PowerShell in conjunction with SQL Server 2005.

Part I of this series is going to illustrate how to install and use a simple PowerShell command and a simple SMO command.

Assumption

a.  The machine you use already has .NET 2.0 installed

b.  The machine you use already has SQL Server 2005 client installed with the latest service pack

Download and Install Microsoft PowerShell

a.  Download Microsoft PowerShell “WindowsXP-KB926139-x86-ENU.exe” from http://download.microsoft.com

b.  Install PowerShell

Step 1: Double click on the “WindowsXP-KB926139-x86-ENU.exe’ executable. [Refer Fig 1.0]

Step 2: Click “Run”. [Refer Fig 1.1]


Fig 1.1

Step 3: Click “Next”. [Refer Fig 1.2]


Fig 1.2

Step 4: Select the option “I agree”. [Refer Fig 1.3]


Fig 1.3

Step 5: Watch the progress of installation. Refer Fig 1.4


Fig 1.4

Step 6: Click Finish. [Refer Fig 1.5]


Fig 1.5

Launch PowerShell

There are few ways to launch PowerShell. One method is to go to the command prompt and type the following command. [Refer Fig 1.6]

PowerShell


Fig 1.6

After a short pause, the PowerShell prompt appears. [Refer Fig 1.7]


Fig 1.7

Alternatively, you can start PowerShell by selecting Programs-Windows PowerShell 1.0-Windows PowerShell. [Refer Fig 1.8]


Fig 1.8

Go to page: 1  2  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives







Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
Simple Query, but so slow. Any Advice for me? o1webdawg 14 July 22nd, 12:59 AM
64 bit Char datatype smeet_sinha 1 July 15th, 02:23 AM
I can't get customized pricing to work ddiabetes 5 July 11th, 10:28 PM
Query Advice - Probably simple neil-j 6 July 11th, 05:38 AM







JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers