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

SQL server replication-- Uninitialize Subscription after recreating

$
0
0

Hello All,

I hv succsefully created Transaction Pull repliaction on 150 articles.bt now I am facing one issue regarding 'Uninitialize Subscription'

Actually problem started after Subscription server resarted and sm subscription goes into inactive state,when I am droping and recreating them they r not getting initialize showing me 'Uninitialize Subscription' status in repliaction monitor.data is going from distributer to Subscriber....

All agents are working properly.

Publisher , subscriber and Distributer hv SQL 2008 SP3 install on it.

Any suggetions will be appreciated...


In Replication i am unfortunately drop the distribution database after that i am unable to configure the publication site and subscription site what can i do?

Distribution agent getting very slow

$
0
0

Hi,

Distribution agent getting very slow all of sudden and Delivery rate went down from abuot 1700 Cmd/sec to about 980 Cmd/Sec. this is part of a nightly batch job with big volume of data and all was going well until a few days ago .. Replicated volume does not change much every night -- there was no changes to any of the machines .. down below is one of latest stats  .. any advise on solutions - Please .

Windows2008/SQL2008R2 64bit  -- Txn replication with three separate machines for Publishers, distributors and Subscribers. Checked many counters on three machines and all seem ok .. except applying commands to Subscriber. Subscriber machine itself looks ok as well .. CPU about 30% .. disk latency about 30ms and these have not changed for long time as well.

10-06-2012 06:36:14   
Total Run Time (ms) : 23463281 
Total Work Time  : 12199810 
Total Num Trans     : 1569577 
Num Trans/Sec    : 128.66 
Total Num Cmds      : 11968782 
Num Cmds/Sec     : 981.06 
Total Idle Time     : 11120531    
Writer Thread Stats   
Total Number of Retries   : 0    
Time Spent on Exec        : 11469232    
Time Spent on Commits (ms): 114752 
Commits/Sec         : 2.49   
Time to Apply Cmds (ms)   : 12199810 
Cmds/Sec            : 981.06   
Time Cmd Queue Empty (ms) : 386067 
Empty Q Waits > 10ms: 11859   
Total Time Request Blk(ms): 11506598    
P2P Work Time (ms)        : 0  P2P
Cmds Skipped    : 0   
Reader Thread Stats   
Calls to Retrieve Cmds    : 2272    
Time to Retrieve Cmds (ms): 2751325 
Cmds/Sec            : 4350.19   
Time Cmd Queue Full (ms)  : 9530352 
Full Q Waits > 10ms : 123304 

A Subscriber Row failed to apply at the Publisher

$
0
0

We have a merge replication topology set up between a SQL Server 2008 instance, and multiple SQL CE 3.5 subscribers.  We have begun seeing the following error on the subscriber machine while synchronizing:

"A Subscriber Row failed to apply at the Publisher"

Also, we see the following error in Conflict Viewer:

"A row insert at [Subscription Name] could not be propagated to [ServerDatabaseName]. This failure can be caused by a constraint violation.  Violation of PRIMARY KEY constraint [PrimaryKeyName]. Cannot insert duplicate key in object [ObjectName]. The duplicate key value is (5ef97fc3-e5e2-42b8-905d-2807687855e8)."

I've verified that a row with that PK value (the GUID in the error above) exists on the server (publisher), yet the subscriber seems to be trying to send another insert of the row with the same PK value.  To make things even weirder, the PK constraints also exist on the subscription CE databases, so how would a new insert with the same PK value even be allowed on the subscriber to prompt an Insert command to be uploaded at all?

There are no Foreign Key's on the publisher or subscriber, and I'd be happy to provide more info if needed.

Has anyone experience this before? Thanks!


Clint

How can I get a custom job name for transactional replication?

$
0
0

I am trying to set up transactional replication.  I want to specify a job name for my agents because I want the names to have meaning.  (Unlike the names Microsoft makes up if I leave it to default.) I am defining the job with:

    exec msdb.dbo.sp_add_job 
        @job_name='Replication - AdventureWorks2012 Log Reader Agent', 
        @enabled=1, 
        @notify_level_eventlog=2, 
        @notify_level_email=1, 
        @notify_level_netsend=0, 
        @notify_level_page=0, 
        @delete_level=0, 
        @description='AdventureWorks2012 Log Reader Agent', 
        @category_name='REPL-LogReader', 
        @owner_login_name='sa';

Then I attempt to define the agent with 

    exec sys.sp_addlogreader_agent 
        @job_name = 'Replication - AdventureWorks2012 Log Reader Agent',
        @publisher_security_mode = 1;

And I get...

The specified Logreader Job ('Replication - AdventureWorks2012 Log Reader Agent') does not exist.

