当前位置:网站首页>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
边栏推荐
- tf. compat. v1.assign
- Cv:: mat and Base64 conversion (including picture compression and decompression)
- Alicloud access resource: nosuchkey
- 反思 - 中小公司项目管理思维 - 先将产品做出来,先将功能做出来
- Prompt during packaging: property 'sqlsessionfactory' or 'sqlsessiontemplate'‘
- 施努卡:什么是视觉定位系统 视觉定位系统的工作原理
- VMware vcenter/ESXI系列漏洞总结
- 关于开发web场景下如何解决手机访问web跨域问题
- 1032 Sharing
- Detailed explanation of top and free commands
猜你喜欢

ES中配置ext.dic文件不生效的原因

1032 Sharing

4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
![[industrial control old horse] detailed explanation of design principle of pattern fountain based on PLC](/img/28/690f9985f32675f5d50d196c293abe.jpg)
[industrial control old horse] detailed explanation of design principle of pattern fountain based on PLC

Protobuf 二进制文件学习及解析

Cartographer中的线程池操作

搭建jenkins环境并自动关联打包好的工程jar进行自动发布

Schnuka: what is visual positioning system? How visual positioning system works

Dump (cl\alv\tree\base================================cp|set\items\for\column) when expanding node or clicking toolbar button

Blue Bridge Cup -- Analysis of the second batch of test questions of the 13th session
随机推荐
【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解
[量化投资系统]Django从数据库中实现筛选及分页
产品安全 - 小漏洞导致大问题
Using cdockablepane to realize floating window in MFC
101. symmetric binary tree (recursive and iterative methods)
Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case
from xx import*等价于from xx import *,不一定要加空格
Vibration signal generation and processing based on MATLAB Doppler effect
DataTables screen error Popup
Blue Bridge Cup -- Analysis of the second batch of test questions of the 13th session
Oracle batch insert data - insert ethnic data
多态中的向上和向下转型
Appium 环境搭建
Cartographer中的线程池操作
Blue Bridge Cup - minimum frame
Detailed explanation of route (Jiuyang Scripture)
编程能力提升方向
1032 Sharing
VMware vcenter/ESXI系列漏洞总结
Problem solving -- > online OJ (13)