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

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: List all databases on all servers
Date 2013-02-14 23:26 +0100
Organization Erland Sommarskog
Message-ID <XnsA167EE7289BA2Yazorman@127.0.0.1> (permalink)
References <heqdnUM4L9nwxoDMnZ2dnUVZ8nadnZ2d@bt.com>

Show all headers | 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