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

How to add another subscription to existing transactional replication

$
0
0

Hi,

We have four publications (1,2,3,4) on server "A" with Push Subscriptions in place.

Publication 1,2 & 3 are being replicated to Server "B" , while publication 4 is being replicated to "C". 

Now we want to replicate publication 1,2 to server "C" as well. (Meaning there will be 2 subscribers for these pubs simultaneously)

Immediate_sync & allow_anonymous are "True".

While searching for solution I came across article : "https://www.mssqltips.com/sqlservertip/2668/role-of-the-immediate-sync-option-for-sql-server-replication/"

What I could get from article is just add new subscription & that is it. No need to create new snapshot in our scenario.

Note:- I want this new subscription also as Push subscription.

Expert opinions required. Thanks in advance.


Error: SQL Server Not Configured For Remote Access (2017, Standard Edition, on an Azure VM)

$
0
0

Hi.

I wanted to kindly ask for the help about these errors:

  1. A log reader agent can only be installed for a database enabled for transactional/snapshot replication. (Microsoft.SqlServer.Rmo)

    And then when I go to the DB to enable it for replication (although before yesterday the Wizard seems to have been doing this automatically, since the replication has been working for the past two+ months):
  2. Could not execute procedure on remote server <name> because SQL Server is not configured for remote access...
    The Distributor has not been installed correctly. Could not enable database for publishing...
    The replication option 'publish' of database <name> has been set to false...Error: 7201

I tried then going to the Linked Server and testing the connection to the one relative to the Remote Distributor, and get the error: Server <name> is not configured for DATA ACCESS...Error: 7411

The facts:

  • Replication was working for more than two months
  • It seems that someone/something restarted the Publication Server yesterday, and this caused the immediate failures of all Publications
  • Once the Publication Server was back online, the replications also continued, but now it is not possible to create new Publications
  • Distributor Server IS enabled for remote connections
  • Distributor Server was having itself as the Publisher, just in order to try to fix this issue, but this did not work either
  • Distributor Server, when queried for SELECT * FROM sys.servers, shows that the Data Access is enabled
  • Distributor Server, when queried for EXEC sp_get_distributor shows distribution_db_installed = 1, is_distribution_publisher = 0, has_remote_distribution_publisher = 1
  • Publication Server, when queried for EXEC sp_get_distributor shows distribution_db_installed = 0, is_distribution_publisher = 0, has_remote_distribution_publisher = 0

The premise:

  • I am starting from the standpoint that there is nothing actually wrong with the Distributor, but rather with the Distributor settings on the Publisher (as displayed in the last bullet of The Facts part)
  • The restart of the Publisher caused some replication-related settings to disappear, thus disrupting the replication
  • I believe that changing these Distributor-related settings on the Publisher (i.e. at least distribution_db_installed = 1) might solve the issue

The questions:

  • How do I manipulate the Fields obtained through EXEC sp_get_distributor (i.e. how do I change the values of distribution_db_installed, etc.)?
  • What could have the restart of the Publisher caused that the replication is disrupted in that the existing replications are fine but no new Publications can be done (nor can the Agent status be observed from the Publisher, due to the same error mentioned in the beginning)?
  • If you have an idea, please let me know how you think this can be fixed?

With thanks and kind regards,

Bogdan


BogdanU

I dont want the snapshot to be created for commands that have already been sent to subscriber (hundreds of them).

$
0
0

Good Morning experts,

I have a publisher db containing thousands of articles to be sent to subscriber. The publisher db is 2TB. There is lot of latency , thousands of undelivered commands in Replication monitor. Some commands (hundreds of them ) have been successfully sent to subscriber. I want to reinitialize the subscriber to resolve the latency , but I dont want the snapshot to be created for commands that have already been sent to subscriber (hundreds of them). How can I achieve this?


Kiran

Merge replication - sync failed (after high number of rows updated)

$
0
0

Hi MSDN and all helpers on this forum.

I'm facing a new problem with SQL Merge replication. (yes, a new one , even if i'm working with merge replication since years, this error is the first one...)

Topology : SQL 2008 64bits on a datacenter box. Merge replication, using web (replisapi.dll).
Subscriber : sql 2008 express on a win 2003 32 bits.

