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.


SQL database to Blob storage

$
0
0

Getting issue while executing the query to take the back up on Blob storage. Followed all the required process , however backup is not going to blob storage. Error msg '': A nonrecoverable I/O error occurred on file "" Backup to URL received an exception from the remote endpoint"

Spin Azure VM 2016 - Installed SQL 2017 - storage account and container - configured credential with storage account name and access key and tried to take the backup on blob but failed. 

Error number: 14068

$
0
0

Error number: 14068 is generated when trying to run snapshot agent. 

Below is the error message generated.  Does the publication needs to be rebuilt?

Error messages:
Message: The subscription status of the object could not be changed. 
Command Text: sp_MSactivate_auto_sub

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: 14068)
Get help: http://help/14068
Level 16, State 1, Procedure sp_MSrepl_changesubstatus, Line 1394
The subscription status of the object could not be changed. (Source: MSSQLServer, Error number: 14068)

Replication and Single user mode

$
0
0

I have a database with replication (Transaction and Snapshot). I wants to bring my Publisher DB into Single user mode for some DBCC Consistency repair. Now my questions are:

1- Will it allowed me to put that DB into Single user mode?
2- Would there be any impact on Single user mode due to log reader agent? 

 

How to resume replication after we move both primary and replication databases

$
0
0

Hi all,

I need somebody to help me to check if we can resume transaction replication after we move both primary and replication databases.

1. Primary database DB1 and distribution database on server1, 

2. replication database DB2 on server2 

3. We will setup DB mirroring for DB1 on server3

4. We will failover DB1 from server1 to server3

5. We will backup/restore replication database db2 on server4

my question is, how can we resume replication for DB1 on server3 and DB2 on server4? DB1 was failed over from server1, DB2 was restored from server2 backup.

Thanks

David

How can I replicate data from SQL Server 2017 to SQL Server 2008 R2

$
0
0

I need to replicate the data in tables from a database running SQL 2017 to a server running SQL 2008 R2. The replication is only needed for the next 8-12 weeks and only one way from SQL 2017 -> SQL 2008 R2. I don't need real time replication, just daily. The servers run as virtual instance on the same physical server in Hyper-V. This is a membership database and is roughly 5 GB in size. There is usually less than 50 MB in data changes per day.

I know I can't use transactional replication. Can I use merge replication? What choices do i have?

I appreciate your time and answers.

SQL 2012 Replikation - can't create subscriber

$
0
0

Hi,

gestern wollte ich einen Abonnenten für eine Replikation anlegen, es gibt noch keine weiteren Abonnenten. Der Publisher ist ein SQL 2012 Standard, der Abonnent ein SQL 2012 Express. Das Problem ist ganz einfach, dass ich, wenn ich in der Liste den SQL-Express als Abonnenten aussuche, bekomme ich die Fehlermeldung 

Netzwerkbezogener oder instanzspezifischer Fehler beim Herstellen einer Verbindung mit SQL Server. Der Server wurde nicht gefunden, oder auf ihn kann nicht zugegriffen werden. Überprüfen Sie, ob der Instanzname richtig ist und ob SQL Server Remoteverbindungen zulässt. (provider: Named Pipes Provider, error: 40 - Verbindung mit SQL Server konnte nicht geöffnet werden) (Microsoft SQL Server, Fehler: 53)

Der Instanzname ist definitiv korrekt und Remoteverbindungen sind auch zugelassen, der Express war natürlich direkt im Netz eingebunden, mit AD und DNS, im Managementstudio konnte ich zeitweise (aber nicht verlässlich) sowohl auf dem Client als auch auf dem Server beide SQL-Server anzeigen. 

Hat jemand eine Idee, wo genau das Problem liegt? Danke schon mal.

Gruß

Susanne

Always on replica and cached views

$
0
0

Hi All,

I've a little suspect on returned rows from sql VIEWS created with(nolock) and pooled c# connections.

My Installation is synch-commit availability mode

at IIW web layer there are 50 up to 100 active connection (applicationIntent=readOnly),

LINQ driven query are sent with bind variable, against VIEW_MY_data

It could be possible that somehow sql view data is taken from buffer manager of replica  and NOT up to date , without re-read actual data ?

