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

SQL Server replication error A valid identity range is not available

$
0
0

When I try to reinitialize transactional replication with an updatable subscription, I got the following error: 

A valid identity range is not available. Check the data type of the identity column.

The replication has only one table, with a column called ID of type int identity (1,1), with 2 rows inside.

I already did:

  • Drop and recreate the ranges;
  • I have executed DBCC CHECKIDENT('Table_Name', 'reseed', Current_Value+1)for both servers inclusive;
  • executed sp_adjustpublisheridentityrange @table_name='table_name';

I have manually updated the table MsRepl_identity_range on the distributor side, but not on the subscriber side.

The update with the procedure sp_MSfetchAdjustidentityrange, at the distributor side, throws the same error as above.

What I planning as the next step:

  • Drop the subscriber table and I will try to reinitialize the replication marking it for reinitialization, using a new snapshot.

But, someone already saw this error and could help with that?

Thant you. Att,



I am getting below attached error(screenshot) while configure SQL Server AlwaysOn 'Availability Group Listener'.

$
0
0

Hi All,

Thanks in Advance,

I am getting below attached error(screenshot) while configure SQL Server AlwaysOn 'Availability Group Listener'.

I am new to the AlwaysOn setup

AlwaysOn listener configuration

Thanks,

SQLDBA

Replicated Database Restore from SQL2k12 to SQL2k16

$
0
0

Hello,

Two servers. One a SQL2k12 ent ed., with sp4 + all the patches, and the 2nd one is a SQL2k16 with sp2 + cu2. Snapshot transactional replication is setup within 2 databases of the same servers. Both are working OK. I took a new backup of the database from SQL2k12 server and restored it overwriting the current database inside SQL2k16 as part of migration testing. Prior to this, I did stop the sql server agent service. Then, I started the agent service inside SQL2k16 server which started OK. However, the Local Publications folder inside SSMS did not show anything. So, launched Replication Monitor inside SQL2k16 and under Agent tab, looked at the error which shows the following:

Error messages:

Message: Specified cast is not valid.

Command Text: exec sp_helppublication @publication select formatmessage(21273)

Wondering how to fix this issue without having to recreate the replication config.

Will greatly appreciate your input.

Thanks.

Victor


Victor

Replication error: Specify the actual server name (Replication.Utilities)

$
0
0

I was trying to setup transactional replication between two servers A (Azure) and B (Local). I setup A as the
publisher and distributor. From B, when trying to connect 
to the distributor on A, I saw the error below:

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 alternate name are not supported. Specify the actual server name (Replication.Utilities)

How can I Set Up Replication Between Two Computers Running SQL Server in Non-Trusted Domains?



Windows Servers Synchronization


Microsoft MS-101 Dumps Pdf ~ 2019/Mar Latest And Updated

$
0
0

Microsoft MS-101 Dumps Pdf  best study for candidates who are facing failure. You can get massive success by learning from these MS-101 Dumps pdf it will boost your confidence level and bring you to lucrative. all you have to do is download and prepare these MS-101 dumps pdf. You will find these MS-101 dumps pdf authentic and valid.

Copy And Prepare :   https://www.realdumpspdf.com/exam/ms-101-dumps-pdf/

 

problems with SQL Server transactional replication

$
0
0

Hi All,

I'm hoping someone can shed some light on a problem I'm experiencing with our SQL Server transactional replication.

Before I go into detail, can I advise that I'm quite new to this and this is my first replication setup, so I apologise in advance if I get anything wrong !

We are attempting to setup replication from Site 1 (HQ) to Site 2 (remote branch office). The two sites are connected by an IPSec VPN tunnel with a bandwidth of 10 Mbps.

Site 1 has a SQL Server 2014 Ent 64-bit. Publisher & Distributor both assigned to this server. There are two publications available. 

Database 1 is approx 16GB and Database 2 is approx 120GB. We are attempting to replicate these two databases across to Site 2 using transactional replication.<o:p></o:p>

Site 2 has a SQL Server 2014 Ent 64-bit. This has two subscriptions to the the server in Site 1.

Replication for Database 1 seems to work fine.

Replication for Database 2 just seems to time out after a while. After some diagnosis the issue seems to be at the transfer of data from Distributor to Subscriber stage. I've had a fiddle with the Distributor Agent profile settings but could really do with some guidance on how I can tweak the settings to get replication to work even if it's very slowly.

Whenever I make changes and then restart the Distribution Agent, I get the message 'delivering transactions ....' and after a while I get the message 'skipped XXXXx errors when applying transactions at subscriber'. The errors all seem to be like this ...

"The row was not found at the Subscriber when applying the replicated UPDATE command for Table "

When I first set this up the agent stopped when it first came across this error. I then updated the agent profile to skip these errors.

