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

Replication working really slow and with multiple errors

0
0

Hello everyone,

we are building a replicated enviroment between two diferent contries with enormous difficulties. Here are the details

Publisher:  Windows Server 2012 with SP1 SQL Server 2012 with SP1

Subscriber: Windows Server 2012 with SP1 SQL Server 2012 with SP1; Merge replication; pull subscription

We have had many problems trying to implement this configuration. At the moment we are testing the enviroment between two testservers, in order to measure the efficiency of the system. Later we will build the productive enviroment.

In order to test the reliability, we have done various tests, for example, disabling and then enabling the replication many times. The last time we enabled it, while the initial snapshot was being synchronized, the subscriber server went down, breaking the replication. Since then we have had enormous problems, because we get a lot of broken merge agent sessions, trying to synchronize a database that isn't subscribed now, and the replication is REALLY slow (0,5-1 row/sec aprox.). We became at the beginning three errors:

  • The merge process could not query the last sent and received generations.(Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200929)
  • Communication link failure (Source: MSSQLServer, Error number: 10054)
  • TCP Provider: An existing connection was forcibly closed by the remote host.(Source: MSSQLServer, Error number: 10054)

Then we decided to reinitialize the subscription with a new snapshot, and these error popped out:

  • You must rerun snapshot because current snapshot files are obsolete

We have checked that the snapshot is not more that 14 days old. I think that the problem may be old metadata stored in some  tables. Is there a procedure to clean up this old metadata? I've read that the problem may be solved by disabling the replication and  running "sp_mergesubscription_cleanup" command, but I think that these command runs automatically with a schedule if a merge replciation is enabled. I am a little bit confused about it, and any help will be greatly appreciated.

Thanks in advance.

Kind regards,

Carlos




Replicating objects in order - SQL Server 2008

0
0

Hi

I am having trouble replicating objects across one server to another. During the process, a view is being created on the subscription server.  However, this errors out due to a table used in the view not yet being created by replication process.

Is there any way I can dictate to the replication process to create tables first then views then SPs after?

Thanks in advance.

XDESTSVERMGR

0
0

Hi,
I have a cluster with 3 nodes: one Primary and two Secondaries. Two nodes have the same configuration (cpu, memory, sql server configurations) and they are used as primary (SQL1) and the first secondary (SQL2). When SQL2 is primary the server responds very good, instead when SQL1 is primary the response times are 2-10 times greater. I checked the wait times. In top, on the first position is a wait type named XDESTSVERMGR. The query associated with this wait type is bellow. 
Could I have some documentation (link, pdf) or could you explain me what means: XDESTSVERMGR, which kind of operations are the cause of this wait type?

Thank you

--(@_msparam_0 nvarchar(4000))  
SELECT *  
INTO #tmpag_availability_groups  
FROM master.sys.availability_groups  
SELECT group_id,  
   replica_id,  
   replica_server_name, 
   create_date,  
   modify_date,  
   endpoint_url,  
   read_only_routing_url,  
   primary_role_allow_connections,  
   secondary_role_allow_connections,  
   availability_mode, 
   failover_mode,  
   session_timeout,  
   backup_priority,  
   owner_sid  
INTO #tmpar_availability_replicas  
FROM master.sys.availability_replicas 
/* BEGIN ACTIVE SECTION (inserted by Ignite) */  
SELECT group_id,  
   replica_id,  
   role, 
   operational_state, 
   recovery_health, 
   synchronization_health, 
   connected_state,  
   last_connect_error_number, 
   last_connect_error_description,  
   last_connect_error_timestamp  
INTO #tmpar_availability_replica_states  
FROM master.sys.dm_hadr_availability_replica_states 
/* END ACTIVE SECTION (inserted by Ignite) */  
SELECT replica_id, 
   join_state  
INTO #tmpar_availability_replica_cluster_states  
FROM master.sys.dm_hadr_availability_replica_cluster_states  
SELECT arrc.replica_server_name,  
   COUNT(cm.member_name) AS node_count,  
   SUM(cm.member_state) AS member_state_sum,  
   SUM(cm.number_of_quorum_votes) AS quorum_vote_sum  
INTO #tmpar_availability_replica_cluster_info  
FROM  
   ( 
   SELECT DISTINCT replica_server_name,  
      node_name  
   FROM master.sys.dm_hadr_availability_replica_cluster_nodes 
   ) AS arrc  
