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

SP's Slow Using Replication

$
0
0

Hi all!

I've configured an Database Replication Snapshot between 2 servers, Server1 is publication, Server2 is subscription.

Before initial subscription, I restored an backup of database from server1 to server2, and test all querys, that was work fine, directly querys in tables and Stored Procedures.

But, after initial subscription, SP's are slow, take about 10 minutes  to return data, before, the same SP returns in 1 second.

Anyone knows what happen? Why only SP are slow?

Both server's runs SQL 2017, Win 2019 and database is in 2008 compatibility. 


Douglas Filipe http://douglasfilipe.wordpress.com


2016 Always On and two different domains

$
0
0
Hello, newbie crossover from Oracle (database) here.  So, I'm working on a project that has envisioned a primary site and a disaster recovery site (1 primary database and 1 standby database (total, not per site)).  The primary site uses one domain and the secondary site uses another.  From what I've read in the documentation (regarding domain differences across sites), it looks like I have to use WSFC and create the availability groups in there to accomplish this?  Any other way to accomplish this without more advanced configurations?  From the instructions it looks like each site has a primary/standby pair, is that really required?   

Error when adding distribution database to SQL 2014: using sp_adddistributiondb error: Destination path is not valid

$
0
0
I am trying to change the default mdf/ldf paths for a the distribution database when running sp_adddistributiondb and when I do so, I get the error"Destination path xxx is not valid. Unable to list directory contents. Specify a valid destination path." When I allow defaults by running exec sp_adddistributiondb @database = N'distribution', it works fine using the default sql install folder. The folder I am directing it to is the same folder other user databases are installed on and where I set the default user databases mdf/ldf log files to on install. This is standard edition, SQL 2014 a named instance. I did install replication components on install, the instance is on a fixed non-standard port.The sql server and agent service account has full rights on the folder. I compared the permissions with the default data folder that it will use when not specified and the only difference was the nt service\mssql$instance so I added that but still no luck. Any suggestions? Thank you

Snapshot agent error when starting

$
0
0

I have problem in creating a publication in SQL Server 2017.

The following error was shown from the Replication Monitor for the Snapshot agent. Both publisher and distributor are on the same computer. But for some reason, it thinks that it is a remote server. 

Can someone please help?



Error messages:
Message: Could not connect to server 'MYCOMPUTER' because 'MYCOMPUTER' is not defined as a remote server. Verify that you have specified the correct server name. . 
Command Text: sp_MSactivate_auto_sub
Parameters: @publication = PUB1
@article = %
@status = initiated

Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
   at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout)
   at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.SetPublisherTranSequenceNumViaAutoSub(PublicationActivationState publicationActivationState, SqlConnection connection)
   at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ActivateCSSPublicationAndSetTranSequenceNums(PublicationActivationState publicationActivationState, SqlConnection connection)
   at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
   at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoConcurrentPreArticleFilesGenerationProcessing()
   at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoPreArticleFilesGenerationProcessing()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 18482)
Get help: http://help/18482
Server MYCOMPUTER, Level 14, State 1, Procedure , Line 1
Could not connect to server 'MYCOMPUTER' because 'MYCOMPUTER' is not defined as a remote server. Verify that you have specified the correct server name. . (Source: MSSQLServer, Error number: 18482)
Get help: http://help/18482

select * from sysservers

srvidsrvstatussrvnamesrvproductprovidername
01152 MYCOMPUTER SQL ServerSQLOLEDB

Replication for Clustered Column Store Index

$
0
0

Hi Team,

We need to replication around 125+ tables that have Clustered Column store, current version running SQL 2016 EE. Can you let me know if SQL Server 2017 or 2019 supports replicating clustered column store index.

We need to move Delta from source to destination using either Merge or Transactional Replication.

Thank you. Let me know if you have any questions.

Best Regards,

Kunal.

Replication error

$
0
0

Ours is a SQL Server 2016 server. I have configured distribution successfully. Next, I right clicked on Local publications and it is throwing an error as follows:

