/*methods of accessing different tables across multiple servers first create a linked server testt,* the RPC configuration of the linked server ' TESTT ' cannot be directly modified under MSSQL2008 to Ture, which can be modified by the following statements:*/ Use [Master]GOEXECMaster.dbo.sp_serveroption@server=N'Testt',@optname=N'RPC',@optvalue=N'true'GOEXECMaster.dbo.sp_serveroption@server=N'Testt',@optname=N'RPC out',@optvalue=N'true'GO--and then access it through the SQL statementSelect * from [Testt].[online_payment].[dbo].[Tb_user]/*ways to access different tables across multiple servers two*/--Enable ad Hoc distributed Queries:execsp_configure'Show advanced Options',1 Reconfigure execsp_configure'Ad Hoc Distributed Queries',1 Reconfigure --The Access statement writes like thisSelect * from OpenRowset('SQLOLEDB','10.176.24.111';'SA';'123', ONLINE_PAYMENT.dbo.TB_USER) a--Close ad Hoc distributed Queries:execsp_configure'Ad Hoc Distributed Queries',0 Reconfigure execsp_configure'Show advanced Options',0 Reconfigure
Ways to access tables from different databases across multiple servers