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

Logreader alert indicate logreader has stopped but it hasnot.

$
0
0

OS: Windows Server 2008 R2 Enterprise SP1

            64 bit 128gb ram

SQL Server: SQL Server 2008 (SP2) - 10.0.4371.0 (X64)

            Enterprise Edition (64-bit)

Issue:

            Server is running Transactional Replication with alert configured to send notification when there is no instance of logreader running.

Performance object

SQLServer:Replication Agents

Counter

Running

Instance

            Logreader

Alert

            If counter becomes 0

This alert started yesterday during database maintenance when large volumes of index were being rebuilt or reorg.

I stopped the Logreader and restarted hoping it would clear the alert but it hasn’t. The job is running and data is being replicated to subscriber.

Query of mslogreader_history shows runstatus  =  3

Why is this happening and how do I stop it?


Central Subscriber Replication Model For DatawarehousingDB

$
0
0

Hi All,

Right now our company is setting up dataware house, for this we got requirement  to update the incremental data to STAGINGDB from two different servers(PROD BOXES).

we need to update the stagingdb twice or thrice in a week, and there will be around 15-25 tables in each database\server.

As per my knowledge the proposed idea is

-->set up transaction replication with central subscriber model so that our staging DB will be subscriber with two publishers.

-->I was thinking to go with Pull Subscription as this doesn't effect our publisher's performance as they are core PROD boxes.

-->tables are not that much huge so can I go with Snapshot REPL instead of Trans REPL

-->is push/pull subscription which will be the better/efficient for this type of setup(central subscriber  model)

could some one please review this plan/doubts and correct me.

with regards,

Ram


How to stop the auto-start of log reader agent (replication) right after my database is restored?

$
0
0

I have the scenario where the SQL server is restored (after migration).

This database has transactional replication set-up on one of the databases. When I do a manual delete and restore of the database, I see that the replication starts right after the publisher and subscriber are restored.

Replication agents should not start and run before the integrity checks are completed. How to stop the replication from auto starting right after the migration?

Thanks in advance - Jebah


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.

How To: Adding an article to snapshot replication and only replicate the change.

$
0
0
I know in transactional replication you can add an article and only have that article replicated to the subscribers without snapshotting the entire publication again. Transactional replication is built on snapshot replication, or I would think it is, so I want to understand how to replicate the one snapshot vs. the whole publication.

John M. Couch


SQL SERVER 2012 Mirror Issue

Cannot view Distributor Properties and create a new publication in SQL Server 2012

$
0
0

I created a distributor, publisher and subscriber in SQL Servers successfully few weeks ago.

I want to record steps to create distributor for preparing documentation. 

Therefore I select "Disable Publishing and Distribution" in Replication to drop all replications. I found that the task is too slow and then I stop the task

I try to open Distributor Properties, it shows the following error

Message 1: SQL Server is unable to complete the Distributor Properties. (Distributor Properties)

Message 2: Could not refresh properties of this object from server. Check if this object still exists on the server.  (Microsoft.SqlServer.Rmo)

Program Location:


   at Microsoft.SqlServer.Replication.ReplicationObject.Refresh()
   at Microsoft.SqlServer.Management.UI.DistDBList.Load(ReplicationSqlConnection distConn)
   at Microsoft.SqlServer.Management.UI.DistributorProperties.LoadProperties()
   at Microsoft.SqlServer.Management.UI.DistributorProperties..ctor(IServiceProvider serviceProvider)
   at Microsoft.SqlServer.Management.UI.DistributorPropertiesControl.OnHosted()
   at Microsoft.SqlServer.Management.SqlMgmt.SqlMgmtTreeViewControl.SetSite(IServiceProvider sp)
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.ProcessAllViews()
   at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane)
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
   at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(ISqlControlCollection control, IServiceProvider provider)
   at Microsoft.SqlServer.Management.UI.LaunchDistributorProperties.PrepareToShow()

Can anyone advise on this problem?

