﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Database list from multiple SQL servers and instances??? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 17:12:28 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>&amp;lt;LOL&amp;gt;[b]And my way is wrong![/b]  I [just] realized dblist.txt will be [overwritten] for each server.  My bad.  Here's a corrected batch file:[font="Courier New"]@ECHO OFFSQLCMD -Lc &amp;gt; serverlist.txtFOR /F %%i IN (serverlist.txt) DO (   SQLCMD /S %%i /E /d master /Q"SET NOCOUNT ON SELECT SUBSTRING(@@SERVERNAME, 1, 30) AS ServerName, SUBSTRING([name],1,40) AS DBName FROM sysdatabases ORDER BY NAME SET NOCOUNT OFF;" &amp;gt;&amp;gt;dblist.txt    )[/font]</description><pubDate>Wed, 12 Dec 2012 06:37:18 GMT</pubDate><dc:creator>Your Name Here</dc:creator></item><item><title>RE: Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>@angelspawnPart of the challenge to be a successful DBA is to use the tools at our disposal to answer these types of questions.  There are [several] ways to answer your own question using batch files, PowerShell, SSMS, scripts, etc.My batch file suggestion is only one possible way to accomplish this.  I'll assume you have administrator access to all SQL Servers in your domain.  Check [font="Courier New"]dblist.txt[/font] on completion.[font="Courier New"]@ECHO OFFSQLCMD -Lc &amp;gt; serverlist.txtFOR /F %%i IN (serverlist.txt) DO (   SQLCMD /S %%i /E /d master -o dblist.txt /Q"SET NOCOUNT ON SELECT SUBSTRING(@@SERVERNAME, 1, 30) AS ServerName, SUBSTRING([name],1,40) AS DBName FROM sysdatabases ORDER BY NAME SET NOCOUNT OFF;"   )[/font]</description><pubDate>Wed, 12 Dec 2012 06:34:05 GMT</pubDate><dc:creator>Your Name Here</dc:creator></item><item><title>RE: Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>We have everything from SQL 2005 up to SQL 2008R2 SSMS.I currently have a SQL 2005 server where i have all others added as linked server.Thanks again for your ideas I will try them outangelspawn</description><pubDate>Wed, 12 Dec 2012 02:29:56 GMT</pubDate><dc:creator>angelspawn</dc:creator></item><item><title>RE: Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>if you having sql server mgmt studio 2008,you can registered no of instance  using central server mgmt .once registration done u can directly execute query on multiple instance.PFA.[img]C:\Documents and Settings\ingrp0504\Desktop\untitled.JPG[/img]</description><pubDate>Wed, 12 Dec 2012 00:11:39 GMT</pubDate><dc:creator>Hemant.R</dc:creator></item><item><title>RE: Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>[font="Courier New"]SELECT name FROM sys.databases[/font] will solve the problem you describe, although I can't help suspecting that your requirement is somewhat more complex than that.  You can use a Central Management Server to run it on all servers at once, or use SSIS to loop through your servers one at a time, or you can set up each server as a linked server and run the query like that.John</description><pubDate>Tue, 11 Dec 2012 02:42:44 GMT</pubDate><dc:creator>John Mitchell-245523</dc:creator></item><item><title>Database list from multiple SQL servers and instances???</title><link>http://www.sqlservercentral.com/Forums/Topic1394958-146-1.aspx</link><description>Hi I'm currently looking for a script to get a list of all databases from our SQL 2005 and above instances.Currently I have to pull this weekly from each instance alone but I don't know how to get this more automated.Can anyone help me?Thanks in advance and Kind RegardsangelspawnI currently use the script from [url=http://www.mssqltips.com/sqlservertip/1426/collect-sql-server-database-usage-for-free-space-and-trending/]here[/url]</description><pubDate>Tue, 11 Dec 2012 02:29:17 GMT</pubDate><dc:creator>angelspawn</dc:creator></item></channel></rss>