initial commit

This commit is contained in:
Thierry Schork
2022-12-30 12:10:12 +01:00
commit 7cf858256a
127 changed files with 12534 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
USE [msdb]
GO
/****** Object: Job [D00480 - ActivePos_read Snapshot] Script Date: 09.12.2022 16:30:47 ******/
EXEC msdb.dbo.sp_delete_job @job_name=N'D00480 - ActivePos_read Snapshot', @delete_unused_schedule=1
GO
/****** Object: Job [D00480 - ActivePos_read Snapshot] Script Date: 09.12.2022 16:30:48 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object: JobCategory [REPL-Snapshot] Script Date: 09.12.2022 16:30:48 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'REPL-Snapshot' AND category_class=1)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'REPL-Snapshot'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
END
DECLARE @jobId BINARY(16)
EXEC @ReturnCode = msdb.dbo.sp_add_job @job_name=N'D00480 - ActivePos_read Snapshot',
@enabled=1,
@notify_level_eventlog=0,
@notify_level_email=0,
@notify_level_netsend=0,
@notify_level_page=0,
@delete_level=0,
@description=N'No description available.',
@category_name=N'REPL-Snapshot',
@owner_login_name=N'sa', @job_id = @jobId OUTPUT
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Snapshot Agent startup message.] Script Date: 09.12.2022 16:30:48 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Snapshot Agent startup message.',
@step_id=1,
@cmdexec_success_code=0,
@on_success_action=3,
@on_success_step_id=0,
@on_fail_action=3,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'TSQL',
@command=N'DECLARE @agentIDAPH int
select @agentIDAPH = mssag.id from master.dbo.sysservers syssrv
join MSsnapshot_agents mssag on mssag.publisher_id = syssrv.srvid
where mssag.name = ''D00480 - ActivePos_read Snapshot''
exec sp_MSadd_snapshot_history @perfmon_increment = 0, @agent_id = @agentIDAPH, @runstatus = 1,
@comments = N''Starting agent.''
',
@server=N'SAMNB707VM02\APSSQL',
@database_name=N'master',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Run agent.] Script Date: 09.12.2022 16:30:48 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Run agent.',
@step_id=2,
@cmdexec_success_code=0,
@on_success_action=1,
@on_success_step_id=0,
@on_fail_action=3,
@on_fail_step_id=0,
@retry_attempts=2,
@retry_interval=60,
@os_run_priority=0, @subsystem=N'Snapshot',
@command=N'-Publisher [SAMNB707VM02\APSSQL] -PublisherDB [ActivePos_read] -Distributor [SAMNB707VM02\APSSQL] -Publication [ActivePosTran] -DistributorSecurityMode 1',
@server=N'SAMNB707VM02\APSSQL',
@database_name=N'distribution',
@flags=0,
@proxy_name=N'[REPL][aphsqlrepl][ActivePos_read]'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Detect nonlogged agent shutdown.] Script Date: 09.12.2022 16:30:48 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Detect nonlogged agent shutdown.',
@step_id=3,
@cmdexec_success_code=0,
@on_success_action=2,
@on_success_step_id=0,
@on_fail_action=2,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'TSQL',
@command=N'DECLARE @agentIDAPH int
select @agentIDAPH = mssag.id from master.dbo.sysservers syssrv
join MSsnapshot_agents mssag on mssag.publisher_id = syssrv.srvid
where mssag.name = ''D00480 - ActivePos_read Snapshot''
exec sp_MSdetect_nonlogged_shutdown @subsystem = ''Snapshot'', @agent_id = @agentIDAPH
',
@server=N'SAMNB707VM02\APSSQL',
@database_name=N'distribution',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'D00480 - Daily at 06h30',
@enabled=1,
@freq_type=4,
@freq_interval=1,
@freq_subday_type=1,
@freq_subday_interval=1,
@freq_relative_interval=1,
@freq_recurrence_factor=0,
@active_start_date=20200113,
@active_end_date=99991231,
@active_start_time=63000,
@active_end_time=235959,
@schedule_uid=N'5bd29613-25c6-4206-b632-aba4bb8a2f5c'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO

View File

@@ -0,0 +1,119 @@
USE [msdb]
GO
/****** Object: Job [DR00470 - ActivePos_read Log reader] Script Date: 09.12.2022 16:30:24 ******/
EXEC msdb.dbo.sp_delete_job @job_name=N'DR00470 - ActivePos_read Log reader', @delete_unused_schedule=1
GO
/****** Object: Job [DR00470 - ActivePos_read Log reader] Script Date: 09.12.2022 16:30:24 ******/
BEGIN TRANSACTION
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
/****** Object: JobCategory [REPL-LogReader] Script Date: 09.12.2022 16:30:24 ******/
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'REPL-LogReader' AND category_class=1)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'REPL-LogReader'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
END
DECLARE @jobId BINARY(16)
EXEC @ReturnCode = msdb.dbo.sp_add_job @job_name=N'DR00470 - ActivePos_read Log reader',
@enabled=1,
@notify_level_eventlog=0,
@notify_level_email=0,
@notify_level_netsend=0,
@notify_level_page=0,
@delete_level=0,
@description=N'No description available.',
@category_name=N'REPL-LogReader',
@owner_login_name=N'sa', @job_id = @jobId OUTPUT
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Log Reader Agent startup message.] Script Date: 09.12.2022 16:30:25 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Log Reader Agent startup message.',
@step_id=1,
@cmdexec_success_code=0,
@on_success_action=3,
@on_success_step_id=0,
@on_fail_action=3,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'TSQL',
@command=N'DECLARE @agentIDAPH int
select @agentIDAPH = mslrag.id from master.dbo.sysservers syssrv
join MSlogreader_agents mslrag on mslrag.publisher_id = syssrv.srvid
where mslrag.name = ''DR00470 - ActivePos_read Log reader''
exec sp_MSadd_logreader_history @perfmon_increment = 0, @agent_id = @agentIDAPH, @runstatus = 1,
@comments = N''Starting agent.''
',
@database_name=N'distribution',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Run agent.] Script Date: 09.12.2022 16:30:25 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Run agent.',
@step_id=2,
@cmdexec_success_code=0,
@on_success_action=1,
@on_success_step_id=0,
@on_fail_action=3,
@on_fail_step_id=0,
@retry_attempts=2147483647,
@retry_interval=1,
@os_run_priority=0, @subsystem=N'LogReader',
@command=N'-Publisher [SAMNB707VM02\APSSQL] -PublisherDB [ActivePos_read] -Distributor [SAMNB707VM02\APSSQL] -DistributorSecurityMode 1 -Continuous',
@server=N'SAMNB707VM02\APSSQL',
@database_name=N'distribution',
@flags=0,
@proxy_name=N'[REPL][aphsqlrepl][ActivePos_read]'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
/****** Object: Step [Detect nonlogged agent shutdown.] Script Date: 09.12.2022 16:30:25 ******/
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Detect nonlogged agent shutdown.',
@step_id=3,
@cmdexec_success_code=0,
@on_success_action=2,
@on_success_step_id=0,
@on_fail_action=2,
@on_fail_step_id=0,
@retry_attempts=0,
@retry_interval=0,
@os_run_priority=0, @subsystem=N'TSQL',
@command=N'DECLARE @agentIDAPH int
select @agentIDAPH = mslrag.id from master.dbo.sysservers syssrv
join MSlogreader_agents mslrag on mslrag.publisher_id = syssrv.srvid
where mslrag.name = ''DR00470 - ActivePos_read Log reader''
exec sp_MSdetect_nonlogged_shutdown @subsystem = ''LogReader'', @agent_id = @agentIDAPH
',
@database_name=N'distribution',
@flags=0
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'DR00470 - Starts automatically',
@enabled=1,
@freq_type=64,
@freq_interval=0,
@freq_subday_type=0,
@freq_subday_interval=0,
@freq_relative_interval=0,
@freq_recurrence_factor=0,
@active_start_date=20191206,
@active_end_date=99991231,
@active_start_time=0,
@active_end_time=235959,
@schedule_uid=N'f4fd19c5-67ae-4e36-8651-c63cbfde0135'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO

View File

