Home Article SQL Server List all SQL Servers in Network 
List all SQL Servers in Network PDF Print E-mail
User Rating: / 0
PoorBest 
SQL Server - Articles
Written by S. Singh   

This Procedure will list out all SQL Server instances in the Network:

 

CREATE PROCEDURE dbo.ListallSQLServers

AS

BEGIN

    SET NOCOUNT ON

 

    CREATE TABLE #servers(sname VARCHAR(255))

 

    INSERT #servers EXEC master..XP_CMDShell 'OSQL -L'

    -- you can also try using ISQL -L too, results differ slightly

 

    DELETE #servers WHERE sname='Servers:'

 

    SELECT LTRIM(sname) FROM #servers WHERE sname != 'NULL'

 

    DROP TABLE #servers

END

 
Exec ListallSQLServers


Comments
RSS
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

S. Singh

 

Sarabpreet’s Seven years of enriched experience and intellectual skills, have provided him an edge over the others by way of endowing him an opportunity to work and grow along with industry leaders. The keen urge of continuously learning and growing to evolve himself and being adaptable to changing environment has proved to be a milestone for his carrier by way of doing certification for database administrator from the I.T Industry leader Microsoft. His core competency lies in administration of SQL Server 2000, 2005 & 2008.
Presently Sarabpreet is working as a Freelancer and provides support to Multiple Clients Handles more than 90 servers & 800+ Databases, all responsibilities related to same such as Designing High Availability Database Solutions Clustering, Log-shipping and Mirroring, Backup\ Restore (Disaster Management), Automating SQL Server monitoring and improving current processes, Identifying performance bottlenecks and providing improvement recommendations, Installation and configuration of SQL 2000 and 2005 cluster, Configuring and troubleshooting backup/DR jobs, Implementing database change requests received from developers, Resolving performance issues, performance tuning, Database Administration and resolving day-to-day issues.

Sarabpreet’s Seven years of enriched experience and intellectual skills, have provided him an edge over the others by way of endowing him an opportunity to work and grow along with industry leaders. The keen urge of continuously learning and growing to evolve himself and being adaptable to changing environment has proved to be a milestone for his carrier by way of doing certification for database administrator from the I.T Industry leader Microsoft. His core competency lies in administration of SQL Server 2000, 2005 & 2008. 

 

                                            Presently Sarabpreet is working as a Freelancer and provides support to Multiple Clients Handles more than 90 servers & 800+ Databases, all responsibilities related to same such as Designing High Availability Database Solutions Clustering, Log-shipping and Mirroring, Backup\ Restore (Disaster Management), Automating SQL Server monitoring and improving current processes, Identifying performance bottlenecks and providing improvement recommendations, Installation and configuration of SQL 2000 and 2005 cluster, Configuring and troubleshooting backup/DR jobs, Implementing database change requests received from developers, Resolving performance issues, performance tuning, Database Administration and resolving day-to-day issues.


Statistics

Content View Hits : 63189

Powered by Solutions-Guru.com!. Designed by: budget hosting reseller hosting packages Valid XHTML and CSS.