Thanks,

Tony

SQL Server Replication from 2008 to 2005

$
0
0

Hi Guys,

 

Im trying to set up transactional replication from SQL 2008 CTP to a SQL 2005 database. 

 

I have no problem setting up the publication on the SQL 2008 server though 2005 gives me an error stating that it cant connect the SQL Version 10?

 

Does anyone know a work around for this?

 

Thanks

 

Richard


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....

Replication question

$
0
0

We have 3 databases as part our new process as named below

Gemini_Prod, cap_Prod and IN_Staging.

IN_Staging consists of

- all tables from Gemini_Prod. Each table renamed as 'GE_'+old table name

- all tables from Cap_Prod. Each table renamed as 'ca_'+ old table name.

Every night Gemini_Prod and Cap_Prod will be updated with new data for previous day (using IntelligentConverter software).

The question is how to update IN_Staging with new data?

Can we set up nightly merge replication or any other type of replication can be set up from Gemini_Prod to IN_Staging and from Cap_Prod to IN_Staging?

Please advice .

Thanks,

sp_MSgetpeerlsns getting blocked in peer to peer replicatoin

$
0
0

Hi All,

We have 4 node peer - peer replication on SQL server 2008 R2 Sp1 , table is around 10 GB and have more inserts (for logging purpose), we have more blockings on table due to replication and impacting production now , blockings are created by dbo.i_table_name.... stored procedure (replication SP) , sp_MSgetpeerlsns is getting blocked by I_table_name.. SP(Insert peer-peer replication SP) , We have insert happening on all 4 nodes , so inserts will be happening frequently and blocking sp_msgetpeerlsns  and table (blocking on index key on table), Same table will be used mostly and so users are unable to access the able and session getting expired due to the same.     ,Please assist I tried rebuilding the indexes,  but issue still persists. Thanks in advance.

msrepl_command

$
0
0

Hi All,

I am running below command in sql server 

select distinct DB_NAME(publisher_database_id),COUNT(1) from MSrepl_commands(nolock)
group by DB_NAME(publisher_database_id)

 It provide information about those user databases which i have never used in replication and even two dbs like 

ReportServer
ReportServerTempDB

so anyone tell me why this command provide information about non replicated database.

And another question is how can i delete undistributed transaction from distribution db (msrepl_command)

Thanks

The process could not execute 'sp_repldone/sp_replcounters'

$
0
0

Hi, 

Have transactional replication running between two SQL2008 R2 databases on different servers/instances.  

The published database is managed by a third party who as part of their release script restore a new database over the top of the live database, this has now "broken" the replication.   Been reading around on how to fix this and I think I have it clear in my head, however would be grateful for a sanity check. :-)

Publisher

  1. No users in the database
  2. Stop the "log reader" agent  
  3. Execute sp_repldone on the published database 
  4. Reinitialize the publication. 
  5. Start the "log reader" 

Subscriber

  1. Reinitialize the subscription 

Does this sound right? 

I would like to script this if possible, not sure how to script the stop/start of the agent though. 

Thanks 

Log Reader Agent: transaction log file scan and failure to construct a replicated command

$
0
0

 

I encountered the following error message related to Log Reader job generated as part of transactional replication setup on publisher. As a result of this error, none of the transactions propagated from publisher to any of its subscribers.

 

Error Message

2008-02-12 13:06:57.765 Status: 4, code: 22043, text: 'The Log Reader Agent is scanning the transaction log for commands to be replicated. Approximately 24500000 log records have been scanned in pass # 1, 68847 of which were marked for replication, elapsed time 66018 (ms).'.

2008-02-12 13:06:57.843 Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on ServerName.'.

2008-02-12 13:06:57.843 Status: 0, code: 18805, text: 'The Log Reader Agent failed to construct a replicated command from log sequence number (LSN) {00065e22:0002e3d0:0006}. Back up the publication database and contact Customer Support Services.'.

