A function like USE points to an SQL database on another server?

In SQL Server, you can use a function useto point a query to another database. For instance:

USE databasename GO;

Is there a function that allows you to point to another database server and use the database on this server? I would expect this to work, but no luck:

USE [servername].databasename GO;

I know that I can simply specify the database request on another server, but when I am engaged in production and intermediate environments, it is more efficient to declare the server and the database at the beginning of the request.

thank

+5
source share
2 answers

Linked Servers . , .

http://msdn.microsoft.com/en-us/library/ms188279.aspx

Management Studio Database/Server Objects/Linked Servers.

:

[Server].database.schema.object

, , . JonH , dabase .

+4

USE , , .

+5

All Articles