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

RMO - Publication Schedule

$
0
0

Hey,

I have the problem, when I create my publication by RMO in c#, that I dont know how or where to change/create the schedule plan for the publication. My code looks like this now:

MergePublication publication = new MergePublication(PublicationName, _settings.RegistryEntries.DbName, GetConnection(true));

publication.SnapshotGenerationAgentProcessSecurity.Login = _settings.SettingsReplication.DomainLoginName;
publication.SnapshotGenerationAgentProcessSecurity.Password = _settings.SettingsReplication.DomainLoginPassword;
publication.SnapshotGenerationAgentPublisherSecurity.WindowsAuthentication = true;

publication.PartitionGroupsOption &= PartitionGroupsOption.False;
publication.SnapshotSchedule.FrequencyInterval = 1;
publication.SnapshotSchedule.ActiveStartDate = int.Parse(DateTime.Now.ToString("yyyyMMdd"));
if (publication.IsExistingObject)
{
  publication.CommitPropertyChanges();
  publication.SnapshotSchedule.Update(); // TODO: not working
}
else
{
  publication.Create();
}

so right now I'm not sure, if I get it wrong what the Update()-function should do, or if there is a bug? because nothing is going to be updated on the server, but there is also no exception.. I tried it without the commitchanges, I tried it in all combinations, but it never updates the interval and startdate..

and if dont change it in the publication, where do I change it?

and in this article it reads like it was designed for it: http://technet.microsoft.com/de-de/library/microsoft.sqlserver.replication.replicationagentschedule.update%28v=sql.105%29.aspx

ah and database-version is 2008 R2 with SP2 and I reference the newest assemblies (Microsoft.SqlServer.Rmo.dll, ... ) with the version: 10.50.400 (SP2)

thx in advance

basto






How can I manage my replication folder

$
0
0

I just started using replication last night. As an experiment I set up one table to be replicated. I looked in the folder where I keep the bcp files and after one evening that folder has grown to 125GB!

How do I manage these files? Is it necessary to keep anything past the last created folder?

Transaction ended in the trigger. The batch has been aborted. (MSSQLServer, Error number: 3609)

$
0
0

I have setup trasaction replication with a remote distribution.
         SQL Server 2000   (The  publisher)
         SQL Server 2008   (The remote ditributor)
         SQL Server 2008  (The subscriber)
Non-trushted environment.

The setup was completed with no errors.  One day, the developers need to update the applications, so they dropped my replications.

Then,  I tested out my trasaction replication with Northwind database as Publisher in SQL 2000.  
When I run the initial snapshot, I received errors of:

Command attempted:

create procedure sp_MSins_Categories
@c1 int,
@c2 nvarchar(15),
@c3 ntext,
@c4 image
as
begin
insert into [Categories](
[CategoryID],
[CategoryName],
[Description],
[Picture]
) values (
@c1,
@c2,
@c3,
@c4 )
end

(Transaction sequence number: 0x0000001D00000152001800000001, Command ID: 6)

Error messages:

The transaction ended in the trigger. The batch has been aborted. (Source: MSSQLServer, Error number: 3609)
Get help: http://help/3609

The transaction ended in the trigger. The batch has been aborted. (Source: MSSQLServer, Error number: 3609)
Get help: http://help/3609


I am not familiar with those errors.  Can anyone help and advice?

I suspected the developers have implemented some custome triggers that will prevent the replication to be setup.

Thanks,
Edwin


None

Transactional Replication issue

$
0
0

hi ,

we are configured the "Transnational replication" from publication server to sub server.here problem is "Log reader " executing too log time and it's still executing past 30 hr's.

note: sql server services account and jobs are running same account here there is no permission issues.

please picture for your references.

please give me the Answer ASAP. 

RMO - Publication - Article Issues

$
0
0