2008-02-12 13:06:57.843 Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'ServerName'.'.

 

Replication agent job kept trying after specified intervals and kept failing with that message.

 

Investigation

I could clearly see there were transactions waiting to be delilvered to subscribers from the followings:

 

SELECT

*FROM dbo.MSrepl_transactions -- 1162

SELECT

*FROM dbo.MSrepl_commands -- 821922

 

The following steps were taken to further investigate the problem. They further confirmed how transactions were in queue waiting to be delivered to distribution database

 

-- Returns the commands for transactions marked for replication

EXEC

sp_replcmds

 

-- Returns a result set of all the transactions in the publication database transaction log that are marked for replication but have not been marked as distributed.

EXEC

sp_repltrans

 

-- Returns the commands for transactions marked for replication in readable format

EXEC

sp_replshowcmds

 

Resolution

Taking a backup as suggested in message wouldn't resolve the issue. None of the commands retrieved from sp_browserreplcmds with mentioned LSN in message had no syntactic problems either.

 

exec

sp_browsereplcmds @xact_seqno_start ='0x00065e220002e3d00006'

 

In a desperate attempt to resolve the problem, I decided to drop all subscriptions. To my surprise Log Reader kept failing with same error again. I thought having no subscription for publications log reader agent would have no reason to scan publisher's transaction log. But obviously I was wrong. Even adding new log reader using sp_addLogreader_agent after deleting the old one would not be any help. Restart of server couldn't do much good either.

 

EXEC

sp_addlogreader_agent

@job_login

='LoginName',

@job_password

='Password',

@publisher_security_mode

= 1;

 

When nothing else worked for me, I decided to give it a try to the following procedures reserved for troubleshooting replication

 

--Updates the record that identifies the last distributed transaction of the server

EXEC

sp_repldone @xactid =NULL, @xact_segno =NULL, @numtrans = 0, @time = 0, @reset = 1

 

-- Flushes the article cache

EXEC

sp_replflush

 

Bingo !

Log reader agent managed to start successfully this time. I wish if I could have used both commands before I decided to drop subscriptions. It would have saved me considerable effort and time spent re-doing subscriptions.

 

Question

Even though I managed to resolve the error and have replication funtioning again but I think there might have been some better solution and I would appreciate if you could provide me some feedback and propose your approach to resolve the problem.

Replication fails to replicate Data from Publisher To Subscriber when run DBCC shrinkfile on datafile

$
0
0

Hi,

We had purged  a lot of unwanted data from one of our replicated databases ,the data was purged from the non replicated articles

Planned to shrink the data file using (DBCC shrinkfile) to claim the space back .The dbcc was running more than 20 hrs .

we saw  this morning that replication was lagging .

On looking at the replication  monitor (Publisher To Distributor History ) says that (the Log reader Agent is scanning the transaction log for commands to be replicated .Apx 339000000 log records have been scanned ).

Checked the log file size of the DB  its about 400GB .

Suspected that the log growth might be because of dbcc command  and killed the dbcc and tried to shrink the log file which came to 200 gb ,but still the replication is not back to speed .

Can someone please explain the background process that happened in the above process which caused the above affect  and any ideas on how to get the replication back to normal.

Thanks,

Jack


Need to shrink huge log file

$
0
0

Hi, 

Have a database which is published using transactional replication.  The replication was broken yesterday due to a restore.  In order to try and fix this I issued  the "EXEC sp_replrestart" command and left it running, unfortunately it has now filled up the disk the log sits creating a 250GB file. 

Getting this error: 

Msg 9002, Level 17, State 6, Procedure sp_replincrementlsn_internal, Line 1 The transaction log for database 'RKHIS_Live' is full. To find out why space in the log

cannot be reused, see the log_reuse_wait_desc column in sys.databases


I really need to free up space on this disk and shrink the log, however I can't backup the database. 

I've not tried shrinking the files yet as I can't do a full backup.

Any ideas? 

