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

error while restoring database with different name on subscriber

$
0
0

Hi all,

I am using merge replication in sql server 2008R2. Yesterday I wanted to create a test environment, so I did:

1. on publisher I restored from backup production db with another name ( lets call it TEST and new files .mdf, .ldf and no switch KEEP_REPLICATION). After this step original replication between production dbs worked fine.

2. on subscriber I did the same: restore as new db TEST with new files .mdf, .ldf and no switch KEEP_REPLICATION.

Unfortunately I noticed, that after second step replication stopped. SQL agent replication job on Subscriber is gone.

Why restoring db with new name did affect original replication?

Finally the most important: replication was set up by external company and I have to bring it to live now but I don't know this subject so good. How can I do it?

Assuming, that there is no data change on subscriber in replicated tables is it enough when I select ‘reinitialize’ on Publisher and Subscriber?

Thanks in advance

Artur


Transaction replication getting same error continuously

$
0
0

Hello Team,

We are configured transaction replication from sql server 2005 to sql server 2008R2,

My distribution database is located in publication server i.e sql server 2005.

Replication working fine there is no issue.

But while we are checking sql server error log and windows event viewer it’s showing below error message continuously.

Error Message :

Replication-Replication Distribution Subsystem: agent domain\abc- replication_Repl-domain\abc-3 failed. The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5

Note: my distribution located in sql server 2005 but above error message showing compatibility level 100.

Please provide me your values inputs and how fix this issue ASAP.

Thanks


Replication doubts

$
0
0
Hi Replication Experts,

Can anyone explain in simple terms regarding my below doubts. I am very much confused with replication concepts.
I understand transactional replication is uni-directional i.e. changes from Publisher are moved to Subscriber and not vice versa.

1. what is the difference between Transactional replication and Peer to Peer replication? Is Peer to Peer replication is another form of Txnl replication?
2. What is the difference between transactional with updatable subscribers and Peer to peer replication?
3. What is the difference between Peer to Peer replication and Merge replication?

I am looking for simple answers so that once I understand basic things, I can drill down more.

Thank you.

distributor server move

$
0
0
Hello all,
I have a situation where client wants to change their distributor server from A to B. i.e. they want to decommission old distributor server. I have a transactional replication with updatable subscription configured with 1 publisher, 1 distributor and 4 subscribers. Publisher DB size is around 120GB and it takes around 15-20 hrs to synch the subscribers if I go by reinit method as there network speed is too slow.

To minimize the downtime what I was thinking is to follow below steps:
1. Remove replication(subscription, publication, distributor),
2. Retire old distributor server,
3. Configure distributor on new server, add publisher and configure publication,

4. Create subscriptions using noinitialize option as my DB's will be already in synch. Please see the below screenshot. Note that during this change there wont be any transactions occurring on publisher/subscribers.

Inline image 2

5. Verify replication

Do you see any issues in using noinitialize option? I have tested this option in my test environment and found that it is working fine. However want to know your views if anyone has encountered any issues in using this option. 

Let me know if you need any further details and thanks in advance.

SQL Server two database at two different locations

$
0
0

Hi Guys,

We are having same database at two different locations (Database A with Sqlserver 2008/Express, database B with Sqlserver 2012).

Our requirement is when ever a row is inserted in a table of Database A from location 1. Same value should also be added in Server 2 at different location.

So that at any point of time both the database base values should be same.

Which is the best method to do it ?

Regards,

Raghu.G


raghu

Merge publication missing. But entry is there sysmergepublications

$
0
0

Hi We have a merge publication. It was working fine. All of a sudden publication is missing.


Replication-Replication Merge Subsystem: agent XXXXXXX failed. Publication 'XXXXXX' does not exist.

But till yesterday it was there we did Sp_helpreplicationDBoption db is true for merge replication and entry is there in sysmergepublications table kindly help. It is severity 1 issue

peer to peer replication

$
0
0

Hi

when i tried to create a subscriber for peer to peer replication in another node , its throwing errors as above .

kindly how can i approach peer to peer.

Replication Scripts Stopped Working..

$
0
0

I have a merge publication that I always create with a script but has now stopped working with what appears to be a complete server problem.

 

The actual command i am executing is a simple

