当前位置:网站首页>SQL Server 2008 publish and subscribe to SQL Server 2017 pit avoidance Guide
SQL Server 2008 publish and subscribe to SQL Server 2017 pit avoidance Guide
2022-06-29 07:52:00 【A_ single_ cat】
Use SQL Server Management Studio Create operation reference related to publication and subscription here or Official document , This article mainly records the pits encountered during the configuration process
1. Due to an operating system error 3, The process could not read the file “"C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\ReplData\unc\NETNETNET-
PC_CLOUDTRADB_SOA_LNGZ_20151130\20151130092501\View_TenderPurchase_45.pre
This is caused by the problem of reading permission of snapshot file , Two can be linked on the same machine sql server The service avoids this problem
2. Cannot link to Subscriber “XXX”
xxxx Unable to open and SQL Swever Link to
And SQL Server A network related or instance specific error occurred while linking . Unable to find or access the server . Please check whether the instance name is correct and SQL Server Whether it is configured to allow remote links .
- Check that is configured to allow remote links
- SQL Server Browers Service is turned on
- Because the subscription mode is pushed by the distributor , Therefore, you need to configure the subscriber on the publisher host
3. Cannot link to “XXX”
user ’sa’ Login failed
- Check that the password is correct ( Took a lot of detours , Including setting alias , machine name , The machine name is consistent with the service name . First, check the literal problem of the prompt )
4.SQL Server 2008 Publish and subscribe to SQL Server 2017 on Linux when , The selected subscriber does not meet the minimum version compatibility level for the selected publication
The first consideration is that the Compatibility levels of the two versions are different , Search found 2008 The compatibility level of is 100, 2017 The compatibility level of is 140 , modify 2017 The compatibility level of is 100 retry , Get the same result .
View compatibility levels
SELECT name, compatibility_level FROM sys.databases;
Modify compatibility level
ALTER DATABASE database_name
SET COMPATIBILITY_LEVEL = 100;
Due to local installation SSMS Version is 2012 , Think it might be ssms Version results in , So use the command subscription . Create a subscription of the same version and generate a script , Specify as the following directory , NewSubscription The file is a subscription command , Modify the corresponding subscriber name @subscriber , Database name @destination_db , Release name @publication , user name @subscriber_login , password @subscriber_password
First create the database at the subscriber she111 For accepting subscriptions . Implement snapshot publication and subscription through commands , Execute... At the publisher . Push subscription through publisher .
-- subscribe
use [disshell]
exec sp_addsubscription @publication = N'she2', @subscriber = N'sql1', @destination_db = N'she111', @subscription_type = N'Push', @sync_type = N'automatic', @article = N'all', @update_mode = N'read only', @subscriber_type = 0
exec sp_addpushsubscription_agent @publication = N'she2', @subscriber = N'sql1', @subscriber_db = N'she111', @job_login = null, @job_password = null, @subscriber_security_mode = 0, @subscriber_login = N'SA', @subscriber_password = N'password', @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20220520, @active_end_date = 99991231, @enabled_for_syncmgr = N'False', @dts_package_location = N'Distributor'
GO
-- Examples of issuing commands
use [disshell]
exec sp_replicationdboption @dbname = N'disshell', @optname = N'publish', @value = N'true'
GO
-- Add snapshot publication
use [disshell]
exec sp_addpublication @publication = N'she2', @description = N' From the publisher “LAPTOP-K7U2ESAM” The database of “disshell” Snapshot publication for .', @sync_method = N'native', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false', @repl_freq = N'snapshot', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1
GO
exec sp_addpublication_snapshot @publication = N'she2', @frequency_type = 4, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 2, @frequency_subday_interval = 10, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 0, @publisher_login = N'sa', @publisher_password = N''
use [disshell]
exec sp_addarticle @publication = N'she2', @article = N'prices', @source_owner = N'dbo', @source_object = N'prices', @type = N'logbased', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N'manual', @destination_table = N'prices', @destination_owner = N'dbo', @vertical_partition = N'false'
GO
边栏推荐
- 1031 Hello World for U
- Cartographer中的线程池操作
- Schnuka: automatic tire grabbing installation, 3D visual positioning, automatic robot grabbing
- Some examples.
- 4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
- 【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解
- 小白大战指针 (上)
- 自动化测试 - uiautomator2框架应用 - 自动打卡
- 数组知识点小结
- [industrial control old horse] detailed design of PLC six way responder system
猜你喜欢

SQL 注入绕过(六)

Protobuf 二进制文件学习及解析

Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case

【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解

cv2.cvtColor

SQL injection bypass (6)

呕心沥血总结出来的MySQL常见错误以及解决方法(二)

Some examples.

Prompt during packaging: property 'sqlsessionfactory' or 'sqlsessiontemplate'‘

ShapeShifter: Robust Physical Adversarial Attack on Faster R-CNN Object Detector
随机推荐
SQL 注入绕过(六)
时间操作 - 时间格式转换
Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200
1032 Sharing
【深度之眼吴恩达机器学习作业班第四期】逻辑回归编程实现
Schnuka: what is visual positioning system? How visual positioning system works
Selected Siemens PLC project example source code [300 sets in total]
What you should know about databases
Appium automation test foundation ADB common commands (III)
Software testing
编程能力提升方向
施努卡:3D视觉识别系统 3D视觉检测原理
【工控老马】PLC六路抢答器系统设计详解
基础语法 - 位运算
VMware vcenter/ESXI系列漏洞总结
环境准备 - 工程管理
ShapeShifter: Robust Physical Adversarial Attack on Faster R-CNN Object Detector
数组知识点小结
[FreeRTOS] interrupt mechanism
1031 Hello World for U