Quantcast
Channel: SQL Server Replication forum
Viewing all 4054 articles
Browse latest View live

Merge Replication -- Bad Insert trigger

$
0
0

I have bad insert trigger created on the publish. It is trying replication this trigger to the subscriber but it is getting a syntax error. It has now been corrected on the publisher but the subscriber will not get passed the bad ddl change of the orginial trigger. How do I tell merge replication to ignore this bad version of the insert trigger.

Re-initializing is not an option.


Log Reader Process not Stopping

$
0
0

Hello Experts,

We have scripts to stop and start replication process. one of the script to stop replication is as mentioned below.Running it doesn’t stop replication – it’s not getting into the part of the code where the LogReader is being stopped. Despite number of futile efforts I am not able to find the root cause. Please help.

--------------------------

@echo off
setlocal enabledelayedexpansion
set OUTPUT_FILE=D:\Stop_Replication_ACS_CA.txt
set TEMP_FILE=D:\Temp_ACS_CA.txt

set P1_SERVER=
set P1_USER=""
set P1_PWD=""
set P1_DIST_DB=Distribution
set P1_DB=ACS
set P1_LR_AGENT_ID=DE43E98A-59D8-4C06-ADB6-AE9B963FE392
set P1_DIST_AGENT_ID=0B9140AC-4894-46C1-BF00-3EEB1F327847

set P2_SERVER=
set P2_USER=""
set P2_PWD="!"
set P2_DIST_DB=Distribution
set P2_DB=ACS_CA
set P2_LR_AGENT_ID=F991C76A-DECC-45C9-AA99-591014C06BF8
set P2_DIST_AGENT_ID=48F4F537-FA13-49A5-8E8F-065B37EB2FB0



>nul copy nul %OUTPUT_FILE%

echo Connecting to %P2_SERVER% to find the last transaction id....
for /f "tokens=*" %%a in ('sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; SELECT convert(varbinary, transaction_timestamp) FROM %P2_DB%.dbo.MSreplication_subscriptions"  ^|findstr /B /C:"0x" ') do (
set LAST_TXN_AT_SUB=%%a
echo !LAST_TXN_AT_SUB!
echo Connecting to %P1_SERVER% to find count of unreplicated transactions....
for /f "tokens=*" %%b in ('sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; select count(distinct (xact_seqno)) from %P1_DIST_DB%..MSrepl_commands Where xact_seqno ^> '!LAST_TXN_AT_SUB!'" ^|findstr /R "[0-9]" ') do (
set TXN_COUNT=%%b
echo !TXN_COUNT!
echo -------------------------------------------------------
:while1
if !TXN_COUNT! GTR 0 (
echo Waiting for Transactions to be replicated....
TIMEOUT 10 >nul
echo Connecting to %P2_SERVER% to find the last transaction id....
for /f "tokens=*" %%c in ('sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; SELECT convert(varbinary, transaction_timestamp) FROM %P2_DB%.dbo.MSreplication_subscriptions"  ^|findstr /B /C:"0x" ') do (
set LAST_TXN_AT_SUB=%%c
echo !LAST_TXN_AT_SUB!
echo Connecting to %P1_SERVER% to find count of unreplicated transactions....
for /f "tokens=*" %%d in ('sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; select count(distinct (xact_seqno)) from %P1_DIST_DB%..MSrepl_commands Where xact_seqno ^> '!LAST_TXN_AT_SUB!'" ^|findstr /R "[0-9]" ') do (
set TXN_COUNT=%%d
echo !TXN_COUNT!
echo -------------------------------------------------------
)
)
GOTO :while1
)

echo Stopping Logreader agent on %P1_SERVER% : %P1_DB%
sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; EXEC msdb..sp_stop_job @job_id = '%P1_LR_AGENT_ID%' " > %TEMP_FILE% 2>&1  
type %TEMP_FILE% >>%OUTPUT_FILE%
type %TEMP_FILE%
del %TEMP_FILE%
echo -------------------------------------------------------
echo Stopping Distribution agent on %P1_SERVER% : %P1_DB%
sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; EXEC msdb..sp_stop_job @job_id = '%P1_DIST_AGENT_ID%' "  > %TEMP_FILE% 2>&1  
type %TEMP_FILE% >>%OUTPUT_FILE%
type %TEMP_FILE%
del %TEMP_FILE%
echo -------------------------------------------------------


)

)

