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

Replication-Subscription create Error

$
0
0

erverA : publication

Server B: subscription

type : push

created pub, while create sub am getting below error,

when i try to create sub from T-SQL also getting error,

Job 'SERVERA--_cat_prodwe-SERVERB-93' started successfully.
Warning: The distribution agent job has been implicitly created and will run under the SQL Server Agent Service Account.
Msg 207, Level 16, State 1, Procedure sp_helpdistributor, Line 272 [Batch Start Line 0]
Invalid column name 'deletebatchsize_xact'.
Msg 207, Level 16, State 1, Procedure sp_helpdistributor, Line 273 [Batch Start Line 0]
Invalid column name 'deletebatchsize_cmd'.

Error when trying to open "Distributor properties...."

$
0
0

If I right click the "Replication" folder, then click "Distributor properties....", I will get the following error:

TITLE: Distributor Properties
------------------------------

SQL Server is unable to complete the Distributor Properties.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=14.0.17224.0&EvtSrc=Microsoft.SqlServer.Management.UI.DistributorPropertiesErrorSR&EvtID=CantComplete&LinkId=20476

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

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

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

Invalid column name 'deletebatchsize_xact'.
Invalid column name 'deletebatchsize_cmd'. (Microsoft SQL Server, Error: 207)

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

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

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

It was working fine! 

Add a table to a replication

$
0
0

I have two MS SQL servers running.  The one is a local publication and the other is a subscriber.  SQL Server version 10.50.1600.

A while back I added a table to one of the publications and noticed today that the subscriber has bunch of records and the publisher has none.  Digging into the list of articles, I see that table is not listed.

It is my understanding that to fix this I need to reinitialize all subscription from the publication server.

Is there anything else I need to know, I really don't want to lose the data in the table.

Regards,

John


John J. Hughes II

Windows 2016/SQL WSFC - cluster failover occurs when FSW is offline

$
0
0

We have a two node cluster - both nodes are Server 2016 Standard to provide HA SQL.  The cluster is configured with a FSW on a third server that does not have WSFC installed.

Whenever the server holding the FSW is rebooted for maintenance, the cluster fails over to the other node.  Should this happen?  Is there a way to configure the cluster so it does not?

I understand the cluster object can no longer write to the FSW so it sees it as offline, which is why it fails over after 60 seconds but how is this useful then?  I thought the point of an FSW is to make sure the cluster does not fail over since both nodes are up.

Thanks in advance for your thoughts and help! 

Transaction replication monitor letency

$
0
0

I configured SQL Server Transactional replication(2008 R3 to 2016 sp1 std). I need to monitor latency(subscriber update) over the period of time Therefore I need to schedule a job to run every 5 min and collect data. I understand Replication monitor has information. But its not a aggregate value over the time . any one has an idea?

thanks

using Azure for SQL replication

$
0
0

hi,

We are looking to include Azure database in our replication topology. Is it able to add Azure database to replication?

A snapshot was generated because there was no subscription

$
0
0

Dear All,

I tried to re-add an article by recreating a table on the Publisher so it can also appear on the Subscriber but I get the following message after I execute the snapshot agent job "a snapshot was generated because there was no subscription" and as a result the Article does not appear on the the Subscriber side; is there anything I'm missing please?

Thank you in advance!

Foreign Key Error with Transactional Replication from Backup

$
0
0

I'm getting a missing foreign key error when I begin transactional replication:

Steps taken:

Created a pull publication(live server)
Created a copy only full backup
Restored backup on reporting server
Created a pull subscription on from backup(live server)
Created a pull subscription on subscriber(reporting server)

I'm getting errors soon after looking through replication monitor:
* The INSERT statement conflicted with the FOREIGN KEY constraint.
* The issue is it's trying to insert a record into a table for which their's no corresponding record(although the record does exist on the live server). Unless I've missed a step I'm not sure why this is happening. I had suspected it may be a case of distribution records getting cleaned up  too early so I disabled the SQL Agent job but it's still happening.

Any help would be greatly appreciated.


Logging replication

$
0
0

Hi guys,

During the bulk copy data into tables in Replication Monitor I can see tables coming by which are copied from the publisher to the subscriber including the amount of rows. Is this somewhere logged so I can see what was copied? I mean I see some tables coming by I selected (for a customer) and show 0 rows. If this is logged somewhere I can show the customer that there are some (and point these by name) tables which are empty on both sides and ask them what the purpose is for replicating these.

Otherwise I need to pay attention to the actions in the selected session and write the tables down on a piece of paper.

kr
Marco

Can Replication be enabled on a Primary Replica of an AlwaysOn Availability group using a publisher only without negatively impacting the Primary or Secondary replica?

$
0
0

We are looking into using a product called Attunity for a Data Warehouse solution. 