Sync is started using RMO on the subscriber.

I update a lot of records (40.000) on one table (that has +- 40 fields).

When I try to sync from the subscriber, i see the w3p (replisapi) memory growing (up to 400 MB).

Then, after 1 min i get an error on my subscriber.

I enabled the log on subscriber : here is what i've got :

2012-04-16 11:34:43.109 Downloaded a total of 3100 chunks.
2012-04-16 11:34:47.328 OLE DB Subscriber 'subscriber': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-04-16 11:34:47.421 The response message was received from 'https://serverweb/SQLReplication/replisapi.dll' and is being processed.
2012-04-16 11:34:47.468 OLE DB Subscriber 'subscriber': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
2012-04-16 11:34:47.578 The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.
2012-04-16 11:34:47.687 Disconnecting from OLE DB Subscriber 'subscriber'
2012-04-16 11:34:47.734 Disconnecting from OLE DB Subscriber 'subscriber'
2012-04-16 11:34:47.781 Disconnecting from OLE DB  'subscriber'
2012-04-16 11:34:47.843 Disconnecting from OLE DB  'subscriber'

If I check the log on the replisapi.dll i've got

MODULE NAME                   , UTC DateTime           ,  TID,  LINE, SEV, MESSAGE
-----------                   , ------------           ,  ---,  ----, ---, -------
CReplDebugLog                 , 2012/04/16 11:29:39.992, 3316,   287,  S1, Starting log file.
CHttpListener                 , 2012/04/16 11:29:43.227, 3316,   258,  S2, INFO: Exchange ID = 31F28F1A-00B8-49ED-9F7F-19F5D7307C8A.
CHttpListener                 , 2012/04/16 11:30:04.804, 3568,  1687,  S2, INFO: IsClientConnected: TRUE
CHttpListener                 , 2012/04/16 11:30:47.944, 3316,  2755,  S1, ERROR: ErrNo = 0x80070715, ErrSrc = <null>, ErrType = 10, ErrStr = The process could not write the response message due to OS error 995.
CHttpListener                 , 2012/04/16 11:30:47.944, 3316,  1271,  S1, ERROR: ErrNo = 0x80070715, ErrSrc = <null>, ErrType = 10, ErrStr = The processing of the response message failed.

If I check on SQL Replication monitor (sql box), i see nothing special...

Any idea ?



SQL Server Merge Replication Error: The format of a message during Web synchronization was invalid

$
0
0

I am doing Merge Replication using Web Synchronization. On Subscriber end, there is SQL Express 2012 on Windows 10 Pro. On publisher end, there is SQL Server 2017 on Windows Server 2019. Web Synchronization is on Windows Server 2016 Hosted on IIS 10. Replication is working perfectly fine as long as the data is not large. Actually I have applied filters on article to replicate data according to my need. So when I applies a filter that pulls data from replication in less than 3000 chunks, it works perfectly. But as soon as it reaches 3100, I get error. On Subscriber end the error is:

The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

On the IIS Server, where Web Synchronization is configured; the error is:

CHttpListener, 5732, 2756, S1, ERROR: ErrNo = 0x80070715, ErrSrc = , ErrType = 10, ErrStr = The process could not write the response message due to OS error 995. CHttpListener, 5732, 1272, S1, ERROR: ErrNo = 0x80070715, ErrSrc = , ErrType = 10, ErrStr = The processing of the response message failed. CReplicationListenerWorker, 5732, 334, S1, ERROR: Failure generating response message, hr = 0x80070715.

It happens exactly when my replication chunks reaches 3100. And it takes around 20 seconds to reach 3100 chunks. So timeout is not an issue I believe.

I checked the file sizes in Snapshot folder. They are max 10 MB large collectively. But the data records to insert are in thousands, or some millions. I have tried setting WebSyncMaxXmlSize to 2000000 post. I have also tried disabling TCP send/receive Payloads. But all in vain.

I am using MergePullSubscription, have tried setting DownloadGenerationsPerBatch from 10 to 100. It also didn't work.

Please let me know with your valuable advises. What else I should try? Or if anyone faced the same issue, what is the proper solution to it?

Monitor Distributor Agent in Transnational Replication

$
0
0

Hi,

