Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1391

Re: List all databases on all servers

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail
From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: List all databases on all servers
Date Thu, 14 Feb 2013 23:26:25 +0100
Organization Erland Sommarskog
Lines 31
Message-ID <XnsA167EE7289BA2Yazorman@127.0.0.1> (permalink)
References <heqdnUM4L9nwxoDMnZ2dnUVZ8nadnZ2d@bt.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
Injection-Info mx05.eternal-september.org; posting-host="e87282ec96c371b8272e2d14c79930f2"; logging-data="2117"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18C6wkwJUFZcVvwCiyLP4FO"
User-Agent Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32)
Cancel-Lock sha1:sl5jVwJxEUDH45LPlfnjALHLhMw=
Xref csiph.com comp.databases.ms-sqlserver:1391

Show key headers only | View raw


Cathy (Cathy@Nospam.com) writes:
> I want to setup a Database and a T-SQL script that queries the network
> for all SQL servers and instances and then puts their names into
> TBL_SQLSERVERS. 

If you want to discover SQL servers in your organisation, T-SQL is 
definitely not the right tool for this.

I would exepct that SMO has some support for this. In practice, that 
would mean a PowerShell script.

> This is to be followed by another query which I already have that uses 
> TBL_SQLSERVERS to give me a complete listing of all databases, types of 
> backups and data file and log file locations to allow me to check and 
> standardise all of these.
 
Once you are connected to a server, you can start to query it. But then 
again, why reinvent the wheel? Here is one tool that I believes some
of what you are asking for: http://www.apexsql.com/sql_tools_doc.aspx

It is also worth checking out tools from other vendors such as
Idera, SqlSentry, Quest etc.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

List all databases on all servers "Cathy" <Cathy@Nospam.com> - 2013-02-14 21:47 +0000
  Re: List all databases on all servers Erland Sommarskog <esquel@sommarskog.se> - 2013-02-14 23:26 +0100
    Re: List all databases on all servers "Cathy" <Cathy@Nospam.com> - 2013-02-15 07:53 +0000
      Re: List all databases on all servers Erland Sommarskog <esquel@sommarskog.se> - 2013-02-15 10:38 +0100
      Re: List all databases on all servers rja.carnegie@gmail.com - 2013-02-15 03:27 -0800
        Re: List all databases on all servers "Cathy" <Cathy@Nospam.com> - 2013-02-15 15:58 +0000

csiph-web