@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# SQL Server Management Studio Solution File, Format Version 18.00
VisualStudioVersion = 15.0.28307.421
MinimumVisualStudioVersion = 10.0.40219.1
Project("{4F2E2C19-372F-40D8-9FA7-9D2138C6997A}") = "OCTPDBA-435 - SQL 2019 bug in Ceres Replication Maintenance tool", "OCTPDBA-435 - SQL 2019 bug in Ceres Replication Maintenance tool.ssmssqlproj", "{9371D1E3-CD2F-46E7-A742-842C8E2E61A9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2DF34B1E-99D6-4A3D-A4D6-A36E61E51C8C}"
ProjectSection(SolutionItems) = preProject
..\..\repos\tfs_DBA.Tools\Main\Scripts\DBAScripts\Bin\CeresReplMaint\FULL_reinit\30_PHARMACY_CREATE_CeresPublication.sql = ..\..\repos\tfs_DBA.Tools\Main\Scripts\DBAScripts\Bin\CeresReplMaint\FULL_reinit\30_PHARMACY_CREATE_CeresPublication.sql
create apos subscription and articles.sql = create apos subscription and articles.sql
D00480 - ActivePos_read Snapshot.sql = D00480 - ActivePos_read Snapshot.sql
DR00470 - ActivePos_read Log reader.sql = DR00470 - ActivePos_read Log reader.sql
drop apos replication.sql = drop apos replication.sql
drop apos subscription and articles.sql = drop apos subscription and articles.sql
ms procs.sql = ms procs.sql
recreate lnk server wam707a02.sql = recreate lnk server wam707a02.sql
update MSdistribution_agents.sql = update MSdistribution_agents.sql
whole query run from powershell.sql = whole query run from powershell.sql
wrong server returned.sql = wrong server returned.sql
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Default|Default = Default|Default
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9371D1E3-CD2F-46E7-A742-842C8E2E61A9}.Default|Default.ActiveCfg = Default
{B27A542F-B116-4BF0-B64A-8A2BE044023F}.Default|Default.ActiveCfg = Default
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D3B87D57-0E93-498E-8EEC-FABF6F0B0542}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<SqlWorkbenchSqlProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="OCTPDBA-435 - SQL 2019 bug in Ceres Replication Maintenance tool">
<Items>
<LogicalFolder Name="Connections" Type="2" Sorted="true">
<Items>
<ConnectionNode Name="ama704aps.amavita.ch\apssql:CENTRALINFRA\ua208700">
<Created>2022-12-09T10:38:31.6246823+01:00</Created>
<Type>SQL</Type>
<Server>ama704aps.amavita.ch\apssql</Server>
<UserName />
<Authentication>Windows Authentication</Authentication>
<InitialDB />
<LoginTimeout>30</LoginTimeout>
<ExecutionTimeout>0</ExecutionTimeout>
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
<ApplicationName />
</ConnectionNode>
<ConnectionNode Name="ama707aps.amavita.ch\apssql:CENTRALINFRA\ua208700">
<Created>2022-12-09T10:38:41.2798735+01:00</Created>
<Type>SQL</Type>
<Server>ama707aps.amavita.ch\apssql</Server>
<UserName />
<Authentication>Windows Authentication</Authentication>
<InitialDB />
<LoginTimeout>30</LoginTimeout>
<ExecutionTimeout>0</ExecutionTimeout>
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
<ApplicationName />
</ConnectionNode>
</Items>
</LogicalFolder>
<LogicalFolder Name="Queries" Type="0" Sorted="true">
<Items />
</LogicalFolder>
<LogicalFolder Name="Miscellaneous" Type="3" Sorted="true">
<Items />
</LogicalFolder>
</Items>
</SqlWorkbenchSqlProject>

View File