LEFT OUTER JOIN master.sys.dm_hadr_cluster_members AS cm  
ON UPPER(arrc.node_name) = UPPER(cm.member_name)  
GROUP BY arrc.replica_server_name  
SELECT *  
INTO #tmpar_ags  
FROM master.sys.dm_hadr_availability_group_states  
SELECT ar.group_id,  
   ar.replica_id,  
   ar.replica_server_name,  
   ar.availability_mode, ( 
   CASE  
      WHEN UPPER(ags.primary_replica) = UPPER(ar.replica_server_name) THEN 1  
      ELSE 0  
   END) as role,  
   ars.synchronization_health  
INTO #tmpar_availabilty_mode  
FROM #tmpar_availability_replicas as ar  
LEFT JOIN #tmpar_ags as ags  
ON ags.group_id = ar.group_id  
LEFT JOIN #tmpar_availability_replica_states as ars  
ON ar.group_id = ars.group_id  
AND ar.replica_id = ars.replica_id  
SELECT am1.replica_id,  
   am1.role, ( 
   CASE  
      WHEN (am1.synchronization_health is null) THEN 3  
      ELSE am1.synchronization_health  
   END) as sync_state, ( 
   CASE  
      WHEN (am1.availability_mode is NULL)  
      OR (am3.availability_mode is NULL) THEN null  
      WHEN (am1.role = 1)                THEN 1  
      WHEN (am1.availability_mode = 0  
      OR am3.availability_mode = 0) THEN 0  
      ELSE 1  
   END) as effective_availability_mode  
INTO #tmpar_replica_rollupstate  
FROM #tmpar_availabilty_mode as am1  
LEFT JOIN  
   ( 
   SELECT group_id,  
      role,  
      availability_mode  
   FROM #tmpar_availabilty_mode as am2  
   WHERE am2.role = 1 
   ) as am3  
ON am1.group_id = am3.group_id  
DROP table #tmpar_availabilty_mode  
DROP table #tmpar_ags  
SELECT AR.replica_server_name AS [Name],  
   ISNULL(AR.availability_mode, 2) AS [AvailabilityMode],  
   ISNULL(AR.backup_priority, -1) AS [BackupPriority],  
   ISNULL(AR.primary_role_allow_connections, 4) AS [ConnectionModeInPrimaryRole],  
   ISNULL(AR.secondary_role_allow_connections, 3) AS [ConnectionModeInSecondaryRole],  
   ISNULL(arstates.connected_state, 2) AS [ConnectionState],  
   ISNULL(AR.create_date, 0) AS [CreateDate],  
   ISNULL(AR.modify_date, 0) AS [DateLastModified],  
   ISNULL(AR.endpoint_url, N'') AS [EndpointUrl],  
   ISNULL(AR.failover_mode, 2) AS [FailoverMode],  
   ISNULL(arcs.join_state, 99) AS [JoinState],  
   ISNULL(arstates.last_connect_error_description, N'') AS [LastConnectErrorDescription],  
   ISNULL(arstates.last_connect_error_number,-1) AS [LastConnectErrorNumber],  
   ISNULL(arstates.last_connect_error_timestamp, 0) AS [LastConnectErrorTimestamp],   
   CASE  
      WHEN arci.member_state_sum IS NULL  
      OR arci.node_count = 0                       THEN 3  
      WHEN arci.member_state_sum = 0               THEN 0  
      WHEN arci.member_state_sum < arci.node_count THEN 2  
      WHEN arci.member_state_sum = arci.node_count THEN 1  
      ELSE 3  
   END AS [MemberState],  
   ISNULL(arstates.operational_state, 6) AS [OperationalState],  
   suser_sname(AR.owner_sid) AS [Owner],  
   ISNULL(arci.quorum_vote_sum, -1) AS [QuorumVoteCount],  
   ISNULL(AR.read_only_routing_url, '') AS [ReadonlyRoutingConnectionUrl],  
   ISNULL(arstates.role, 3) AS [Role],  
   ISNULL(arstates.recovery_health, 2) AS [RollupRecoveryState], ( 
   CASE  
      WHEN arrollupstates.sync_state = 3 THEN 3  
      WHEN (arrollupstates.effective_availability_mode = 1  
      OR arrollupstates.role = 1)        THEN arrollupstates.sync_state  
      WHEN arrollupstates.sync_state = 2 THEN 1  
      ELSE 0  
   END) AS [RollupSynchronizationState],  
   ISNULL(AR.session_timeout, -1) AS [SessionTimeout],  
   AR.replica_id AS [UniqueId]  