172.25.16.39 must be enabled as a Publisher before you can create a publication. 




Kiran

How does a pull subscription know what commands (data changes) in distribution db to retrieve since its last successful synchronization

$
0
0

We have publisher A (sql 2016), distributor B (sql 2019), and subscriber C(sql 2016) in our env and each resides in its own vm box.   The subscription in the subscriber is a pull one.   We are using the transactional replication.  I like to understand when a pull subscription is trying to get the data changes(commands) from the distribution db:

1. how does the subscription process determine where the starting point from previous successfully sync to get the next batch of commands in the dist db?   

2. Does the subscriber have any replication system tables residing locally that would store some kind of record seq no so it knows the last successful sync point?

OD


Ocean Deep

Unregister SQL Server database from Microsoft SQL Data Sync after deleting Azure Sync Agent

$
0
0

Hello Everyone, not sure if this is the right place to post this, I was playing with SQL Data Sync between Azure SQL Database and SQL Server on-premises; until my azure account ran out money :-), I removed my azure test environment and now I can't unregister my on-premise database from the "Microsoft SQL Data Sync" since I no longer have a key from the Azure Sync Agent.

Is there a way to manually unregister the on-premise database?, or I need to recreate the whole thing again?

Thank you in advance

Luis


Luis


IF THERE IS a MECHANISM TO KNOW IF SPECIFIC RECORDS HAVE REACHED FROM PUBLISHER TO SUBSCRIBER IN REPLICATION

$
0
0
We have a scenario wherein material receipt entries are made at factory and purchase invoices are booked at head office (against those material receipts) for control of operations. We have two way transactional replication setup between head office and factory. Often it happens that material receipts done at factory location does not reaches head office for booking or purchase invoices booked at head office does not reach factory/skipped and replication monitor does not show any error. When query comes we have to check manually. These leads to confusion while making decisions. Daily atleast 50+ entries are made of material receipt at factory and daily atleast 40 purchase invoices are booked against material receipts of previous day. Is there a way in replication to know if the concerned material receipt entries of factory location have reached head office and concerned purchase invoice booked entries of head office have reached at factory location OR some mechanism by which it can be checked everyday the gap between the two/if any material receipt of factory has not reached head office and if purchase invoice booked at head office has not reached factory. 

2019 Always On Availability - All Secondary instances show Synchronizing - Data Loss

$
0
0
I finally got my 2019 Always On Availability Group running, and all connections working.
However, all Secondary instances show Synchronizing -with Data Loss.

I have searched google and cannot find any useful information on this issue.
Any information on this issue would be great.

If I try to test the failover feature, it states that one or more databases are not synchronized.
I would LOVE to test this out and make sure everything is going to run right, as I need to put the sites back on this server and put it live.
All sites have been running on a non-server backup for about a month now. 

Any assistance would be great.

Thank you.
Wayne

Replication Error after in-place upgrade to SQL Server 2019

$
0
0

Hello All,

Good Day!

I have a transactional replication with pull subscriber configured between 2 Always node.  Below is my topology

Publisher:

Server A, Server B, Server C in a AlwaysON cluster and version SQL Server 2016

Distributor:

Server D Standalone server in SQL Server 2019

Subscriber:

Server E, Server F in another AlwaysON Cluster and version SQL Server 2016.

I had upgraded the Subscriber AlwaysON cluster to SQL Server 2019 CU4 through in-place upgrade approach. 

  • Upgrade was successful and AlwaysON is in sync.
  • Logreader is working fine and the replication monitor is also good from publisher to distributor.
  • But the distributor job is between retries and below is the error observed.

               2020-05-21 18:37:25.208 Startup Delay: 1841 (msecs)
               2020-05-21 18:37:27.067 Connecting to Subscriber ''
               2020-05-21 18:37:27.114 Agent message code 207. Invalid column name 'job_login'.

