Showing posts with label transactional. Show all posts
Showing posts with label transactional. Show all posts

Tuesday, March 27, 2012

Can not generate snapshot (SQl Server 2005 Transactional Repl )

Hi,

This is my first try at implementing transactional replication (Sql Server 2005). My Publisher and Distributor are on different instances of SQL. I am receiving the following error during execution of setp 2 in snapshot agent:

2005-09-15 19:09:48.39 Connecting to Distributor 'WLN-SQL2005DEV\WDC_DIST'
2005-09-15 19:09:48.61 The replication agent had encountered an exception.
2005-09-15 19:09:48.61 Source: Replication
2005-09-15 19:09:48.61 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentException
2005-09-15 19:09:48.61 Exception Message: The snapshot could not be generated because the publisher is inactive.
2005-09-15 19:09:48.61 Message Code: 54057

Can anyone help me out with this?

Thank you,

NickCan you elaborate how you got into this situation?

To fix the problem, you can call the following stored procedure:

sp_changedistpublisher 'YOUR-PUBLISHER-NAME', 'active', 'true'
|||I just got into that situation. I am not sure exactly how I got there but it occured after one or more instances of removing the distibutor, publisher and subscriber and trying to recreate them.

Can not generate snapshot (SQl Server 2005 Transactional Repl )

Hi,

This is my first try at implementing transactional replication (Sql Server 2005). My Publisher and Distributor are on different instances of SQL. I am receiving the following error during execution of setp 2 in snapshot agent:

2005-09-15 19:09:48.39 Connecting to Distributor 'WLN-SQL2005DEV\WDC_DIST'
2005-09-15 19:09:48.61 The replication agent had encountered an exception.
2005-09-15 19:09:48.61 Source: Replication
2005-09-15 19:09:48.61 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentException
2005-09-15 19:09:48.61 Exception Message: The snapshot could not be generated because the publisher is inactive.
2005-09-15 19:09:48.61 Message Code: 54057

Can anyone help me out with this?

Thank you,

NickCan you elaborate how you got into this situation?

To fix the problem, you can call the following stored procedure:

sp_changedistpublisher 'YOUR-PUBLISHER-NAME', 'active', 'true'
|||I just got into that situation. I am not sure exactly how I got there but it occured after one or more instances of removing the distibutor, publisher and subscriber and trying to recreate them.

Monday, March 19, 2012

Can MS SQL Server do bidirectional, transactional replication using an Identity column?