@@ -0,0 +1,387 @@
-- Enabling the replication database
use master
exec sp_replicationdboption @dbname = N'ActivePos_read', @optname = N'publish', @value = N'true'
GO
exec [ActivePos_read].sys.sp_addlogreader_agent @job_login = N'CENTRALINFRA\svc-APH-repl', @job_password = 'TWdZItCqjU!uLgws', @publisher_security_mode = 1
GO
-- Adding the transactional publication
use [ActivePos_read]
exec sp_addpublication @publication = N'ActivePosTran', @description = N'Transactional publication of database ''ActivePos_Read''', @sync_method = N'concurrent', @retention = 120, @allow_push = N'true', @allow_pull = N'false', @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'continuous', @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, @allow_initialize_from_backup = N'true', @enabled_for_p2p = N'false', @enabled_for_het_sub = N'false'
GO
exec sp_addpublication_snapshot @publication = N'ActivePosTran', @frequency_type = 4, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 1, @frequency_subday_interval = 1, @active_start_time_of_day = 63000, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N'CENTRALINFRA\svc-APH-repl', @job_password = 'TWdZItCqjU!uLgws', @publisher_security_mode = 1
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'sa'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'NT AUTHORITY\SYSTEM'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'AMAVITA\L-AM-AP-SQL-AMA-Pharmacy_Servers_Database_Administrator'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'AMAVITA\hcisqlrepl'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'AMAVITA\L-AM-AP-SQL-AMA-Pharmacy_Servers_Windows_Operations'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'CENTRALINFRA\svc-APH-repl'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'CENTRALINFRA\L-CI-AP-SQL-AMA-Pharmacy_Servers_Windows_Operations'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'CENTRALINFRA\L-CI-AP-SQL-AMA-Pharmacy_Servers_Database_Administrator'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'CENTRALINFRA\svc-GAIA-repl'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'CENTRALPHARMA\G-CP-RL-ORG-GX_IT_IS_WindowsEngineeringServicesI'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'NT SERVICE\SQLAgent$APSSQL'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'NT SERVICE\Winmgmt'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'NT SERVICE\SQLWriter'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'NT SERVICE\MSSQL$APSSQL'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'ittech'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'sqlAppAPHAdm'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'cslt'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'distributor_admin'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'dba'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'sup'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'sqlAppMonitoringviewerUsr'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'sqlLksrvTMPUsr'
GO
exec sp_grant_publication_access @publication = N'ActivePosTran', @login = N'dev'
GO
-- Adding the transactional articles
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Brand', @source_owner = N'dbo', @source_object = N'Brand', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Brand', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboBrand]', @del_cmd = N'CALL [sp_MSdel_dboBrand]', @upd_cmd = N'SCALL [sp_MSupd_dboBrand]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'BrevierText', @source_owner = N'dbo', @source_object = N'BrevierText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'BrevierText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboBrevierText]', @del_cmd = N'CALL [sp_MSdel_dboBrevierText]', @upd_cmd = N'SCALL [sp_MSupd_dboBrevierText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ClinicalCheck', @source_owner = N'dbo', @source_object = N'ClinicalCheck', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ClinicalCheck', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboClinicalCheck]', @del_cmd = N'CALL [sp_MSdel_dboClinicalCheck]', @upd_cmd = N'SCALL [sp_MSupd_dboClinicalCheck]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ClinicalCheckToPatient', @source_owner = N'dbo', @source_object = N'ClinicalCheckToPatient', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ClinicalCheckToPatient', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboClinicalCheckToPatient]', @del_cmd = N'CALL [sp_MSdel_dboClinicalCheckToPatient]', @upd_cmd = N'SCALL [sp_MSupd_dboClinicalCheckToPatient]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ClinicalCheckType', @source_owner = N'dbo', @source_object = N'ClinicalCheckType', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ClinicalCheckType', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboClinicalCheckType]', @del_cmd = N'CALL [sp_MSdel_dboClinicalCheckType]', @upd_cmd = N'SCALL [sp_MSupd_dboClinicalCheckType]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'CommonVar', @source_owner = N'dbo', @source_object = N'CommonVar', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'CommonVar', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboCommonVar]', @del_cmd = N'CALL [sp_MSdel_dboCommonVar]', @upd_cmd = N'SCALL [sp_MSupd_dboCommonVar]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Criteria', @source_owner = N'dbo', @source_object = N'Criteria', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Criteria', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboCriteria]', @del_cmd = N'CALL [sp_MSdel_dboCriteria]', @upd_cmd = N'SCALL [sp_MSupd_dboCriteria]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'CustomerCard', @source_owner = N'dbo', @source_object = N'CustomerCard', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'CustomerCard', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboCustomerCard]', @del_cmd = N'CALL [sp_MSdel_dboCustomerCard]', @upd_cmd = N'SCALL [sp_MSupd_dboCustomerCard]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'CustomerReminder', @source_owner = N'dbo', @source_object = N'CustomerReminder', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'CustomerReminder', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboCustomerReminder]', @del_cmd = N'CALL [sp_MSdel_dboCustomerReminder]', @upd_cmd = N'SCALL [sp_MSupd_dboCustomerReminder]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DatabaseHistory', @source_owner = N'upd', @source_object = N'DatabaseHistory', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'DatabaseHistory', @destination_owner = N'upd', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_updDatabaseHistory]', @del_cmd = N'CALL [sp_MSdel_updDatabaseHistory]', @upd_cmd = N'SCALL [sp_MSupd_updDatabaseHistory]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucher', @source_owner = N'dbo', @source_object = N'DiscountVoucher', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucher', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucher]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucher]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucher]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinition', @source_owner = N'dbo', @source_object = N'DiscountVoucherActionDefinition', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherActionDefinition', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherActionDefinition]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherActionDefinition]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherActionDefinition]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinitionSpecificTargetItem', @source_owner = N'dbo', @source_object = N'DiscountVoucherActionDefinitionSpecificTargetItem', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherActionDefinitionSpecificTargetItem', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherActionDefinitionSpecificTargetItem]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherActionDefinitionSpecificTargetItem]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherActionDefinitionSpecificTargetItem]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCondition', @source_owner = N'dbo', @source_object = N'DiscountVoucherCondition', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherCondition', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherCondition]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherCondition]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherCondition]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinition', @source_owner = N'dbo', @source_object = N'DiscountVoucherCouponActionDefinition', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherCouponActionDefinition', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherCouponActionDefinition]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherCouponActionDefinition]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherCouponActionDefinition]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionPrinting', @source_owner = N'dbo', @source_object = N'DiscountVoucherCouponActionDefinitionPrinting', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherCouponActionDefinitionPrinting', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherCouponActionDefinitionPrinting]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherCouponActionDefinitionPrinting]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherCouponActionDefinitionPrinting]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionText', @source_owner = N'dbo', @source_object = N'DiscountVoucherCouponActionDefinitionText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherCouponActionDefinitionText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherCouponActionDefinitionText]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherCouponActionDefinitionText]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherCouponActionDefinitionText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherPackageElement', @source_owner = N'dbo', @source_object = N'DiscountVoucherPackageElement', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherPackageElement', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherPackageElement]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherPackageElement]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherPackageElement]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'DiscountVoucherText', @source_owner = N'dbo', @source_object = N'DiscountVoucherText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'DiscountVoucherText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboDiscountVoucherText]', @del_cmd = N'CALL [sp_MSdel_dboDiscountVoucherText]', @upd_cmd = N'SCALL [sp_MSupd_dboDiscountVoucherText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIBill_Pharmacists_Header', @source_owner = N'dbo', @source_object = N'IIIBill_Pharmacists_Header', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIBill_Pharmacists_Header', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIBill_Pharmacists_Header]', @del_cmd = N'CALL [sp_MSdel_dboIIIBill_Pharmacists_Header]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIBill_Pharmacists_Header]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICommon_Bank_PTT_Master', @source_owner = N'dbo', @source_object = N'IIICommon_Bank_PTT_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICommon_Bank_PTT_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICommon_Bank_PTT_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIICommon_Bank_PTT_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICommon_Bank_PTT_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICommunicationItem', @source_owner = N'dbo', @source_object = N'IIICommunicationItem', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICommunicationItem', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICommunicationItem]', @del_cmd = N'CALL [sp_MSdel_dboIIICommunicationItem]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICommunicationItem]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICountry_Master', @source_owner = N'dbo', @source_object = N'IIICountry_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICountry_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICountry_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIICountry_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICountry_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICoverage_Documents', @source_owner = N'dbo', @source_object = N'IIICoverage_Documents', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICoverage_Documents', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICoverage_Documents]', @del_cmd = N'CALL [sp_MSdel_dboIIICoverage_Documents]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICoverage_Documents]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICurrency_Master', @source_owner = N'dbo', @source_object = N'IIICurrency_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICurrency_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICurrency_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIICurrency_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICurrency_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICustomer', @source_owner = N'dbo', @source_object = N'IIICustomer', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICustomer', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICustomer]', @del_cmd = N'CALL [sp_MSdel_dboIIICustomer]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICustomer]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICustomerCategory', @source_owner = N'dbo', @source_object = N'IIICustomerCategory', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICustomerCategory', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICustomerCategory]', @del_cmd = N'CALL [sp_MSdel_dboIIICustomerCategory]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICustomerCategory]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICustomerGroup', @source_owner = N'dbo', @source_object = N'IIICustomerGroup', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIICustomerGroup', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICustomerGroup]', @del_cmd = N'CALL [sp_MSdel_dboIIICustomerGroup]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICustomerGroup]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIICustomerToPerson', @source_owner = N'dbo', @source_object = N'IIICustomerToPerson', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'IIICustomerToPerson', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIICustomerToPerson]', @del_cmd = N'CALL [sp_MSdel_dboIIICustomerToPerson]', @upd_cmd = N'SCALL [sp_MSupd_dboIIICustomerToPerson]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIDelivery_Note_Header', @source_owner = N'dbo', @source_object = N'IIIDelivery_Note_Header', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIDelivery_Note_Header', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIDelivery_Note_Header]', @del_cmd = N'CALL [sp_MSdel_dboIIIDelivery_Note_Header]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIDelivery_Note_Header]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIDiscountOperation', @source_owner = N'dbo', @source_object = N'IIIDiscountOperation', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIDiscountOperation', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIDiscountOperation]', @del_cmd = N'CALL [sp_MSdel_dboIIIDiscountOperation]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIDiscountOperation]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIDiscountSchemaDetail', @source_owner = N'dbo', @source_object = N'IIIDiscountSchemaDetail', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIDiscountSchemaDetail', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIDiscountSchemaDetail]', @del_cmd = N'CALL [sp_MSdel_dboIIIDiscountSchemaDetail]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIDiscountSchemaDetail]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIExchange_rate', @source_owner = N'dbo', @source_object = N'IIIExchange_rate', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIExchange_rate', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIExchange_rate]', @del_cmd = N'CALL [sp_MSdel_dboIIIExchange_rate]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIExchange_rate]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIGaldatCode11', @source_owner = N'dbo', @source_object = N'IIIGaldatCode11', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIGaldatCode11', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIGaldatCode11]', @del_cmd = N'CALL [sp_MSdel_dboIIIGaldatCode11]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIGaldatCode11]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsurance_Master', @source_owner = N'dbo', @source_object = N'IIIInsurance_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsurance_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsurance_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsurance_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsurance_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsuranceAgreement', @source_owner = N'dbo', @source_object = N'IIIInsuranceAgreement', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsuranceAgreement', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsuranceAgreement]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsuranceAgreement]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsuranceAgreement]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsuranceCodeException', @source_owner = N'dbo', @source_object = N'IIIInsuranceCodeException', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsuranceCodeException', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsuranceCodeException]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsuranceCodeException]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsuranceCodeException]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsuranceGroup', @source_owner = N'dbo', @source_object = N'IIIInsuranceGroup', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsuranceGroup', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsuranceGroup]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsuranceGroup]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsuranceGroup]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsuranceGroupLink', @source_owner = N'dbo', @source_object = N'IIIInsuranceGroupLink', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsuranceGroupLink', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsuranceGroupLink]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsuranceGroupLink]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsuranceGroupLink]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIInsuranceTaxLink', @source_owner = N'dbo', @source_object = N'IIIInsuranceTaxLink', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIInsuranceTaxLink', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIInsuranceTaxLink]', @del_cmd = N'CALL [sp_MSdel_dboIIIInsuranceTaxLink]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIInsuranceTaxLink]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIItemCommercialRule', @source_owner = N'dbo', @source_object = N'IIIItemCommercialRule', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIItemCommercialRule', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIItemCommercialRule]', @del_cmd = N'CALL [sp_MSdel_dboIIIItemCommercialRule]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIItemCommercialRule]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIItemLink', @source_owner = N'dbo', @source_object = N'IIIItemLink', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIItemLink', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIItemLink]', @del_cmd = N'CALL [sp_MSdel_dboIIIItemLink]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIItemLink]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIItemRelation', @source_owner = N'dbo', @source_object = N'IIIItemRelation', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIItemRelation', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIItemRelation]', @del_cmd = N'CALL [sp_MSdel_dboIIIItemRelation]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIItemRelation]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIManufacturer', @source_owner = N'dbo', @source_object = N'IIIManufacturer', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIManufacturer', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIManufacturer]', @del_cmd = N'CALL [sp_MSdel_dboIIIManufacturer]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIManufacturer]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIINetwork_Registration_Detail', @source_owner = N'dbo', @source_object = N'IIINetwork_Registration_Detail', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIINetwork_Registration_Detail', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIINetwork_Registration_Detail]', @del_cmd = N'CALL [sp_MSdel_dboIIINetwork_Registration_Detail]', @upd_cmd = N'SCALL [sp_MSupd_dboIIINetwork_Registration_Detail]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIINetworkDiscount', @source_owner = N'dbo', @source_object = N'IIINetworkDiscount', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIINetworkDiscount', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIINetworkDiscount]', @del_cmd = N'CALL [sp_MSdel_dboIIINetworkDiscount]', @upd_cmd = N'SCALL [sp_MSupd_dboIIINetworkDiscount]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPartner_Item_Details', @source_owner = N'dbo', @source_object = N'IIIPartner_Item_Details', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPartner_Item_Details', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPartner_Item_Details]', @del_cmd = N'CALL [sp_MSdel_dboIIIPartner_Item_Details]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPartner_Item_Details]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPartner_Stock_Details', @source_owner = N'dbo', @source_object = N'IIIPartner_Stock_Details', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPartner_Stock_Details', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPartner_Stock_Details]', @del_cmd = N'CALL [sp_MSdel_dboIIIPartner_Stock_Details]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPartner_Stock_Details]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPatient_Insurance', @source_owner = N'dbo', @source_object = N'IIIPatient_Insurance', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPatient_Insurance', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPatient_Insurance]', @del_cmd = N'CALL [sp_MSdel_dboIIIPatient_Insurance]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPatient_Insurance]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPayment', @source_owner = N'dbo', @source_object = N'IIIPayment', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'IIIPayment', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPayment]', @del_cmd = N'CALL [sp_MSdel_dboIIIPayment]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPayment]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPerson', @source_owner = N'dbo', @source_object = N'IIIPerson', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPerson', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPerson]', @del_cmd = N'CALL [sp_MSdel_dboIIIPerson]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPerson]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPerson_Title', @source_owner = N'dbo', @source_object = N'IIIPerson_Title', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPerson_Title', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPerson_Title]', @del_cmd = N'CALL [sp_MSdel_dboIIIPerson_Title]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPerson_Title]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPharmaceutical_Master', @source_owner = N'dbo', @source_object = N'IIIPharmaceutical_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPharmaceutical_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPharmaceutical_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIIPharmaceutical_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPharmaceutical_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPharmacy', @source_owner = N'dbo', @source_object = N'IIIPharmacy', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPharmacy', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPharmacy]', @del_cmd = N'CALL [sp_MSdel_dboIIIPharmacy]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPharmacy]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPhysician', @source_owner = N'dbo', @source_object = N'IIIPhysician', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPhysician', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPhysician]', @del_cmd = N'CALL [sp_MSdel_dboIIIPhysician]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPhysician]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPrescription_hdr', @source_owner = N'dbo', @source_object = N'IIIPrescription_hdr', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPrescription_hdr', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPrescription_hdr]', @del_cmd = N'CALL [sp_MSdel_dboIIIPrescription_hdr]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPrescription_hdr]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPrice', @source_owner = N'dbo', @source_object = N'IIIPrice', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPrice', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPrice]', @del_cmd = N'CALL [sp_MSdel_dboIIIPrice]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPrice]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPriceCode', @source_owner = N'dbo', @source_object = N'IIIPriceCode', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPriceCode', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPriceCode]', @del_cmd = N'CALL [sp_MSdel_dboIIIPriceCode]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPriceCode]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIPriceModifier', @source_owner = N'dbo', @source_object = N'IIIPriceModifier', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIPriceModifier', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIPriceModifier]', @del_cmd = N'CALL [sp_MSdel_dboIIIPriceModifier]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIPriceModifier]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIProduct_Form', @source_owner = N'dbo', @source_object = N'IIIProduct_Form', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIProduct_Form', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIProduct_Form]', @del_cmd = N'CALL [sp_MSdel_dboIIIProduct_Form]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIProduct_Form]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIRayon_Code_Master', @source_owner = N'dbo', @source_object = N'IIIRayon_Code_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIRayon_Code_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIRayon_Code_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIIRayon_Code_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIRayon_Code_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIRefundException', @source_owner = N'dbo', @source_object = N'IIIRefundException', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIRefundException', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIRefundException]', @del_cmd = N'CALL [sp_MSdel_dboIIIRefundException]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIRefundException]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIRepetition_Info', @source_owner = N'dbo', @source_object = N'IIIRepetition_Info', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIRepetition_Info', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIRepetition_Info]', @del_cmd = N'CALL [sp_MSdel_dboIIIRepetition_Info]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIRepetition_Info]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail', @source_owner = N'dbo', @source_object = N'IIISales_Order_Detail', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISales_Order_Detail', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISales_Order_Detail]', @del_cmd = N'CALL [sp_MSdel_dboIIISales_Order_Detail]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISales_Order_Detail]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail_Additional_Info', @source_owner = N'dbo', @source_object = N'IIISales_Order_Detail_Additional_Info', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISales_Order_Detail_Additional_Info', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISales_Order_Detail_Additional_Info]', @del_cmd = N'CALL [sp_MSdel_dboIIISales_Order_Detail_Additional_Info]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISales_Order_Detail_Additional_Info]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Header', @source_owner = N'dbo', @source_object = N'IIISales_Order_Header', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISales_Order_Header', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISales_Order_Header]', @del_cmd = N'CALL [sp_MSdel_dboIIISales_Order_Header]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISales_Order_Header]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIService_Master', @source_owner = N'dbo', @source_object = N'IIIService_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIService_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIService_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIIService_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIService_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISmall_Expense_Master', @source_owner = N'dbo', @source_object = N'IIISmall_Expense_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISmall_Expense_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISmall_Expense_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIISmall_Expense_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISmall_Expense_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchema', @source_owner = N'dbo', @source_object = N'IIISpecialDiscountSchema', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISpecialDiscountSchema', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISpecialDiscountSchema]', @del_cmd = N'CALL [sp_MSdel_dboIIISpecialDiscountSchema]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISpecialDiscountSchema]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail', @source_owner = N'dbo', @source_object = N'IIISpecialDiscountSchemaDetail', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISpecialDiscountSchemaDetail', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISpecialDiscountSchemaDetail]', @del_cmd = N'CALL [sp_MSdel_dboIIISpecialDiscountSchemaDetail]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISpecialDiscountSchemaDetail]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail_old_prod_2', @source_owner = N'dbo', @source_object = N'IIISpecialDiscountSchemaDetail_old_prod_2', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIISpecialDiscountSchemaDetail_old_prod_2', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIISpecialDiscountSchemaDetail_old_prod_2]', @del_cmd = N'CALL [sp_MSdel_dboIIISpecialDiscountSchemaDetail_old_prod_2]', @upd_cmd = N'SCALL [sp_MSupd_dboIIISpecialDiscountSchemaDetail_old_prod_2]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIStorage_Area', @source_owner = N'dbo', @source_object = N'IIIStorage_Area', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIStorage_Area', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIStorage_Area]', @del_cmd = N'CALL [sp_MSdel_dboIIIStorage_Area]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIStorage_Area]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIITax', @source_owner = N'dbo', @source_object = N'IIITax', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIITax', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIITax]', @del_cmd = N'CALL [sp_MSdel_dboIIITax]', @upd_cmd = N'SCALL [sp_MSupd_dboIIITax]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIUserDetails', @source_owner = N'dbo', @source_object = N'IIIUserDetails', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIUserDetails', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIUserDetails]', @del_cmd = N'CALL [sp_MSdel_dboIIIUserDetails]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIUserDetails]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIVat_Code_Master', @source_owner = N'dbo', @source_object = N'IIIVat_Code_Master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIVat_Code_Master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIVat_Code_Master]', @del_cmd = N'CALL [sp_MSdel_dboIIIVat_Code_Master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIVat_Code_Master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'IIIZip_master', @source_owner = N'dbo', @source_object = N'IIIZip_master', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'IIIZip_master', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboIIIZip_master]', @del_cmd = N'CALL [sp_MSdel_dboIIIZip_master]', @upd_cmd = N'SCALL [sp_MSupd_dboIIIZip_master]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'InsuranceNetwork', @source_owner = N'dbo', @source_object = N'InsuranceNetwork', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'InsuranceNetwork', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboInsuranceNetwork]', @del_cmd = N'CALL [sp_MSdel_dboInsuranceNetwork]', @upd_cmd = N'SCALL [sp_MSupd_dboInsuranceNetwork]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Interaction', @source_owner = N'dbo', @source_object = N'Interaction', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Interaction', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboInteraction]', @del_cmd = N'CALL [sp_MSdel_dboInteraction]', @upd_cmd = N'SCALL [sp_MSupd_dboInteraction]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemComposition', @source_owner = N'dbo', @source_object = N'ItemComposition', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemComposition', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemComposition]', @del_cmd = N'CALL [sp_MSdel_dboItemComposition]', @upd_cmd = N'SCALL [sp_MSupd_dboItemComposition]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemInteraction', @source_owner = N'dbo', @source_object = N'ItemInteraction', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemInteraction', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemInteraction]', @del_cmd = N'CALL [sp_MSdel_dboItemInteraction]', @upd_cmd = N'SCALL [sp_MSupd_dboItemInteraction]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemLimitation', @source_owner = N'dbo', @source_object = N'ItemLimitation', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemLimitation', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemLimitation]', @del_cmd = N'CALL [sp_MSdel_dboItemLimitation]', @upd_cmd = N'SCALL [sp_MSupd_dboItemLimitation]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemLocation', @source_owner = N'dbo', @source_object = N'ItemLocation', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemLocation', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemLocation]', @del_cmd = N'CALL [sp_MSdel_dboItemLocation]', @upd_cmd = N'SCALL [sp_MSupd_dboItemLocation]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemRegulationInfo', @source_owner = N'dbo', @source_object = N'ItemRegulationInfo', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemRegulationInfo', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemRegulationInfo]', @del_cmd = N'CALL [sp_MSdel_dboItemRegulationInfo]', @upd_cmd = N'SCALL [sp_MSupd_dboItemRegulationInfo]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemSearch', @source_owner = N'dbo', @source_object = N'ItemSearch', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemSearch', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemSearch]', @del_cmd = N'CALL [sp_MSdel_dboItemSearch]', @upd_cmd = N'SCALL [sp_MSupd_dboItemSearch]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemSite', @source_owner = N'dbo', @source_object = N'ItemSite', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemSite', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemSite]', @del_cmd = N'CALL [sp_MSdel_dboItemSite]', @upd_cmd = N'SCALL [sp_MSupd_dboItemSite]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'ItemText', @source_owner = N'dbo', @source_object = N'ItemText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'ItemText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboItemText]', @del_cmd = N'CALL [sp_MSdel_dboItemText]', @upd_cmd = N'SCALL [sp_MSupd_dboItemText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'MigrationScriptHistory', @source_owner = N'upd', @source_object = N'MigrationScriptHistory', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'MigrationScriptHistory', @destination_owner = N'upd', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_updMigrationScriptHistory]', @del_cmd = N'CALL [sp_MSdel_updMigrationScriptHistory]', @upd_cmd = N'SCALL [sp_MSupd_updMigrationScriptHistory]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'NumeraryValue', @source_owner = N'dbo', @source_object = N'NumeraryValue', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'NumeraryValue', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboNumeraryValue]', @del_cmd = N'CALL [sp_MSdel_dboNumeraryValue]', @upd_cmd = N'SCALL [sp_MSupd_dboNumeraryValue]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Operation', @source_owner = N'dbo', @source_object = N'Operation', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Operation', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboOperation]', @del_cmd = N'CALL [sp_MSdel_dboOperation]', @upd_cmd = N'SCALL [sp_MSupd_dboOperation]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'OperationRole', @source_owner = N'dbo', @source_object = N'OperationRole', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'OperationRole', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboOperationRole]', @del_cmd = N'CALL [sp_MSdel_dboOperationRole]', @upd_cmd = N'SCALL [sp_MSupd_dboOperationRole]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'OuManager', @source_owner = N'dbo', @source_object = N'OuManager', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'OuManager', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboOuManager]', @del_cmd = N'CALL [sp_MSdel_dboOuManager]', @upd_cmd = N'SCALL [sp_MSupd_dboOuManager]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'PatientQuickInfo', @source_owner = N'dbo', @source_object = N'PatientQuickInfo', @type = N'view schema only', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001, @destination_table = N'PatientQuickInfo', @destination_owner = N'dbo', @status = 16
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'PharmacyItemLink', @source_owner = N'dbo', @source_object = N'PharmacyItemLink', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'PharmacyItemLink', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboPharmacyItemLink]', @del_cmd = N'CALL [sp_MSdel_dboPharmacyItemLink]', @upd_cmd = N'SCALL [sp_MSupd_dboPharmacyItemLink]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'PointOfSale', @source_owner = N'dbo', @source_object = N'PointOfSale', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'PointOfSale', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboPointOfSale]', @del_cmd = N'CALL [sp_MSdel_dboPointOfSale]', @upd_cmd = N'SCALL [sp_MSupd_dboPointOfSale]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Posology', @source_owner = N'dbo', @source_object = N'Posology', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Posology', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboPosology]', @del_cmd = N'CALL [sp_MSdel_dboPosology]', @upd_cmd = N'SCALL [sp_MSupd_dboPosology]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'PrescriberRole', @source_owner = N'dbo', @source_object = N'PrescriberRole', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'PrescriberRole', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboPrescriberRole]', @del_cmd = N'CALL [sp_MSdel_dboPrescriberRole]', @upd_cmd = N'SCALL [sp_MSupd_dboPrescriberRole]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'QrCodes', @source_owner = N'dbo', @source_object = N'QrCodes', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'QrCodes', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboQrCodes]', @del_cmd = N'CALL [sp_MSdel_dboQrCodes]', @upd_cmd = N'SCALL [sp_MSupd_dboQrCodes]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Report', @source_owner = N'dbo', @source_object = N'Report', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Report', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboReport]', @del_cmd = N'CALL [sp_MSdel_dboReport]', @upd_cmd = N'SCALL [sp_MSupd_dboReport]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Role', @source_owner = N'dbo', @source_object = N'Role', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Role', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboRole]', @del_cmd = N'CALL [sp_MSdel_dboRole]', @upd_cmd = N'SCALL [sp_MSupd_dboRole]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'RunOnceScriptHistory', @source_owner = N'upd', @source_object = N'RunOnceScriptHistory', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'RunOnceScriptHistory', @destination_owner = N'upd', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_updRunOnceScriptHistory]', @del_cmd = N'CALL [sp_MSdel_updRunOnceScriptHistory]', @upd_cmd = N'SCALL [sp_MSupd_updRunOnceScriptHistory]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'StandardText', @source_owner = N'dbo', @source_object = N'StandardText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'StandardText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboStandardText]', @del_cmd = N'CALL [sp_MSdel_dboStandardText]', @upd_cmd = N'SCALL [sp_MSupd_dboStandardText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'StandardTextText', @source_owner = N'dbo', @source_object = N'StandardTextText', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'StandardTextText', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboStandardTextText]', @del_cmd = N'CALL [sp_MSdel_dboStandardTextText]', @upd_cmd = N'SCALL [sp_MSupd_dboStandardTextText]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'Substance', @source_owner = N'dbo', @source_object = N'Substance', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'Substance', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboSubstance]', @del_cmd = N'CALL [sp_MSdel_dboSubstance]', @upd_cmd = N'SCALL [sp_MSupd_dboSubstance]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'UserRole', @source_owner = N'dbo', @source_object = N'UserRole', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'UserRole', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboUserRole]', @del_cmd = N'CALL [sp_MSdel_dboUserRole]', @upd_cmd = N'SCALL [sp_MSupd_dboUserRole]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'VestaVersion', @source_owner = N'vesta', @source_object = N'VestaVersion', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'manual', @destination_table = N'VestaVersion', @destination_owner = N'vesta', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_vestaVestaVersion]', @del_cmd = N'CALL [sp_MSdel_vestaVestaVersion]', @upd_cmd = N'SCALL [sp_MSupd_vestaVestaVersion]'
GO
use [ActivePos_read]
exec sp_addarticle @publication = N'ActivePosTran', @article = N'WebService', @source_owner = N'dbo', @source_object = N'WebService', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'drop', @schema_option = 0x00000000080351FF, @identityrangemanagementoption = N'none', @destination_table = N'WebService', @destination_owner = N'dbo', @status = 24, @vertical_partition = N'false', @ins_cmd = N'CALL [sp_MSins_dboWebService]', @del_cmd = N'CALL [sp_MSdel_dboWebService]', @upd_cmd = N'SCALL [sp_MSupd_dboWebService]'
GO
-- Adding the transactional subscriptions
use [ActivePos_read]
exec sp_addsubscription @publication = N'ActivePosTran', @subscriber = N'WAM707A02', @destination_db = N'ActivePos_read', @subscription_type = N'Push', @sync_type = N'replication support only', @article = N'all', @update_mode = N'read only', @subscriber_type = 0
exec sp_addpushsubscription_agent @publication = N'ActivePosTran', @subscriber = N'WAM707A02', @subscriber_db = N'ActivePos_read', @job_login = null, @job_password = null, @subscriber_security_mode = 0, @subscriber_login = N'sqlAppAPHPosUsr', @subscriber_password = 'albKEDO!x$s4HbE%%IXq', @frequency_type = 64, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 4, @frequency_subday_interval = 5, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @dts_package_location = N'Distributor'
GO