sp_addpublication_snapshot

 

but it fails with

 

Msg 50000, Level 16, State 1, Procedure sp_add_jobstep_internal, Line 253

The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

Msg 3931, Level 16, State 1, Procedure sp_MSadd_repl_job_unsafe, Line 376

The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.

 

 

I have tried recreating the database from scratch, renaming it, renaming the publication, even disabling the publications altogether but it makes no difference. There is nothing in the sql or event logs and I cant do any work until Ive got past it - help!

 

I am using SQL 2005 SP2 if that makes any difference.

 

Thanks

Andy


log reader error "Cannot insert the value NULL into column 'article_id', table 'distribution.dbo.MSrepl_commands'; column does not allow nulls"

$
0
0

SQL Server 2012.  Republishing a subscriber to a new, filtered DB on same server.  I initialized by backup/restore.  I created the publication first, then ran the backup, restored as a new DB and then sp_addsubscription using "init with backup".  Log reader errors:

Error messages:

<dir>

</dir>
<dir>

The process could not execute 'sp_MSadd_replcmds' on 'RPTDB01'. (Source: MSSQLServer, Error number: 1007)

Get help: http://help/1007

Cannot insert the value NULL into column 'article_id', table 'distribution.dbo.MSrepl_commands'; column does not allow nulls. INSERT fails. (Source: MSSQLServer, Error number: 1007)

Get help: http://help/1007

Cannot insert the value NULL into column 'article_id', table 'distribution.dbo.MSrepl_commands'; column does not allow nulls. INSERT fails.Cannot insert the value NULL into column 'article_id', table 'distribution.dbo.MSrepl_commands'; column does not allow nulls. INSERT fails. (Source: MSSQLServer, Error number: 1007)

Get help: http://help/1007

IDistPut Interface has been shut down. (Source: MSSQL_REPL, Error number: MSSQL_REPL2000)

Get help: http://help/MSSQL_REPL2000

</dir>

The last step did not log any message! (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)

Replication problem with Cumulative Update 1 for SQL Server 2012 SP2

$
0
0

 

Hello,

Last week, I updated my SQL Server 2012 SP1 to SP2 and then Cumulative Update 1.
I did it without any reboot between SP2 and Cumulative Update 1.

Before the update, my replications (Merge and Transactional) were working fine.

After the update - Although data replicate, I get constantly these errors :

- Transactional Replication - Log Reader Agent : 
The last step did not log any message! (Source : MSSQL_REPL, Error number : MSSQL_REPL22037)

- Merge Replication (on all subscribers - All are SQL 2005 Express) : 
The merge process could not perform metadata cleanup by retention in the basis of "DatabaseName" data. If the problem persists, try increasing the query timeout process or reduce the retention period. When solving the problem, restart the synchronization with detailed and specify an output file to write to record history. (Source: MSSQL_REPL, Error Number: MSSQL_REPL-2147199466) 
Get help: http: // help / MSSQL_REPL-2147199466

Conflict of operand types: bigint is incompatible with uniqueidentifier (Source: MSSQLServer, Error number: 206) 
Get help: http: // help / 206 

Conflict of operand types: int is incompatible with uniqueidentifier (Source: MSSQLServer, Error number: 206) 
Get help: http: // help / 206


Also, if I execute the stored procedure : sp_mergemetadataretentioncleanup
I get these errors :
Msg 206, Level 16, State 2, Procedure sp_mergemetadataretentioncleanup, Line 63 
Conflict of operand types: bigint is incompatible with uniqueidentifier 
Msg 206, Level 16, State 2, Procedure sp_mergemetadataretentioncleanup, Line 65 
Conflict of operand types: int is incompatible with uniqueidentifier

Error messages translated from French.

So it seems seems related to this KB article : http://support.microsoft.com/kb/2982019/en-us
It should had been corrected in Cumultative Update 1 but for my case it is not !

To resolve the problem, I tried :

- Uninstalling 2012 SP2 - Cumulative Update 1
Reboot
Start SQL Server (no SQL Agent)
- Uninistalling 2012 SP2
Reboot
Start SQL Server (no SQL Agent)
- Install 2012 SP2
Reboot
Start SQL Server (no SQL Agent)
- Install 2012 SP2 - Cumulative Update 1
Reboot
Start SQL Server (no SQL Agent)
Start SQL Agent

