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

Distribution database licensing model

$
0
0

Hi all,

I have to implement a transactional replication scenario I've 2 servers, let's say Server_A and Server_B, both servers run SQL Server 2012 Enterprise Edition. I've to publish a database on Server_A, the subscriber database will be on Server_B.

If I want to put distribution database on a standalone server (let's say Server_C) that hosts only that database (no user's databases) have I to buy license for it?


Snapshot replication and identity columns in each of over 400 tables

$
0
0

Hi,  I've set up a snapshot replication that runs only once per month to refresh a QC database with production data.  It expires in between each run but that's not my problem in this post.  About 450 tables (virtually every table in replication) have an identity column.  The identity column is set to null after the snapshot.  I have a script that generates all the current column values and sets the seed to that value but I have found it's harder to reseed when the value is null as opposed to a numeric so I have to jump through some hoops to get it to work.

I'm hoping there's a solution using replication and identity management.  I have read that rather than dropping or truncating tables we want to delete rows instead to preserve the values.  Is this true?  How do I do that with replication?

Thanks!



How to reconfigure Replication(Transactional)?

$
0
0

Hello all, Question about setting up Transnational replication. 

During the Replication reconfigure do we need to keep the publisher database off to the users?

No transactions should not made on publisher database until the replication starts?

Transnational replication broken in our environment so planning to reconfigure. Here is my plan to reconfigure. Please suggest me the steps.

1. Generate scripts for existing Publisher and subscriptions.

2. Remove the existing replication using "SP_RemoveDBReplication

3. Delete all the Publications & Subscriptions

4. Backup publisher database & restore on Subscriber server

5. Run the scripts which are taken at step 1.

Thanks

 

The process could not connect to Distributor and Login failed for User - Severity 14 State 11

$
0
0

Hi-

We are encountering both the errors above.

I've tried
using a domain user account for the Log Reader an Snapshot Agents that
has perms on both DB's on source and destination servers - db_Owner.

The SQL Server and SQL Agent services run as system account.

Set DB Ownership in Files Tab to "sa" and have switch to domain account above.

Also set all the SQL Agent Jobs for replication to sa and to domain user and still getting the "connect from distributor error."

And this mesg:

"The job failed.  The Job was invoked by User sa.  The last step to run was step 1 (Run agent.)."

Found that Sev 14 State 11 means that the account/login "should" be good - but maybe the password or perms are to blame?

Can someone tell us where a domain user account needs to be entered for proper replication to happen?

And if SQL Services, Agents, Scheduled jobs, etc can all be run as one user to simplify the process?

We
can't seem to connect to the other server with our subscriber and get
the published DB replicated to our source from destination server.

Does the unc replication folder need to be shared(are perms set automatically?)?

The file sizes for the DB(mdf) and log(ldf) files are static and don't appear to be growing or increasing.

Thanks for any help.

-P

 

Let Transactional Replication fix out of Sync

$
0
0

HI

Is there a way to let the replicaton Process automaticly  "repair" out-of-sync conditions?
We know that there is the "rinit" way, but would like to get around it.

It should be able to change values in a table  and even insert missing rows.
Is there a way to do this?

Thanks

Christian

Snapshot Agent failing with the error Failed to read from server

$
0
0
Hello All,

We have Transnational Replication in place and running fine for years. Since last week it is failing because of mistakenly restoring old backups on publisher. When i reinitialized subscribers all other subscriptions are back into sync but one is failing to reinitialize. below is the error.

Snapshot Agent is failing with the below error.

"Failed to read from server"

Any suggestions please?

SQL Server could not create a subscription for Subscriber

$
0
0

I am getting the following error when trying to setup Peer to Peer Replication. 

Warning: The distribution agent job has been implicitly created and will run under the SQL Server Agent Service Account.
Msg 6522, Level 16, State 1, Procedure sp_MSgeneratenosyncsubscriptionsetupscript_sqlclr, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "sp_MSgeneratenosyncsubscriptionsetupscript_sqlclr": 
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.MethodAccessException: Attempt by method 'System.Configuration.TypeUtil.CreateInstanceRestricted(System.Type, System.Type)' to access method 'System.Diagnostics.SwitchElementsCollection..ctor()' failed. ---> System.Security.SecurityException: Request failed.
System.Security.SecurityException: 
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
   at System.Security.PermissionListSet.CheckSetDemandWithModification(PermissionSet pset, PermissionSet& alteredDemandSet, RuntimeMethodHandleInternal rmh)
   at System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandleInternal rmh)
   at System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet g