FROM #tmpag_availability_groups AS AG  
INNER JOIN #tmpar_availability_replicas AS AR  
ON (AR.replica_server_name IS NOT NULL)  
AND (AR.group_id=AG.group_id)  
LEFT OUTER JOIN #tmpar_availability_replica_states AS arstates  
ON AR.replica_id = arstates.replica_id  
LEFT OUTER JOIN #tmpar_availability_replica_cluster_states AS arcs  
ON AR.replica_id = arcs.replica_id  
LEFT OUTER JOIN #tmpar_availability_replica_cluster_info AS arci  
ON UPPER(AR.replica_server_name) = UPPER(arci.replica_server_name)  
LEFT OUTER JOIN #tmpar_replica_rollupstate AS arrollupstates  
ON AR.replica_id = arrollupstates.replica_id  
--WHERE (AG.name=@_msparam_0)  
ORDER BY [Name] ASC   
DROP TABLE #tmpar_availability_replicas  
DROP TABLE #tmpar_availability_replica_states  
DROP TABLE #tmpar_availability_replica_cluster_states  
DROP TABLE #tmpar_availability_replica_cluster_info  
DROP TABLE #tmpar_replica_rollupstate  
DROP table #tmpag_availability_groups 

Web Synchronization failed on Permission

0
0

 

Hi,

 

   I was trying to setup Database Replication on SQL Server 2005 running on Windows Vista with IIS 7.  I can setup the publication fine, but when I tried to setup Web Synchronization, it said I do not have permission on the machine:

 

TITLE: Welcome to the Configure Web Synchronization Wizard
------------------------------

The user does not have permissions on the specified computer. Specify another computer name.

------------------------------
BUTTONS:

OK
------------------------------

  I used SQL & Windows Authentication on the machine, but other than that I don't know where to start looking for problems.  I'm new to the SQL Server 2005 and IIS 7 (have been using linux for web projects for a while), can anyone point me to the right direction?  Thanks!

Drop distributor, publication and subscription

0
0

Hello All,

I have to upgrade publisher from SQL 2008 to 2012 (the upgrade will be on new windows server - side by side) and to do so, will have to drop the distributor, publications and subscriptions.

So I scripted the drop/disable and create/enable from wizard. The script is tested the test environment. The drop replication script dropped everything but the table and data even though the tables had property setup to 'drop/delete the table' if name is used. This is exactly I wanted. So the drop script is tested.

Now, the create replication script created distributor, publications and subscription (sync = with replication only) without re-initialization as expected due to the sync property. But i got an error below:

The logreader agent already exists. Use 'sp_changelogreader_agent' to change any settings/properties

Do I have to drop log reader agent job manually? Or can i ignore this error?

Please advise?

Thanks,

P

Merge Replication with Web Synchronization

0
0
Hello,
 
I am creating a subscription for Merge Replication, which is configured with Web synchronization.
I do not want to share the Publisher server info (SQL Server credentials), distributor info (SQL Server credentials) with the subscriber server, please let me know if it possible. please share the sample if you have.

How to delete whatever is created by sql server 2008 R2 Copy Database wizard?

0
0

I know this is not 'replication' but the categories in the sql server forum area are terrible and I have no idea where else to post this.

I created an 'operation' via the copy database wizard. I call it an 'operation' because I can find no clue was to what the copy database wizard actually generates. I have spent hours searching for information about how to edit whatever the CDW generates but have found absolutely nothing. Maybe something in DTS, maybe something that is executed by sql agent, but there is nothing under sql agent and I can't find a dts file or entry under the legacy\dts folder in SSMS. The wizard is completely non-re-entrant.

I have no way to edit or delete the CDW 'operation'. I gather from this experience and from having ready many threads on CDW that it's a lousy tool and so I'm basically giving up on it. But at least I need to delete the CDW generated 'operation'. Can someone tell me how to do that?

SNAPSHOT REPLICATION NOT FLOWING THE DATA

0
0

Hi ALl,

We have snapshot replication, we see that data is not replicating even though the job status and synchronization status is fine. There are no filters

But we are not able to find where is the problem.

Could you please give some insights


Add new stored procedure to existing publication

0
0

Hi All,

Thanks  in advance.

is it posible  add  new  stored procedure to existing transactional publication without new Snapshot ? 

Regards,

Sajid P K


-Sajid

log reader agent

0
0

may i know the process involved in log reader agent or definition.

please suggest me about it.

How to generate a new snapshot when republishing

0
0

I currently have a republishing scenario setup. Server A is a transaction publication to server B. Server B uses the replicated tables from server A in a merge publication to multiple subscribers.

Publisher - Transactional

Publishing Subscriber - Transactional Subscription and Merge Publication

Subscriber - Merger subscription

How can I rerun the snapshot on Server A? When I attempt this now I get "Cannot drop the table because it is being used for replication" error. I understand why I am getting the message, because those articles are in fact being used in a merge publication. Is there anyway around this problem, or do I have to rebuild everything if I want to run a new snapshot from the publisher on server A?