Also when I look in replication monitor there seems to be a lot of data still waiting to be sent to the subscriber and doesn't really decrease even after a few days !

This led me down the path of looking at our network and if there were any issues but I've not found any. 

Could anyone offer any advice / guidance on how I could fix this issue ?

Is this normal because of the size of Database 2 ?

Does the initial replication take several days ?

Anyway, thank you for taking the time to read this and if anyone can help then that would be much appreciated.


Replicating from new versions of Oracle?

Transaction replication distributor to subscriber is pending status

$
0
0

Hi I have replication setup 2018R2 to 2014 production. Distribution subscriber is pending. I found the article .

Q1. How to find exacts same record which was not found.

Q2. As a option how to continue replication by skipping the missing records.

Q3: In this situation what are the suggestions to fix the prod

Not an idea to rebuild the subscribers again as its huge

Thanks heaps of some one can  advise    



Detaching a replicated database

$
0
0

SQL Server 2005 - We want to detach a replicated database in order to move the files to different disks.  The database is a publisher.  According to BOL, "Before you can detach the database, you must disable publishing by running sp_replicationdboption".

Planned steps -
1) EXEC sp_replicationdboption @dbname= 'db_name'
        , @optname= 'publish'
        , @value= 'false'

2) Detach the database

3) Copy the database files to new locations

4) Attach the database

5) EXEC sp_replicationdboption @dbname= 'db_name'
        , @optname= 'publish'
        , @value= 'true'



Will these steps suffice, or am I missing something?

Is there anything that needs to be done to the subscriber?

SQL 2019 CTP2.2 Replication error in sp_changereplicationserverpasswords

$
0
0

Hi, I am trying to change SQL replication agents password

exec sp_changereplicationserverpasswords @login_type = 0, @login = 'sa', @password = ' PASS'

Msg 208, Level 16, State 1, Procedure master.sys.sp_MSchangerepltablepasswords, Line 26 [Batch Start Line 108]
Invalid object name 'MSreplservers'.

How to safely remove old distribution agent jobs

$
0
0

I have two distribution agent jobs which are looking for publications or databases that do not exist or have been moved but the old distribution agent jobs are still present on the server.  These jobs just keep retrying forever and I would like to remove them safely.  Besides simply stopping the job and then deleting it, is there any other metadata that I need to remove or processes that I need to follow?

Also, I have two distribution databases on another server and the publication looks like it is only using one of the distribution dbs.  How can I confirm this?  Am I correct in assuming that I just need to remove the db from the list of distribution dbs in the configure distribution databases and publishers in order to remove the db?

Initialization for just one table schema change

$
0
0

Fellow SQLers,

On a SQL 2008r2 box and coming up to speed on replication. I saw a youtube where someone explained a process whereby IF you altered the schema of a table, you could get replication to create a script-snapshot of JUST that table. I cannot find that process to do that.

As an example, I have a pulication with two tables. I have added a field to one of those tables in the DB. Now I want to add that field to the publication. When you do that, you get the popup that indicates you need to reinitialize.  I would rather not reinitialize the whole publication (both tables) to the subscriber.

I had seen a youtube whereby a person describes dropping the table from the publisher, then adding it back. I am still seeing that the process wants to reiniti the entire publication. Any trick around this to just publish the one table schema change?

Thanks, MG


SQL 2016 Peer to Peer Transactional update-update Conflict Issue Due to Reboot?

$
0
0

Dear all,

We are using SQL 2016 Peer to Peer Transactional replication in our environment. The p2p replication is configured among 4 nodes with rectangle like topology with "Continue replication after conflicted detection" on. The 4 nodes are split in pairs in two physically separated sites, lets call them site 1 and site 2. The tables are carefully designed such that between site 1 and site 2, writes can happen simultaneously but they are touching different rows on the same table.

Within the same site, our application is only accessed one SQL node at a time such that if one SQL node goes down, the app will start using the second node. 

Now onto the issue we observed. Initially we have our application access first collocated SQL server and then we abruptly shut down that SQl server to emulate a failure. Our application then picked up second collocated SQL server and everything seemed fine from the surface. Then we rebooted the first SQL server and from replication monitor we saw it being brought back to the replication. However, we were seeing a lot conflicts in some tables.

We are suspecting conflicts happened because when first SQl server was brought down, there were undistributed commands in its distribution database while at the same time the application has switched to the second SQL server and updating there. When the first SQL server is brought back it would try to apply those undistributed commands to the second SQl server and ended up touching the same rows, causing conflicts. Is this a correct assumption?

If the above assumption/suspect is correct, before rejoining the failed SQL server back to the replication, we can purge/delete its distribution database, restore its publication database from SQL server two and reset up publication/distribution and join it back to the peer to peer replication. Is this a correct approach assuming we are okay with some data loss in the event of SQL server failure?