echo -------------------------------------------------------

echo Connecting to %P1_SERVER% to find the last transaction id....
for /f "tokens=*" %%a in ('sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; SELECT convert(varbinary, transaction_timestamp) FROM %P1_DB%.dbo.MSreplication_subscriptions"  ^|findstr /B /C:"0x" ') do (
set LAST_TXN_AT_SUB=%%a
echo !LAST_TXN_AT_SUB!
echo Connecting to %P2_SERVER% to find count of unreplicated transactions....
for /f "tokens=*" %%b in ('sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; select count(distinct (xact_seqno)) from %P2_DIST_DB%..MSrepl_commands Where xact_seqno ^> '!LAST_TXN_AT_SUB!'" ^|findstr /R "[0-9]" ') do (
set TXN_COUNT=%%b
echo !TXN_COUNT!
echo -------------------------------------------------------
:while2
if !TXN_COUNT! GTR 0 (
echo Waiting for Transactions to be replicated....
TIMEOUT 10 >nul
echo Connecting to %P1_SERVER% to find the last transaction id....
for /f "tokens=*" %%c in ('sqlcmd -S %P1_SERVER% -U %P1_USER% -P %P1_PWD% -Q "SET NOCOUNT ON; SELECT convert(varbinary, transaction_timestamp) FROM %P1_DB%.dbo.MSreplication_subscriptions"  ^|findstr /B /C:"0x" ') do (
set LAST_TXN_AT_SUB=%%c
echo !LAST_TXN_AT_SUB!
echo Connecting to %P2_SERVER% to find count of unreplicated transactions....
for /f "tokens=*" %%d in ('sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; select count(distinct (xact_seqno)) from %P2_DIST_DB%..MSrepl_commands Where xact_seqno ^> '!LAST_TXN_AT_SUB!'" ^|findstr /R "[0-9]" ') do (
set TXN_COUNT=%%d
echo !TXN_COUNT!
echo -------------------------------------------------------
)
)
GOTO :while2
)

echo Stopping Logreader agent on %P2_SERVER% :  %P2_DB%
sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; EXEC msdb..sp_stop_job @job_id = '%P2_LR_AGENT_ID%' " > %TEMP_FILE% 2>&1  
type %TEMP_FILE% >>%OUTPUT_FILE%
type %TEMP_FILE%
del %TEMP_FILE%
echo -------------------------------------------------------

echo Stopping Distribution agent on %P2_SERVER% :  %P2_DB%
sqlcmd -S %P2_SERVER% -U %P2_USER% -P %P2_PWD% -Q "SET NOCOUNT ON; EXEC msdb..sp_stop_job @job_id = '%P2_DIST_AGENT_ID%' "  > %TEMP_FILE% 2>&1  
type %TEMP_FILE% >>%OUTPUT_FILE%
type %TEMP_FILE%
del %TEMP_FILE%
echo -------------------------------------------------------




)

)
echo -------------------------------------------------------
echo For more details are logged in %OUTPUT_FILE%
echo Press any key to exit
pause >nul

-----------------------------------

Best Regards,

Kapil Relan

Unable start or stop merge replication (Push)

$
0
0

Hi,

I have the merge replication (Push)  for SQL Server 2008.The right-click option for Start and Stop Synchronizing in subscriptions has been disabled. How can I stop the merge replication and start again ?

This error happened 1 week after I created the merge replication. The merge data cannot sync to subscriber and only solution I can use is drop and re-create the merge replication again but error would be re-occur a week later.

The merge replication work fine before and start from middle on May 2015, but it keep happen right now.

Any solutions?

Thanks

Teddy

Replication between 2012 sp1 and sp2

$
0
0

Hi All,

Could you please let me know if i can setup the transactional replication by using below versions.

1.Distributor & Subscriber (SQl2012 SP2)

2.Publisher ( SQL2012 SP1)

I believe that there will be no issue as the version is same.However,i just want to know if there is any issue with the Service Pack.

Thanks in Advance.

Error accured while clean up the cluster

$
0
0

Hello,

I have problem when I create the clusters I created domain account and give him permission create computer objects and real all properties but there are problem when clean up the cluster always pop up and error but latter I tried using my domain admin and worked perfectly is there any permission is missing for cluster ?? or all I need is Create Computer Object and Read Permission?

