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

Merge Agent not applying transactions in bulk on first initialization of a subscriber

$
0
0

We have a filtered publisher (SQL Server 2012) with several pull and push subscriptions that have been functioning fine for years.

We have just added a new pull subscriber from a remote server.  We configured an alternate folder location on the subscriber (pointing to existing path on a remote server).  We generated new snapshot and partitioned snapshot, and moved to subscribing server at alternate path.

We're seeing a problem we've never seen before:

When the merge agent runs, it applies the schema and performs a few hundred bulk inserts, but then proceeds to 'download changes to subscriber' as though the snapshot is old (it is brand new and should have all transactions).  We have never seen this before, i.e. all data is usually applied in bulk when creating a new or reinitializing an existing subscriber.

Just for kicks, we marked the subscriber for re-initialization (from both the publishing and subscribing server) with a fresh set of snapshots.  The same problem occurred.

We have also tried in our test environment (which mirrors production) and the snapshot applies as expected (via bulk inserts).

Ideas?

(It might be relevant to note the publisher was recently upgraded in-place from 2005 to 2012.)




Merge Replication Error

$
0
0

"You must rerun snapshot because current snapshot files are obsolete. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201021"

I configured Merge Replication on SQL Server 2012 (11.0.5058.0 (X64) Enterprise Edition)


With all default setting.

Please help me.

Undistributed Transactions Build Up at Same Time Each Night

$
0
0

There is a database "Foo" sitting on server "A". There is a database "Bar" sitting on server "B". A.Foo publishes a subset of its schema. B.Bar subscribes to A.Foo's publication. The distribution database is on "B" (B.distributor). This a push subscription (transactions are pushed to the subscriber from the distributor). Every day (including the weekend) I get the following alert:

"5/12/2015 3:53:16 AM, Unsubscribed Transactions (Count) on "B" is Warning.

SQL Server instance "B" has 636771 unsubscribed replication transactions received by the Distributor and not received by a Subscriber.

Unsubscribed Transactions (Count): Number of replication transactions received by the Distributor and not received by a Subscriber."

The number of transactions will vary. The alerts will be sent between 1:20 AM (EST) and 3:30 AM (EST). I'm trying to figure out what is causing the backup of transactions. I assume the issue precedes the alerts by 30-minutes or so.

  • There are no backups occurring
  • Nothing is blocking the distributor agent in the subscription database
  • Job activity is at a minimum; the few jobs running run throughout the day
  • The machine has plenty of resources -- CPU, RAM, etc.
  • The publisher database shows no signs of stress

What other scenario's am I missing? Any troubleshooting steps you'd suggest?


Adam

Merge Replication

$
0
0

This is the scenario: 4 SQL Server 

Stage Env 

ServerA (2008R2) -Publication\distribution

ServerB (2008R2)-Subscriber

Prod Env

ServerC (2012)-Publication\distribution

ServerD (2012)-Subscriber

All above servers (Stage and Prod) configured with merge replication and contains 20 database. Stage Env and Prod Env contains same databases the only difference is SQL version.

Now we are planning to move databases from Stage Env to Prod Env and then configure merge replication.

Both Stage and Prod contains same Databases but recently we did some modifications in Stage. Now we are planning to update same in Prod.

What is the easier method with minimal downtime?  

This is my Plan Please correct me if i am wrong.

1. Take the backup of all 20 databases from ServerA

2. Delete Merge Replication and 20 databases in ServerC and ServerD.

3. Restore 20 databases on ServerC and ServerD then configure Merge Replication

Is it correct process? or with out deleting replication and DB is there any other method. I don't think so.

 

Merge Replication Snapshot default Location

$
0
0

Hi,

How to change the default snapshot folder (Merge Replication) location in SQL Server 2012 Standard Edition? Actually that field is grayed out.



Merge replication between sql server and oracle

$
0
0

Hi Guys

we have oracle(source),SqlServer(Destination) i would like to create merge replication between these two.

