find the replications and articles from distribution server
--according old upatedb replication, you may check the publication, then use the fllowing sql to find out these articles.
select * from MSpublications --check the publication
--according to publication, find out that these article.
select * from MSarticles where publication_id=1
select 'exec sp_addarticle @publication = N''analysis2_coredb_04'', @article = N'''+article+''', @source_owner = N''dbo'', @source_object = N'''+article+''', @destination_table = N'''+article+''', @type = N''logbased'', @creation_script = null, @description = null, @pre_creation_cmd = N''drop'', @schema_option = 0x00000000000000F3, @status = 16, @vertical_partition = N''false'', @ins_cmd = N''SQL'', @del_cmd = N''SQL'', @upd_cmd = N''SQL'', @filter = null, @sync_object = null, @auto_identity_range = N''false'' GO'
from MSarticles where publication_id=40
///All creation produre
-- Enabling the replication database
use master
GO
exec sp_replicationdboption @dbname = N'analysis2', @optname = N'publish', @value = N'true'
GO
use [analysis2]
GO
-- Adding the transactional publication
exec sp_addpublication @publication = N'analysis2_intranetdb', @restricted = N'false', @sync_method = N'character', @repl_freq = N'continuous', @description = N'Transactional publication of newjoyo2 database from Publisher DB-SELECT01.', @status = N'active', @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'false', @enabled_for_internet = N'false', @independent_agent = N'false', @immediate_sync = N'false', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @retention = 336, @allow_queued_tran = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_dts = N'false', @allow_subscription_copy = N'false', @add_to_active_directory = N'false'
exec sp_addpublication_snapshot @publication = N'analysis2_intranetdb',@frequency_type = 4, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8, @frequency_subday_interval = 1, @active_start_date = 0, @active_end_date = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959
GO
exec sp_grant_publication_access @publication = N'analysis2_intranetdb', @login = N'BUILTINAdministrators'
GO
exec sp_grant_publication_access @publication = N'analysis2_intranetdb', @login = N'distributor_admin'
GO
exec sp_grant_publication_access @publication = N'analysis2_intranetdb', @login = N'sa'
GO
-- Adding the transactional articles
exec sp_addarticle @publication = N'analysis2_intranetdb', @article = N'TD007', @source_owner = N'dbo', @source_object = N'TD007', @destination_table = N'TD007', @type = N'logbased', @creation_script = null, @description = null, @pre_creation_cmd = N'drop', @schema_option = 0x00000000000000F3, @status = 16, @vertical_partition = N'false', @ins_cmd = N'SQL', @del_cmd = N'SQL', @upd_cmd = N'SQL', @filter = null, @sync_object = null, @auto_identity_range = N'false' GO
-- Adding the transactional subscription
exec sp_addsubscription @publication = N'analysis2_intranetdb', @article = N'all', @subscriber = N'DB-BO', @destination_db = N'bo2', @sync_type = N'automatic', @update_mode = N'read only', @offloadagent = 0, @dts_package_location = N'distributor'
GO
exec sp_addsubscription @publication = N'analysis2_intranetdb', @article = N'all', @subscriber = N'DB-BO02-R1', @destination_db = N'bo2', @sync_type = N'automatic', @update_mode = N'read only', @offloadagent = 0, @dts_package_location = N'distributor'
GO
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-242470/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Generate Distribution Model from SAP ERP to SAP EWM in SAP S/4Hana
- LeetCode-Find Median from Data StreamLeetCode
- angularJS articles and resourcesAngularJS
- PSQLException: ERROR: failed to find conversion function from unknown to charSQLExceptionErrorAIFunction
- how to move a MediaWiki wiki from one server to anotherServer
- SAP Retail Differences Between Articles and MaterialsAI
- Standard Functions Used in SAP Retail with ArticlesFunctionAI
- No Response from the Server, Does it Hang or Spin? (Doc ID 68738.1)Server
- Migrate from SQL SERVER to Oracle 10GSQLServerOracle 10g
- Procedure to create Distribution model
- SAP Distribution Model初探
- Could not find a version that satisfies the requirement py4j (from versions: ) No matching distributUIREM
- Some good articles about SQL*loaderGoSQL
- C++ articles:Guru of the Week #1 (轉)C++
- Introduction to "Bug Description" Articles [ID 245840.1]
- ORACLE-BASE - Oracle DBA and development articlesOracledev
- MySQL5.7 Unable to find a match: MySQL-community-serverMySqlUnityServer
- 已將資料庫上下文更改為 'distribution'。 (Microsoft SQL Server,錯誤: 21613)資料庫ROSSQLServer
- You do not have permission to get URL ‘/’ from this server解決方案Server
- Slave: received 0 length packet from server, apparent master shutdownServerAPPAST
- WINNT: How to Remove Oracle Fail Safe From a Windows NT Cluster ServerREMOracleAIWindowsServer
- Error occurred while downloading files from admin server for deploymentErrorWhileServer
- C++ articles:Guru of the Week #4 -- Class Mechantics (轉)C++
- 一個老外高手的Favorite Metalink Articles
- Starting MySQL * Couldn't find MySQL server (/usr/bin/mysqld_safe)MySqlServer
- SCM600--Master Data in Sales and DistributionAST
- MySQL報錯Slave: received end packet from server, apparent master shutdownMySqlServerAPPAST
- Guide to Database Migration from Microsoft SQL Server using MySQL WorkbenchGUIIDEDatabaseROSServerMySql
- eclise 部署web工程報 There are no resources that can be added or removed from the server.WebREMServer
- SAP SD (Sales & Distribution) Training TutorialAI
- Oracle EBS核心功能之Distribution流程Oracle
- springboot專案打包提示Unable to find a single main class from the following candidates錯誤Spring BootAI
- tomcat新增專案報錯:There are no resources that can be added or removed from the serverTomcatREMServer
- Unable to execute SonarScanner analysis: Fail to get bootstrap index from server: Host is unreachable(Host unreachable)AIbootIndexServer
- An Introduction to Error Message Articles [ID 22080.1]Error
- C++ articles:Guru of the Week #3:使用標準庫 (轉)C++
- cURL error 52: Empty reply from server GitHub 三方登入報錯ErrorServerGithub
- 解決angular安裝 unable to access 'https:github...' Empty reply from serverAngularHTTPGithubServer