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

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


Merge Replication to refresh client database.

$
0
0

Hi All,

We have a large application that uses Merge Replication as part of the solution (ie. Syncing data entered on multiple mobile devices with the main server database). The PDA's have small functions to process some of the data. This all works fine.

We are now moving to a new process of full "offline" mode. We are going to use tablet PCs to process data in an "offline" version of the application. The problem is most of the data uses identity columns for IDs. Our plans is, when user wants to data sync an offline version after they have made changes, to use SQL to update the server database with any data which has been changed in the tablet version since it was last sync'd (stored as a time stamp). This is ok but the IDs will be out of sync because there are multiple offline tablets. So we would then like to refresh the tablet to be a copy of the server database, thus getting the same IDs etc. The server databases may be several Gb in size so we can't just do a backup and restore. Is there any way we can use Merge Replication to refresh the tablet database (Subscriber) to be the same as the server database (Publisher). This will effectively remove any changes made on the tablet and replace them with the latest server version with correct IDs.

thanks

Dave

Error: 28005, Severity: 16, State: 2...An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impe

$
0
0

I've seen some similar questions, but want to make sure I can get an answer quickly and how to fix.

Thanks,

Paul

spid24s     Error: 28005, Severity: 16, State: 2

spid24s     An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.


Why did my subscriptions reinitialize without uploading data first!?

$
0
0

I am trying to figure out why the subscriptions on my merge replicated SQL Server 2008R2 database got reinitialized without my telling them to.

Last week I created some new tables, added a couple keys, and did minor table column alterations on the publication database.  I then generated a new snapshot so the new tables and keys would propagate.  I did NOT tell SQL Server to reinitialize anyone's subscription, and even if I had done that, I would have certainly made sure to select "Upload Changes First".

I have generated new snapshots on this very database before, not reinitialized any subscriptions, and all changes were propagated without problem.  This week, however, when users synched after I made my changes and generated the new snapshot, their subscriptions were reinitialized and their data was NOT uploaded first!  So they lost everything since their last synch.  An absolute nightmare going on right now.

How did this happen?  Does generating a new snapshot automatically reinitialize existing subscriptions?  And, further, does it do it without uploading changes first?  I do not believe either of these things occur based on my experience and readings, but then how did this happen?  

I don't think there's anything I can do now to save the lost data, but I want to understand what triggers a reinitialization, so I can prevent this from happening in the future.



sp_publication_validation procedure doesn't seem to work properly

$
0
0

Hello,

I am trying to use sp_publication_validation stored procedure to validate that my replication setup is working correctly.  This procedure is pretty straightforward and is describedhere.

I am running this command:

	EXEC sp_publication_validation @publication = 'MyPublication'
		,@rowcount_only = 1		-- (1 - rowcnt only, 2 - rowcnt and checksum)
		,@full_or_fast = 0		-- (0 - full count using COUNT(*), 1 - use sysindexes.rows, 2 - conditional)

Initially everything seems to be ok and the results indicate that all of the tables match.  Next I go over to the subscriber and manually delete a few rows from some of the tables.  I manually verify that the row counts in my tables are now different between the publisher and the subscriber.  Finally I run the sp_publication_validation procedure again and .... it says that everything is still OK.  This is wrong!  I also tried to returns both rowcnt and checksum and it still doesn't detect the fact that there are differences between the publisher and subscriber.

I appreciate any ideas.

Thank you!


Transactional Replication with Oracle Publisher

$
0
0

Hi,

I have a migration coming up that Involves the Oracle server that we are using as Publisher for our transnational replication and SQL server being the Subscriber.

Here is the plan.

Shutdown Oracle Server. (Publisher)

Shutdown SQL server.(Subscriber)

