List of databases from a remote SQL server?

  • Is it possible to get a list of databases from a remote SQL server, without having to create a linked server? 

    I'm wondering if command line ISQL would do it, I'm going to look into that now - wondered if anyone has any insight into this or another way to get the information.

     

  • Use openrowset to access remote data from an OLE DB data source. It is an alternative to accessing remote data in other servers using OLE DB.

  • F.Y.I.

    SELECT * FROM OPENROWSET('SQLOLEDB', 'server_name';'uid';'pwd', 'SELECT * FROM master..sysdatabases')

  • Whoa, that worked great!  Exactly what I was trying to do - thank you very much!!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply