I have used sp_addlinkedserver to access the remote machines db now i am writing queries explicitly on database like,
select * from [server\instance].database.owner.tablename
Now with this,
- [Server\instance] : this has to be provided explicitly
- [database] : can we find databases on specified instance using query like ms_ForEachDB ?
- [owner] : Can we find the database owner name using query ?
If these values are found using queries do we need to use EXEC() to execute this or we can still achieve it using nice queries ?
Thanks all,