Migrate the Oracle server (they are going to physically move the servers. Server names are going to be the same but the Domain name and IP's are going to change)

Once confirmed the Oracle migration is complete. We are going to update the TNSNAMES.ORA file to match the new ips'.

Check the replication.

Question:

Do you see nay issue in the process? Does Changing the domain name have any impact on the replication?

Appreciate if you can let me know if ther eare any concerns.

Thanks,


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

Transaction replication - Indexes and constraints

$
0
0

Dear all,


We have a master database which is been set for transaction replication having publisher at the server1(SQL Server 2012) and through pull subscription there are 8 other servers

we have a setup of transactional replication in server1 as publisher through pull subscription 8 different servers pulling the data from server 1.

In server 1 there are no indexes/constraints are available. The 8 other servers are filling the data are used for different business units, which requires indexes and constraints to be created differently in each server.

Our idea is, to create whatever the common indexes across all 8 servers will create in server1. So that the indexes will be in place when the replication happens on the destination servers.

Only respective server indexes, will be created on the individual servers.

If incase, we need to reinitialize the subscription all the indexes created on the destination will be washed out and only the server1's indexes will remain.

So to create a repository for each server and the respective indexes as a script, if any crash we will re-apply against the server.

Is the above plan an optimal one? or anyother better solution for this.

Thanks.


SQL merge replications fails only over VPN

$
0
0

Hey Folks,

I planned and configured a VPN infrastructure (SSTP VPN with EAP) and now I have a problem with SQL merge replication over VPN. Our staff is using a local client app to collect som data. Sometimes they start within this app a replication to an SQL-Server in our Data Center. This is working very fine but it fails over VPN. I am a SQL greenhorn and need some help now.

The error on the client says: "The process could not connect to Subscriber. Error: MSSQL_REPL20084. SQL Server Network Interfaces: Error Locating Server/Instance Specified (xFFFFFFF)".

Event viewer on the SQL Server says: "Event ID 14151 Replication-Replication Merge Subsystem: agent XXX\SQLEXPRESS-61 failed. The process could not connect to Subscriber XXXX\SQLEXPRESS."

Facts:

- Windows 8.1 Clients

- SQL Server 2012

- SQL replication is working well in the local Area Network.

- All Firewall Profiles are equaly configuired fpr replication.

- VPN client can Ping SQL Server.

- SQL Server can Ping VPN Client.

Please can anyone give me a hint? And remember, SQL is a unknown world for me :)

Thanks!

SQL 2012 Transaction replication broke

$
0
0

Hello,
I have setup replication in sql 2012 a couple of months back and I am seeing an error since this morning. Now the thing is I am replicating schema changes as shown in the image below

So why am I still getting this error and causing the replication to break?

Error:
Column names in each table must be unique. Column name  is specified more than once. (Source: MSSQLServer, Error number: 2705)
Get help: http://help/2705

Experts need your valuable inputs.

Thanks

Replication Article Type - Where in System Tables?

$
0
0

Hi,

I have publications with articles that are indexed views in the publication database, and they are replicated to tables in the subscriber databases.
I add the articles with "execsp_addarticle... @type =N'indexed view logbased', ...".
However, when I query sysarticles.type, all I get is 1 (= Log-based article), which is the same thing I get when I have added a regular table with "... @type =N'logbased', ...".

The documentation for "sp_addarticle (Transact-SQL)"
http://msdn.microsoft.com/en-us/library/ms173857.aspx
shows that there are 15 acceptable argument values for the @type parameter.

However, in the documentation for "sysarticles (System View) (Transact-SQL)"
http://msdn.microsoft.com/en-us/library/ms174970.aspx
shows only 9 possible values for the type column.

How do I query the system tables to determine which of the 15 acceptable values was provided as an argument to the@type parameter whensp_addarticle was called to add an article to a publication?


Dan Jameson
Associate Director of IT/DBA
Children's Oncology Group
www.ChildrensOncologyGroup.org



Copy over SQL Server 2005 databases to new server

$
0
0

I am trying to copy over SQL Server 2005 databases which currently in Windows Server 2003 to SQL Server 2005 which currently newly installed in new server.

Is that anyway to copy all DB over at the same time, instead of copy individually one by one to save time. Or is there anyway to duplicate the whole SQL Server 2005 over.

Thanks

CREATE/ALTER/DROP INDEX statements are not replicated right?

SQL Server Replication Problem with Merge Subscription

$
0
0

I have setup Replication to implement a Merge Pull Subscription.  Published and Distributor are on one server running SQL Server 2012.  Client is running SQL Express Server 2008 R2. Connection is via VPN, Clients are NOT domain users so all security is via sql logins

I have a couple of issues.

1. If I choose a Snapshot type of Native SQL, I am receiving 'scrambled' data, basically some fields are coming across looking like Japanese characters, this is causing the sync to fail when it happens on a key field as it seems to be duplicating the values. All server installs have the same collation and Language selection.   I can avoid this if I choose Character Mode.

2. Once I have a a good initial sync done, if I add a record to a table which is two way updatable, then try to sync the changes back to the Main server I get the following error message:

Uploading data changes to the Publisher

Enumerating Deletes in all Articles
Enumerating inserts and Deletes in article tblArCust
No Data needed to be merged
The merge process could not enumerate changes at the 'Subscriber'
The merge process could not enumerate changes at the 'Subscriber'

I can sync any changes made at the Master down to the Client, but not the other way. The strange thing is that I can successfully do the sync if I use my PC which has a full version of SQL 2012.  I have on occasion during testing been able to sync from a Express Client that I did a clean install on, however if I then cleared the PC, then tried the same steps, I cannot sync so it doesn't seem consistent.

I have spent at least a week searching on-line for this issue but other than a few articles about people having an issue like this pop up on a install that has been successfully running there has been no real explannation of what can cause it. 

