当前位置:网站首页>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
边栏推荐
- P1908 reverse sequence pair
- Quick analysis: easy to share the Internet
- Mysql5.7 installation super easy tutorial
- Qt新建项目
- mongodb的认识
- <口算練習機 方案開發原理圖>口算練習機/口算寶/兒童數學寶/兒童計算器 LCD液晶顯示驅動IC-VK1621B,提供技術支持
- C crystal report printing
- 《可供方案开发》口算训练机/数学宝/儿童口算宝/智能数学宝 LCD液晶显示驱动IC-VK1622(LQFP64封装),原厂技术支持
- Use bloc to build a page instance of shutter
- Generally speaking, if the error of inconsistent tab and space occurs frequently
猜你喜欢
Chaos engineering platform chaosblade box new heavy release
什么是 eRDMA?丨科普漫画图解
<口算練習機 方案開發原理圖>口算練習機/口算寶/兒童數學寶/兒童計算器 LCD液晶顯示驅動IC-VK1621B,提供技術支持
The conference on the growth of all things was held in Hangzhou, and dangbei was selected into the top 100 list of future unicorns in China in 2022
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
Launcher启动过程
Use of swagger
浏览器驱动的下载
Origin plots thermogravimetric TG and differential thermogravimetric DTG curves
随机推荐
Codeforces Round #803 (Div. 2)(A~D)
QT - make a simple calculator - realize four operations
一般来讲,如果频繁出现inconsistent tab and space的报错
全屋Wi-Fi:一个谁也解决不好的痛点?
Yolov3 & yolov5 output result description
selenium 在pycharm中安装selenium
< schéma de développement de la machine d'exercice oral > machine d'exercice oral / trésor d'exercice oral / trésor de mathématiques pour enfants / lecteur LCD de calculatrice pour enfants IC - vk1621
HMS core machine learning service helps zaful users to shop conveniently
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
Methods of software testing
Origin plots thermogravimetric TG and differential thermogravimetric DTG curves
没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
跨服务器数据访问的创建链接服务器方法
Convolutional neural network (Introduction)
Analysis of CPU surge in production environment service
Custom events, global event bus, message subscription and publishing, $nexttick
Using computed in uni app solves the abnormal display of data () value in tab switching
Selenium, element operation and browser operation methods
Everyone believes that the one-stop credit platform makes the credit scenario "useful"
uniapp自动化测试学习