I don't care about replication at this point and will happily ditch it if it gets me out of this situation. 

Thanks 

 

Does Microsoft have any iAnywhere Mobilink like tools?

$
0
0

Hi guys

We have a project that involves 2 or more disconnected field worker that need to sync data to a master repository.  The requirements are still evolving, but it's possible there may be complex rules where a record in the master repository may only be changed if some other condition exists.

I worked on a similar project back in the early 2000s and at that time we used Sybase's Mobilink platform to establish those update rules and sync the data.  I'm wondering if Microsoft has similar technologies now?  I realize I can write the rules manually for the sync in an SSIS package, but wanted to know if anybody can recommend other means of accomplishing this?

Tks


Steven

Transaction Log Growing due to Pending Transaction (Replication)

$
0
0

SQL Server 2005 SP4 with Transactional replication.

I have this Database Log, which keeps growing due to a Pending transaction in the Database Log. (DB in SIMPLE recovery Mode)

If i issue a DBCC OPENTRAN i get :

Replicated Transaction Information:
 Oldest distributed LSN     : (0:0:0)
 Oldest non-distributed LSN : (47839439:351:1)

The following Query using fn_dblog gives me LSN and Transaction ID Info.
select * from::fn_dblog(NULL,'47839439:351:1') -Gives me this result

If i have to Shrink the Log i have to use sp_repldone to mark the transactions as replicated or skipped.

I take precautions in running this statement as this is not always what you want to do manually as it is internally done by the Log Reader Agent.

EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0,     @time = 0,  @reset=1

Now.. What if i Just want to mark just the transaction in question as done.. using the @xactid 

How can i translate the CurrentLSN or TransactionID or LogRecord or Transaction SID or any other vlue to--> @xactid.....


Tempdb is growing crazy due to replicating data to ther SQL server

$
0
0

Hi,

I am having issues with my SQL 2012 where the temp is growing crazy during replicating the data to other SQL 2012 server. The actual DB is 5GB and the tempdb approaches upto 200GB. I have to restart the server to bring the rest the tempdb but it grows back again...The log reports following errors...

The activated proc '[dbo].[spDRSMsgBuilderActivation]' running on queue 'CM_ABC.dbo.ConfigMgrDRSMsgBuilderQueue' output the following:  'ERROR 3961, Level 16, State 1, Procedure spDRSSendChangesForGroup, Line 1, Message: Snapshot isolation transaction failed in database 'CM_ABC' because the object accessed by the statement has been modified by a DDL statement in another concurrent transaction since the start of this transaction.  It is disallowed because the metadata is not versioned. A concurrent update to metadata can lead to inconsistency if mixed with snapshot isolation.'

spid32s     The activated proc '[dbo].[spDRSMsgBuilderActivation]' running on queue 'CM_ABC.dbo.ConfigMgrDRSMsgBuilderQueue' output the following:  'ERROR: Sync of type Configuration Data failed, see previous messages for details.'

Any suggestions?

Thanks

Replication synchronization error

$
0
0
Reinitialized the replication subscription. which generated the new snapshot scripts under a shared location.

I am getting error under View synchronization status 
"The concurrent snapshot for publication 'xxx' is not available because it has not been fully generated or the Log Reader Agent is not running to activate it. If generation of the concurrent snapshot was interrupted, the Snapshot Age"

While log reader agent is also running between retry and error is:
" Status: 4096, code: 20024, text: 'Initializing'.
The agent is running. Use Replication Monitor to view the details of this agent session.
Status: 2, code: 20011, text: 'The process could not execute 'sp_replcmds' on '*********'.'.
The process could not execute 'sp_replcmds' on '******'.
Status: 2, code: 0, text: 'Query timeout expired'.
Status: 2, code: 22037, text: 'The process could not execute 'sp_replcmds' on '**********'.'.
The agent failed with a 'Retry' status. Try to run the agent at a later time.


Any solution ?
Viewing all 4054 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>