No error during uninstall and install

Everything seems to have worked fine but the problem is still there (SQL is in version 11.0.5532)

So I don't know what to do to correct that except going back to 2012 SP1 but I'm worrying if it's a good idea ?

Does anybody has an idea on how to correct this ?

Thanks for reading and in advance for your help.

Best regards,

Olivier

Unable to perform retention-based metadata cleanup in database 'XYZ'

$
0
0

Hi All!

I am facing issues with Merge Replication in SQL Server 2012. The replication type is push-based with both the publisher and the distributor on the same server. Currently I have 5 subscribers which were replicating perfectly till end last week but today I'm facing metadata cleanup issues with all of them. Here is the error :-

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

Source:  Merge Replication Provider
Number:  -2147199466
Message: The merge process could not perform retention-based metadata cleanup in database 'XYZ'. If this failure continues, try increasing the query timeout for this process, or try reducing the retention period. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
2014-06-30 01:23:59.322 Percent Complete: 0
2014-06-30 01:23:59.322 Category:SQLSERVER
Source:  XYZ-SQL2012
Number:  206
Message: Operand type clash: bigint is incompatible with uniqueidentifier
2014-06-30 01:23:59.385 Percent Complete: 0
2014-06-30 01:23:59.385 Category:SQLSERVER
Source:  XYZ-SQL2012
Number:  206

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

I can see that all the subscribers are replicating perfectly every 15 mins with the server yet they are showing the above error. For all the subscribers, the subscription expiration is set for an interval of 14 days. I have tried checking the logs but just couldn't get any clues and don't know where to start looking.

Any help would be highly appreciated.

Thanks

Unable to create subscriber

$
0
0

Dear Friends,

I have two different sql servers one two different domains connected by internet. Iam working on Doman-A. Both sql server's are 2005

Domain Name  System Name         Sql Instance Name             Port No

Domain-A       SysA(IP:202.187.65.124)     SqlA                              1215

Domain-B       SysB(IP:102.45.68.125)       SqlB                               1465

Intially I was unable to connect from SysA to SysB through sql management studio. But after giving the connection string as 102.45.68.125\SqlB,1465 I was able to connect. Now my main problem is with the replication only. I had configured Publisher and Distrbutor on SysA. I want the subscriber to be SysB. But when I try to configure the subscription in the New Subscription Wizard from SSMS installed on SysA and try to Configure the subscription I get the following error message:

TITLE: New Subscription Wizard
------------------------------

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, 'SysB\SqlB'. (Replication.Utilities)

Plz help me guys.

Thanking you

Chandra Mohan N

Did SQL server 2014 support log based Heterogeneous Replication?

$
0
0

Hello,

I want replicate big data (every day 40 GB data) from 3 Oracle 11g/12c databases to mssql server 2014.

All Oracle databases running RAC with ASM on Solaris zoning.

Can SQL server get replicate data from Oracle archive log if oracle database running Solaris/Unix OS?

if yes, please provide related setup guide.

Move replication

$
0
0

Hi!

It there any feature in SQL server to move real-time data from one table to another table from 1 server to another server.

Example:

News table in DB1:Server1.  Millions of news inserted every second in table 1.

News table in DB2:Server2.  Millions of readers read news in table 2

Some service replicate all data from table1 to table2 and then delete data from table1 after replication.

Idea is that size of DB1:Server1 has to be low, and has to be keep low.


RUV

Merge Replication

$
0
0

We are having a Merge replication setup as follow:

Publisher  (in Location A West Coast)

   Subscriber 1 PUSH   (in Location A West Coast)

   Subscriber 2 PULL    (in Location A West Coast)

   Subscriber 3 PUSH   (in Location B East Coast)

Subscriber 2 was changed last week from PUSH to PULL after a corruption took place and was fully synchronized (I thought)

Last night at 8pm the physical server boxes got rebooted by the system admin  in both locations and this morning at 8.10am a full synchronization took place automatically resulting in data being reverted to data from last week.  How could this have happened and why did this full synchronization took place ?

Jan


Publication deleting error.

$
0
0

Hi team ,

