|
| |||||||||
| Tags: mini shell, powershell, sql server, windows |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Can we Use the SQL Server Mini-Shell Version of Windows PowerShell
Yes, We can use the SQL Server with Mini Shell Version of Windows Power Shell, but i will explain this with some different scenario. If you have noticed the Exchange Windows PowerShell tool seems different this is because they created a custom Windows PowerShell profile that loads the Exchange snap-in and creates a couple of special functions. This is designed to make it easier for you to use Windows PowerShell to manage Exchange 2007. The version of Windows PowerShell that is used by the SQL team in SQL 2008 is the same version of Windows PowerShell that is included on the disk with Windows Server 2008—it is Windows PowerShell 1.0. The reason some commands are missing and other commands are added is because the SQL team created what is called a "mini-shell." It’s the “mini-shell” that makes using Windows PowerShell with SQL Server instances even easier. We tooled around a bit inside the structure that this provider has, learned about the objects that it exposes and how you can get and set properties, and even ran several commands that the provider includes. But now it is time to really put this thing to work. We will see how you can use Windows PowerShell to perform some useful tasks, working through some practical applications. |
|
#2
| |||
| |||
| Re: Can we Use the SQL Server Mini-Shell Version of Windows PowerShell
First let's talk about MiniShells and why they exist. During the Vista reset, there was a great deal of anxiety about .NET versioning and general angst about instability arising from plugin models where code coming from the various sources run in the same process. The SQL Server team created a set of mappings for the SMO object model so that they can be treated exactly like a drive letter. In other words, instead of having to set a variable to the instance and database objects that are displayed, you can just use the cd (change directory) shortcut to move around. Basically, you are dropped right into a SQL Server Instance, moving around the hierarchy of objects by using a simple cd command. Imagine the case where you load plugins from 10 different sources and then something goes wrong - who is responsible? Who do you call for support? MiniShells allow teams to address these issues by creating fixed execution environments that built in our labs and fully tested/verified before release. If you have a problem with a SQL PowerShell and call PSS, the first thing they are going to do is to have you try to reproduce the problem using the SQL MiniShell. (NOTE: In my experience, 9 out of 10 times that you have a problem with multiple plugins in a process comes from bad memory management - a problem largely [but not completely] managed out of existence by the CLR.) The first thing we have to do is obtain the directory of all the databases on an instance. Substituting the server name in the serverName part of this string and instance name (use default if it is the default instance) in the instanceName part of this string, type this command in the Windows PowerShell for SQL Server provider: Quote:
Quote:
|
|
#3
| |||
| |||
| Re: Can we Use the SQL Server Mini-Shell Version of Windows PowerShell Installing SQL Server Support You install the software required to run Windows PowerShell scripts by using SQL Server Setup. SQL Server 2008 Setup installs the following Windows PowerShell components when you select either the client software or the Database Services nodes:
The SQL Server 2008 version of SQL Server Management Studio supports starting Windows PowerShell sessions from the Object Explorer tree. The SQL Server 2008 version of SQL Server Agent supports Windows PowerShell job steps. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Can we Use the SQL Server Mini-Shell Version of Windows PowerShell" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is LSA Shell (Export Version) | Ameeryan | Networking & Security | 3 | 14-10-2009 11:52 PM |
| Unable to upgrade LSA Shell shows (export version) problem | Broot | Networking & Security | 2 | 29-06-2009 08:38 PM |
| Daily Checks on MySQL Server 2008 Servers through PowerShell | Bud | Guides & Tutorials | 2 | 06-06-2009 01:10 PM |
| Remote Desktop Shell Version 6.0.6001 Problems | jms88 | MediaCenter | 2 | 30-09-2008 09:45 PM |
| mstscax.dll does not match the version of the client shell | rosioliv | Windows Software | 2 | 26-12-2007 05:24 PM |