When I configure a merge-publication by the management studio gui, I will come to a step called "Article Issues" right after I choose the articles that are going to be published.. It just says that I will have to change my application, because UniqueIdentifiers will be inserted into the tables. After the wizard finished, every table has a new rowguid-column (guid, not null). I recon this is pretty important for the (merge)replication.

So my question: is there a option in the publication-object for creating rowguid-columns in each article or do I need to configure right at the article-creation?

at the moment, I create the publication, then I loop with smo the tables of the database and create articles? Is there a easier way to do it?

thanks in advance basto

changes in subscriber

$
0
0

Hi,

Quick question. I have plain vanilla Transaction replication setup across two servers. What I have noticed that I made changes directly to my subscriber and they didn't get overwritten by the replication job from publisher (ofcourse I have different values in my publisher database).

Is there setup issue or design or some property didn't get set right?

Thanks, 

SQL Server replication question

$
0
0
Hello, I have a SQL database on which mirroring is already setup to get mirrored on to another server. Now I want to setup transactional replication on the Principal db to a different server, can I set up transactional replication on a Principal db which is already getting mirrored to another server? Thanks. 

sqldev

Will "view synchronization status" hurt anything?

$
0
0

I receive alert  that one  replication failed. Under Sql server management studio, I check replication---Local publications: find that replication. right click it and then click "view synchronization status"(It looks that start button is clicked automatically): status is  " waiting *** second(s) before pulling for further change" for ever.

How to troubleshoot?If stop, will it hurt sql server box...?

Need advice.Thanks.


Gaps in Identity Range

$
0
0

Hi All,

We're experiencing a weird phenomenon with identity range management presently and wondered if anyone had any ideas on why it's happening and how to fix.

We are using Merge Replication and 5 subscribers.

When we look at the table that holds the identity ranges (i.e. range_begin, range_end, next_range_start and next_range_end) we see that there appears to be a big gap in the middle of the identity range on the constraint.

This is an example of what I mean... 

([ID]>(13018108) AND [ID]<=(13118108) OR [ID]>(16818108) AND [ID]<=(16918108))

Anyone any ideas as to what caused this?

I understood that the primary and secondary ranges where allocated thus.

A --> B and B --> C

and not...

A -- B and X--> Y

If you see what I mean...

Warm Regards,

Nigel.

Oracle to SQL Replication LogReader Error

$
0
0


Here are the error messages, any help will be greatly appreciated.  Would like to know if there's a way to see the records that is causing the error and if not, can we skip it?  

ORA-01455: converting column overflows integer datatype (Source: MSSQL_REPL_ORACLE, Error number: 1455)
Get help: http://help/1455

Heterogeneous Logreader encountered an error in call to LoadReplCmds when processing state 'FETCH'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
Get help: http://help/MSSQL_REPL22037


tae yang

Trans Repl terminates and restarts after error

$
0
0

Afternoon,

Having a strange issue where transx replication is running for one of our larger publication and is going along smoothly then an error hit ...

     TCP Provider: An existing connection was forcibly closed by the remote host.

The sync then initializes again and starts delivery the rest of the transactions neededing to be pushed out.

Added to this is that our alerting tool (DELL Spotlight) fires off a call to the oncall DBA saying the instance is down BUT everything is fine.

I do not see anything in the WIN App or Sys event logs at that time.

Wondering what I need to look at to figure this out or get more details.

Thanks ALL!

sql server 2008 replication failed---how to work with verbose history logging?

$
0
0

One sql replication job fails/hangs. I find following error message

"The merge process was unable to access row metadata at the 'Subscriber'. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to write to, or use SQL Profiler to determine the source of the failure.(Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200996)"

How to turn on verbose history logging and specify an output file?I never did this before. Need spcecific instruction step by step.Thanks

Database Replication Queries

$
0
0

Hi ,

Can anyone please clarify my questions on Database replication?

how to implement automated database replication scheme.

 

what is it to clean the database to meet the minimal Microsoft replication criteria? In other words what is the minimal criteria for replication process?


 Thanks,

Preetha


