I am stuck with a SQL query. How do I get all the databases names from multiple SQL Servers at a time? I have the server IP's in a table.
You can get the database informations using.
SELECT * from sys.databases
If you want to know this from other servers, in pure t-sql, you need to link the server.
You say that you cant link the servers. Another alternative is to create a .NET CLR Object and embed them to the server.
Than you can connect to other servers, without linking them together, and execute sql statements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With