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

how to resolve slow running stored producer ?

$
0
0

Hi All,

I have faced issue regarding stored procedure.

actually  my application team ran the stored procedure regular basics (contain some inserts)  ,,every day it take 20 mins for executing but today it's tacking the more than 2 hours (still it's running) . 

i have checked the which they are inserting and ran the updated statics also,i have checked  and fixed the table fragmentation and indexes related issues but still it's tacking the logtime for executing .

what is the recompile ?

how to resolve the slow running stored procedure?

Please post the your valuable ANS ASAP.

Thanks in Advance. 


RAM


Question on Snapshot replication.

$
0
0
Hi All, 

Am in a learning curve with SQL server and have some questions regarding SQL server, Please help me out!

Situation:
I have a table with 5 columns replicated(Transactional replication) to subscriber in the same server. Now I added a new column to the table and I stopped log reader agent then ran the snapshot, distribution agent and reinitialized the subscription manually. If I check the subscriber it shows only 5 columns which means new column is not replicated.
Please advise why the new column is not replicated in snapshot, If need the new column(Full table) to replicate how do I need to proceed?I would appreciate if you explain it! :)
Note -Tried with property immediate sync true and false.

As per my understanding snapshot truncates the table and copies it again from publisher. I tired this test because I performed a huge delete operation in publisher which caused a replication bottleneck

Best Regards Moug

Snapshot replication run daily , but data refreshed only every other day

$
0
0

Hi , I have 

Sql server  version 9.00.4060.00, snapshot replication (12 tables )runs daily at 6 AM 

Normal syncronization time 1 minute 

in last few week I noticed that EVERY OTHER day syncronization takes only 1 seconds (no errors) and no data refreshed at destinaion.

I droped and recreated schedule ,but it did not help

How to investigate this problem ?

Thank you 

Alex

Can Sync Framework be used on a publisher or subscriber

$
0
0

We use merge replication for scale out and are considering using Sync Framework to sync to another system (possibly not a database or possibly another SQL Server database with its own replication topology. Is this supported or are there any conflicts to note?

Thanks,

Bruce

patching for replication.

$
0
0

Patching normally refers to applying Cummulative Updates, hot fixes, or services packs. but,how can we do patching for replication  in ms sql server? what is the process we should follow?

thanks in advance.

How to resolve row mismatch in transactional replication ?

$
0
0

Hi All,

i get a row mismatch in transactional replication in SQl server 2008.

Error messages:
The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
Get help: http://help/20598
The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
Get help: http://help/20598.

Please post your valuable answers ASAP

Thanks in advance.


RAM

the transaction ended in the trigger the batch has been aborted

$
0
0

Hello I have a SP and a Trigger that acts when a table is updated.    I've researched some about this error but i still cannot find an answer.  I would really appreciate if someone could help me a  tittle. 

Stored procedure. 

USE [TICKETS]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER OFF
GO

CREATE PROCEDURE [dbo].[PA_REOPEN] 

@folio AS INTEGER

AS
BEGIN 

UPDATE Ticket_Mstr SET status='ST0006',FReopen=getdate(), HReopen=getdate(), REOPEN=1 WHERE FOLIO=@FOLIO

DECLARE @id_det AS INT

SELECT @id_det = count(folio) FROM ticket_det WHERE folio=@folio

SET @id_det = @id_det +1

INSERT INTO ticket_det (folio,id_folio,tec_cve,finicial,hinicial,ffinal,hfinal,htipo,status,obvs)
VALUES (@folio,@id_det,'-----',getdate(),getdate(),getdate(),getdate(),'S','ST0006','Ticket Reabierto')


END
GO

Trigger. 

ALTER TRIGGER [dbo].[TR_UP_TPRIORIDAD] ON [dbo].[ticket_mstr] 

FOR UPDATE

AS

DECLARE @PRIO AS VARCHAR
DECLARE @FOLIO AS INTEGER

BEGIN


BEGIN TRANSACTION 

SELECT @PRIO=TPRIORIDAD, @FOLIO=FOLIO FROM INSERTED

IF @PRIO='Elija Prioridad...'


BEGIN

UPDATE TICKET_MSTR  SET TPRIORIDAD='BAJA' WHERE FOLIO=@FOLIO

END

COMMIT TRANSACTION

END

Regards. 

sql server 2012 replication problem

$
0
0
Dear friends, I have create a teansactional publication in sql server 2012, but when I check the syncrhronization status I get the following error:

Unable to start execution of step 2 (reason: Error authenticating proxy domain\administrator, system error: Logon failure: unknown user name or bad password.). NOTE: The step was retried the requested number of times (10) without succeeding. The step failed.

The sql server agent is running o domain administrator account.

Do you have any idea of how to solve this problem ?

how to find where replications has been suscribed?

$
0
0
i know where database has been publisher but i dont know how to find where its has been suscribed?

Transactional Replication Error

$
0
0
Publisher (pub is own Distributor) SQL 2008 Enterprise SP1 on Win2003 x64 Server SP2

Created a trans repl pub with 1 table and recieved the following error. I have created multiple trans reps with no errors.
Error messages:
Message: A .NET Framework error occurred during execution of user-defined 
routine or aggregate "sp_scriptdropinsreconciliationproc_sqlclr": 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlConnection' threw an exception. ---> 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> 
System.Configuration.ConfigurationErrorsException: The value of the property 
'name' cannot be parsed. The error is: Request failed. (C:\Program 
Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn\sqlservr.config 
line 21)
System.Configuration.ConfigurationErrorsException: 
  at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] 
keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, 
SectionRecord sectionRecord, Object parentResult)
  at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord 
factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean 
getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
  at 
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String 
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, 
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
  at 
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String 
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, 
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
  at System.Configuration.BaseConf
	...
System.TypeInitializationException: 
  at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
  at 
Microsoft.SqlServer.Replication.TransSqlClrCodeGenerators.ScriptDropReconciliationProcedure(SqlInt32 
articleId, CustomStoredProcedureType customProcedureType)
  at Microsoft.SqlServer.Replication.TransSqlC...
A .NET Framework error occurred during execution of user-defined routine or 
aggregate "sp_scriptdropdelreconciliationproc_sqlclr": 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlConnection' threw an exception. ---> 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> 
System.TypeInitializationException: The type initializer for 
'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> 
System.Configuration.ConfigurationErrorsException: The value of the property 
'name' cannot be parsed. The error is: Request failed. (C:\Program 
Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn\sqlservr.config 
line 21)
System.Configuration.ConfigurationErrorsException: 
  at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] 
keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, 
SectionRecord sectionRecord, Object parentResult)
  at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord 
factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean 
getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
  at 
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String 
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, 
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
  at 
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String 
configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, 
Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
  at System.Configuration.BaseConf
	...

The row was not found at the Subscriber when applying the replicated command.

$
0
0

Hello,

I am getting this error can someone help me plz

The row was not found at the Subscriber when applying the replicated command.

why the publisher failed to deliver the row to the subscriber

Switching from CONCURRENT to NATIVE after Snapshot is Complete to get Maximum BCPThreads for Snapshot and Distribution

$
0
0

Folk can we trick replication into using Maximum threads both on the Snapshot and Distribution Sides while still using CONCURRENT for the Snapshot portion (which causes less blocking) and somehow switching to NATIVE for distribution (which allows > 1 Threads).

Seems to me this should be a standard setting since in my experience multiple threads & CONCURRENT is much faster (15 Minutes instead of 1++ Hour for a 200+Gig Publication) and has the least blocking on the Snapshot side.  Unfortunately the fine print says that CONCURRENT limits the Distribution phase of the Snapshot to 1 thread which when I am rebuilding our Reporting DB is way too slow (> 2 Hours).   I have processing power to spare so speed is more important.

So my question is can we trick replication after the Snapshot is taken by switching the internals so that the Distributor sees the publication as NATIVE?  

Also, Will there be CSS files taken/played in both NATIVE and CONCURRENT?


...Ray


SQL 2008 r2 to SQL Server 2012 replication error

$
0
0

We have configured the distributor on SQL Server 2012 and we were able to create a publication on another server running SQL 2008 R2 until recently.  Now were getting this error message when we tried to configure the remote distributor on the publication server.  NOTE: the password is correct and has been doubled checked.

We are replication 2008 db to 2012 instance. - Thanks Norm

Title: Configuration Distribution Wizard

SQL Server could not connect to the Distributor using the specified password. 

Connection to server failed.

OLE DB provider "SQLNCLI10" for linked server returned message "Login timeout expired".

OLE DB Provider "SQLNCLI10" for linked server returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.  For more information.......



How does the peer to peer replication resolve the conflict?

$
0
0

Hello,

Suppose there's 3 sites in p2p replication, how dose the system handle with conflict if two of the sites update same row at the same time?