we need to delete the replication and configured freshly, but we are trying to delete the existing publication i am getting bellow error.

How we can delete the publication under replication.

Note: we deleted the distribution database and subscription all but unable to delete the publication like ‘abc_tanrep’ publication name.

Error.

Every day Expired subscription clean up job fails on publisher server

$
0
0

Dear All,

Few days back I configured transactional replication b/w 2 server after that every day I noticedExpired subscription clean up job fails on publisher server but not any effect to replication it's going smooth.

ERROR MESSAGE:

Only functions and some extended stored procedures can be executed from within a function. [SQLSTATE 42000] (Error 557).  The step failed

please help me!!!

Thank In Advance!!!


mastanvali shaik


Merge Replication Identity Issues

$
0
0

Hi Experts,
Good Day.

We are using Merge replication on sql server 2008 R2 with SP2, Windows server 2008 R2.

one publisher and three subscribers.

as per the Topology, when ever the subscriber reaches to it's maximum identity number, application is getting crashed and by the time merge agent again goes to publisher to get new identity ranges, it is working fine. So it is the expected behavior.

The insert failed. It conflicted with an identity range check constraint in database 'Live_HRR', replicated table 'dbo.HRR_LOG', column 'HRR_log_seq'. 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.
The statement has been terminated.

can we do something not to crash the application? it is crashing once, and then getting new range. from then on wards, working fine till it faces the same issue. by giving good ranges, we can avoid getting this error, but i'm looking for a solution to getn alerted when it reaches 80% of it's allocated range. i want to get an alert email from sql server once it reaches that threshold. please could you help me on this? even if email is not possible, i'd like to get a report to see what are all the tables reached to it's 80% threshold. please could you help on this?

Thanks in Advance.
Cheers,

Vinod Mallolu

how to check whether the current snapshot is validated?

$
0
0

I have removed some articles of my publication in transactional replication. I use the script below, and contrary to what I have found in documentation, it does not invalidate the snapshot of that publication.

I normally test this by running the snapshot agent, which, after about 12 seconds, tells me that there is no need to run a full snapshot.

How can I test whether the snapshot is good, without running it?

I don't want to run it, because if it is not good, I don't want to stop it in the middle, and I don't want to run it during the office hours.

thanks and regards

Marcelo

-- the script to remove an article from the replication is: (1) and (2) below:
-- to be run at the publisher (in this case SERVER MYSERVER - DATABASE MYDATABASE
-- (1)
--use [MYDATABASE]
--exec sp_dropsubscription @publication = N'MYPUBLICATION', @article = N'tblTaxTransaction', @subscriber = N'all', @destination_db = N'all'
--GO

-- (2)
--use [MYDATABASE]
--exec sp_droparticle @publication = N'MYPUBLICATION', @article = N'tblTaxTransaction', @force_invalidate_snapshot = 1
--GO



--[ @force_invalidate_snapshot = ] force_invalidate_snapshot
--Acknowledges that the action taken by this stored procedure may invalidate an existing snapshot. 
--force_invalidate_snapshot is a bit, with a default of 0.
--0 specifies that changes to the article do not cause the snapshot to be invalid. 
--If the stored procedure detects that the change does require a new snapshot, an error occurs 
--and no changes are made.

--1 specifies that changes to the article may cause the snapshot to be invalid, 
--and if there are existing subscriptions that would require a new snapshot, 
--gives permission for the existing snapshot to be marked as obsolete and a new snapshot generated.


less Data in publisher table than in subscriber table

$
0
0

Hi,

I've got the following problem.

In the published table are about 583679655 rows.

But in the same table on the subscriber are only 586159455 rows.

There are 2479800 missing.

But how is this possible? If i delete a row at the publisher, the row had to be deleted at the subscriber. I couldn'd find out, if it is possible to delete rows, without an entry in the transactionlog. 

I have no errors in the replication, and everything seemed to work fine. 

Any ideas, where the different could come from?

Distributor: SQL 2012 Standard

Publisher: SQL 2008 R2 Standard

Subscriber: SQL 2008 R2 Standard

Size of replicated batabase: ~ 500 GB

Type of replication: push transactional replication

Thanks,

Kind regards,

Andreas

Viewing all 4054 articles
Browse latest View live




Latest Images