Another thing we saw was that when the first SQL server is rebooted and brought back into replication, from replication monitor, the performance was critical as a lot pending commands were being generated and we were suspecting this is the result of conflicts. We had to eventually terminate our applications and increase the bandwidth between two sites before all the pending commands were applied. Also, is this a valid assumption?

Thank you

"Stand Alone" Replicated Database

$
0
0

I understand basic replication methods but I need help with the viability of setting up a particular situation.

The Non-Technical Situation

We have an vendor supplied accounting application in use in my department that has an SQL server db backend. The app's hosting server and database server are maintained by the organization's IT department. My department is legally an independent entity from the company itself but we have to rely on the main company's IT department for application and database hosting. My organization's IT department does not have the resources or official responsibility to provide anything above and beyond maintaining the servers. I have been hired by my department as an in house data analyst to provide BI that goes above and beyond the simplistic reporting built into the application. The department head's plan was to have a replicated copy of the production db that I could access directly for creating custom queries, views, tables, etc. 

The Technical Situation

The IT department is understandably hesitant to let someone else outside of their department from accessing a production database which is where the plan of replication comes in. I know that we could setup a scheduled one way merge replication to a second DB that I could then access for the functionality that I need. This way, I could have my hand in the data while making the IT department happy knowing that any changes that I make on the replicated database will never make it back to the production db. The questions I have are about merge replication and schema. When you originally setup the replication, the database schema and data will be replicated to the subscriber. What happens if I wanted to add custom views, lookup tables, stored procedures, etc. to the replicated database? I will not alter the existing structure of tables, sps, etc. in any way. I will just want to add additional objects that serve my purposes. Will this break the replication because I've added to the subscriber's schema or will the data flow from the publisher to the subscriber as usual since all original schema objects will exist in the subscriber's schema unaltered?

Like I've said, I don't know enough about this type of situation to speak intelligently about it. And the department head needs to know if her plan is viable before she pushes for the replicated db.

TIA.

Move publisher and subscriber DB's to another drive on same server

$
0
0

I am planning to move publisher and subscriber DB's to another drive on same server and I am planning to follow below steps

Stop SQL server 

Move the data and log files to new drive 

Switch drive letters 

Bring SQL server online 

Are the above steps sufficient and  any other items I am missing here .Will the replication properties move to the new location  after copying it over?


Encrypting Replication flow

$
0
0

[Initially Posted in Security Forum, posting it here for a better response]

I am trying to encrypt replication flow, in two different ways:

1) In both Log Reader Agent Job and Distribution Agent Job added parameter "EncryptionLevel". On checking sys.dm_exec_connections, I see column encrypt_option as "TRUE". This makes me believe it works!

2) Create a new Agent Profile for both Log Reader and Distribution Agent, add parameter "EncryptionLevel" in addition to all default parameters. Make these profiles as default. Restart all agent jobs again. If I query sys.dm_exec_connections, to my surprise, column encrypt_option is "FALSE". 

Why is this behavior strange. Can experts out in the community help me?

Thanks,

Lokesh Vij


Set Up SQL Transactional Replication Between Two Computers in Non-Trusted Domains

$
0
0

Does anyone have instructions on configuring transnational Replication Between Two Computers Running SQL Server in Non-Trusted Domains ?

Most of the threads are referring to below URL but Microsoft seems to have removed the page. 

https://support.microsoft.com/en-nz/help/321822

is it possible to configure transaction replication between a database a, and a database b, when the tables and column names are different between the 2 databases?

$
0
0
is it possible to configure transaction replication between a database a, and a database b, when the tables and column names are different between the 2 databases? 

RAM

Transaction replication table counts

$
0
0

Hi I am running sql server 2018 to 2014 replication.

I need to validate both side tables whether raw counts are equal.  I am not expecting to select count(*) from table name. Its need to match with individual table keys. Then would be the real comparison is on.

Any one can advise on this would be highly appreciated

regards

Could not find stored procedure "" merge replication error

$
0
0

Hi,

Getting the below after performing some schema updates. Only appears to be affecting one subscription. Other subscriptions to the same publication database are fine. Can't reinitialize as it's a failry system critical and large database.

Error messages:

  • The merge process was unable to access row metadata at the 'Subscriber'. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to write to, or use SQL Profiler to determine the source of the failure. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200996) Get help: http://help/MSSQL_REPL-2147200996
  • Could not find stored procedure ''. (Source: MSSQLServer, Error number: 2812) Get help: http://help/2812
  • Failed to get metadata for a batch of rows. (Source: MSSQLServer, Error number: 20680) Get help: http://help/20680

 

Viewing all 4054 articles
Browse latest View live