物件。 如需詳細資訊,請參閱 sp_addlinkedserver (Transact-SQL)。 如果四部分的名稱是利用 OPENDATASOURCE 函數來建構為名稱的伺服器部分,則該名稱也可用來指定遠端資料表來源。 已指定 OPENDATASOURCE 時,database_name 和schema_name 就無法套用至所有資料來源,並且會
如果 FROM 子句中出现重复的名称,SQL Server 会返回错误。 table_or_view_name 表或视图的名称。 如果表或视图存在于 SQL Server 的同一实例的另一个数据库中,请按照 database.schema.object_name 形式使用完全限定名称 。 如果表或视图存在于 SQL Server 实例之外,请使用窗体中的四部分名称 linked_server。目录...
execsp_addlinkedserver--创建链接服务器@server='链接名称',--要访问的服务器别名(一般就是直接使用服务器地址)@srvproduct='',@provider='SQLOLEDB',@datasrc='目标服务器地址'--要访问的服务器地址goexecsp_addlinkedsrvlogin--添加链接服务器的登陆用户'链接名称',--被访问的服务器别名'false',null,'用户名...
Applies to: SQL Server Azure SQL Managed InstanceExecutes the specified pass-through query on the specified linked server. This server is an OLE DB data source. OPENQUERY can be referenced in the FROM clause of a query as if it were a table name. OPENQUERY can also be referenced as the ...
调用远程数据库的T-SQL和SP(SQLSERVER) --执行远程存储过程.查询远程数据库 --远程连接 if ( not exists(select * from sys.servers where name='yangr1')) begin EXEC sp_addlinkedserver @server='yangr1',--被访问的服务器别名(随意起一个)
Si la table ou la vue existe en dehors de l’instance de SQL Server, utilisez un nom en quatre parties sous la forme linked_server.catalog.schema.object. Pour plus d’informations, consultez sp_addlinkedserver (Transact-SQL). Un nom en quatre parties est construit à l’aide de la fonct...
Applies to: SQL Server Azure SQL Managed InstanceExecutes the specified pass-through query on the specified linked server. This server is an OLE DB data source. OPENQUERY can be referenced in the FROM clause of a query as if it were a table name. OPENQUERY can also be referenced as the ...
object. For more information, see sp_addlinkedserver (Transact-SQL). A four-part name that is constructed by using the OPENDATASOURCE function as the server part of the name can also be used to specify the remote table source. When OPENDATASOURCE is specified, database_name and schema_name ...
object. For more information, see sp_addlinkedserver (Transact-SQL). A four-part name that is constructed by using the OPENDATASOURCE function as the server part of the name can also be used to specify the remote table source. When OPENDATASOURCE is specified, database_name and schema_name ...
The following example shows the SQL Server syntax that runs a pass-through command against a linked server. { EXEC | EXECUTE } ( { @string_variable | [ N ] 'command_string [ ? ]' } [ + ...n ] [ { , { value | @variable [ OUTPUT ] } } [ ...n ...