当前位置:网站首页>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

边栏推荐
- 途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
- C语言高级用法--函数指针:回调函数;转换表
- 卷积神经网络(入门)
- The most complete analysis of Flink frame window function
- P1042 [NOIP2003 普及组] 乒乓球
- [development environment] 010 editor tool (tool download | binary file analysis template template installation | shortcut key viewing and setting)
- MySQL 45 lecture - learning from the actual battle of geek time MySQL 45 Lecture Notes - 04 | easy to understand index (Part 1)
- MySQL45讲——学习极客时间MySQL实战45讲笔记—— 05 | 深入浅出索引(下)
- Use of swagger
- docker mysql
猜你喜欢

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

2022家用投影仪首选!当贝F5强悍音画效果带来极致视听体验

Will your sleep service dream of the extra bookinfo on the service network

默认插槽,具名插槽,作用域插槽

Do you know that there is an upper limit on the size of Oracle data files?

每日学习2

腾讯云 TStor 统一存储通过信通院首批文件存储基础能力评测

Teamtalk source code analysis win client

Chinese science and technology from the Winter Olympics (III): the awakening and evolution of digital people

联合搜索:搜索中的所有需求
随机推荐
Openharmony notes --------- (4)
《可供方案开发》口算训练机/数学宝/儿童口算宝/智能数学宝 LCD液晶显示驱动IC-VK1622(LQFP64封装),原厂技术支持
每天坚持20分钟go的基础二
Teamtalk source code analysis win client
Adhere to the foundation of 20 minutes go every day II
MySQL -- convert rownum in Oracle to MySQL
< schematic diagram of oral arithmetic exercise machine program development> oral arithmetic exercise machine / oral arithmetic treasure / children's math treasure / children's calculator LCD LCD driv
提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”
故事點 vs. 人天
你知道Oracle的数据文件大小有上限么?
How many knowledge points can a callable interface have?
693. Travel sequencing (map + topology)
Code implementation MNLM
Packet capturing tool Fiddler learning
线性dp求解 最长子序列 —— 小题三则
Data consistency between redis and database
Whole house Wi Fi: a pain point that no one can solve?
Getting started with QT - making a simple calculator
Slashgear shares 2021 life changing technology products, which are somewhat unexpected
NLA自然语言分析,让数据分析更智能