Regards,

Ayesh.

In which scenario it might be necessary to schedule the Snapshot Agent for Transactional publication?

$
0
0

When I create a new Transactional publication using a Publication Wizard, there is one step called Snapshot Agent which gives a possibility to:

  1. Create a snapshot immediately
  2. Schedule the Snapshot Agent

My question is when it might be necessary to schedule the Snapshot Agent for Transactional publication?

As far as I know, snapshot is used only to initialize new subscriptions. When snapshots are generated after a subscription is initialized, they are not applied to a Subscriber.

Thank you.


Alexey

Issue in transactional replication

$
0
0

Hi All,

We have transactional replication setup.When we truncated the date in primary server,it is not updating the data in secondary server.We can able to see truncated records in secondary db.

We didn't set the option Do not replicate DELETE statements,butit is still showing the records.

Could you please share me the information why it is not replicating the truncate changes.

Blockings due to replication.

$
0
0
We have transactional replication.After creating replication, we found that many blocking and deadlocks are occurring continuously.Will it cause any blocking on publisher db.

The process could not bulk copy into table ***** in replication.

$
0
0

While replicating a table first time to the subscriber i got below error.The table size is around 150GB.It is transactionla replication.

"The process could not bulk copy into table table name".How can we replicate this table to subscriber?

How to know if replication is running?

$
0
0

Hi,

Ive got an instance running replication to another instance on the same server. Ive just completed an archiving query that took 10 to run. Ive tested replication by changeing a value in a field and checking if it propogated to the subscriber. It hasnt, but im wondering if the replication is taking a long time to catch up or if its just broken (it was running ok before I initiated the 10 hour query). Is there a way to check if its still running?  The replication monitor confuses me!

Thanks,

Zoe

Merge Replication Error-call to MSmerge_ins_sp and MSmerge_upd_sp calls produces Implict Conversion Datatype errors?

$
0
0

Hi all,

Hoping someone has some advice on this specific error.

Background info

I have a read-only subscription for an article "quote" and it keeps retring to insert and update 20 odd records. When I put a trace on and track down the offending code its looking like its calling the stored procedures with incorrect parameters causing a datatype conversion error?

The resulting error is a

"The merge process is retrying a failed operation made to article ''quote'' - Reason: ''Implicit conversion from data type varchar to varbinary is not allowed."

Here are some example calls which fail when I call them manually

exec [dbo].[MSmerge_ins_sp_649622254F6B4EDE6845A21483954514] 'E15E798F-8423-E511-9403-40F2E9249F9A','22',90952,1313767,737439,'','martini',NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'robrown','2015-07-06 10:13:16','robrown','2015-07-06 10:13:16',385807,NULL,NULL,'','','','',NULL,NULL,NULL,NULL,'','  ',NULL,NULL,'E15E798F-8423-E511-9403-40F2E9249F9A',NULL,0,NULL,NULL,NULL,NULL,NULLan

and an update

exec [dbo].[MSmerge_upd_sp_649622254F6B4EDE6845A21483954514] 'B709A45F-DA22-E511-9403-40F2E9249F9A',0xC0F9FF7F7F303CEB030000000000000000000000000000000000000000000000,'03',24572,1313672,737315,'','cherbert',NULL,NULL,NULL,11,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'cherbert','2015-07-05 13:55:01','cherbert','2015-07-06 10:13:39.4900000',NULL,NULL,'','','','',NULL,NULL,NULL,NULL,'','  ',NULL,NULL,'B709A45F-DA22-E511-9403-40F2E9249F9A',NULL,1,NULL,NULL,NULL,NULL,NULLI have

I have ran into this error a few times and am getting sick of redeclaring the article to amend.

Any advice appreciated as always.

Kind Regards,

Matt

SQL Server merge replication is blocking purge process

$
0
0

Hi All,

We have a situation on sql 2012 where merge replication is setup between two servers. It is working fine and with normal updates/inserts/deletes. But there is frequent purge process that runs every half hour and tries to delete a batch of data (not that big) gets blocked by merge replication. Sometime merge process gets blocked and become victim of deadlock. Workaorund for now is to confine purge to a specifc window overnight and stop merge agent and let the purge run for two hours unhindered. It is working for us but the goal is to have this purge works 24/7 alongside merge replication. 

