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

Transaction replication Error

$
0
0

Hi,

We are having a replication between two servers both are in SQL server 2000 standard edition. The service packs of both these are at different levels.

The transactional replication was working for almost 6 months with out any issue. All of a sudden from the last one week we are getting following error.

Error at parameter 29 during datastream processing of parameterized command.

Error at parameter 45 during datastream processing of parameterized command.

This error occurs every 5 minutes.

I ran DBCC checkdb in publisher, subscriber and distributor. There are no errors\corruption.

Logintimeout for the distribution agent was increased from 15 seconds to 1000 seconds. This also did not help to solve the issue.

Service pack was not installed in the last 6 months.

Can someone help how to resolve this.

Thanks


Initial snapshot in Transactional replication

$
0
0

Hi, 

  • SQL 2008R2 

Having a problem getting the initial load (snapshot?) of a database at the subscriber.  I went through the wizard and selected create new database at the subscriber, so it's basically empty.  It's a pull subscription and all  the agent jobs work fine (no errors) but no data is being replicated over to the subscriber.  

The folder in Windows is getting all the snapshot files.

I did this in a test scenario, the only difference begin that I restored the subscriber database from the publisher database and all worked fine.  

Probably missed the obvious here but anyone have any thoughts on what it might be? 

 

Relationship between subscription and agent job

$
0
0

Hi, 

When I create a transactional subscription (SQL 2008R2) I also get a SQL agent job.  Is it safe to rename this agent job to something else as the name is awful and it has an incremental number at the end. 

Thanks

Replication ceases working after adding table at publisher

$
0
0

Hi, 

I have a transactional replication between two SQL 2008 R2 which has been running fine for hours.  I just added a new table in the publisher, added a PK and inserted 10,000 rows.  I re-initialized  the publication and the subscriber and now no replication is taking place.  There are no errors from the SQL agent jobs at either side and nothing in the replication monitor.  

I've deleted the table in the publisher but still I seem to have broken the sync between the two. 

The publication is creating files just fine in the Windows share.

I suppose I could just drop the subscription, as this seems to be the issue, and re-create it.  Can't see why adding table/index/rows in a subscriber causes this though.  

Any advice on where else to look? 

Thanks 

Change Data Capture, insert+delete instead of update

$
0
0

Hello everyone,

I'm having an odd issue, that I need some help understanding.  I've got a number of tables enabled for Change Data Capture, but I've noticed some behavior that doesn't make sense.

I am utilizing CDC to populate an ODS via SSIS packages, and have noticed a few instances where I'm getting a delete operation come through, but the source record still exists.  In the source system, I can query 'cdc.fn_cdc_get_net_changes_...' and see combinations of 1 (delete) and 4 (update new) for the __$operation.

__$start_lsn, __$operation, TableId, ...
0x000BB75700002F250005, 1, 1938241
0x000BB75700002F250005, 4, 1938241

Also, if I query the cdc.<Table>_CT table directly, I see pairs of 1 and 2 (insert) for the same __$start_lsn and __$seqval.  How can this happen?  If I get *net* changes, shouldn't I only get one record back per the primary key of the source table?

__$start_lsn, __$seqval, __$operation, __$update_mask, TableId, ...
0x000BB75700002E7C0005, 0x000BB75700002E7C0003, 1, 0x0FFF, 1938241
0x000BB75700002E7C0005, 0x000BB75700002E7C0003, 2, 0x0FFF, 1938241
0x000BB75700002F250005, 0x000BB75700002F250003, 1, 0x0FFF, 1938241
0x000BB75700002F250005, 0x000BB75700002F250003, 2, 0x0FFF, 1938241

Let me say, I've got a trace going to see if I can find the command(s) that is causing the duplicate results, but has anyone ever seen this before? 

Thanks in advance for your time and help!

Jarret


Merge Replication The process could not connect to Distributor

$
0
0

I am attempting to test merge replication between servers on different workgroups. I have setup accounts with the lame logon on both server machines as well as in the SQL server.  I have also set alias's on both machines.

When I attempt to synchronize the Db's the agent fails with 'The process could not connect to Distributor'. I'm not sure what I am doing wrong.

Any advice?