Unable to set Transactional Replication between SQL Server 2005 Standard Edition and SQL Server 2008 R2 Enterprise Edition

$
0
0

Hi All,

I'm facing below issues with our production setup.

Scenario:

Server A: SQL Server 2005 Standard Edition SP 4 32 bit
Server B: SQL Server 2008 R2 Enterprise Edition SP 1 64 bit

Server A needs to be a Publisher.
Server B needs to be a Distributor and Subscriber.

We need to have a Transactional Replication from Server A to Server B.

This setup was running till 10 days back as per mentioned above. Due to some issues Server A was formatted and re-setup.

Now when we're trying to setup the replication we're getting the error in the first step itself.

Below is the error that we get when we try to connect to the distributor (Server B) from publisher (Server A) and enter the distributor's administrative link password.

ERROR:

Connection to server [<Server B>] failed.

OLE DB provider "SQLNCLI" for linked server "36C5C21A-B7CC-42FE-B146-D08B9C95EB8B" returned message "Login timeout expired".

OLE DB provider "SQLNCLI" for linked server "36C5C21A-B7CC-42FE-B146-D08B9C95EB8B" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". (Microsoft SQL Server, Error: 21670)

We've Tried Below Things but no success

- Checked "allow remote connections" in sp_configure for both servers - OK
- Removed and added Server B as publisher in the distributor's publisher list. - Still didn't work
- The SQL Account used for connections on both Server A and Server B have SA rights on respective servers
- The LAN / Windows IDs used for both Server A and Server B are Windows Admins
- SQL Server Agent on both servers is running with the LAN / Windows ID with Admin rights on the servers and SA rights on the SQL Server

Any help in this regard will be appreciated.

Regards
Mayur Kashikar


Replication only works in one direction

$
0
0

We have two servers ntserver1 and ntserver2.  Ntserver1 is in the root of the domain eg company.local and ntserver2 is in a child domain eg child.company.local

We have configured replication of a SQL database on the ntserver1 to replicate to ntserver2. This works fine. However we cannot replicate changes to the database from ntserver2 to ntserver1.

Any ideas anyone ?


Stuck on CDC disable error

$
0
0

Hello!

We are working on automating deployments for our SQL Server 2012 SP1 instance that uses CDC.  We are getting the following error when we try to run:

exec sys.sp_cdc_disable_table
@source_schema = N'dbo',
@source_name = N'SUser',
@capture_instance = N'all'

Error:

Msg 22833, Level 16, State 1, Procedure sp_cdc_disable_table_internal, Line 148
Could not update the metadata that indicates table [dbo].[SUser] is not enabled for Change Data Capture. The failure occurred when executing the command 'sp_cdc_disable_table_tranx'. The error returned was 22837: 'Could not delete table entries or drop objects associated with capture instance 'dbo_SUser'. The failure occurred when executing the command 'sp_cdc_drop_change_table_objects dbo_SUser'. The error returned was 14677: 'The user does not have permission to perform this operation. The user must be a member of data collector role 'mdw_admin'.'. Use the action and error to determine the cause of the failure and resubmit the request.'. Use the action and error to determine the cause of the failure and resubmit the request.

I am troubleshooting this as sysadmin running the query from SSMS.  I have scoured the forums and the googles, but I can't really find any info on this.  The error mentions that the user must be a member of data collector role, which we spelled out explicitly also just for the fun of it (didn't help....).

Any ideas?

Any help is much appreciated!

Thanks!

-Bill S.

Replication command string error

$
0
0

Hi All, 

We are facing a rear issue which leads to crash of all subscription and table out of sync.

Details are: Replication 'A' have 3 subscriber (B,C,D)

- When Column 'Col1' is being updated with some value , it creates replication string for all three subscription

- At subscriber end, when this replication string get execute it gave us an error

   Error converting data type varchar to uniqueidentifier.

- We tried to drop and re-create replication many times but none of error resolved(conversion error and out of sync)