Has any one faced with this issue before? Also are there other active/active solutions available where database on both sql instances on different servers can be updated and remain in sync.

This is a vendor application based database and , most tables have primary keys non clustered.  THat is an issue in my opinion.

thanks!

dba60.


dba60


sql server 2014 - replication plus trigger

$
0
0

hi, experts,

if my database (2014) enables replication , maybe transactional replication.

further, trigger (insert, update, delete) is enabled on some database tables.

but this setup, will it hit performance issue on sql server?

thank you very much!


delaynomore.

How to Pause replication? Emergency!!

$
0
0

Hi All,

I have a replication job that is taking weeks to catch up with a large batch.

I need to get extracts from the subscriber database but I cant while replication is catching up.

Is there a way to pause replication at the subscriber so that I can get the data?

Its a transactional replication.

Thanks,

Zoe

transactional replication error 20598 with read_committed_snapshot ON

$
0
0

Good day colleagues,

I am transactionaly replicating a database, upon which I have enabled read_committed_snapshot. Once the process starts the distribution agent gives error ‘The row was not found at the Subscriber when applying the replicated command 20598’.

This is a known issue for Microsoft detailed in this link https://support.microsoft.com/en-us/kb/982857#/en-us/kb/982857.

The question is Microsoft says this happens when “subscribers are initialized and a snapshot is generated for the replication.”

Q1: In my case I am not using snapshot but backup to initialize my subscriber. Should this still happen or should I look elsewhere for the problem?

Q2: I cannot replicate this issue in my test env. Both prod and test have the same setup. The only difference is that test is in Ent ed and prod in Std (don’t ask). Is this affecting only Std edition? Neither test nor prod have sp1 installed.

Q3: The article doesn’t specify which read_committed_snapshot causes the issue, that on the publisher db or that on the subscriber or both.

Many thanks
Archie

Tablediff falsely indicates two tables as identical

$
0
0

Hello all,

I am testing tablediff to find and manually correct differences in my transactional replication topology.

I have truncated my subscriber table and run tablediff utility between the published and subscribed tables upon which tablediff finds them identical.

When I pass –q to do a row count it does find that they have different row count by some 5000.

What am I missing?

Many thanks

Archie

Merge Replication failing with This publication differs from the publication to which the subscription was initially created

$
0
0

I have 2 merge publications. On 1 publication I continously get the following error immediately after I successfully created the subscription and successfully downloaded and applied the snapshot.

This publication differs from the publication to which the subscription was initially created.

This is absolutely incorrect since I never changed the publication; all I did was run the agent one more time after the first syncronization of the snapshot. Sometimes the error does not occur but most times it does.

This never occurs on the other merge publication.  Sometimes the error doesn't occur and other times it does. I have tried everything I know of to fix this but with no luck. I have deleted all the system replication tables and ran sp_mergesubscription_cleanup on the subscriber to no avail. I have captured the log files.


David Ryan

The portion of the log where the error occurred.

2012-02-20 01:01:45.527 Microsoft SQL Server Merge Agent 10.50.2500.0
2012-02-20 01:01:45.529 Copyright (c) 2008 Microsoft Corporation
2012-02-20 01:01:45.530 Microsoft SQL Server Replication Agent: replmerg
2012-02-20 01:01:45.532
2012-02-20 01:01:45.534 The timestamps prepended to the output lines are expressed in terms of UTC time.
2012-02-20 01:01:45.535 User-specified agent parameter values:
   -Publisher ZEUS
   -PublisherDB ESDB
   -Publication SQLMERGEPUB_ES_MER
   -Subscriber MER-DEV-2
   -SubscriberDB MERDB
   -SubscriptionType 1
   -SubscriberSecurityMode 1
   -Distributor ZEUS
   -Output C:\repllog\ES_MER.txt
   -OutputVerboseLevel 2
   -XJOBID 0x1B5DB8378B69EE49BA3F2E1B2DAE4140
   -XJOBNAME ZEUS-ESDB-SQLMERGEPUB_ES_MER-MER-DEV-2-MERDB- 0
   -XSTEPID 1
   -XSUBSYSTEM Merge
   -XSERVER MER-DEV-2
   -XCMDLINE 0
   -XCancelEventHandle 00000000000006F4
   -XParentProcessHandle 00000000000005D8