I've noticed a suspicious value and a not found result from my Tracelog with a timestmp of 6 second later than , timestamp column on DBMS.

Primary and slave are connected over a couple of Infinband.

Ciao

Diego


Diego scaravaggi



How to get last synchronization date and time of a database in SQL

$
0
0

Hi Team,

How to get last synchronization date and time of a database in SQL?

Any query to check or what is the log file?

Please let me know


Regards, Boopathi

Removing a filtered article in merge replication

$
0
0

Hi all,
I have a merge rep setup, and it includes hierarchy of filtered tables.
At the top of the hierarchy there is a parameterised filter (user login) and join filters kick in beneath that.

I want to remove one of the filtered articles from merge replication - we no longer wish to replicate that data.

I'm aware of the following from the documentation -

"Drop an article, where the article is a parent in a join filter or logical record (this has the side effect of dropping the join)
- requires: new snapshot and reinitialise subscriptions."

So I have been hoping that I could drop an article which is at the bottom of the filter hierarchy and not a parent of any other article, and be able to do so without reinitialisation.

I have done some testing and I can drop the article, and that works. It appears to drop the filter too.
I can run the snapshot agent and sync with the subscribers - that article appears to disappear from the publication at publisher and subscribers. 

All good so far. 

But a problem arises if I apply an update at the top level that moves the data from one partition to another.
That update throws an error relating to the parent article of the article I dropped.

The error  is :
Procedure MSmerge_expand_sp_EC91C74F42DD4B7C98FF40E8E42136F3, Line 736 [Batch Start Line 5]
Could not find stored procedure 'dbo.MSmerge_expand_sp_DE3788A836DF4BB8B025333DB7F6B9E2'.

It seems the parent article still tried to enumerate the change with respect to the dropped child article

If I query sysmergepartitioninfo it shows the missing procedure name in the metadata, but the SP doesn't exist in the DB - it appears it is removed by the static snapshot job which I run after dropping the child article.  

Is this a bug or is my understanding incomplete (well yes, the latter is already true!).

I could possibly work around this by setting force_reinitilise whilst making the change, but that's not an option for me, given the number of subscribers, the size of the partitions and the impact that would have on the business.

I have tried explicitly dropping the filter before removing the article but that simply demands reintialisation.

Can anyone clarify whether it is possible to drop the lowest article in a filter hierarchy without reinitialisation ?

Thank you!

Oracle Publications

$
0
0

I am trying to setup Transactional Replication from Oracle to SQL Server, but SQL is not seeing the schema of the objects. It can see the table names, but not the columns. Oracle is on 12.2 and SQL Server is 2016. Has anyone set this up before?


John M. Couch

SQL Server 2008 Replication Agent missing required privilege

$
0
0

So our replication publisher was once an Active Directory domain controller. We removed it as a domain controller and have noticed that certain replication setups have stopped. we are getting the error that a required privilege is not held by the client.

 

The account that is running the agent has sysadm access and still receiving this error. We have also added it to local domain admins group.

 

Thoughts?

Configure replication from SQL server 2014 Enterprise Ed. to SQL server 2017 Enterprise Ed.

$
0
0

The query here is pertaining to Replication support between Publisher instance running on SQL Server 2014 Ent. Ed. and Subscriber instance being on SQL Server 2017 Ent. Ed. Currently all DB instances (Publisher, Distributor & Subscriber) are running on SQL Server 2014 Ent. Ed.

But, we are undergoing migration activity where the Subscriber DB is getting upgraded to SQL server 2017 Ent. Ed. first then it is decided to configure new Distribution instance on a separate machine that will run SQL server2017 Ent. Ed. so that we can configure replication from Publisher running on SQL server 2014 Ent. Ed. , Distributor instance running on SQL server 2017 Ent. Ed & Subscriber instance running on SQL server 2017 Ent. Ed.

Now, in this migration activity we are trying to identify an approach that will help us to configure replication from Publisher instance(SQL 2014 Ent. Ed.) to the newly created Distributor instance(SQL 2017 Ent. Ed.) without hampering the existing replication setup.

Also We would like to know is there any other way to achieve this or issues that could arise due to this approach ?