...
System.TypeInitializationException: 
   at System.Data.SqlClient.SqlConnection..ctor()
   at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
   at Microsoft.SqlServer.Replication.TransSqlClrCodeGenerators.GatherMetadataAndGenerateScript()
   at Microsoft.SqlServer.Replication.TransSqlClrCodeGenerators.sp_MSgeneratenosyncsubscriptionsetupscript_sqlc...
The Subscriber was dropped.
Msg 21678, Level 16, State 1, Procedure sp_MSrepl_addpushsubscription_agent, Line 194
The parameter "@job_password" can be set to "NULL" only when "@job_login" is set to "NULL".

This only occurs when selecting "Push" for the delivery. If I select Pull it creates without errors. 

Any help would be appreciated. 

Thanks,

Dean Whitlock

cascade fails with merge replication

$
0
0

Foreign Key cascades appear to be failing on publication causing conflicts.

Foreign Keys are set as Not For Replication

Several FK's on multiple tables point to 2 primary tables.

The Primary tables are set to replicate before their subordinate tables.

We recently upgraded our publication database from SQL 2005 to SQL 2012.  Our subscriber DBs are 2005 Express.  A majority of our tables are FK'd with upd/del cascade to 2 primary tables.  Since the upgrade we've experienced a great number of conflicts because not all of the foreign key updates appear to be cascading fully.  This appears to be isolated to Win 7 subscribers replicating against SQL 2012 because it was not occurring prior to the upgrade and it is only WIN 7 machines that are affected.  It is not always the same tables that are affected and sometimes one of the primary tables is impacted while the cascades from it appear to have worked.

Has anyone else experienced a similar issue?  Any ideas on what the cause may be and how to resolve the issue?  Any help is greatly appreciated.


connection problem

$
0
0

Hi,

If sql server is not getting connected how to resolve it?

SQL Server 2012 SP1 -> Exception Message: Failed to read column data

$
0
0

Hi all,

SQL Server 2012 SP1 Enterprise Edition (11.0.3368) I get this error when I try to run the snapshot agent to make a snapshot of my pubblication. Full error is:

2013-08-02 08:15:20.95 [0%] Bulk copying snapshot data for article 'COEP'
2013-08-02 08:15:21.31 [0%] The replication agent had encountered an exception.
2013-08-02 08:15:21.31 Source: Replication
2013-08-02 08:15:21.31 Exception Type: Microsoft.SqlServer.Replication.NativeSqlConnectionException
2013-08-02 08:15:21.31 Exception Message: Failed to read column data
2013-08-02 08:15:21.31 Message Code: 0
2013-08-02 08:15:21.31