This error is not specific to any user tables as it is appearing across all the distributor job.  And in my observation there are new two column addition in the "MSdistribution_agents" system table, "job_login" and "job_password" either in 2017 or 2019 and causing this problem.

Anyone experienced similar problems?

Setting up replciation on an Always on database

$
0
0

Hello 

We are planning to migrate our on premises  SQL server 2008 R2 servers to Azure with SQL server 2016 + Always on .

Once we have the environment ready we need to configure replication (Transactional replication ) and Log shipping on always on Databases  .If someone in the group has experience please share your experience and steps to configure it .

Thanks

Priyanka


KSH

Can Connect SQL instance by IP but not host name - 2019 std sql

$
0
0

hi , 

i have installed sql server 2019 standard edition on Linux - ubuntu server.

i am able to connect the instance through the server IP from my laptop SSMS, but where as when i try to connect the same through hostname its not connecting . 

Can you please tell me to resolve this . 

i have ensured that all the sql service are up and run including browser

thank you 


hemadri



SQL Server 2017 Snapshot Replication Issue

$
0
0

Hello,

I am trying to configure an SQL Server 2017 transactional replication to another SQL Server  2017 , but the snapshot agent returns the following error:
Message: An unspecified error had occurred in the native SQL Server connection component.
 MSSQL_REPL, Error number: MSSQL_REPL55012)

I have tried the solutions provided in one of the article posted in this group but even after that i get the same issue.

I have Configured Publisher, Distributor,Subscriber everything. The permissions are correct and also Updated both the instances to the Latest Service-Pack. Even then it didn't fix the issue.

Any suggestions how to solve this issue?


Thanks,
Hemanth



SQL Replication - distribution database

$
0
0

I can't use the distribution database because it doesn't exist, and I can't create the distribution database because it already exists.

A failed replication set up had left a fat distribution database that caused the server CPU to peg 100%
when I tried to set up a new Transactional replication (halfway through the wizard).

I removed all replication objects from SMSS, but the only thing that fixed it was deleting the distribution
database with an ALTER to OFFLINE and a DROP, and restarting SQL.

Now, I'm unable to set up replication.

When I try, I get the error "Database 'distribution' does not exist. Make sure that the name is entered correctly."

In Distributor Properties, the Publisher is shown with a distribution database of 'distribution'. If I
untick that, SQL asks if I want to disable the Publisher. I say yes & get the error "Database
'distribution' does not exist.'

Ok, so let's create it.  In the General tab of that window I create a new Distribution database and call it
'distribution'.  Then I get the error 'Could not add the distribution database 'distribution'. This
distribution database already exists.


exec sp_helpdistributor    shows distribution database as 'distribution'
SMSS doesn't show the distribution database at all.

Any ideas on how I can proceed?


How can we give permission to create index and deny everything else

$
0
0
I'm looking for a way to give permission for a user just to create Index on a table and deny everything else like alter column ,change schema on a table ,Drop table etc. 

SQL Server version : 2017  

2 Way replication issue faced of records skipping/not replicating.

$
0
0
We have a replication setup wherein data entry is done at head office and also at multiple branch locations; data replicates from h.o. to multiple branch locations; also data entry done at branch locations gets replicated back at h.o. location and from h.o. replicates to all branches so that each branch can see other branch data as well as h.o. data.

Many times issue faced is that a) even though; the replication monitor does not show any issue; but few records are skipped while replicating from say branch A location to h.o.

b) at other times issue faced is that even though data from say branch A comes to h.o.; it does not replicate to branch B.

Thanks in advance.

Replication sync

$
0
0

Please provide query to see status of replication if i have publication name.

Thank u


MnSap

Replication sync

$
0
0

Hi All,

Transactional Replication job is failed. So can i restart job to resync replication?


MnSap


Can Replication cause 100%CPU

$
0
0
I configured transactional replication and in sometime CPU spiked to 100%. Sysadmin guys are saying replication as the root cause. Is it correct? 

Kiran

Viewing all 4054 articles
Browse latest View live


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