If I comment out the @job_name parameter - an agent does get defined.

What am I doing wring here?


John

Remain the replication setting after restore database

$
0
0

Hi ALL

I will help to migrate database to a new server. and the database currently is pulisher and distributor to replicate data to another server.

how can I remain all the settings of the replication after migration of the database ??

SQL Server Transactional Replication Fails OS error 3

$
0
0

I have set up Transactional Replication without updating Subscriptions.  The Distribution database appears to be configured correctly (it resides on the same SQL Server instance as the Publication database).  The Publication database seems to work okay, as evidenced by: 1) the initial Snapshot seems to have been set up successfully; and 2) the log reader agent is running successfully.  Where I have the problem is on the Subscription side agent.  It fails to complete giving an error message of:

The process could not read file 'f:\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\PDAEGISDBDEVVM_NWSAEGISMSPDB_NWSAEGISMSPDB_PUB\20121008163528\ZetronUnitNumber_1465.pre' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL20024)

I believe I know what the problem is, but I don't know how to fix it.  I think the Subscription database is trying to access the file on a path that doesn't specify the Publication database.  I specified that the repldata files would be stored on a locally attached disk with a path name of f:\MSSQL10.MSSQLSERVER\MSSQL\ReplData.  But I am not too sure about how to make this path name known to the Subscription server. 

I am performing a "pull" subscription.

Can i stop logshipping or Database mirroring or Replication,if i need to insert,update data or add new SP and tables to the database?

$
0
0

I have got deployemnt scripts having some inserts,updates and adding some tables and storedprocedures to the database(logshipping setup - Primary).Do i need to stop logshipping?.

If it mirroring or replication.Do i need to stop?

Thanks,

Ron.



Log shipping

$
0
0

What steps should I follow to make the secondary server as the primary server where the database is in read only mode. Do I inactivate log shipping and restore the read only database from the transaction log.

Prinary key violation after subscribing to a database

$
0
0

Hi,

  I am working on publishing and subscribing.  I published a database and subscribed it. Now when start testing on my subscribed database i am getting primary key violation. I know its because the primary key id range is not correct. But dont know how can I correct it.


Can anyone help me how can I do it. I am using sqlserver 2000 and sql server 2005.


Thanks in advance

Pavan


Pavan

MSmerge_bi_... tables growing

$
0
0

Hi$

I have an SQL server merge replication, that works fine.
However, there are a number of tables named MSmerge_bi_<GUID>, which now take up more than half the storage space in the database.
I found no info on these tables on the net.
They contain a column named generation, that seems to contain references to very old replication generations (they are not present in MSmerge_genhistory).
What are these tables?
Is there a way to clean them up?


BalintN

rebuiling Indexes with replication

$
0
0

Dear All,

We have two servers having SQL SERVER 2000 with enterprise edition,

For 1<sup>st</sup> Server: I have scenario where i need to rebuild the indexes of few major tables and we have replicated these tables to another server (backup server for reporting purposes)

For 2<sup>nd</sup> server: I need to run rebuilding of indexes, but 20 tables out of 49 are not being replicated.

 

Please advise, do I need to stop the replication process while running the rebuild indexes of these tables. Or replication will not be impacted in any case.

 Please share what plan of action I can execute for this situation.

 


Somesh


SQL Server Transactional Replication No Updating Subscriptions/Pull Subscriptions OS Error 3

$
0
0

<continuation of earlier question in the day>
I have set up Transactional Replication no updating Subscriptions.  The Distribution database resides on the same SQL Server instance as the Publication database.  The Publication DB is OK -- the initial Snapshot ran  successfully and the log reader agent is running successfully.  I defined a Pull subscription.  The problem I have is an ongoing problem with OS error3:

The process could not read file 'f:\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\PDAEGISDBDEVVM_NWSAEGISMSPDB_NWSAEGISMSPDB_PUB\20121008163528\ZetronUnitNumber_1465.pre' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL20024)

This path is permits reads by everyone.  I want to change this path to be something like \\ following by <server name> \ followed by <drive share name> \followed by MSSQL10.MSSQLSERVER\MSSQL\ReplData\

I have updated the path name change in the Distribution properties (Snapshot), but I am still getting this same error.  I have also run the SP: sp_updateextendedproperty, but it still fails.  Can you tell me how to update it with this path with the correct definition?  Thanks.

This operation conflicts with another pending operation on this transaction

$
0
0
We have a database on server1 which has a series of stored procedures that perform select and inserts into another database on a linked server on server2. The database on server2 is setup as a merge publication for replication externally. I have removed the publication from server2 and I can now run all the stored procedures successfully and it only takes approx 45 minutes to complete.