2012-02-20 01:01:45.564 Percent Complete: 0
2012-02-20 01:01:45.565 Connecting to Subscriber 'MER-DEV-2'
2012-02-20 01:01:45.566 Connecting to OLE DB Subscriber at datasource: 'MER-DEV-2', location: '', catalog: 'MERDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:01:45.625 OLE DB Subscriber: MER-DEV-2
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: MERDB
   user name: MER-DEV-2\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:01:45.629 OLE DB Subscriber 'MER-DEV-2': {call sp_MSgetversion }
2012-02-20 01:01:45.637 OLE DB Subscriber 'MER-DEV-2': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select collationproperty(@collation, N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2012-02-20 01:01:45.646 OLE DB Subscriber 'MER-DEV-2': {?=call sp_helpsubscription_properties (N'ZEUS', N'ESDB', N'SQLMERGEPUB_ES_MER')}
2012-02-20 01:01:45.650 Distributor security mode: 1, login name: , password: ********.
2012-02-20 01:01:45.651 OLE DB Subscriber 'MER-DEV-2': {?=call sp_helpsubscription_properties (N'ZEUS', N'ESDB', N'SQLMERGEPUB_ES_MER')}
2012-02-20 01:01:45.655 Publisher security mode: 1, login name: , password: ********.
2012-02-20 01:01:45.657 Percent Complete: 0
2012-02-20 01:01:45.658 Connecting to Distributor 'ZEUS'
2012-02-20 01:01:45.659 Connecting to OLE DB Distributor at datasource: 'ZEUS', location: '', catalog: '', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:01:45.685 OLE DB Distributor: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name:
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:01:45.690 OLE DB Distributor 'ZEUS': {call sp_MSgetversion }
2012-02-20 01:01:45.694 OLE DB Distributor 'ZEUS': {call sp_helpdistpublisher (N'ZEUS') }
2012-02-20 01:01:45.698 OLE DB Distributor 'ZEUS': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'ZEUS')
2012-02-20 01:01:45.699 OLE DB Distributor 'ZEUS': {call sp_MShelp_merge_agentid (0,N'ESDB',N'SQLMERGEPUB_ES_MER',null,N'MERDB',100,N'MER-DEV-2')}
2012-02-20 01:01:45.702 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.707 OLE DB Distributor 'ZEUS': {call sp_MShelp_profile (13, 4, N'')}
2012-02-20 01:01:45.710 Percent Complete: 0
2012-02-20 01:01:45.710 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.711 Initializing
2012-02-20 01:01:45.715 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.717 Connecting to OLE DB Publisher at datasource: 'ZEUS', location: '', catalog: 'ESDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:01:45.719 Percent Complete: 0
2012-02-20 01:01:45.720 Connecting to Publisher 'ZEUS'
2012-02-20 01:01:45.721 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.738 OLE DB Publisher: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: ESDB
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:01:45.743 OLE DB Publisher 'ZEUS': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select collationproperty(@collation, N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2012-02-20 01:01:45.746 OLE DB Publisher 'ZEUS': {call sp_MSgetversion }
2012-02-20 01:01:45.751 Connecting to OLE DB Publisher at datasource: 'ZEUS', location: '', catalog: 'ESDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:01:45.773 OLE DB Publisher: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: ESDB
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:01:45.785 This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:01:45.787 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.794 Percent Complete: 0
2012-02-20 01:01:45.794 This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:01:45.795 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:01:45.808 Percent Complete: 0
2012-02-20 01:01:45.809 Category:NULL
Source:  Merge Process
Number:  -2147199389
Message: This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:01:45.810 Disconnecting from OLE DB Subscriber 'MER-DEV-2'
2012-02-20 01:01:45.811 Disconnecting from OLE DB Subscriber 'MER-DEV-2'
2012-02-20 01:01:45.812 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:01:45.813 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:01:45.814 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:01:45.816 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:01:45.818 Disconnecting from OLE DB Distributor 'ZEUS'
2012-02-20 01:01:45.821 Disconnecting from OLE DB Distributor 'ZEUS'
2012-02-20 01:04:40.620 Microsoft SQL Server Merge Agent 10.50.2500.0
2012-02-20 01:04:40.623 Copyright (c) 2008 Microsoft Corporation
2012-02-20 01:04:40.624 Microsoft SQL Server Replication Agent: replmerg
2012-02-20 01:04:40.625
2012-02-20 01:04:40.626 The timestamps prepended to the output lines are expressed in terms of UTC time.
2012-02-20 01:04:40.627 User-specified agent parameter values:
   -Publisher ZEUS
   -PublisherDB ESDB
   -Publication SQLMERGEPUB_ES_MER
   -Subscriber MER-DEV-2
   -SubscriberDB MERDB
   -SubscriptionType 1
   -SubscriberSecurityMode 1
   -Distributor ZEUS
   -Output C:\repllog\ES_MER.txt
   -OutputVerboseLevel 2
   -XJOBID 0x1B5DB8378B69EE49BA3F2E1B2DAE4140
   -XJOBNAME ZEUS-ESDB-SQLMERGEPUB_ES_MER-MER-DEV-2-MERDB- 0
   -XSTEPID 1
   -XSUBSYSTEM Merge
   -XSERVER MER-DEV-2
   -XCMDLINE 0
   -XCancelEventHandle 00000000000006F4
   -XParentProcessHandle 00000000000005D8
2012-02-20 01:04:40.657 Percent Complete: 0
2012-02-20 01:04:40.658 Connecting to Subscriber 'MER-DEV-2'
2012-02-20 01:04:40.659 Connecting to OLE DB Subscriber at datasource: 'MER-DEV-2', location: '', catalog: 'MERDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:04:40.721 OLE DB Subscriber: MER-DEV-2
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: MERDB
   user name: MER-DEV-2\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:04:40.737 OLE DB Subscriber 'MER-DEV-2': {call sp_MSgetversion }
2012-02-20 01:04:40.745 OLE DB Subscriber 'MER-DEV-2': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select collationproperty(@collation, N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2012-02-20 01:04:40.755 OLE DB Subscriber 'MER-DEV-2': {?=call sp_helpsubscription_properties (N'ZEUS', N'ESDB', N'SQLMERGEPUB_ES_MER')}
2012-02-20 01:04:40.759 Distributor security mode: 1, login name: , password: ********.
2012-02-20 01:04:40.760 OLE DB Subscriber 'MER-DEV-2': {?=call sp_helpsubscription_properties (N'ZEUS', N'ESDB', N'SQLMERGEPUB_ES_MER')}
2012-02-20 01:04:40.764 Publisher security mode: 1, login name: , password: ********.
2012-02-20 01:04:40.766 Percent Complete: 0
2012-02-20 01:04:40.767 Connecting to Distributor 'ZEUS'
2012-02-20 01:04:40.768 Connecting to OLE DB Distributor at datasource: 'ZEUS', location: '', catalog: '', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:04:40.791 OLE DB Distributor: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name:
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:04:40.796 OLE DB Distributor 'ZEUS': {call sp_MSgetversion }
2012-02-20 01:04:40.799 OLE DB Distributor 'ZEUS': {call sp_helpdistpublisher (N'ZEUS') }
2012-02-20 01:04:40.804 OLE DB Distributor 'ZEUS': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'ZEUS')
2012-02-20 01:04:40.806 OLE DB Distributor 'ZEUS': {call sp_MShelp_merge_agentid (0,N'ESDB',N'SQLMERGEPUB_ES_MER',null,N'MERDB',100,N'MER-DEV-2')}
2012-02-20 01:04:40.809 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.813 OLE DB Distributor 'ZEUS': {call sp_MShelp_profile (13, 4, N'')}
2012-02-20 01:04:40.816 Percent Complete: 0
2012-02-20 01:04:40.817 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.817 Initializing
2012-02-20 01:04:40.820 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.823 Connecting to OLE DB Publisher at datasource: 'ZEUS', location: '', catalog: 'ESDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:04:40.824 Percent Complete: 0
2012-02-20 01:04:40.825 Connecting to Publisher 'ZEUS'
2012-02-20 01:04:40.826 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.846 OLE DB Publisher: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: ESDB
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:04:40.851 OLE DB Publisher 'ZEUS': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select collationproperty(@collation, N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
2012-02-20 01:04:40.854 OLE DB Publisher 'ZEUS': {call sp_MSgetversion }
2012-02-20 01:04:40.860 Connecting to OLE DB Publisher at datasource: 'ZEUS', location: '', catalog: 'ESDB', providerstring: '' using provider 'SQLNCLI10'
2012-02-20 01:04:40.880 OLE DB Publisher: ZEUS
   DBMS: Microsoft SQL Server
   Version: 10.50.2500
   catalog name: ESDB
   user name: ZEUS\mer_mergeagent
   API conformance: 0
   SQL conformance: 0
   transaction capable: 1
   read only: F
   identifier quote char: "
   non_nullable_columns: 0
   owner usage: 15
   max table name len: 128
   max column name len: 128
   need long data len:
   max columns in table: 1000
   max columns in index: 16
   max char literal len: 131072
   max statement len: 131072
   max row size: 131072
2012-02-20 01:04:40.890 This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:04:40.893 OLE DB Subscriber 'MER-DEV-2': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.899 Percent Complete: 0
2012-02-20 01:04:40.900 This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:04:40.900 OLE DB Distributor 'ZEUS': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-02-20 01:04:40.912 Percent Complete: 0
2012-02-20 01:04:40.913 Category:NULL
Source:  Merge Process
Number:  -2147199389
Message: This publication differs from the publication to which the subscription was initially created. The original publication may have been deleted and replaced with a new publication with the same name. At the subscriber, delete the subscription and recreate it for the new publication.
2012-02-20 01:04:40.914 Disconnecting from OLE DB Subscriber 'MER-DEV-2'
2012-02-20 01:04:40.915 Disconnecting from OLE DB Subscriber 'MER-DEV-2'
2012-02-20 01:04:40.916 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:04:40.917 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:04:40.918 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:04:40.920 Disconnecting from OLE DB Publisher 'ZEUS'
2012-02-20 01:04:40.921 Disconnecting from OLE DB Distributor 'ZEUS'
2012-02-20 01:04:40.923 Disconnecting from OLE DB Distributor 'ZEUS'

Queue Reader Agent getting aborted

$
0
0

Error messages:
Failed while resolving conflict (Source: MSSQL_REPL, Error number: MSSQL_REPL36047)
Get help: http://help/MSSQL_REPL36047

While Event viewer app log says

Replication-Replication Transaction Queue Reader Subsystem: agent [Server].6 failed. The Queue Reader Agent has encountered the error ''No specified error'' when connecting to "DBNAME" on "Server". Ensure that the publication and subscription are defined properly and that both servers are running.

Replication-Replication Transaction Queue Reader Subsystem: agent [Server].6 failed. Queue Reader aborting

Replication-Replication Transaction Queue Reader Subsystem: agent [Server].6 failed. Failed while resolving conflict

While I have seen for conflict but the windows poping out and saying there are no conflict. how I can resolve it??

"Personnalized" merge replication per subscribers?

$
0
0

Hi,

Here is the situation: We have a master database (SQL 2014 Std) from which data are imported from XML files (send by en ERP system) using SSIS.  There is about 12 other servers (SQL 2014 Express) located in remote warehouses. People will uses PocketPC to scan barcode of products in the warehouses and all operations must be forwarded to the master DB to be exported in a XML file for the ERP system.

Now, each warehouses are independant. How can I setup the replication so only data belonging to a specific warehouse is replicated to its corresponding DB? I thought about creating views, one for each warehouses, and setup a replication for each warehouse, so there would be 12 merge replications configured. Is it fine? Can I do that? Is there a better way to achieve what we need to do?

thanks for your time and help

Replication Monitor won't show (Error details or messages of the select session:)

$
0
0

Hi,

since I had a bad error in replication, my replication monitor won't show the tab "Error details or messages of the select session". 

I am not able to activate or to show this "tab", to get all information about my error.

I added two screeshots, one with the 3 tab, and the other, were the information about my error are missing. Any idea, how i can my default view back?

Replication Monitor OK:

My Replication Monitor with missing tab:

I had to know, which ID is causing a primary key violation. It would be nice, if someone could help me. Instead of Replication Monitor, I would use t-sql.

Thanks a lot

Regards,

Andreas

Viewing all 4054 articles
Browse latest View live




Latest Images