Thanks

SQL Server replication requires the actual server name to make a connection to the server. Specify the actual server name (Replication.Utilities)

0
0

Canot create subscription

Please help me

I get the error code is:

TITLE: Connect to Server
------------------------------

Cannot connect to 89.19.13.138.

------------------------------
ADDITIONAL INFORMATION:

SQL Server replication requires the actual server name to make a connection to the server. Specify the actual server name, '94DE80ACD308'. (Replication.Utilities)

------------------------------
BUTTONS:

OK
------------------------------

PLEASE CHECK THIS LINKS

my server info : http://www.tolgasimsek.com/11.jpg

and

error screen : http://www.tolgasimsek.com/22.jpg


snapshot replication re initialization manually

0
0

hi all,

we have snapshot replication set up between 2 servers. but data is not replicating. then we decided to re initialize the subscription but we are getting error as subscription is created manually hence you need re initialize manually.

how to re initialize subscription manually. what are the care must be taken while doing it . please explain

Snapshot failing with following error message - Error 14151 Severity 18, State 1

0
0

I'm trying to create three publications on one server, all going to the same subscriber.

Once I was able to create successfully and but am having issues with the last two, where I can't get the snapshot to run-

Here are the errors -

Replication-Replication Snapshot Subsystem: agent servername-test_DB-test_DB-92 failed. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information.  The step failed.

Error: 14151, Severity: 18, State: 1.

Agent shutdown. For more information, see the SQL Server Agent job history for job servername-test_DB-test_DB-92'.

Any help would be greatly appreciated.

Thanks

Susan

Changing password of distributor_admin user

0
0

Hi All,

I just want to change the password of "distributor_admin" user 
can anyone suggest what are the pros and cons 
and also which is the better way to caange this password


replication stopp after change changing SQL Server Agent User

0
0

Hi,

I tryed to change the user for SQL Server Agent on my Distributor. We use pushed transaction replications. But after i changed the user, all replications stopped:

ERROR: (from SQL Monitor)

The job failed.  The Job was invoked by Start Sequence 0.  The last step to run was step 3 (Detect nonlogged agent shutdown.).

The new user is a domainusert too, and had administrative rights on the server. I changed the user to start SQL Server Agent on other servers without error.

Can anybody tell me, how to change the user on a distributor, without stopping all replications?

Thanks

Kind regards,

Andreas

Add an Article to a Publication initialized from backup?

0
0

Greetings. I want to add an Article to a Publication that was initialized from backup. Previously I had gotten this to work on servers that are >= 2008R2, but for some reason it no longer is and I can't figure out why despite many hours of efforts. 

Does anyone know if this technique is supported by MS, or have any ideas why it may not be working? The Insert, Update, and Delete sprocs simply never get created on the Subscriber database. I created them manually but they likely weren't called as the data never got propagated to the Subscriber (I didn't run a trace to know for sure, but think it's a safe bet). I also called sp_refeshsubscriptions and that didn't help.

I know I can create another Publication and simply Snapshot these new tables, but I'd really like to keep them all in one Publication if at all possible. 

Thoughts?


TIA, ChrisRDBA

Domain name change of SQL servers involved in Bi directional transactional replication

0
0
Hello all,

I have a situation where client wants to change their domain name of servers hosting SQL Servers(e.g. from AB to CD). I have a transactional replication with updatable subscription configured with 1 publisher, 1 distributor and 4 subscribers. 

We are only changing the domain name and not hostname/IP address. Will it affect replication as it uses linked server? Linked server login used to configure during replication configuration is 'sa' and replication is using immediate updating using MSDTC. I am more concerned about replication as reconfiguration is a big headache. Also I know I'll have to change service accounts, logins, proxys etc. Any other things to take care of?

Let me know if you need any further details and thanks in advance.

log shipping

0
0

hai ,

i am facing a problem in log shipping that is 

i have created a standby database in secondary server but its not updating , when we update primary database in the primary server.

may i know the reason for that.

Can you replicate a replicated database

0
0

I'm working with SQL Ser ver 2012

A third party isreplicating their database to my company on the outside of our DMZ

Our subscriber server is outside our firewall.

I am trying to set up a local distributor /publisher on the subscriber server to asubscriber server inside our firewall.

am getting the following error:

TITLE: New Publication Wizard
------------------------------

SQL Server could not create publication 'itx20'.

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.
The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.
Changed database context to '<database Name>'. (Microsoft SQL Server, Error: 50000)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3128&EvtSrc=MSSQLServer&EvtID=50000&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

ANy help you can provide is much appreciated.

Louis


Viewing all 4054 articles
Browse latest View live




Latest Images