I wanted to monitor the Distributor Agent's running status in Transnational Replication. I want to get alert when it is stopped.

Tried to create alert for the same. But its not working as expected (does not see any occurrence even when Distribution Agent is stopped).

USE [msdb]
GO
EXEC msdb.dbo.sp_update_alert @name=N'Dist Agent Stopped', 
@message_id=0, 
@severity=0, 
@enabled=1, 
@delay_between_responses=0, 
@include_event_description_in=1, 
@database_name=N'', 
@notification_message=N'Distributor agent is not running', 
@event_description_keyword=N'', 
@performance_condition=N'Replication Agents|Running|Distribution|=|0', 
@wmi_namespace=N'', 
@wmi_query=N'', 
@job_id=N'00000000-0000-0000-0000-000000000000'
GO

EXEC msdb.dbo.sp_update_notification @alert_name=N'Dist Agent Stopped', @operator_name=N'XYZ', @notification_method = 1
GO


Thank you,

Udham Singh

SQL Server 2017. Implementing Replication on a Failover Cluster failed

$
0
0

Hello 

I am trying to implement a replication on a failover cluster but I am getting the following error when I tried to create the distribution database:

"Could not load file or assembly 'Microsoft.SqlServer.Replication.dll' or one of its dependencies. The specified module could not be found. (Microsoft.SqlServer.Rmo)"

Also I would like to hear from someone that had implementing a replication in a failover cluster in SQL Server 2017 or higher

Thanks in advance



LS_Copy & LS_Restore job not working in Log shipping MS SQL 2016

$
0
0

Hello Everyone,

Trying to configure Log shipping as DR solution. LS_Backup working fine in primary site. Backup files are getting resides in primary. However, LS_Copy & LS_Restore jobs are getting failed. Observed that backupfiles are not available or not copied to destination folder.

Need help in this regards.

--- COPY Job log:

Date9/25/2019 11:06:53 PM
LogJob History (LSCopy_BC-DB_Simulator)

Step ID1
ServerBC-DR\DRDB
Job NameLSCopy_BC-DB_Simulator
Step NameLog shipping copy job step.
Duration00:00:00
Sql Severity0
Sql Message ID0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted0

Message
Executed as user: NT Service\SQLAgent$DRDB. The step failed.

-- Restore Job

Date9/25/2019 11:15:00 PM
LogJob History (LSRestore_BC-DB_Simulator)

Step ID1
ServerBC-DR\DRDB
Job NameLSRestore_BC-DB_Simulator
Step NameLog shipping restore log job step.
Duration00:00:00
Sql Severity0
Sql Message ID0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted0

Message
Executed as user: NT Service\SQLAgent$DRDB. The step failed.

*** for security purpose --- renamed domain name and db name


SQL Server Replication 101

$
0
0

So we are trying to create an Enterprise Data Warehouse and Operational Data Store(ODS) Data Environment. Our idea is to spin-up a Replication Environment in order to isolate our EDW/ODS Environment and keep it away from our main Production Server where our main application data resides. Obviously, we DO NOT want to impact our normal business day operations.

Our benchmarks tell us it's going to be a couple of days of wall time to get our replicated environment up and running based on complex queries which are aggregating the data from various resources for our EDW/ODS Environment.

We are hoping that respondents can point us in the right direction in regards to the SQL Server steps we need to implement to accomplish this. As well, we want some Sync Points along the way if that's possible. If the load is going to take 3-4 days, we DO NOT want to re-start from the beginning...merely start where it left off or aborted for whatever reason...be it a data reason...be it an electrical outage...anything.

Thanks for your review and am hopeful for a reply. 

Transactional Replication Collation Conflict

$
0
0

i have one server with collation(SQL_Latin1_General_CP1_CI_AS)and Database with collation(Arabic_CI_AS)Use it as publication to the replication and i have another server with collation(Arabic_CI_AS) and contained database with collation (Arabic_CI_AS) Use it as subscriber and use it in availability group always on and replication have error (Cannot resolve the collation conflict between "Latin1_General_100_CI_AS_KS_WS_SC" and "Arabic_CI_AS" in the equal to operation.),please advice me

