how to invoke in objects(tables,stored procs,views etc..) in anathor server database from my current server database.THANKS IN ADVANCE..
how to invoke in objects(tables,stored procs,views etc..) in anathor server database from my current server database.THANKS IN ADVANCE..
SQL Server supports 4 part object naming:
[<server>].[<database>].[<schema>].[<object>]
So, you can call things in other servers (linked servers) or databases just by including the relevant identifier.
For example, calling a procedure in another database on the same server:
EXEC [OtherDB].[MySchema].[MyProc]
You could use Linked Servers and then reference the objects by:
server.database.schema.object
For more ad-hoc requests, you can also use OPENROWSET and OPENDATASOURCE
No one has followed this question yet.