当前位置:网站首页>Method of creating linked server for cross server data access
Method of creating linked server for cross server data access
2022-07-02 14:22:00 【Deli loves】
SQL Database creation link service , It's not just SQL database , It's fine too Oracle other , This paper aims at SQL Operating instructions for
1. Temporary access across servers , Direct use OPENROWSET The way
-- Example query statement
--select top 1 *from openrowset('SQLOLEDB',' service name ';' account number ';' password ', database .dbo. surface )a
select top 1 *
from openrowset('SQLOLEDB','192.168.1.1';'sa';'111',TEST.dbo.TEST)a
where NO ='1'This query will prompt an error “ Tips :SQL Server Blocking of components 'Ad Hoc Distributed Queries ' Of STATEMENT 'OpenRowset/OpenDatasource'”, Please refer to the solution of the targeted description in the next blog post .
2. Cross server data access , Create a linked server
2.1 Sentence creation
-- Cross server data access
-- If you often visit or have a large amount of data , It is recommended to use a linked server
-- Create a linked server
-- The creation example is as follows
--SQLOLEDB The default is SQL database
--SER_REMOTEERP Get the service name for you , Can write 192.168.1.2 You can also choose any other
-------------------------------------------------------------------
-- Create statement
EXEC sp_addlinkedserver 'SER_REMOTEERP','','SQLOLEDB','192.168.1.2'
-- Local user name , Remote service login , Password of remote service
-- For general creation null or SA
EXEC sp_addlinkedsrvlogin 'SER_REMOTEERP','false',null,'sa',' password '
EXEC sp_serveroption 'SER_REMOTEERP','rpc out','true'
-- Query statement
select top 1 * from SER_REMOTEERP. Database name .dbo. Table name
-- Delete linked Services
EXEC sp_dropserver 'SER_REMOTEERP','droplogins'If you encounter problems when creating : There is no remote server ‘‘ Map to local users ‘(null)/sa‘ Remote users of ‘sa‘ And service master password decryption error ”, Then refer to my next blog to solve , Connect as follows
2.2 SQL Screen operation

Enter the remote login account and password

RFC and RFC OUT choice TRUE

Test the connection to verify

边栏推荐
猜你喜欢

Use of swagger

Essential elements of science fiction 3D scenes - City
![[development environment] StarUML tool (download software | StarUML installation | StarUML creation project)](/img/08/9f25515e600a3174340b2589c81b0e.jpg)
[development environment] StarUML tool (download software | StarUML installation | StarUML creation project)

Analysis of CPU surge in production environment service

没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
![[Hongke technology sharing] how to test DNS server: DNS performance and response time test](/img/f4/d8c21d6c33985fd6d819cd44c22c72.png)
[Hongke technology sharing] how to test DNS server: DNS performance and response time test

<口算練習機 方案開發原理圖>口算練習機/口算寶/兒童數學寶/兒童計算器 LCD液晶顯示驅動IC-VK1621B,提供技術支持

Available solution development oral arithmetic training machine / math treasure / children's oral arithmetic treasure / intelligent math treasure LCD LCD driver ic-vk1622 (lqfp64 package), original te

Development and design of animation surrounding mall sales website based on php+mysql

Will your sleep service dream of the extra bookinfo on the service network
随机推荐
Selenium installing selenium in pycharm
Quarkus学习四 - 项目开发到部署
Basic knowledge of QT original code
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
故事点 vs. 人天
瀏覽器驅動的下載
Simple introduction to ENSP
docker mysql
Codeforces Round #803 (Div. 2)(A~D)
Use of swagger
Solve the problem that openocd fails to burn STM32 and cannot connect through SWD
Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute
uni-app中使用computed解决了tab切换中data()值显示的异常
Use bloc to build a page instance of shutter
Mysql5.7 installation super easy tutorial
P1908 逆序对
[to be continued] [UE4 notes] l5ue4 model import
Design and implementation of car query system based on php+mysql
什么是 eRDMA?丨科普漫画图解
PyQt5_ Qscrollarea content is saved as a picture