select * from sys.servers; --使用 sp_helpserver 来显示可用的服务器 Exec sp_helpserver --删除已经存在的某个链接 Exec sp_droplinkedsrvlogin 服务器别名,Null Exec sp_dropserver 服务器别名 --使用sp_addlinkedserver来增加链接 EXEC sp_addlinkedse
SELECT * FROM sysservers 可以查出当前 SQL Server 实例上配置的所有链接服务器的列表及其相关信息 示例使用 Transact-SQL 创建与其他 SQL Server 实例的链接服务器 在查询编辑器中,输入以下 Transact-SQL 命令以便链接到名为SRVR002\ACCTG的 SQL Server 实例: USE [master] GO EXEC master.dbo.sp_addlinkedserve...
Applies to: SQL Server Azure SQL Managed Instance Linked servers enable the SQL Server Database Engine and Azure SQL Managed Instance to read data from the remote data sources and execute commands against the remote database servers (for example, OLE DB data sources) outside of the ins...
SQLRETURN SQLLinkedServers( SQLHSTMT hstmt) 参数 hstmt ODBC 语句句柄。 返回值 SUCCEED 或 FAIL。 注释 SQL Server 链接服务器为分布式查询中可以使用由四部分组成的名称引用的 OLE DB 数据源。SQLLinkedServers 返回将数据源定义为结果集的属性。可使用 sp_addlinkedserver 系统存储过程向 SQL Server 定义链接...
適用於:SQL Server Azure SQL 資料 Azure SQL 受控執行個體 Azure Synapse Analytics Analytics Platform System (PDW) 下載OLE DB 驅動程式 LINKEDSERVERS 資料列集會列舉可以參與 SQL Server 分散式查詢的組織資料來源。 LINKEDSERVERS 資料列集包含下列資料行。 展開資料表 資料行名稱類型指標描述 SVR_NAME DBTYPE...
Applies to: SQL Server Azure SQL Managed Instance Linked servers enable the SQL Server Database Engine and Azure SQL Managed Instance to read data from the remote data sources and execute commands against the remote database servers (for example, OLE DB data sources) outside of the instance ...
Set ls = New SQLDMO.LinkedServer With ls .Name = "XLTEST_DMO" .ProviderName = "Microsoft.Jet.OLEDB.4.0" .DataSource = "c:\book1.xls" .ProviderString = "Excel 8.0" End With s.LinkedServers.Add ls s.CloseEnd Sub 查询Excel 链接服务器 将Excel 数据源配置为链接服务器之后,您可以方便...
Set ls = New SQLDMO.LinkedServer With ls .Name = "XLTEST_DMO" .ProviderName = "Microsoft.Jet.OLEDB.4.0" .DataSource = "c:\book1.xls" .ProviderString = "Excel 8.0" End With s.LinkedServers.Add ls s.Close End Sub 查询Excel 链接服务器 ...
Applies to:SQL Server Returns the list of linked servers defined in the local server. Transact-SQL syntax conventions Syntax syntaxsqlCopy sp_linkedservers[ ; ] Arguments None. Return code values 0(success) or a nonzero number (failure). ...
SQL Server Azure SQL Managed Instance Linked servers enable the SQL Server Database Engine and Azure SQL Managed Instance to read data from the remote data sources and execute commands against the remote database servers (for example, OLE DB data sources) outside of the instance of SQL Server...