View File

@@ -0,0 +1,66 @@
/*=============================================================================
re-create replication
Parameters
----------------------
Context
----------------------
ama707 (sql 2019)
Creation : 09.12.2022 / TSC
Modifications:
=============================================================================*/ BEGIN TRANSACTION
USE [master]
GO
BEGIN TRANSACTION
--#region drop replication subscription
EXEC [ActivePos_read].[dbo].[sp_dropsubscription] @publication = N'ActivePosTran', @article = N'all', @subscriber ='all'
EXEC [ActivePos_read].[dbo].[sp_droppublication] @publication = N'ActivePosTran'
--#endregion
--#region drop linked server
EXEC master.dbo.sp_dropserver @server=N'wam707a02', @droplogins='droplogins'
--#endregion
SELECT *
FROM sys.[servers] [s]
--#region restart ActivePosClientService'
EXEC xp_cmdshell 'net stop ActivePosClientService '
EXEC xp_cmdshell 'net start ActivePosClientService '
--#endregion
--#region start job "backup"
EXEC msdb.dbo.sp_start_job
@job_name = 'D91030 - Backup ActivePos_Read'
,@step_name = 'Purge old ActivePos_Read backups'
;
--#endregion
--#region repair replication
EXEC ActiveSystemServer.dbo.RepairReplication
--#endregion
SELECT *
FROM sys.[servers] [s]
EXEC [ActivePos_server].dbo.[ExecuteOnAllPos]
@query = 'select 1' -- varchar(max)
,@nonQuery = 1 -- bit
,@timeout = 60 -- int
ROLLBACK TRANSACTION
/*
NET
[ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
STATISTICS | STOP | TIME | USE | USER | VIEW ]
*/