Implementing a Database Project with TFS on a Database with merge replication.

$
0
0

Hi all, i think this is a very interesting issue that i want to ask you, i have a merge replication topology, 1 publisher and 4 suscribers, but now... the most important thing here is, i want to handle the versions of the database with a database project but my doubt is how can i do that ??? it is complex to perform ?, how can i perform it ?

Please if you know how can i implement a database project and handle the versios but keeping the merge replication topology i will apreciate you so much !

Thanks and regards.

Replication and Alias Server Names

$
0
0

Hi all

I have two SQL Server Instances each on its own domain where the domains do not trust each other. One instance is 2008 R2 while the other is 2012 SP2. I can connect to each server remotely either from DomainA\2008R2Instance looking at DomainB\2012Instance or vice versa using a SQL Login.

The problem I experience is that when trying to set up a Subscription from DomainB\2012Instance I get an error suggesting that the DomainA\2008R2Instance cannot be found. This is odd because when using normal connection via SSMS I can connect to the server either from DomainA or DomainB. However Replication is not able to see each other?

I have read that possibly I have to set up an Alias name for the remote Server from DomainB\2012Instance when trying to connect to the DomainA\2008R2Instance.

This information is found here:https://support.microsoft.com/KB/321822?wa=wsignin1.0

However I am not sure which section to use in the document?

Anyone have any experience with this type of thing?

Thanks in advance.

Dom


gbuidrow question

$
0
0
I've just setup a Merge Replication, and wondering guidrow. Is there a best practice for generating these values?

Subscription not showing up on subscriber

$
0
0

Hi,

I have SQL server 2008 installed on 3 servers; one acting as publisher, another as subscriber and 3rd one as distributor. I added a new table for replication in a new publication. I then added a subscription for that publication at the subscriber. Now, the subscription is not listed and neither is the table showing up on the subscriber.

The publication status in the replication monitor shows as critical. The snapshot agent took a 100% snapshot of the article. MSrepl_errors also does not list any errors.

I tried adding the subscription again but it gives an error saying it already exists. I also tried deleting the publication & subscription and re-creating them. But none of these helped.

A few days back, some existing tables failed to replicate newly added rows for a few articles. Somehow this got resolved when the distributor was rebooted. But I do not want to reboot the distributor every time this issue is seen.

Can someone please help me debug the issue?


AA

GENERATING A SNAPSHOT PROBLEM - MERGE REPLICATION

$
0
0

I HAVE A MERGE PUBLICATION, AND I WANT TO GENERATE A SNAPSHOT, BUT WHEN I TRY TO DO THAT THE AGENT SHOWS ME THIS MESSAGE 

[0%] The process is running and is waiting for a response from the server.

AND THE SNAPSHOT IS NOT GENERATED :( I DONT KNOW WHAT IS HAPPNENIGN, THANKS IN ADVANCE


Copy Permissions for Non-DBO Stored Procedures

$
0
0

Hello,

I perused this forum and I've been all over the web with this. I'm attempting to "copy permissions" on stored procedures that are not in dbo schema, using snapshot replication. This results in a System.NullReferenceException, Object Reference Not Set to An Instance of An Object error. Followed by Version string portion was too short or too long.

I've seen some other folks post the same issue and seen this referenced on the Microsoft Connect site as Closed Won't Fix. https://connect.microsoft.com/SQLServer/feedback/details/431393/replicate-permissions-option-on-stored-procedure-in-non-dbo-schema-causes-snapshot-agent-to-crash

Surely, there has to be a solution to this by now!?! This was first noted in 2009. I am running SQL 2008 R2 Enterprise 64, SP3. What I have discovered in researching the issue, and testing, is that this is associated with the object not being part of the dbo schema. If I place the stored procedures in dbo, snapshot runs and the permissions get passed to the publication database.

Does anybody know if this has been addressed? Running a script at the end of the process is not optimal for this situation.

Does Log reader agent use sa in sp_replcmds?

$
0
0

We have publisher, subscriber, and distributor on separate servers. Replication is Push Transactional with replication agents setup to run under SQL Agent account context. We are in the process of disabling sa from everywhere and I am monitoring sessions that use sa to make sure there is no impact.

I see that log reader agent session sometimes uses sa as login name in its sessions on publisher. In sys.dm_exec_sessions, there are two columns for login: Login_Name and Original_Login_Name. The Login_Name shows sa. Most of the time the SPID of log reader agent on publisher shows the SQL agent service account as login name of the session. But sometimes the same SPID shows sa as login name. This always coincides with session running SP_REPLCMDS without any parameters and also messages like "The Log Reader Agent is scanning the transaction log for command to be replicated. Approximately...." in Replication Monitor. Normally, the session would run SP_REPLCMDS giving some parameters. When this happens, in sys.dm_exec_sessions, the log reader SPID keeps showing Original Login name as that of Distributor agent service account but login_name sa.

Does sp_replcmds run as sa? If I disable sa on publisher, distributor, and subscriber, will it break replication?

DB audit on merge replicated DB

$
0
0

Hi ALL,

I have merge replication configured on sql server 2008. My question is can i  create DB audit(which is available from 2008) on merge replicated db. creating db audit causes any issues in replication?

TIA

DBMS

$
0
0

   Is SQL a DBMS? WHY OR WHY NOT?


Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200992)