I would think it has something to do with permissions and that the subscriber process is not able to update the publisher, but in all of my testing I am using the same permissions setup, and it does work on my PC.

 Any idea of what I should be looking at?

MS SQL 2008 R2 STD

$
0
0

Hi.

I plan to deploy a two node MS SQL 2008 R2 STANDARD Cluster running on Windows 2012 R2 STD.

Questions,

1. Can I still implement replication even when running a MS SQL Cluster ?

The reason I need to replicate data from my main branch to a branch office, so that users on the branch office can directly access the info on their local servers.

---> Can anyone point me to supporting TechNet reference.

Thanks,

Paul


Transactional replication issue

$
0
0

Hi,

I have configured transactional replication and there 4 log reader agents for 4 DB, in that at a time only one DB logreader agent is running, the rest of the three is not running, when have separate distributor server, we have restarted the SQL agent in Distributor server and restarted the sql server service also, the next time another one db log reader agent running, the rest is not working. the below error message only getting, Appreciates your help,can any one fix this.

2014-08-26 04:15:00.438 Status: 0, code: 1007, text: 'Another logreader agent for the subscription or subscriptions is running, or the server is working on a previous request by the same agent.'.
2014-08-26 04:15:00.438 Another logreader agent for the subscription or subscriptions is running, or the server is working on a previous request by the same agent.
2014-08-26 04:15:00.438 Status: 0, code: 22037, text: 'The last step did not log any message!'.

Data issue with Merge Replication using SQl Express 2012 -> SQL 2012

$
0
0

I have setup a Merge Replication to update Client PC's with table data from the main server.  These clients are running SQL Server Express 2012, the Main Server is on SQL Server 2012. 

The issue I am having is this

When I set the Snapshot format if I pick:

Native SQL Server - all Subscribers must be servers running SQL Server

Then on the client I am getting an error where it appears that data that is being Bulk Copied into the table is somehow being transformed into what looks like Japanese characters.  Not only does this make the data unusable, it also seems that that whatever data is it creating, is causing duplicate values on key fields.

If I change this option to:

Character - required if any subscriber is a device running Microsoft SQL Server Compact Edition.

Then the data comes over ok, but all of the timestamp fields are dropped off of the table schema and are not created, which creates errors in the application.

If I run using option 1 above, on another instance on the same server, then everything is fine, so it appears that it is an issue with SQL Express. As far as I understood, SQL Express is NOT the same as SQL Server Compact, but perhaps I am mistaken, or are there some settings I should be looking at? 

Insert Failed... Conflicted With Identity Range Check Constraint

$
0
0

In SQL 2008 R2, we have a client setup to use Transaction Publication With Updatable Subscription. In our setup, we have 1 Publisher and 1 Subscriber.

 Replication had been working for a month or so until they attempted to perform a daily process which imports in a few hundred records (less than the Range Size for that article) and they received the error:

---------

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

---------

I have attempted to run sp_adjustpublisheridentityrange and stop/start the "Synchronizing" of the Subscriber. Importing into the table continues to fail with the same error.  The subscriber is in the Amazon Cloud (SQL Express) so I am using a PUSH Replication with Queued updates. 

The subscriber is just a fail safe DB and no data has been Inserted on the Subscriber side. 

Done a lot of research on this and havent been able to find a solution. Any ideas on how we can get around this issue?  

Thanks.


Changing Replication Publisher version and server

$
0
0

I am replacing a server (Server A) that currently has a SQL 2005 replication distribution database and publisher with a new server that will have a SQL 2008 distribution database and publisher.  The new server will have the same name, same address, same everything except Windows Server O/S version and SQL database version as the old server.

The replication target server is a SQL 2008 subscriber with a replication pull subscription from Server A.   My question is - can a subscriber be reinitialized if the publisher changes to a new server with the same name in a different version of SQL?  Or, does the subscriber need to be recreated?   Can I simply reinitialize my subscriber or do I have to recreate it?

Duplicates on SQL server replication

$
0
0

Hi All,

We are having a bit of a strange problem with SQL Server. I am not SQL Server skilled. I am supporting an Informatica platform where we are connecting to SQL Server replication database and pulling data across. We connect to a view which does a simple select on the base table. We bring the data across. For one particular day, we have seen duplicates come through for the primary key. There are two records coming through which are exact duplicates. Duplicates for every column.

But after the job completes, if we query the DB, the duplicates are not showing. Is it possible for the replication to do something that would make our job pull across two rows instead of one ? Strange question and Strange scenario ? But, have anyone come across similar issue ?

We use informatica, which establishes a mixed mode connection from AIX to SQL server DB and issues a single select statement. ~3 M rows are brought across, of there ~10K rows are exact duplicates. The duplicates are showing in our DB, but if we query SQL Server DB after the job completes, there are no duplicates.

Please advice.

Viewing all 4054 articles
Browse latest View live




Latest Images