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


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

Re: List all databases on all servers

From "Cathy" <Cathy@Nospam.com>
Newsgroups comp.databases.ms-sqlserver
References <heqdnUM4L9nwxoDMnZ2dnUVZ8nadnZ2d@bt.com> <XnsA167EE7289BA2Yazorman@127.0.0.1>
Subject Re: List all databases on all servers
Date 2013-02-15 07:53 +0000
Message-ID <UdWdnW3cqsDxdIDMnZ2dnUVZ8kudnZ2d@bt.com> (permalink)

Show all headers | View raw


Had a quick look at apexsql demo, looks nice but still requires me to enter 
all server names.

Thing is in a large organisation like ours, others could be deploying sql 
servers without informing me,

Ideally I need to track any new installations and ensure they comply to the 
most basic set of standards. (i.e backups & logfiles)

I have previously used osql and powershell to view other SQL servers and 
instances, but thought it would make sense to be able to do similar from 
within your T-SQL as this would allow you to run everything in one place 
instead of to dijointed procedures being run seperately or having to script 
this via a batch procedure.

Thanks for your input. I still need to have a look at the others you 
suggested

Regards
C


"Erland Sommarskog" <esquel@sommarskog.se> wrote in message 
news:XnsA167EE7289BA2Yazorman@127.0.0.1...
> 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