This was a known bug of SQL Server 2008/2008R2 (http://support.microsoft.com/kb/2606301/en-us) but I've not found anything related to SQL Server 2012.

Any help is appreciated

Snapshot replication manual agent job: The step is improperly defined and so could not be run. (SOLVED but why :)

$
0
0

I tried to write a manual agent job with the Management Tools 2012, essentially copy paste from the job that the replication wizard created. I then got the error as stated in the title of this post. 

The problem is solved by manually editing the agent job script. Have I missed something obvious in the GUI or is it not possible to use it to create this kind of job?

My solution: It turns out that the GUI tool does not configure the @server parameter.

@os_run_priority=0, @subsystem=N'Snapshot', 
@command=N'-Publisher [MYSERVER] -PublisherDB [db_vs] -Distributor [MYSERVER] -Public......
@server=N'MYSERVER',  <--- MISSING! -----
@database_name=N'master'

With the @server parameter added it works like a charm.

Daisy chaining replication setup

$
0
0

Site 1 -- > Site 2 (Transactional replication)

DB 1    --> DB 2

Site 2 

DB 2 --> DB 3 (Transactional replication)

drop some sensitive fields and take a FULL backup of DB 3.

We need to setup another transactional replication on Site 3 from Site 2 as follows:

Site 2    Site 3
DB2 --> DB 4

can the backup taken above of DB 3 be used (as this is filtered).

Other option is , to create a new Publication on DB2 and send it as a snapshot to DB4 (however,in that case it would mean sending about 700GB over VP..any idea how much time that will take?

can someone comment on this???

Replication

$
0
0

Hi, I have configered snepshot replication, I have two server and one is for publication and second one is for sub. now how can I use this publi. and sub. means how can I use this configration, means what is the benefit of this replication and how?

What/How to check if Replication is working properly and using the correct type?

$
0
0

Hi-

It appears that our replication processes are not working properly.

On our publication/distribution DB's the Status is OK, Current Perf = "Excellent".

Snapshts are completed(100% - X Articles generated) & Log Reader Agent running - I've reinitialized and been able to see Last Actions transferring articles, etc.

However - the Last actions are now - "No replicated tranactions are available."

Then, in the View Details...

Subscriber History - there are some errors  - "column or number of supplied values does not match defintion" and "Skipping *.sch files because it has already been delivered for a repvious article or previously interrupted snapshot".

This error seems to be related to one record/Table only.

Also - under Undistributed Commands - their is a very large number of commands waiting to be applied to Subscriber.( 648535)

Should we apply Loglevel Output to the Log Reader Agent or another agent to find out more details as to our current subscriber sync issues?

We also notice that our DB's and log files(on the file system) don't seem to match - meaning, shouldn't the subscriber(destination) Database/Log be the "same" size  as the Publisher/Distrib(source) DB?

If not - maybe that is a whitespace/fragmentation - not sure.

We copied our DB first then started replicating since they were so large and we worried about WAN(MPLS) speed of copy for a 100GB DB and the time it would take to replicate a new copy of the DB from scratch.

We are using Transactional(pull) replication - should we be using merge or another form of replication?

We just want to replicate our Publisher/Distrib-source(write) DB across a WAN to a Subscriber-destination(read-only) DB.

Thanks for any help.

-P

 

The specified network name is no longer available

$
0
0

Hi, I'm receiving the error: "The Merge Agent received the following error status and message from the Internet Information Services (IIS) server during Web synchronization: [500 :'( The specified network name is no longer available.  )']"

during web syncronization, merge replication.

Database server is SQL Server 2005 SP2 and the web server (a separate machine) is windows server 2003. Client databases (i.e. the subscribers) are sql server 2005 and 2008. There are about 200 subscribers.

The behaviour is quite difficult to understand. The error is not systematic. About 10% of synchronizations are failing. It happens that the same client can receive the error but, after about 10 minutes, when it retries, its replication becomes successful.

This is a replication system that exists for 3 years, ever worked quite well. Now i can't understand what can be the source of this problem. Any ideas ?

Many thanks in advance

Stefano


In snapshot replication - Are all articles in the same publication synced to the same time ?

$
0
0

Hi,

I have 2 tables (parent and child with FK) in the same publication in snapshot replication.

Parent row must have at least one child row.

Child row must have one parent row. 

When inserting data , we always insert data in the same transaction.

I understand that the snapshot is done by the bcp utility.

1) Will I get full transactions ?

2) Is the data of all tables in the same publication is synced to the same time?

Regards, Asi Pesa


FK when refreshing snapshot replication

$
0
0

Hi ,

I have 2 tables : parent and chiled with FK between them.

I didn't specify "NOT FOR REPLICATION" in the FK definition.

only the parent table is replicated.

When I refresh the snapshot, the data is truncated/deleted.

How does it work on the subscriber ? Since there is a moment where the parent table is empty.


Regards, Asi Pesa

SQl Server 2012 an d Bi-directional transactional replication

$
0
0

Hello all,

I've read that SQL Server 2012 does not support bi-directional replication.  We are currently running SQL Server 2008 and our replication topolgy utilizes bi-directional replication between two different SQL Server instances, with merge replication existing on one of those instances.  To be more specific:

  • On Server/DB X, records are inserted, which are replicated via transactional replication to Server/DB Y
  • Server/DB Y has merge replication set up, which subscrbers connect to over the web
  • Any records created by the subscribers to Server/DB Y merge replication are uploaded, then replicated back to Server/DB X via transactional replication

We are looking to upgrade to 2012 by then end of this year, and I am trying to find out how to preserve, or improve, our repliction topology.  If anyone has any suggestions or comments, please let me know.

Thanks in advance,

Clint


Clint

SQL 2005 error on alter procedure - Invalid object name 'sysarticles'.

$
0
0

I get an error while altering a procedure - Msg 208, Level 16, State 1, Procedure sp_MStran_ddlrepl, Invalid object name 'sysarticles'.

I have disabled replication completely still this error comes up on ALTERING the following procedure. 

Create and drop commands are working fine.

create proc zzz_CheckAdminValidationFeedback    
(@location_code nvarchar(20),@Password nvarchar(20))        
as          
begin          
select * from zz_locationcodePassword  where location_code=@location_code and Password=@Password      
end 

Any help is highly appreciated.

Transactional replication troubleshooting

$
0
0

Hi,

I have one publication and 2 subscribers

how can I stop a specific subscriber??....log reader agent will stop all subscriptions right?

NEED this information URGENTLY!!

Regards,

mandar

Viewing all 4054 articles
Browse latest View live




Latest Images