to get tables and views

could any one tel me step by step process we are using ssms for sql server and oracle-sql developer for oracle as client

Please i am in need,urgent

Thanks in advance


ADKR

ReadCertificateThumprint : Failed to get SSB certificate thumbprint

$
0
0

Hello, 

I am installing a secondary site for SCCM and having issues in the SQL portion when it gets to setting up SSB. I'm not sure if it's directly pertinent to the SQL portion but here is what I've done so far on the config mgr side. 

    • -       SCCM 2012 Primary Site in datacenter
    • -       SQL Server 2012 hosted on the primary site server
    • -       Firewall ports opened for 80, 135, 443, 445, 1433, 4022, 8530 on cisco and host firewalls
    • -    I then opened up all firewall ports in the network and host(s) in each direction for troubleshooting when the above didn't work.
    • -       Attempting to have secondary site at each branch office
    • -       Secondary site server computer account is in local admin group on primary
    • -       Primary site server computer account is in local admin group on secondary
    • -       Secondary site server has full access to system management container in AD
    • -       Secondary site server computer account is in a security group which has sysadmin rights on the primary SQL Server
    • -       Utilizing Secondary Site Server pre-existing SQL 2008 R2 instance
    • -       Confirmed 1433, and 4022 accessibility with telnet from secondary to primary

    I run the secondary site wizard from the console, it passes all prereqs and runs setup for about 5 minutes on the secondary site server and fails here (ConfigMgrSetup.log):

    • ***Select dbo.fnConverBinaryToBase64String9thumbprint) FROM master.sys.certificates WHERE name='ConfigMgrEndpointCert"
    • CSControlSetup::ReadCertificateThumbprint : Failed to get SSB certificate thumbprint.
    • Error: Failed to setup SQL Server certificate for service broker "%NameOfMySecondarySiteServer%"
    • Error:Failed to initialize site control data.

I've searched around and the only thing I can find is in relevance to an LSA password filter reg key, but I do not have on that box. 

Any ideas? 

Thanks! 

How to check if web merge sync is working between a subscriber and publisher thru HTTPS ?

$
0
0
How to check if web merge sync is working between a subscriber and publisher thru HTTPS ? SQL port 1433 at subscriber is blocked so no direct connection to subscriber.

Ranga


Merge Replication Error for Subscripting

$
0
0

Please create a master key in the database or open the master key in the session before performing this operation.
Changed database context to 'abcd'

Getting above error while configuring Merge Replication at subscriber in SQL 2012

Triggers not firing at snapshot

$
0
0

I am creating a SQL replication, with remote disturber server. Replication type is transactional and this is push subscription based. Source containing a table named ‘Item’, the destination table ‘Item’ having triggers which do some operations. At the publication I have set following option to not to drop the triggers at the destination.

Action if name is in use: Keep existing object unchanged.

When I run the initial snapshot the triggers are not firing. The triggers are working fine while mirroring.

Can anyone please help on this?

Merge Replication

$
0
0

hello guys,  i'm trying to setup a merge Replication on server2012 with mssql standaard in a workgroup. Publication has been set and the subscription is also set only i get an error if i check the launchbox which says unitialize when i look at the subscriber agent. Can someone help me?.

Gr. Strong12345


Job Migration for log shipping

$
0
0

In our environment on log shipping is configured but there are some jobs in primary servers the jobs are with SSIS packages with dependency on some files/folders also.

Now how can I move the jobs to secondary server so that it can be enabled in time of DR replication.

Merge Replication Identity Value out of sync

$
0
0
We are running merge replication. My identity value was out of sync and the inserts stopped working. I Reseeded the identity value to 1500000 and ran "sp_adjustpublisheridentity" which set that to the new range (and table constraint) in the MSMerge file and table. I discovered my error and Reseeded the table back to 150000. How to I get the new range to be created when it is LESS than 1500000 in the MsMerge file???? Can I use the sp_restoreidentity....???