Our current production environment  is a 4 node WSFC.  3 of the nodes belong to the SQL Server Failover cluster. The  4th node, which is the AlwaysOn secondary replica, is used for reporting purposes only.  The secondary node will never take on the primary role for any of the SQL instances so failover to that node will never take place which is why it's not part of the SQL Cluster.  

The Attunity product  reads from the transaction log  via the Microsoft Sql Server API and requires MS Replication to be enabled however according to them we only need to set up the publisher side of things. We have never used replication so I'm  unsure if this is even a possible scenario. 

Does anyone know if Replication can be set up on an AlwaysOn primary database without  "breaking" the secondary replicas? Can it be set up to only enable a publisher and what impact could  that have? We have a call with the vendor on Tuesday and I have several questions however before that call, I need to understand if  their requirements are feasible and what are the possible implications.

Any guidance/advice is greatly appreciated.

remopve transaction replication

$
0
0

I am in the process of remove <g class="gr_ gr_185 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="185" id="185">trasaction</g> replication and reconfigure back  Initially  I delete <g class="gr_ gr_403 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" data-gr-id="403" id="403">subscriber</g> from GUI and the Publisher. But I am accdently remove the 

distribution DB as follows

use master 
go 
alter database distribution set offline; 
drop database distribution;

I run the disable publisher and distribution option and end with the following error as distribution DB is not found

When I manually try to create distribution DB then get <g class="gr_ gr_685 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="685" id="685">errror</g>. 

Msg 5120, Level 16, State 101, Line 94
Unable to open the physical file "U:\Microsoft SQL Server\VER\MSSQL\Data\distribution.MDF". Operating system error 5: "5(Access is denied.)".

Not sure how to clear <g class="gr_ gr_755 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="755" id="755">all .</g> <g class="gr_ gr_765 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="765" id="765">Still</g> I am not getting "configure distribution " as distribution has not deleted clearly. 

Anyone can help would be greatly appreciated

remopve transaction replication error

remove transaction replication error

Identity Range Check Problem

$
0
0

Hello all,

This problem always happens whenever a merge replication is used and whenever a table has auto-number (also known as identity).

[SQLSTATE 01000] (Message 0)  The insert failed. It conflicted with an identity range check constraint in database 'xxx', replicated table 'dbo.replicated_table', column 'id'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent. [SQLSTATE 42000] (Error 50000).  The step failed.

I have tried various solutions but none of them seems to work.

I read a post that they released a hotfix available to download for this bug on Microsoft SQL Server 2005, however I am using the 2016 SQL Server.

I tried changing the range of the publisher, subscriber, everything but nothing seems to work.

I am suspecting that the problem would either be:

1) A bug in the replication

2) Something from the application side causing it (The way users insert their data)

Thank you for the time you spent on reading this post, and your answer is much appreciated!

sp_addarticle replication

$
0
0

Hi Experts,

Am trying to add article using TSQL script and normally follow the steps listed on this link to add from GUI.

https://dba.stackexchange.com/questions/12725/add-article-to-transactional-publication-without-generating-new-snapshot

Now, I scripted out an existing article which is like below 

EXEC sp_addarticle 
     @publication = N'Publisher_Profile', 
     @article = N'Table', 
     @source_owner = N'dbo', 
     @source_object = N'Table', 
     @type = N'logbased', 
     @description = N'', 
     @creation_script = N'', 
     @pre_creation_cmd = N'drop', 
     @schema_option = 0x000000000803509F, 
     @identityrangemanagementoption = N'manual', 
     @destination_table = N'Table', 
     @destination_owner = N'dbo', 
     @status = 24, 
     @vertical_partition = N'false', 
     @ins_cmd = N'CALL  [sp_MSins_dboTable]', 
     @del_cmd = N'CALL  [sp_MSdel_dboTable]', 
     @upd_cmd = N'SCALL [sp_MSupd_dboTable]';

GO

How can I ensure the step View Snapshot Agent Statuswhich I do from GUI is performed from TSQL so it just initializes the snapshot for the   newly added article not all the existing once's.

Thanks 

Priya


SQL Server 2016 mirroring terminated

$
0
0

I setup basic mirroring between 2 servers with no witness, so far so good, DB’s replicate fine. <o:p></o:p>

Come monthly maintenance windows the servers get patched by SCCM and reboot.<o:p></o:p>

The mirror still stands, no errors.

<o:p></o:p>

One day I added more RAM to the target server and the mirror stopped with error: “Database mirroring has been terminated for database “db01” <o:p></o:p>

<o:p> </o:p>

What could have caused this and how can I prevent this from happening?<o:p></o:p>

<o:p> </o:p>

What do I need to do to restart the mirror as the DB is now showing not mirrored?