If I re-add the publication the process takes about 3 hours sends the SQL server cpu usage into overdrive and the procedures fail with:
 Msg 3970, Level 16, State 2, Procedure MSmerge_ins_B59B83C7DBBD4E82985EE7A62558E4EE, Line 31
This operation conflicts with another pending operation on this transaction. The operation failed

I think this is something to do with identity range settings on the publication, but I don't fully understand how I should be adjusting this. I also don't understand why it is also more demanding on server resources and takes so much longer

Thanks
Craig

Why is the insert trigger on the subscriber table causing the following replication error?

$
0
0

Hello,

I had set up a transactional sql to sql replication a couple months ago and now the business would like for us to build a real time reporting database off of the data.  However, in each table in the reporting database, they would like us to add the following columns: Deleted_Date, and Duplicate_Date.  These dates will let them know when the record was deleted or came through as a duplication.  So that eliminated the idea of using transactional replication and I started looking into triggers.  As a test, I created an insert, update, and delete triggers on one of the tables at the subscriber.  When an insert or delete was executed at the publisher, the insert and delete triggers at the subscriber executed successfully with no issues.  However, if an update is executed at the publisher then replication encountered the following error below.  If I delete the insert trigger on the table then replication is happy and continues.  After further research, I found that 'If any column that is part of a unique constraint is updated, then SQL Server implements the update as a "deferred update", which means as a pair of DELETE/INSERT operations'.  I did check the columns that are being updated and they are not part of a unique constraint or primary key so I'm at a dead end.  Any ideas or workaround?  Thanks.

http://support.microsoft.com/kb/238254

Command attempted:

if @@trancount > 0 rollback tran
(Transaction sequence number: 0x00000F8D0001F13A000F00000000, Command ID: 2)

Error messages:
The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction. (Source: MSSQLServer, Error number: 3930)
Get help: http://help/3930
The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction. (Source: MSSQLServer, Error number: 3930)
Get help: http://help/3930

Tae


tae yang






SQL Server Transactional Replication (No Subscriber Update): DB Maintenance Question

$
0
0

I have Transactional Replication with no subscriber update and pull subscriptions.

I understand that routine maintance has to be performed on the Subscriber database as usual.  What I am wondering about is the Distribution database and the Publication database.  I have read that I should specify:

sp_replicationdboption  'Distribution','sync with backup','true'

to make sure that my log backups include all the transactions.  I should also run this on the Publication database.  Would you agree with this? 

                                       

Jim Drewe

SQL Server Transactional Replication (No Subscriber Update): DB Restore Question

$
0
0

I have Transactional Replication with no subscriber update and pull subscriptions.

My question involves database restores.  I understand that performing a restore with Transactional Replication, I can ignore the option “Preserve the replication settings (WITH KEEP REPLICATION)” since that deals with Log Shipping only.  I am questioning this since I ran a restore from a production non-replicated database backup file to my replicated test database.  It wiped out my replication and I had to rebuild it. 

My question is when I restore from a non-replicated database to a replicated database should I specify this option to protect my definitions? 

How about if I restore from a replicated database backup file to a replicated database?  Is it only for Log Replication?

Thx.


Jim Drewe

merge replication showing error

$
0
0
I am doing merge replication in sql server 2008.I was working fine for about 2 weeks.But from last two days i can see some error in replication monitor. what may be the reason for these errors.I have not changed any settings or password in publisher or subscribers.In the below image it shows at 8:57 AM agent as running. But i hav scheduled it for 12:00 PM. please help me on this..i am new to replication..

Merge Replication move - SQL Server version

$
0
0

Hello,

I asked in a previous question how to move a database with merge replications on it. (move master, publication, distribution, msdb with keep_replication-flag on a server with the same hostname)

But on the old server (Windows Server 2003) i run SQL Server 2008 Standard Edition. Can there be a problem, if I restore the database on a Windows Server 2008 R2 with SQL Server 2008 R2 on it?

Otherwise I could also install a SQL Server 2008 Enterprise Edition, if this would work?

Thanks, Karl



Move 2005 DB to 2012, shrink and then move to 2005 again after replicatiom

$
0
0

Hi,

I had a problem on one of our databases, i could not shrink it in the server where it was hosted even in single user so i prepared a new server and made a copy of the database and shrink that copy with sucess, now i want to syncronize da databases since the original is in use.

After the databases are sync i want to substitute de original with the shrinked one from the SQL 2012 to the SQL 2005.

The shrink part is made, now i need to sync, what woud you recommend mirroring or subscrition?

Is possible after that move the database from the 2012 back to the 2005 ?

Any other ideas?

sincerely,

AM

Viewing all 4054 articles
Browse latest View live