View File

@@ -0,0 +1,648 @@
-- Dropping the transactional subscriptions
USE [ActivePos_read]
EXEC sp_dropsubscription @publication = N'ActivePosTran', @subscriber = N'WAM707A02', @destination_db = N'ActivePos_read', @article = N'all'
GO
-- Dropping the transactional articles
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Brand', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Brand', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'BrevierText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'BrevierText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ClinicalCheck', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ClinicalCheck', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ClinicalCheckToPatient', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ClinicalCheckToPatient', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ClinicalCheckType', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ClinicalCheckType', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'CommonVar', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'CommonVar', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Criteria', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Criteria', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'CustomerCard', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'CustomerCard', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'CustomerReminder', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'CustomerReminder', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DatabaseHistory', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DatabaseHistory', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucher', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucher', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinition', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinition', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinitionSpecificTargetItem', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherActionDefinitionSpecificTargetItem', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherCondition', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCondition', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinition', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinition', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionPrinting', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionPrinting', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherCouponActionDefinitionText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherPackageElement', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherPackageElement', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'DiscountVoucherText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'DiscountVoucherText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIBill_Pharmacists_Header', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIBill_Pharmacists_Header', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICommon_Bank_PTT_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICommon_Bank_PTT_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICommunicationItem', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICommunicationItem', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICountry_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICountry_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICoverage_Documents', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICoverage_Documents', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICurrency_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICurrency_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICustomer', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICustomer', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICustomerCategory', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICustomerCategory', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICustomerGroup', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICustomerGroup', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIICustomerToPerson', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIICustomerToPerson', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIDelivery_Note_Header', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIDelivery_Note_Header', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIDiscountOperation', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIDiscountOperation', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIDiscountSchemaDetail', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIDiscountSchemaDetail', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIExchange_rate', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIExchange_rate', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIGaldatCode11', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIGaldatCode11', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsurance_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsurance_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsuranceAgreement', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsuranceAgreement', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsuranceCodeException', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsuranceCodeException', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsuranceGroup', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsuranceGroup', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsuranceGroupLink', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsuranceGroupLink', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIInsuranceTaxLink', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIInsuranceTaxLink', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIItemCommercialRule', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIItemCommercialRule', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIItemLink', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIItemLink', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIItemRelation', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIItemRelation', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIManufacturer', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIManufacturer', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIINetwork_Registration_Detail', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIINetwork_Registration_Detail', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIINetworkDiscount', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIINetworkDiscount', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPartner_Item_Details', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPartner_Item_Details', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPartner_Stock_Details', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPartner_Stock_Details', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPatient_Insurance', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPatient_Insurance', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPayment', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPayment', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPerson', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPerson', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPerson_Title', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPerson_Title', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPharmaceutical_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPharmaceutical_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPharmacy', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPharmacy', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPhysician', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPhysician', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPrescription_hdr', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPrescription_hdr', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPrice', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPrice', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPriceCode', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPriceCode', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIPriceModifier', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIPriceModifier', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIProduct_Form', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIProduct_Form', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIRayon_Code_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIRayon_Code_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIRefundException', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIRefundException', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIRepetition_Info', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIRepetition_Info', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail_Additional_Info', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Detail_Additional_Info', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISales_Order_Header', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISales_Order_Header', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIService_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIService_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISmall_Expense_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISmall_Expense_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchema', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchema', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail_old_prod_2', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIISpecialDiscountSchemaDetail_old_prod_2', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIStorage_Area', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIStorage_Area', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIITax', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIITax', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIUserDetails', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIUserDetails', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIVat_Code_Master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIVat_Code_Master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'IIIZip_master', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'IIIZip_master', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'InsuranceNetwork', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'InsuranceNetwork', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Interaction', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Interaction', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemComposition', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemComposition', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemInteraction', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemInteraction', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemLimitation', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemLimitation', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemLocation', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemLocation', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemRegulationInfo', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemRegulationInfo', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemSearch', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemSearch', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemSite', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemSite', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'ItemText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'ItemText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'MigrationScriptHistory', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'MigrationScriptHistory', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'NumeraryValue', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'NumeraryValue', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Operation', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Operation', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'OperationRole', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'OperationRole', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'OuManager', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'OuManager', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'PatientQuickInfo', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'PatientQuickInfo', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'PharmacyItemLink', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'PharmacyItemLink', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'PointOfSale', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'PointOfSale', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Posology', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Posology', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'PrescriberRole', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'PrescriberRole', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'QrCodes', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'QrCodes', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Report', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Report', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Role', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Role', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'RunOnceScriptHistory', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'RunOnceScriptHistory', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'StandardText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'StandardText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'StandardTextText', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'StandardTextText', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'Substance', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'Substance', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'UserRole', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'UserRole', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'VestaVersion', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'VestaVersion', @force_invalidate_snapshot = 1
GO
use [ActivePos_read]
exec sp_dropsubscription @publication = N'ActivePosTran', @article = N'WebService', @subscriber = N'all', @destination_db = N'all'
GO
use [ActivePos_read]
exec sp_droparticle @publication = N'ActivePosTran', @article = N'WebService', @force_invalidate_snapshot = 1
GO
-- Dropping the transactional publication
use [ActivePos_read]
exec sp_droppublication @publication = N'ActivePosTran'
GO