i tried to delete publication and recreate it and recreate subscriber But given the same problem Eventually I had to wipe through the system tables and i create properties of articles (Copy Collation=Fasle) and (Action if name is in use = Truncate all data in the existing object)

Error : Cannot resolve the collation conflict between "Latin1_General_100_CI_AS_KS_WS_SC" and "Arabic_CI_AS" in the equal to operation.

The Distributer Has not been Installed Correctly - Error 20036 SQL 2014

$
0
0

Dear All,

Could anyone help me with create new publication. currently we plan to activate of database server to DR site. we have 2 sql alwaysOn environment

1.Environment #1 with SQL alwaysOn

  -DC site (DC-DB01,DC-DB02)--->Primary &Secondary node

  -DR Site (DR-DB01)--->Secondary node

2.Environment #2 with SQL AlwaysOn

 -DC Site (DC-DB03, DC-DB04)--->Primary &Secondary node

 -DR Site (DR-DB02)--->Secondary node

At DC site on environment #1 (DC-DB01) we have created publication. And we have created one subscription on environment #2 (DC-DB03). we have failover database to DR site and recreate new publication on environment #1 and subscription on environment #2 at DR site. but we are meet one issue while we creating publication at dr  site "SQL Server could not create publication.....The Distributor has not been installed correctly (Microsoft SQL server, Error. 20036)"

here's my step above

1.Stop Service replication at DC-DB01
2.Remove subcription at DC-DB03
3.Remove Publication at DC-DB01
4.Failover all Database environment #1 to DR-DB01 (DR)

5.Failover all Database environment #1 to DR-DB02 (DR)

6.Create publication on DR-DB01 at DR site

7.Create subscriber on DR-DB02 at DR site 

Thanks !

Login failed for user ''. Reason: The account is disabled. (.Net SqlClient Data Provider)

$
0
0
how do i fix a `Login failed for user '<username>'. Reason: The account is disabled. (.Net SqlClient Data Provider)` error?

replication

$
0
0

Hi All,

I see log file for a DB keep growing. Log_reuse_wait_desc shows as 'replication'.

What can be done to fix the issue?

I see many forums stating the below command would help clearing the tlog:

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

But is it okay to run this cmd as it would clear all the pending transactions & mark it as all done?

MSSQL Replication Over The Internet

$
0
0

I'll be configuring a replication of a database over the internet using SSMS. I need to encrypt the communication between the two hosts, and a VPN isn't an option. Is using HTTPS via IIS the best option I have? I believe you can use certificates for encrypting connections over SSMS, but does that not apply to replication?

I'm just looking for the best option.

Thanks

To Which Database the data is sharing in mysql read replica

$
0
0

Hi ,

I had configured to two databases (one is master and one is slave database).

Now i inserted some data in master database. The created data is reflected in slave database looks fine .

Now my doubt is , the data which i inserted is presented in both master and slave databases right. now i want to retrieve/access the data which i inserted. From which database i am retrieving  my data and where can i find that to which database it is pointing. 


Replication to azure subscriber

$
0
0

Hi,

I'm experiencing the error below:

A .NET Framework error occurred during execution of user-defined routine or aggregate "sp_scriptdropinsreconciliationproc_sqlclr": System.TypeInitializationException: The type initializer for 'System.Data.ProviderBase.DbConnectionClosedPreviouslyOpened' threw an exception.

the publisher db is SQL 2016.

the problem occurred when i tried to reinitialize subscription.

The snapshot agent fails and throws out the error above.

Can anyone assist?


DATE data type is not replicated to Subscriber in Merge Replication

$
0
0

Hi,

I have configured Merge Replication on DB. This is SQL Server 2016 ENT 

What i observered is in one table (Column) DATE and TIME data type is not replacted from Publisher to Subscriber DB instead it is showing as Varchar at subscriber side.

How to fix this issue? 

Shutdown Time-Out Interval for Transactional Replication

$
0
0

Hello.