I have been struggling for several days trying to setup bidirectional,
transactional replication by Publishing the same table on each server with
NOT FOR REPLICATION and an even/odd partitioning of the IDENTITY columns:
CREATE TABLE test (
col1 INTEGER IDENTITY( 1, 2 ) NOT FOR REPLICATION NOT NULL PRIMARY
KEY,
col2 CHAR(10) );
CREATE TABLE test (
col1 INTEGER IDENTITY( 2, 2 ) NOT FOR REPLICATION NOT NULL PRIMARY
KEY,
col2 CHAR(10) );
I used the Articles/Snapshot Keep the existing table unchanged option and
choose not perform to perform a snapshot automatically to preserve the
schema. Unidirectional replication from the first server to the second
worked perfectly.
Most recently, when using SQL commands instead of Stored Procedures and with
the "Use column names in commands that are not replaced by stored
procedures", I encountered:
Violation of PRIMARY KEY constraint 'PK__test__3D5E1FD2'. Cannot insert
duplicate key in object 'test'.
IDENTITY column values seem to be generated properly on each server, but
when I setup the second subscription I encountered the error. Apparently
when I inserted a row in the second server, it propagated to the first
server which may have tried to send it back to the second server?
I am not interested in new GUIID columns being introduced into our schema,
nor can we tolerate Two Phase Commit as the connection to the servers must
be asynchronous. Primary keys will never change. Inserted rows at each
site will get their own even or odd key values.
Is MS SQL Server up to the task or should I use our own trigger-based,
asynchronous replication solution?
Thanks, Matt
================================================== ========================
Matthew J. Ramuta Enterprise Information Solutions, Inc.
Txt: 6306973359@.mobile.att.net 4910 Main Street, Downers Grove, IL 60515
Off: 630-512-0570 Fax: 630-512-0568 Cell: 630-697-3359
================================================== ========================
Yes it is entirely possible.
Are you doing this through the wizards, because the wizards don't support
bi-directional transactional replication.
What you should do is script out what you have and then edit the script and
change the sp_addsubscription proc to also have a parameter saying
@.loopback_detection='true'
Do this for both sides.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Matthew J. Ramuta" <mattr@.eisolution.com> wrote in message
news:quqUc.3719$Y94.920@.newssvr33.news.prodigy.com ...
> I have been struggling for several days trying to setup bidirectional,
> transactional replication by Publishing the same table on each server with
> NOT FOR REPLICATION and an even/odd partitioning of the IDENTITY columns:
> CREATE TABLE test (
> col1 INTEGER IDENTITY( 1, 2 ) NOT FOR REPLICATION NOT NULL PRIMARY
> KEY,
> col2 CHAR(10) );
> CREATE TABLE test (
> col1 INTEGER IDENTITY( 2, 2 ) NOT FOR REPLICATION NOT NULL PRIMARY
> KEY,
> col2 CHAR(10) );
> I used the Articles/Snapshot Keep the existing table unchanged option and
> choose not perform to perform a snapshot automatically to preserve the
> schema. Unidirectional replication from the first server to the second
> worked perfectly.
> Most recently, when using SQL commands instead of Stored Procedures and
with
> the "Use column names in commands that are not replaced by stored
> procedures", I encountered:
> Violation of PRIMARY KEY constraint 'PK__test__3D5E1FD2'. Cannot
insert
> duplicate key in object 'test'.
> IDENTITY column values seem to be generated properly on each server, but
> when I setup the second subscription I encountered the error. Apparently
> when I inserted a row in the second server, it propagated to the first
> server which may have tried to send it back to the second server?
> I am not interested in new GUIID columns being introduced into our schema,
> nor can we tolerate Two Phase Commit as the connection to the servers must
> be asynchronous. Primary keys will never change. Inserted rows at each
> site will get their own even or odd key values.
> Is MS SQL Server up to the task or should I use our own trigger-based,
> asynchronous replication solution?
> Thanks, Matt
> ================================================== ========================
> Matthew J. Ramuta Enterprise Information Solutions, Inc.
> Txt: 6306973359@.mobile.att.net 4910 Main Street, Downers Grove, IL 60515
> Off: 630-512-0570 Fax: 630-512-0568 Cell: 630-697-3359
> ================================================== ========================
>

Tuesday, February 14, 2012

Can I replicate SBS SQL to a full install of SQL

I am running SBS 2000. I use SQL (in SBS) as the transactional database for
Great Plains and Sales Logix. I want to set up an OLAP environment for data
mining, but I want to put the OLAP stuff on another server. My plan is 1)
buy a new server, 2) buy/install Win2003 Server and SQL Server 2003 on the
new server and 3) replicate the SQL from SBS to the new server for OLAP
access. Someone told me that SQL within SBS can not be replicated to a
full-blown SQL installation, but searching the Web and newsgroups, I haven't
found anything that supports or denies that fact. Does anyone know of a
reason that I can't replicate my SBS SQL out to a SQL 2000 or SQL 2003 box?
If I can't. is there another migration path?
Thanks!
I know of no such reason.
"Toltar" <Toltar@.discussions.microsoft.com> wrote in message
news:D532AFDB-61C2-4EA3-AF7E-3400C3E48031@.microsoft.com...
>I am running SBS 2000. I use SQL (in SBS) as the transactional database
>for
> Great Plains and Sales Logix. I want to set up an OLAP environment for
> data
> mining, but I want to put the OLAP stuff on another server. My plan is 1)
> buy a new server, 2) buy/install Win2003 Server and SQL Server 2003 on the
> new server and 3) replicate the SQL from SBS to the new server for OLAP
> access. Someone told me that SQL within SBS can not be replicated to a
> full-blown SQL installation, but searching the Web and newsgroups, I
> haven't
> found anything that supports or denies that fact. Does anyone know of a
> reason that I can't replicate my SBS SQL out to a SQL 2000 or SQL 2003
> box?
> If I can't. is there another migration path?
> Thanks!