$
0
0

We are observing an issue in replication ,on further analysis we encountered the following error message at SQL management console for IntelliAgent_A_A_Repl<o:p></o:p>

 <o:p></o:p>

Error messages:
The merge process could not store conflict information for article 'IS_nQueryCMAMaster'. Check the publication properties to determine where conflicts records are stored. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200992)
Get help: http://help/MSSQL_REPL-2147200992
Cannot insert duplicate key row in object 'dbo.MSmerge_conflicts_info' with unique index 'nc1MSmerge_conflicts_info'. The duplicate key value is (89044001, b2201f36-7d9d-e411-9403-42f2e996c2b9, SI-PRI-A-01\MSSQLEXPRESS2012.IntelliAgent_A_A_Repl, 1). (Source: MSSQLServer, Error number: 2601)
Get help: http://help/2601

<o:p></o:p>

Merge Rep - excessive enumeration of article during Initialisation

$
0
0

Hi all,

This is for a Merge  pull replication , publisher SQL2008 , subscribers SQL2008 Express. Partitioned by SUSER_NAME

There are a couple of articles that have the following issue :- when a subscriber is initialised, after BCP'ing the data in,
the sync seems to enumerate and download the whole table multiple times. 

Extract of the history cut down to bare bones is as follows for one such table ('universe').
The table has roughly 58,000 rows, and is unfiltered (whole table downloaded to subscriber). 
It is not heavily updated. The metadata seems to reflect this with no excessive volumes for this table in msmerge_contents
or msmerge_genhistory.

End result is 696516 changes downloaded for a table of 58k rows that has just been BCP'd into using a dynamic snapshot.

I'd love to avoid this overhead , can anyone please help me track down the reason why this happens (and avoid it) ?

Thanks !

Initializing
Connecting to Publisher 'PUB-SRV'
Checking to see if there is a partitioned snapshot available for this Subscriber.
Creating the partitioned snapshot, since it was not already available for this Subscriber.
Starting agent.
Initializing
Connecting to Distributor 'PUB-SRV'
Connecting to Publisher 'PUB-SRV'
Publisher database compatibility level is set to 100.
Retrieving publication and article information from the publisher database 'PUB-SRV.PUBL'
[0%] A dynamic snapshot will be generated at '\\PUB-SRV\Repldata\unc\PUB-SRV_PUBL_PUBL\DAVEUSER_1824\'.
[0%] Using the login 'LHF\DAVE.USER' for dynamic filtering
[0%] Using the hostname 'PUB-SRV' for dynamic filtering
[0%] Getting the subscriber partition id
[0%] Copying F:\ReplData\unc\PUB-SRV_PUBL_PUBL\20150212083346\Acc_28.sch to Publication's snapshot folder
...etc
Bulk copying data into table 'universe'
Bulk copied data into table 'universe' (58043 rows)
Applied script 'universe_52.dri'
Applied script 'universe_52.trg'
Applied script 'universe_52.prc'
...
Downloading data changes to the Subscriber
Enumerating changes in filtered articles using Subscriber's assigned partition ID.
Enumerating deletes in all articles
Downloaded 500 change(s) in 'universe' (500 updates): 500 total
...etc
Downloaded 500 change(s) in 'universe' (500 updates): 58000 total
Downloaded 43 change(s) in 'universe' (43 updates): 58043 total
Enumerating deletes in all articles
Downloaded 500 change(s) in 'universe' (500 updates): 58543 total