Thanks, M<o:p></o:p>


Maelito

Enable Replication/CDC from High Availability Group

$
0
0

Hello Experts,

First of all, I should confess that I have very minimal knowledge about both HA and Replication. So, pardon me if I am posting in the wrong forum and feel free to move it to the respective forum.

I would need your expertise in setting up few things.

I have a HA Group where our Application is sitting or communicating with the Databases. Obviously this group will have a Primary node and a Secondary node based on the definition of High Availability Group. The Application could be reading/writing data to the database either through a Listener/Load Balancer.

So, now my requirement is, I would like to setup Replication from the HA Group to a Staging Database server so that I can enable CDC on my Staging Database Server. I know that CDC can be enabled on HA Group itself but, due to some organization policies, I would like to enable CDC ONLY on Staging Database Server.

As part of this, I would like to script out all the Replication scripts from the Publisher (HA Server) to Subscriber (Staging DB Server). Could someone please help me with scripts as most of the internet talks about doing it through SSMS? The reason I would like to script out this is because, every time the Application does a build, I would like them to disable the Replication, do their build, and then re-enable the Replication at the end. It was also my understanding that, in order to enable/disable Replication one should have sysadmin privileges. If that is the case, can I setup a SQL Agent Job and allow the application to run the Job to enable/disable Replication whenever they're doing the build? Please advise.

Thanks!

 

Known is a DROP, Unknown is an OCEAN.

Replication preventing drop of linked server not used in replication.

$
0
0

An hour ago I manually created a linked server of type SQL Server for temporary admin use. The linked server exists on a server that does have replication subscriptions and publications which were created several days ago.

I just tried to remove the linked server and could not:

EXEC master.dbo.sp_dropserver @server=N'myserver\myinstance', @droplogins='droplogins'

Msg 20582, Level 16, State 1, Procedure sp_MSrepl_check_server, Line 31 [Batch Start Line 39]
Cannot drop server 'myserver\myinstance' because it is used as a Publisher in replication.


No, it isnt:

select is_publisher, is_subscriber, is_distributor from sys.servers where name = 'myserver\myinstance'

is_publisher is_subscriber is_distributor
------------ ------------- --------------
0            0             0

Bug? How do I get rid of this now?



data replication from Always on groups

$
0
0

Hi In my environment has a requirement to replicate database to BIA env from  database running on always on availability group env. Database expect to sync near real time.

What is best replication technology to use achieve this  . I understand transactional replication would be better good. But I  have few issues on this .When Always on availability group when fail over /fail back between servers , how the Transactional replication is working. Is this works if we configure transactional replication thorough "Group Listener"? I never know how its working is this setup. Very sensitive and sync breaks easily ??

Secondly mirroring. As per my understanding Mirroring need same version level to mirror DBs. But When not sure how its working when   fail over /fail back between servers

Any one can advice would be highly appreciated.

thanks

SQL Server 2014 Express Merge Replication issue

$
0
0

For some time, I have been using some VBA code to perform an web merge sync using the sqlmergx.dll (Microsoft SQL Merge Control 10.0) object.  These existing projects use SQL Server 2008 R2 with 2008 R2 Express clients, and continue to work reliably. 

I've started working on a new project is using SQL Server 2016 with SQL Server 2014 Express clients.  The same code using the later version of the sqlmergx.dll (Microsoft SQL Merge Control 12.0) object now fails web sych, throwing the following error;

"Run-time error '430'.  Class does not support Automation, or does not support expected interface".

It works just fine without web synchronization enabled, but as soon as it is turned on;

    .UseWebSynchronization = True
    .InternetURL = RemoteServerURL
    .InternetSecurityMode = BASIC_AUTHENTICATION
    .InternetLogin = "domain\username"
    .InternetPassword = "somepassword"

the code fails and throws the automation error when it hits run after being initialized.

   .Initialize
   .Run
   .Terminate

The exact same code works fine with the same setup (2014 Express client) on my development box when I use the 2008 R2 control (Microsoft SQL Merge Control 10.0).

I was initially thinking that the newer control needed some additional parameter that the older one didn't need, but I can't see anything that makes sense.

Does anyone have any ideas or advice ?  Is this something that was broken between 2008 and 2014 and never fixed ?  Or is there something else going on ?

I could just deploy 2008 R2 Express on the client workstations, but would prefer to use a newer release.

I'll also deploy a new VM to experiment with Server 2016 Express and version 13.0 of the control.  Although for some reason I can't recall at the moment, I was trying to avoid using 2016.  (edit. Remembered it was due to lack of support for W7)

Thanks to anyone with an answer or explanation, or simply just a "me too" !!

Darren C (Csoftware)


Viewing all 4054 articles
Browse latest View live




Latest Images