confusion on applying latest service pack on sql server 2008r2 x64 with snapshot replication.

$
0
0

hi Guys,

need some clarification regarding how to really apply the latest SP on a sql server 2008r2 x64 with snapshot replication configured.

server1 is both the publisher + distributor  (on sql server 2008r2 x64) replication data is via a push subscription.

server 2 is the subscriptor (on sql server 2008r2 x64)

i am not too sure about the sequence to proceed with the SP

1. Do i need to stop the replication? if yes how do i stop the replication?

https://support.microsoft.com/en-us/kb/247110/en-gb

2. or there is no need to stop anything including the sql agent or services and just proceed to apply the SP in no particular order of my 3 servers?

3. is there a way to test the replication is still working after the applying of the SP.

sorry kind of quite new on replication.

any link to restore the replication as a backup is appreciated.

Replication Wizard doesn't like SQL Server Alias

$
0
0

I tried creating a new replication but I get an error that says,

"SQL Server replication requires the actual sever name to make the connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specifiy the actual server name, 'SomeMachineNumber'."

I don't get this. Why can't I use an alias? I googled and found few articles but not sure if I understand what others are talking about. Here is how I have things set up and I'm hoping someone can explain to me what is happening.

On my machine, I have the following alias set up.

Alias Name: SQLDEV, Port No: 2433, Protocol: TCP/IP, Server: SomeMachineNumber

In Mgmt Studio, I can connect to the server SomeMachineNumber by using the alias SQLDEV. However, if I try to create a new publication on SQLDEV, I get the above error.

Now, just for the heck of it, I created another alias using the same properties as above except, I named the alias the same as the server, "SomeMachineNumber". I connect to the server in Mgmt Studio using the new alias, and now I am able to create the new publication.

Does this make sense? Am I not still using an alias in the second example? Why does the replication seemingly like the alias "SomeMachineNumber", but not "SQLDEV"?


SQL 2012 to 2014 in place

$
0
0

planning for in place upgrade  one of our server from 2012 to 2014.

Server is in replication.  Server planning for upgrade is subscriber and also publisher

I can disable replication flow from this server.  how do I stop replication flow in to this server.

Drop and readd subscription, will start reinitilization but i want to stop temporarily and restart after upgrade done

Thanks

v

ALTER TABLE SWITCH PARTITION on a replicated table

$
0
0

A customer wants to implement table partitioning on a replicated table.

 

They want to hold 13 months of data in the table and roll off the earliest/oldest month to an identical archive table.  The table has a date field and partitioning by month makes sense all around.

 

So SWITCH PARTITION is the obvious solution to this, except for the fact that the table is replicated (transactional w/no subscriber updates).

 

What are his architectural or practical solutions to using table partitioning and replication?

 

 

 

 

 

thx

 

SQL Agent unable to create unc directories

$
0
0

Hi,

So, I am running into a snafu for the shared folder. The user has full rights on the share, I even logged onto a computer with that user and tried doing folder manipulations

If I launch a command line as the replication user, and try to run the snapshot, it works, it creates the folder and the snapshot:

