SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Powershell script to allow you to login to any instance or sqlserver

By terryj30,

This Powershell script well allow you to search for any instance or sql server you have or have enterned in to the file. once you run this powershell script it will ask you for a string type in what ever instance you want it mssql then it will give you a number of instances you can then press 1 to what ever number the server is on and it will log you in.

PS C:\CheckSQLServer\sql> ./loginsql.ps1
search string: IBTKYPSP32
Press 1 for : IBTKYPSP32A006
Press 2 for : IBTKYPSP32A017
Press 3 for : IBTKYPSP32A021
Press 4 for : IBTKYPSP32A026
Press 5 for : IBTKYPSP32A028
Press 6 for : IBTKYPSP32A031
Press 7 for : IBTKYPSP32A100
Press 8 for : IBTKYPSP32B017
Press 9 for : IBTKYPSP32B026
Press 10 for : IBTKYPSP32B031
Press 11 for : IBTKYPSP32A034
Press 12 for : IBTKYPSP32B034\HOSTED_P1
Press 13 for : IBTKYPSP32A036\HOSTED_P1
Press 14 for : IBTKYPSP32B037\HOSTED_P1
Enter choice : 1 - 14: 14
Logging on to the SQLSERVER you requested: IBTKYPSP32B037\HOSTED_P1
1> sp_who
2> go
spid ecid status loginame
cmd requ
------ ------ ------------------------------ --------------------------------------------------------------------------------------------
------------ ----------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------- ---------------- ----
1 0 background sa

2 0 background sa

3 0 background sa

4 0 background sa

5 0 background sa


Total article views: 1997 | Views in the last 30 days: 1
Related Articles

Monitoring Resource Governor Memory Grants

A very useful query that will allow you to monitor the resource governor memory grants along with ot...


Conditional Format Field Background

Conditional formatting background color of a field


Using Resource Monitor In Windows Server 2008 to Look at I/O Performance for SQL Server 2008

One quick and dirty tool that I like to use to monitor I/O performance at the file level is Resource...


Performance monitoring from client

performance monitoring