Here is replication string which we got from Replication error table

0x0031C9AC00001A5D0001ServerNameDBName203001NULLNULL0x00000000000000000000{CALL [dbo].[sp_MSupd_dboTableName]

(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'A4',NULL,NULL,NULL,NULL,NULL,{A853D213-5EC5-42F8-9287-FC505997A2FF},NULL,NULL,NULL,NULL,NULL,NULL,
438156,'WT WM',0x00100400)}1

--> 'WT WM' value in above string is creating problem for us as procedure at subscriber end expect a Unique identifier values (old Unique identifier value).



SM

CDC Job capture failure

$
0
0

Recently I Restored a database from Live to Test Instance for implementing CDC feature on sql server 2008 X64 Enterprise Edition on Windows server 2008r2 X64.
***Meant there was NO CDC Enabled in Production Nor Replication Features Its stand Alone. 

Initially i Enabled CDC on Database level and next for 3 Tables, after that i inserted records for all the tables but the same was not getting reflected to CDC tables. then i checked in agent service-> CDC capture Job -> view history, then i got the following below error..

Message
Msg 22859, Level 16, State 2, Log Scan process failed in processing log records. Refer to previous errors in the 

current session to identify the cause and correct any associated problems. For more information, query the 

sys.dm_cdc_errors dynamic management view.


Date14-Dec-13 8:07:35 AM
LogJob History (cdc.HC_UAT_DB_V4_capture)

Step ID2
ServerADDCSVHC05
Job Namecdc.HC_UAT_DB_V4_capture
Step NameChange Data Capture Collection Agent
Duration00:34:29
Sql Severity16
Sql Message ID22859
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted11

Message
Executed as user: Test\hcuat. Could not locate text information records for the column "ExMaritalStatus", 

ID 189 during command construction. [SQLSTATE 42000] (Error 18773)  The Log-Scan Process failed to construct a 

replicated command from log sequence number (LSN) {00232390:00001fc9:0015}. Back up the publication database and 

contact Customer Support Services. [SQLSTATE 42000] (Error 18805)  Log Scan process failed in processing log 

records. Refer to previous errors in the current session to identify the cause and correct any associated 

problems. [SQLSTATE 42000] (Error 22859)


can anyone please help me.., what is the cause for the below error and how i can get rid of this.

"ExMaritalStatus",column -> Nvarchar datatype

Note : 
      *** issue can be solved by disabling & enabling CDC at database level but i need the root cause, again CDC capture job fails for capturing other Nvarchar columns when i Re-Enable at the database level. This cause is getting cycled/looping in capturing other colums.

 Thanks for the advance.


 



Pavicoolman

SQL Server Transactional replication, Oracle as Subcriber.

$
0
0

Hi,

I am Raja, I am new to SQL Server Replication(Non-SQL Subscriber). I have to configure SQL Server transactional replication from SQL Server database(Publisher) tables to Oracle(Subscriber) database in my development environment. I tried many times but I couldn't. Could you please any one send reference link or screen shots? I tried in google and youtube but I didn't get proper screen shots or video.

Thanks,

Raja

Error in replication

$
0
0

Error messages:

<dir></dir>
<dir>

The process could not bulk copy into table '"dbo"."MPI_COMPANY"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037

Invalid object name 'dbo.MPI_COMPANY'. (Source: MSSQLServer, Error number: 208)
Get help: http://help/208

To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below. Consult the BOL for more information on the bcp utility and its supported options. (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253

bcp "FlexNet"."dbo"."MPI_COMPANY" in "G:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQL\MSSQL\ReplData\unc\MESD01_DISTRIBUTION_MPI_DEV\20131214232548\COMPANY_2.bcp" -e "errorfile" -t"\n<x$3>\n" -r"\n<,@g>\n" -m10000 -SCIDCSWDMESMPD01\MSSQL -T -w (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253

</dir>
Viewing all 4054 articles
Browse latest View live




Latest Images