I have noticed that my Transactional Replication started breaking down for the reasons I still cannot explain other than there is some kind of (auto) restart of my DISTRIBUTION Server (it's a dedicated DIST Server, so not the same as the Publishing Server)...but could also be that the Infrastructure guys are doing something to DNS etc. that I am not aware of.

I started to explore this failure, and came across the fact (apart from the fact that the SQL Server Agent on my DIST Server "mysteriously" gets stopped once in a while) that SQL Server Agent > Properties > Job System > Shutdown time-out interval parameter is set to 15 seconds.

Since I have no experience with what this Parameter is in charge of, please advise whether, in the case of Transactional Replication, this should be turned off (if possible at all) or otherwise put to as high a value as possible (due to the fact that LogReader and Distribution Agents should "never" stop executing)?

(please do not paste the official declaration of what this Parameter is in charge of, since I have already read this - I am interested in advice/help based on experience)

With thanks and kind regards,

Bogdan


BogdanU

Publication Not Working with Compression (SQL Server 2017)

$
0
0

I'm adding a publication via sp_addpublication with the compress_data parameter set to true but it's generating a 14151 application event ID. This was working with SQL Server 2016 and is only a problem since moving to SQL Server 2017.

The event log shows the following:

Log Name:      Application
Source:        MSSQL$AXISDIPLOMAT
Date:          16/10/2019 10:12:55
Event ID:      14151
Task Category: Server
Level:         Error
Keywords:      Classic
User:          SYSAXIS\AXISDiplomatServices
Computer:      COCOA.systemsaxis.co.uk
Description:
Replication-Replication Snapshot Subsystem: agent COCOA\AXISDIPLOMAT-AXISLogs-AXISLogs-5 failed. The replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.FciException
Exception Message: The replication agent had encountered a file compression (cabinet) library error while calling 'FCIC
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQL$AXISDIPLOMAT" />
    <EventID Qualifiers="49152">14151</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-10-16T09:12:55.153531900Z" />
    <EventRecordID>13058</EventRecordID>
    <Channel>Application</Channel>
    <Computer>COCOA.systemsaxis.co.uk</Computer>
    <Security UserID="S-1-5-21-2143581470-1533220960-538272213-14285" />
  </System>
  <EventData>
    <Data>Replication Snapshot Subsystem</Data>
    <Data>COCOA\AXISDIPLOMAT-AXISLogs-AXISLogs-5</Data>
    <Data>The replication agent had encountered an exception.
Source: Replication
Exception Type: Microsoft.SqlServer.Replication.FciException
Exception Message: The replication agent had encountered a file compression (cabinet) library error while calling 'FCIC</Data>
    <Binary>47370000120000001300000043004F0043004F0041005C0041005800490053004400490050004C004F004D004100540000000D00000064006900730074007200690062007500740069006F006E000000</Binary>
  </EventData>
</Event>

It happens every time I add the publication. If I switch off compression then the error goes away. 

Can anyone suggest the cause of the error?

Transaction replication - create subscriber error

$
0
0

Hi I am configuring Transaction replication 

source: SQLserver 2014 

Dest :SQL Server 2016 Cu7

I created publication, While create subscriber, I am getting following error. Any expert idea would be highly appreciated 

Command executed and error occurred 

exec sp_addpullsubscription_agent @publisher = N'SQLDB1SER',
 @publisher_db = N'HRDB', 
 @publication = N'DB_PUB', 
 @distributor = N'SQLDB1SER', 
 @distributor_security_mode = 1, 
 @distributor_login = N'', 
 @distributor_password = null, 
 @enabled_for_syncmgr = N'False', 
 @frequency_type = 64, 
 @frequency_interval = 0, 
 @frequency_relative_interval = 0, 
 @frequency_recurrence_factor = 0, 
 @frequency_subday = 0, 
 @frequency_subday_interval = 0, 
 @active_start_time_of_day = 0, 
 @active_end_time_of_day = 235959, 
 @active_start_date = 20191016, 
 @active_end_date = 99991231,
  @alt_snapshot_folder = N'', 
  @working_directory = N'', 
  @use_ftp = N'False', 
  @job_login = N'PROD\REP_user',
   @job_password = 'abcd', 
   @publication_type = 0
GO

+++++++++++++++++++++++++++++++++++

I found the same error as bellow which some one got

https://dba.stackexchange.com/questions/235523/replicaton-the-current-transaction-cannot-be-committed-and-cannot-be-rolled-ba/235524

+++++++++++++++++++++++++++++++++++++++

 



Viewing all 4054 articles
Browse latest View live


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