will it be error directly?

Suppose the environment is 2k8 r2

Much thanks!


The specified network name is no longer available

$
0
0

Hi, I'm receiving the error: "The Merge Agent received the following error status and message from the Internet Information Services (IIS) server during Web synchronization: [500 :'( The specified network name is no longer available.  )']"

during web syncronization, merge replication.

Database server is SQL Server 2005 SP2 and the web server (a separate machine) is windows server 2003. Client databases (i.e. the subscribers) are sql server 2005 and 2008. There are about 200 subscribers.

The behaviour is quite difficult to understand. The error is not systematic. About 10% of synchronizations are failing. It happens that the same client can receive the error but, after about 10 minutes, when it retries, its replication becomes successful.

This is a replication system that exists for 3 years, ever worked quite well. Now i can't understand what can be the source of this problem. Any ideas ?

Many thanks in advance

Stefano


synchronization between publisher and subscriber in Transactional replication

$
0
0

Hi All,

Im going to configure transactional replication from my PROD server to another server. I have 300+ tables and the total size of the DB is around 50 GB, which is getting realtime data from users as well as different sources.I have few question on configuring part

1) Im going to take a full backup and restore it in the target server for both the participating servers to be in sync.

2)By the time the DB is restored in the target server and i configure the transactional replication between the two nodes, lot of data changes would have taken place in my prod(source) server. So the target is out of sync. How is this managed in transactional replication setup. Will the snapshot agent makes sure both the publisher and subscriber are in sync at the time of configuration.

Thanks

How to remove all Replication related objects from SQL Server, so I can try setting up anew?

$
0
0
Hi I tried to follow the MSDN tutorials below for enabling SQL Server for replication:

Preparing the Server for Replication
http://msdn.microsoft.com/en-us/library/aa337475.aspx
Replicating Data Between Continuously Connected Servers
http://msdn.microsoft.com/en-us/library/aa337437.aspx

The database I wanted to replicate from was AdventureWorks2012.

Unfortunately what I created didn't work

During the process various things was created on the server

For example the publication: AdvWorksProductTrans, which is residing in folder "Local Publications".
Also the database "ProductReplica" was created.

Now I would like to work through the tutorial again or try another tutorial, my problem is that
I am stuck with these Replication related objects which prevents me from trying again.

For example when I Right-click the Replication folder now I can't see "Configure Distribution." Which is probably because of already created replication objects

What shall I do to clean the server for these Replication related objects, so I can try anew?

How to rebuild index on publisher database in Transaction Replication

$
0
0

Hi,

My concern is when last time I ran rebuild online index script of 700 GB Tables or articles in publisher side, it took 6 hours to complete and after that my transaction replication stopped working. Ldf size had reached to 500 GB and replication stopped working. Data was not able to replicate from publisher to distributer throwing Error "sp_repldone could not execute"

This time again we are going to run rebuild index script on publisher. So what proactive activity we need to do to avoid such issues in future.

SQL version-    SQL Server R2 Enterprise Edition

SQL Server 2005 replication latency issue

$
0
0

We have Replication setup for SQL Server 2005 to Oracle server. Each table setup with separate publisher. We are having latency issue with only one table.

Snapshot get delivered successfully if we reinitialize it but after that it shows performance critical and Distributor to Subscriber history shows 'Delivering replicated transactions'. Undistributed commands are keep increasing. It marks subscriber in active after a week or so.

 

Process for this particular replication show suspended with wait type 'async_network_io wait'.

 

How do I troubleshoot the issue?

Error with dropping Transactional Publication

$
0
0

Running SQL 2012.

Currently merge and transactional replication are setup on the datbase (db1). Trying to drop the publication is generating a log reader agent error.

Exec sp_droppublication @publication = 'transactional_pub', @ingnore_distributor = 1

"Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database at a time. If you executed a log-related procedure, drop the connection over which the procedure was executed or execute sp_replflush over that connection before starting the Log Reader Agent or executing another log-related procedure. "

Error From Event viewer:

Replication-Replication Transaction-Log Reader Subsystem: agent 'srv-transactionalpub' failed. The process could not execute 'sp_replcmds' on Server

I am not running any other log reader agent or log related storedproc in any connection.

The following didn't work:
Restarted the log reader agent.
Removed replication objects from subscription using sp_removedbreplication - To remove any orphaned metadata from subscriber.

Any ideas on how to fix this?

Viewing all 4054 articles
Browse latest View live




Latest Images