C:\Windows>set u USERDNSDOMAIN=DOMAIN.LOCAL USERDOMAIN=DOMAIN USERNAME=sqlrepltest USERPROFILE=C:\Users\sqlrepltest C:\Windows>"C:\Program Files\Microsoft SQL Server\110\COM\snapshot.exe" -Publish er [DT-SVT-SQL-02] -PublisherDB [iTRANS] -Distributor [DT-SVT-SQL-02] -Publicati on [ITRANS] -ReplicationType 2 -DistributorSecurityMode 1 2015-05-19 19:05:14.30 2015-05-19 19:05:14.30 Microsoft (R) SQL Server Snapshot Agent 2015-05-19 19:05:14.30 [Assembly Version = 11.0.0.0, File Version = 11.0.5058.0 ((SQL11_PCU_Main).140514-1820 )] 2015-05-19 19:05:14.30 Copyright (c) 2008 Microsoft Corporation. 2015-05-19 19:05:14.30 The timestamps prepended to the output lines are expresse d in terms of UTC time. 2015-05-19 19:05:14.31 User-specified agent parameter values: 2015-05-19 19:05:14.31 -------------------------------------- 2015-05-19 19:05:14.31 -Publisher DT-SVT-SQL-02 2015-05-19 19:05:14.31 -PublisherDB iTRANS 2015-05-19 19:05:14.31 -Publication ITRANS 2015-05-19 19:05:14.31 -ReplicationType 2 2015-05-19 19:05:14.31 -Distributor DT-SVT-SQL-02 2015-05-19 19:05:14.31 -DistributorSecurityMode 1 2015-05-19 19:05:14.31 -------------------------------------- 2015-05-19 19:05:14.31 Connecting to Distributor 'DT-SVT-SQL-02' 2015-05-19 19:05:14.47 Parameter values obtained from agent profile: 2015-05-19 19:05:14.47 --------------------------------------------- 2015-05-19 19:05:14.47 -BcpBatchSize 100000 2015-05-19 19:05:14.48 -HistoryVerboseLevel 2 2015-05-19 19:05:14.48 -LoginTimeout 15 2015-05-19 19:05:14.48 -QueryTimeout 1800 2015-05-19 19:05:14.48 --------------------------------------------- 2015-05-19 19:05:14.48 Validating Publisher 2015-05-19 19:05:14.50 Connecting to Publisher 'DT-SVT-SQL-02' 2015-05-19 19:05:14.53 Publisher database compatibility level is set to 110. 2015-05-19 19:05:14.53 Retrieving publication and article information from the p ublisher database 'DT-SVT-SQL-02.iTRANS' 2015-05-19 19:05:15.16 [0%] Preparing table '[dbo].[cert_issuer]' for merge repl ication

...

...


Now, if I try the same thing from SSMS:

Executed as user: domain\sqlrepltest. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information.  The step failed.

previous step:
2015-05-19 19:03:05.02 Source: Replication
2015-05-19 19:03:05.02 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentException
2015-05-19 19:03:05.02 Exception Message: The replication agent failed to create the directory '\\domain.local\GlobalShares\ReplData\Test\unc\DT-SVT-SQL-02_ITRANS_ITRANS\20150519150243\'.
2015-05-19 19:03:05.02 Message Code: 52026

The user domain\sqlrepltest has:

* db_owner on distribution and the aimed database

* ability to trace

What did I miss ?

Best regards,

Olivier

Merge replication - multi site, multi distributor, publisher, subscribers ...

$
0
0

Hi,

We have 2 sites at the moment. Each site has 2 servers. To reduce network load I was aiming at doing the following with a merge replication :

* configure one server at each site to be distributor and publisher

* configure the other server at each site to be a subscriber

* configure the 2 publishers to also be subscribers to each other to sync the sites.

Or even better:

* have all the servers be distributors, publishers and subscribers, so that if one dies, who cares as they all have the same configuration.

Also, I was thinking of:

* having the distributor and publishers use a DFS share replicated on both sites (or maybe the same share on each sql server ? not sure what the best practice is on this one)

However, I can't seem to find a good post / thread where it describes this kind of scenario in a step by step way nor what happens to the identity range management.

If you could share any light on this or point me to the right English terms to describe the above scenario, thanks in advance.

Olivier

PS: We only have STD edition, so peer to peer and AG are not available to US. (which is why we are using merge)

PS2: One way I could see this work is if I manually set the identity columns in the tables so that they won't overlap and make the range management manual. Then just setup publications / distributors and subscribers on each node. (But if I can dodge the manual management, it be great)

Replication 2008 r2

$
0
0

Is possible to replicate SQL Server 2008 R2 to SQL Server 2014 Ent.

Thanks

V

Viewing all 4054 articles
Browse latest View live




Latest Images