Downloaded 500 change(s) in 'universe' (500 updates): 116043 total
Downloaded 43 change(s) in 'universe' (43 updates): 116086 total
Enumerating deletes in all articles

...this pattern may repeat many times until ...

Downloaded 500 change(s) in 'universe' (500 updates): 696473 total
Downloaded 43 change(s) in 'universe' (43 updates): 696516 total

696516 changes downloaded for a table of 58k rows that has just been BCP'd into using a dynamic snapshot !

Restore log and differential backups on a Publication database.

$
0
0

Hi, i have the following issue, i have to restore a log backup and a differential backup in a publication database, the problem is that i want to keep the publications and the subscriptions without recreate the subscriptions.

So how can i perform this goal :/ is somebody know how can i do that please let me know :D !!! thanks in advance.

In my case is a merge replication....

Added another subscriber to existing publication. Snapshot delivered but ket re-initializing if Distribution agent is restarted

$
0
0

Hi,

Here is the situation. We have existing replication with sql 2008 r2 publisher and a subscriber on same edition. The database is quite big so snapshot generally takes about 4 hours or more. There are additional tables on subscriber so a backup / restore mode of initialization is not suitable.

This replication is working just fine, now there is a need to add a sql 2014 subscriber to this publisher and same tables as in current publication, so we decided to simply add another push subscription for this new sql 2014 subscriber. During the process the Initial snapshot is generated and applied to new 2014 subscribe, keep in mind we have not made any change to publication to avoid affecting the existing subscriber. So when snapshot is delivered and appeared in replication monitor it started creating primary keys on subscriber database. We have few big tables where we are not sending clustered and non clustered indexes across so that replication snapshot goes fast (although it is over 4 hours). These indexes and primary keys get created with manual scripts after snapshot is generated. During this time log reader agent has been actively sending transactions to existing subscriber that is telling me that as soon as distribution agent done with the snapshot it will start sending transactions to new subscriber (which is quite normal). Now the problem, after snapshot is done I need to run manual scripts to create PK and indexes on new subscriber, to do that I have to stop distribution agent so that indexes and PKs don't get blocked. After I stopped distrib agent temporarily, the Scripts got completed successfully within 20 minutes and when I re-started distribution agent , to my surprise it started initializing the new subscriber again and sending same snapshot that was already applied. It make me puzzled what caused the distribution agent to reinitialize although it already delivered snapshot and I have indexes created and ready to go. I tried this process again with more careful approach and gave about one hour after snapshot delivered message received. but it did the same thing.  Only explanation I can think of that publisher database is actively sending transactions when I was applying snapshot and as soon as it is delivered, the distribution agent started delivering transaction, I could see Undistributed Commands kept on growing high telling me that there are lots of transactions for new subscriber to catch up but without indexes and some missing primary keys it would not even catch up and so I always stop the distrib agent and run my scripts on subscriber and run into this situation. During all these times the existing subscriber never had any issue.

Do I need to make sure no ort minimal transactions happening on publisher when I initialize the new subscriber.

Or should I create new separate publication on the same publisher and use that.

Any other suggestions are welcome

Thanks!


dba60

copy or replication

$
0
0
Dear,

I need the following:

I need to make a copy or replication of database update on another server or in it, either in the same instance or another instance.

What I need is to have the updated every 15 minutes because that base will integrate with REPORTING base.

Try doing the following method:

Footsteps by Replication

But upon entering the data automatically replicated in seconds, but when entering a new table does not.

If you need some other features.
No Date Available qeremos high or mirror.
Pending a prompt solution.

regards,

Edwin Duran Ospina _____________________________________________ Si la respuesta ha sido la solución, favor marcarla.

Viewing all 4054 articles
Browse latest View live




Latest Images