Note: We have excluded below option:
1) Upgrade Publisher or Distributor DB instance to SQL 2017 Ent. Ed.

Replicate to different network

$
0
0

Existing setup :  Server1 (cloud) as Publication & Distributor   (sql 2016)  to  Server2 (cloud) as Subscriber (sql 2016)   ( same network for 15 aricles)


New system:    Server1 (cloud) as Publication & Distributor   (sql 2016) to local on-premises VM  as Subscriber  (sql 2019)  (different server for 15 articles)


how to setup transnational replication for the new system. 


Clear sessions of Log Reader Agent

$
0
0

Can see multiple errors of the same type in Sessions of the Log Reader Agent (Publisher to Distributor History). I would like to clear these logs so as to easily monitor for genuine errors. Is it possible to clear these logs generating every minute?


Partition table Replication

$
0
0

Hi Experts,

Am planning to migrate to a new version from SQL Server 2014 to 2017 enterprise. Am thinking of using the transactionreplication to keep the data sync. Am very new to replication so I have a situation please help with if its possible to perform those changes using replication.

1. Scenario : Copy a backup restore of 2014 to 2017 and setup replication between them. 

I think, this is doable but another challenge is that my existing table is very very large and is of INT data type. 

So am thinking to do partitioning of the table at 2017 machine & also update the data type from INT to Big INT.

So after performing partition and data type from INT to Big INT. Is it possible to setup replication if not please advice a suitable approach.

Thanks & regards

Priya

Lock on Views at snapshot replication all the time

$
0
0

Hi

I did setup a snapshot replication including some views. Did work without any problems. After the snapshot was finished and transfered to the subscriber I tried to do a drop of one of the views.

I got an error message that the view is locked by replication and cannot be dropped.

Is this really the fact that views included in snapshot replication cannot be dropped? If yes why?

Thank you for your help.

Regards

Beat

Unable to configure transactional replication using Listener name from SSMS 2014

$
0
0
Hi,

We are running SQL Server 2014 Ent and 2017 Ent. 

While setting up transactional replication with Publisher DB in 2014 and Subscriber DB in 2017 (Remote Distributor also in 2014), it was found that this configuration can get created only from the upgraded SSMS, i.e. SSMS 2017.

But, now there has been a new observation wherein lies our query - while setting up replication between two DBs both in 2014, the Publisher DB needs to be connected from SSMS 2017 for the listerner name to work.

It otherwise gets created by using the instance name but, which is not advisable in an AG environment as it will stop working once a failover occurs.

While we are able to carry out work, this case obviously made us curious as to why it behaves this way? Can someone please highlight?

Error Message:

SQL Server is unable to connect to server 'TestLSN'.

Additional information:
SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternative name are not supported. Specify the actual server name, 'myinstance\myinstance'. (Replication.Utilities)

Note:

Below things are already checked:

1) Listener name is added in the SQL configuration Manger under Alias
2) Machine name & Listener name is updated in the Host file(C:\Windows\System32\Drivers\etc)
3) Machine name or SQL server instance name has not been renamed in the past.

Regards, Rahul

Can we have two different publication servers and single subscriber Server

$
0
0

Hi,

I have a request to add a database from a server to the existing replication setup.

Existing setup:

Server1: Publisher

Database: XXX

Server2: Subscriber and distribution. All agents are running on this server.

Database: XXX

Requirement:

Add new database ABC to replication which is located on server3 and it should use Server2 as the subscriber.

If this is possible, please let me know the steps.

When I try to create the publication on server3, it says SERVER3 is not enabled as a publisher at the distributor. What should be done to fix this <g class="gr_ gr_744 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation multiReplace" data-gr-id="744" id="744">error.</g>

Thanks in Advance!!

SQL server cross replication login failed

$
0
0

Hello All,

We have DEV and UAT domain. I am trying to create replication from UAT to DEV and vice versa. As we have two different domain we can't use domain account. So, i have created SQL account to add subscriber. But, somehow i am still reeving login failed for user Error 18456. I have checked SQL authentication has been set to allow SQL and Windows account. Can anyone please help as this is urgent issue and need to resolve asap. Thanks for your help in advance. 

Viewing all 4054 articles
Browse latest View live




Latest Images