View File

@@ -0,0 +1,90 @@
WITH subscriber( [publisher] , [publication]) AS (
SELECT publisher, subscriber
FROM OPENROWSET('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','SET FMTONLY OFF; EXEC arizona.dbo.sp_helpsubscriberinfo
with result sets ((
[publisher] nvarchar(128),
[subscriber] nvarchar(128),
[type] tinyint,
[login] nvarchar(128),
[password] nvarchar(524),
[commit_batch_size] int,
[status_batch_size] int,
[flush_frequency] int,
[frequency_type] int,
[frequency_interval] int,
[frequency_relative_interval] int,
[frequency_recurrence_factor] int,
[frequency_subday] int,
[frequency_subday_interval] int,
[active_start_time_of_day] int,
[active_end_time_of_day] int,
[active_start_date] int,
[active_end_date] int,
[retryattempt] int,
[retrydelay] int,
[description] nvarchar(255),
[security_mode] int,
[frequency_type2] int,
[frequency_interval2] int,
[frequency_relative_interval2] int,
[frequency_recurrence_factor2] int,
[frequency_subday2] int,
[frequency_subday_interval2] int,
[active_start_time_of_day2] int,
[active_end_time_of_day2] int,
[active_start_date2] int,
[active_end_date2] int
));
') [or]
)
, subscription(subscriber, publication, [destination database]) AS (
SELECT subscriber, publication, [destination database]
FROM OPENROWSET('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','SET FMTONLY OFF; EXEC arizona.dbo.sp_helpsubscription
with result sets ((
[subscriber] nvarchar(128),
[publication] nvarchar(128),
[article] nvarchar(128),
[destination database] nvarchar(128),
[subscription status] int,
[synchronization type] tinyint,
[subscription type] int,
[full subscription] bit,
[subscription name] nvarchar(386),
[update mode] int,
[distribution job id] varbinary(16),
[loopback_detection] bit,
[offload_enabled] bit,
[offload_server] nvarchar(128),
[dts_package_name] nvarchar(128),
[dts_package_location] int,
[subscriber_security_mode] smallint,
[subscriber_login] nvarchar(128),
[subscriber_password] varchar(10),
[job_login] nvarchar(128),
[job_password] varchar(10),
[distrib_agent_name] nvarchar(100),
[subscriber_type] tinyint,
[subscriber_provider] nvarchar(128),
[subscriber_datasource] nvarchar(4000),
[subscriber_providerstring] nvarchar(4000),
[subscriber_location] nvarchar(4000),
[subscriber_catalog] nvarchar(128)
));
') [or]
)
SELECT DISTINCT
[ms].[publication]
,sub.[publisher]
,[ms].[publisher_db]
,pub.subscriber
,pub.[destination database]
FROM [subscription] pub
JOIN [subscriber] sub ON sub.publication = pub.subscriber
JOIN sys.servers s ON s.[data_source] = sub.publication
LEFT JOIN [distribution].dbo.[MSpublications] [ms] ON ms.publication = pub.publication
WHERE pub.[destination database] = 'gaia'
;

View File

@@ -0,0 +1,52 @@
EXEC [distribution].dbo.sp_helpsubscriberinfo;
SELECT [agents].[subscriber_id], [agents].[subscriber_db], s.[name], s.[data_source]
FROM distribution..MSdistribution_agents agents
JOIN sys.[servers] [s] ON s.[server_id] = [agents].[subscriber_id]
WHERE subscriber_db IN ( 'Gaia' )
AND anonymous_subid IS NULL
USE [Arizona]
EXEC dbo.sp_helpsubscription;
EXEC dbo.sp_helpsubscriberinfo;
EXEC dbo.sp_helppublication
SELECT *
FROM [distribution].dbo.[MSpublications] [ms]
SELECT *
FROM [distribution].dbo.[MSpublication_access] [msa]
RETURN
EXEC msdb.dbo.[sp_help_jobserver]
@job_id = 0x009CFE264DE04E428316007B0B0BD218
,@show_last_run_details = 0
;
select
db_name() PublisherDB
, sp.name as PublisherName
, sa.name as TableName
, UPPER(srv.srvname) as SubscriberServerName
from dbo.syspublications sp
join dbo.sysarticles sa on sp.pubid = sa.pubid
join dbo.syssubscriptions s on sa.artid = s.artid
join master.dbo.sysservers srv on s.srvid = srv.srvid
SELECT s.*
FROM [Arizona].[dbo].[syssubscriptions] s
JOIN [Arizona].[sys].[servers] [s2] ON s2.[server_id] = s.srvid
WHERE dest_db='gaia'
AND subscription_type = 0
SELECT *
FROM distribution..MSdistribution_agents agents
WHERE subscriber_db IN ( 'Gaia' )
RETURN
SELECT *
FROM msdb.dbo.[sysjobs] [s]
WHERE [s].[job_id] = 0x009CFE264DE04E428316007B0B0BD218

View File

@@ -0,0 +1,49 @@
USE [master]
GO
/****** Object: LinkedServer [wam707a02] Script Date: 09.12.2022 15:58:13 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'wam707a02', @srvproduct=N'SQL Server'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'wam707a02',@useself=N'False',@locallogin=NULL,@rmtuser=N'sqlAppAPHPosUsr',@rmtpassword='albKEDO!x$s4HbE%%IXq'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'sub', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'collation name', @optvalue=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'wam707a02', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO

View File

@@ -0,0 +1,92 @@
BEGIN TRANSACTION
SET XACT_ABORT ON
SELECT srv.name,*
FROM
(
SELECT
[agents].[subscriber_id]
,[agents].[subscriber_db]
,[agents].[subscriber_name]
,[agents].[publisher_id]
,[agents].[publisher_db]
,[agents].[publication]
,[agents].[subscription_type]
,[agents].[name]
FROM [distribution]..[MSdistribution_agents] [agents]
WHERE [agents].[subscriber_db] IN ( 'Gaia' )
AND [agents].[anonymous_subid] IS NULL
) sub1
INNER JOIN
(
SELECT publisher,
publisher_db,
publication,
publication_type,
agent_name,
publisher_srvid,
job_id
FROM distribution..MSreplication_monitordata
WHERE publication_id IS NOT NULL
AND agent_type = 3
) sub3
ON sub1.publisher_id = sub3.publisher_srvid
--AND CAST(sub1.job_id AS UNIQUEIDENTIFIER) = sub3.job_id
AND sub1.publisher_db = sub3.publisher_db
AND sub1.publication = sub3.publication
AND sub1.subscription_type = sub3.publication_type
AND sub1.name = sub3.agent_name
JOIN master.sys.servers AS srv
ON srv.server_id = sub1.subscriber_id;
/* update publication server id */
UPDATE a
SET [subscriber_id] = s.[server_id]
FROM [distribution].[dbo].[MSdistribution_agents] a
CROSS JOIN [sys].[servers] [s]
WHERE s.[data_source] LIKE '%GALCTP'
;
/* check after */
SELECT srv.name,*
FROM
(
SELECT
[agents].[subscriber_id]
,[agents].[subscriber_db]
,[agents].[subscriber_name]
,[agents].[publisher_id]
,[agents].[publisher_db]
,[agents].[publication]
,[agents].[subscription_type]
,[agents].[name]
FROM [distribution]..[MSdistribution_agents] [agents]
WHERE [agents].[subscriber_db] IN ( 'Gaia' )
AND [agents].[anonymous_subid] IS NULL
) sub1
INNER JOIN
(
SELECT publisher,
publisher_db,
publication,
publication_type,
agent_name,
publisher_srvid,
job_id
FROM distribution..MSreplication_monitordata
WHERE publication_id IS NOT NULL
AND agent_type = 3
) sub3
ON sub1.publisher_id = sub3.publisher_srvid
--AND CAST(sub1.job_id AS UNIQUEIDENTIFIER) = sub3.job_id
AND sub1.publisher_db = sub3.publisher_db
AND sub1.publication = sub3.publication
AND sub1.subscription_type = sub3.publication_type
AND sub1.name = sub3.agent_name
JOIN master.sys.servers AS srv
ON srv.server_id = sub1.subscriber_id;
ROLLBACK TRANSACTION
SELECT *
FROM sys.servers s

View File

@@ -0,0 +1,353 @@
USE master;
SET NOCOUNT ON;
IF OBJECT_ID('tempdb..#tempsub2') IS NOT NULL
DROP TABLE #tempsub2;
IF OBJECT_ID('tempdb..#tempsub1') IS NOT NULL
DROP TABLE #tempsub1;
CREATE TABLE #tempsub2
(
publisher sysname,
publisher_db sysname,
publication sysname,
subscriber sysname,
subscriber_db sysname,
Pending_Commands INT,
time_to_deliver_pending_Commands INT
);
DECLARE @publisher sysname,
@publisher_db sysname,
@publication sysname,
@subscriber sysname,
@subscriber_db sysname,
@GAIASrvName VARCHAR(100);
SELECT @GAIASrvName = CASE WHEN [Type] = 'DEVE' THEN 'SWGCMDEV01.CENTRALINFRA.NET\DGALCTP'
WHEN [Type] = 'VALI' THEN 'SWGCMQMS01.CENTRALINFRA.NET\TGALCTP'
WHEN [Type] = 'PROD' THEN 'SWGCMDB01.CENTRALINFRA.NET\PGALCTP'
ELSE ''
END FROM [master].[cfg].[InstanceContext];
IF OBJECT_ID('tempdb..#tempsub1')IS NOT NULL BEGIN;
DROP TABLE #tempsub1;
END;
SELECT sub3.[publisher],
sub1.[publisher_db],
sub1.[publication],
--CASE
-- WHEN [sub1].[anonymous_subid] IS NOT NULL THEN
-- UPPER([sub1].[subscriber_name])
-- ELSE
-- UPPER(srv.name)
--END 'Subscriber',
CAST(NULL AS sysname)AS Subscriber, --will be computed later
[sub1].[subscriber_db],
[sub1].[job_id],
[sub1].[id],
[sub1].[subscription_type],
[sub1].[name]
INTO [#tempsub1]
FROM
(
SELECT
[agents].[publisher_db]
,[agents].[publisher_id]
,[agents].[publication]
,[agents].[anonymous_subid]
,[agents].[subscriber_name]
,[agents].[subscriber_db]
,[agents].[job_id]
,[agents].[id]
,[agents].[subscription_type]
,[agents].[name]
FROM distribution..MSdistribution_agents agents
WHERE subscriber_db IN ( 'Gaia' )
AND anonymous_subid IS NULL
) sub1
INNER JOIN
(
SELECT publisher,
publisher_db,
publication,
publication_type,
agent_name,
publisher_srvid,
job_id
FROM distribution..MSreplication_monitordata
WHERE publication_id IS NOT NULL
AND agent_type = 3
) sub3
ON sub1.publisher_id = sub3.publisher_srvid
--AND CAST(sub1.job_id AS UNIQUEIDENTIFIER) = sub3.job_id
AND sub1.publisher_db = sub3.publisher_db
AND sub1.publication = sub3.publication
AND sub1.subscription_type = sub3.publication_type
AND sub1.name = sub3.agent_name
--CROSS JOIN master.sys.servers AS srv
--WHERE srv.name = @GAIASrvName
;
DECLARE subscribers CURSOR FOR
SELECT publisher,
publisher_db,
publication,
Subscriber,
subscriber_db
FROM #tempsub1;
OPEN subscribers;
FETCH NEXT FROM subscribers
INTO @publisher,
@publisher_db,
@publication,
@subscriber,
@subscriber_db;
WHILE @@FETCH_STATUS = 0
BEGIN
/* Those CTE are extracting the publication, publisher and subscriber from MS helper procs */
WITH subscriber( [publisher] , [publication]) AS (
SELECT publisher, subscriber
FROM OPENROWSET('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','SET FMTONLY OFF; EXEC arizona.dbo.sp_helpsubscriberinfo
with result sets ((
[publisher] nvarchar(128),
[subscriber] nvarchar(128),
[type] tinyint,
[login] nvarchar(128),
[password] nvarchar(524),
[commit_batch_size] int,
[status_batch_size] int,
[flush_frequency] int,
[frequency_type] int,
[frequency_interval] int,
[frequency_relative_interval] int,
[frequency_recurrence_factor] int,
[frequency_subday] int,
[frequency_subday_interval] int,
[active_start_time_of_day] int,
[active_end_time_of_day] int,
[active_start_date] int,
[active_end_date] int,
[retryattempt] int,
[retrydelay] int,
[description] nvarchar(255),
[security_mode] int,
[frequency_type2] int,
[frequency_interval2] int,
[frequency_relative_interval2] int,
[frequency_recurrence_factor2] int,
[frequency_subday2] int,
[frequency_subday_interval2] int,
[active_start_time_of_day2] int,
[active_end_time_of_day2] int,
[active_start_date2] int,
[active_end_date2] int
));
') [or]
)
, subscription(subscriber, publication, [destination database]) AS (
SELECT subscriber, publication, [destination database]
FROM OPENROWSET('SQLOLEDB','Server=(local);TRUSTED_CONNECTION=YES;','SET FMTONLY OFF; EXEC arizona.dbo.sp_helpsubscription
with result sets ((
[subscriber] nvarchar(128),
[publication] nvarchar(128),
[article] nvarchar(128),
[destination database] nvarchar(128),
[subscription status] int,
[synchronization type] tinyint,
[subscription type] int,
[full subscription] bit,
[subscription name] nvarchar(386),
[update mode] int,
[distribution job id] varbinary(16),
[loopback_detection] bit,
[offload_enabled] bit,
[offload_server] nvarchar(128),
[dts_package_name] nvarchar(128),
[dts_package_location] int,
[subscriber_security_mode] smallint,
[subscriber_login] nvarchar(128),
[subscriber_password] varchar(10),
[job_login] nvarchar(128),
[job_password] varchar(10),
[distrib_agent_name] nvarchar(100),
[subscriber_type] tinyint,
[subscriber_provider] nvarchar(128),
[subscriber_datasource] nvarchar(4000),
[subscriber_providerstring] nvarchar(4000),
[subscriber_location] nvarchar(4000),
[subscriber_catalog] nvarchar(128)
));
') [or]
)
SELECT DISTINCT
@subscriber = [pub].[subscriber]
FROM [subscription] pub
JOIN [subscriber] sub ON sub.publication = pub.subscriber
JOIN sys.servers s ON s.[data_source] = sub.publication
LEFT JOIN [distribution].dbo.[MSpublications] [ms] ON ms.publication = pub.publication
WHERE pub.[destination database] = 'gaia'
AND sub.[publisher] = @publisher
AND [ms].[publisher_db] = @publisher_db
;
/* push back the subscriber name into the [#tempsub1] table, for compatibility with sql 2017 and below */
UPDATE t SET [t].[Subscriber] = @subscriber
FROM [#tempsub1] [t]
WHERE t.[Subscriber] IS NULL
AND t.[publisher_db] = @publisher_db
AND t.[publication] = @publication
;
PRINT '
@publisher: '+ISNULL(CONVERT(VARCHAR(200),@publisher),'NULL')+'
@publisher_db: '+ISNULL(CONVERT(VARCHAR(200),@publisher_db),'NULL')+'
@publication: '+ISNULL(CONVERT(VARCHAR(200),@publication),'NULL')+'
@subscriber: '+ISNULL(CONVERT(VARCHAR(200),@subscriber),'NULL')+'
@subscriber_db: '+ISNULL(CONVERT(VARCHAR(200),@subscriber_db),'NULL')+'
EXEC distribution..sp_replmonitorsubscriptionpENDingcmds
@publisher= '''+ISNULL(CONVERT(VARCHAR(200),@publisher),'NULL')+'''
,@subscription_type=0
,@publisher_db= '''+ISNULL(CONVERT(VARCHAR(200),@publisher_db),'NULL')+'''
,@publication = '''+ISNULL(CONVERT(VARCHAR(200),@publication),'NULL')+'''
,@subscriber= '''+ISNULL(CONVERT(VARCHAR(200),@subscriber),'NULL')+'''
,@subscriber_db= '''+ISNULL(CONVERT(VARCHAR(200),@subscriber_db),'NULL')+'''
;
';
INSERT INTO [#tempsub2] (
[publisher]
,[publisher_db]
,[publication]
,[subscriber]
,[subscriber_db]
,[Pending_Commands]
,[time_to_deliver_pending_Commands]
)
EXEC ('
SELECT ''' + @publisher + ''' , ''' + @publisher_db + ''' ,''' + @publication + ''' , ''' + @subscriber + ''' , ''' + @subscriber_db + ''' ,*
FROM OPENROWSET (''SQLOLEDB'',''Server=(local);TRUSTED_CONNECTION=YES;'',''set fmtonly off EXEC distribution..sp_replmonitorsubscriptionpENDingcmds @publisher= ''''' + @publisher + ''''' ,@subscription_type=0, @publisher_db= ''''' + @publisher_db + ''''',@publication = ''''' + @publication + ''''',@subscriber= ''''' + @subscriber + ''''' ,@subscriber_db=''''' + @subscriber_db + '''''
with result sets
((
pendingcmdcount INT,
estimatedprocesstime INT
))
'')
' );
PRINT ('
SELECT ''' + @publisher + ''' , ''' + @publisher_db + ''' ,''' + @publication + ''' , ''' + @subscriber + ''' , ''' + @subscriber_db + ''' ,*
FROM OPENROWSET (''SQLOLEDB'',''Server=(local);TRUSTED_CONNECTION=YES;'',''set fmtonly off EXEC distribution..sp_replmonitorsubscriptionpENDingcmds @publisher= ''''' + @publisher + ''''' ,@subscription_type=0, @publisher_db= ''''' + @publisher_db + ''''',@publication = ''''' + @publication + ''''',@subscriber= ''''' + @subscriber + ''''' ,@subscriber_db=''''' + @subscriber_db + ''''''')
' );
FETCH NEXT FROM subscribers
INTO @publisher,
@publisher_db,
@publication,
@subscriber,
@subscriber_db;
END;
CLOSE subscribers;
DEALLOCATE subscribers;
IF NOT EXISTS
(
SELECT 1
FROM #tempsub1 Info
INNER JOIN #tempsub2 Pending_commands
ON Info.publisher_db = Pending_commands.publisher_db
AND Info.publication = Pending_commands.publication
AND Info.Subscriber = Pending_commands.subscriber
AND Info.subscriber_db = Pending_commands.subscriber_db
LEFT OUTER JOIN msdb..sysjobs jobs
ON Info.job_id = jobs.job_id
INNER JOIN
(
SELECT time,
agent_id,
runstatus,
delivery_latency,
comments,
ROW_NUMBER() OVER (PARTITION BY agent_id ORDER BY time DESC) AS pos
FROM distribution..MSdistribution_history
) comment
ON comment.agent_id = Info.id
WHERE comment.pos = 1
)
BEGIN
SELECT 'Not Started' AS status,@@SERVERNAME AS publisher, publisher_db,publication,'' AS subscriber,subscriber_db,NULL AS Pending, 'Push' AS [Type],'' AS Distribution_agent_name, 'Not Started' AS comments
FROM distribution..MSdistribution_agents agents
WHERE subscriber_db IN ( 'Gaia' )
AND anonymous_subid IS NULL;
END;
ELSE
BEGIN
SELECT CASE comment.runstatus
WHEN 1 THEN
'Started'
WHEN 2 THEN
'Succeeded'
WHEN 3 THEN
'In progress'
WHEN 4 THEN
'Idle'
WHEN 5 THEN
'Retrying'
WHEN 6 THEN
'Failed'
END status,
Pending_commands.publisher,
Pending_commands.publisher_db,
Pending_commands.publication,
Pending_commands.subscriber,
Pending_commands.subscriber_db,
Pending_commands.Pending_Commands AS Pending,
CASE Info.subscription_type
WHEN 0 THEN
'Push'
WHEN 1 THEN
'Pull'
WHEN 2 THEN
'Anonymous'
END 'Type',
Info.name 'Distribution_agent_name',
comment.comments
FROM #tempsub1 Info
INNER JOIN #tempsub2 Pending_commands
ON Info.publisher_db = Pending_commands.publisher_db
AND Info.publication = Pending_commands.publication
AND Info.Subscriber = Pending_commands.subscriber
AND Info.subscriber_db = Pending_commands.subscriber_db
LEFT OUTER JOIN msdb..sysjobs jobs
ON Info.job_id = jobs.job_id
INNER JOIN
(
SELECT time,
agent_id,
runstatus,
delivery_latency,
comments,
ROW_NUMBER() OVER (PARTITION BY agent_id ORDER BY time DESC) AS pos
FROM distribution..MSdistribution_history
) comment
ON comment.agent_id = Info.id
WHERE comment.pos = 1;
END;
DROP TABLE #tempsub1;

View File

@@ -0,0 +1,37 @@
SELECT srv.name,*
FROM
(
SELECT *
FROM distribution..MSdistribution_agents agents
WHERE subscriber_db IN ( 'Gaia' )
AND anonymous_subid IS NULL
) sub1
INNER JOIN
(
SELECT publisher,
publisher_db,
publication,
publication_type,
agent_name,
publisher_srvid,
job_id
FROM distribution..MSreplication_monitordata
WHERE publication_id IS NOT NULL
AND agent_type = 3
) sub3
ON sub1.publisher_id = sub3.publisher_srvid
--AND CAST(sub1.job_id AS UNIQUEIDENTIFIER) = sub3.job_id
AND sub1.publisher_db = sub3.publisher_db
AND sub1.publication = sub3.publication
AND sub1.subscription_type = sub3.publication_type
AND sub1.name = sub3.agent_name
JOIN master.sys.servers AS srv
ON srv.server_id = sub1.subscriber_id;
SELECT *
FROM sys.servers
SELECT GAIASrvName = CASE WHEN [Type] = 'DEVE' THEN 'SWGCMDEV01.CENTRALINFRA.NET\DGALCTP'
WHEN [Type] = 'VALI' THEN 'SWGCMQMS01.CENTRALINFRA.NET\TGALCTP'
WHEN [Type] = 'PROD' THEN 'SWGCMDB01.CENTRALINFRA.NET\PGALCTP'
ELSE '' END FROM [master].[cfg].[InstanceContext]