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

Log Reader Job is going to idle state.

$
0
0

Hi,

we have facing one issue related to Log Reader Job in the customer site.

We have step up the database replication between the two server. And the three jobs (distributor,  snapshot and log reader) setup and started successfully. Then from the code where we are using sql dmo api to monitor these three jobs (distributor,  snapshot and log reader) so running for the period of 5 to 6 months, log reader job is going to idle state. So SQL DMO API will return us the status as "IDLE", so in our code, we are checking if the status is IDLE break the Sycn. So want to know why the log reader job is going to IDLE state after period of 5 to 6 months.

Thanks in advance.

Regards,

Som


Options for connection between SQL Server AND Oracle

$
0
0

Hi,

I am not sure this is the right category to post this. I saw replication and posting it here.

We have SQL Server 2012 on windows and Getting new vendor system which is on Oracle on Unix. We need to get the data and send the data to Oracle. We would like to know what are the best options.

1) Linked Servers OR

2) Replication of Oracle tables in SQL Server OR

3) Any other options?

Please let us know what are industry standards.

Thanks,

Spunny

SQL Replication - Untrusted Domains

$
0
0

I'm trying to configure SQL Server Replication (Merge) between two servers.  The servers sit on two different domains, which are untrusted.  For security reasons, DNS is not running.  I can connect from one server to the other using the ip address.  When connected to server A, I can view folder shares, etc. on server B.  The same holds true when I'm connected to server B.  I can create the publication without any issues.

The issue I have is when I attempt to create a subscription, I enter the ip address of the server housing the publication.  I receive an error message indicating that I must use a server name.  When I enter the server name, it fails because it can't see it.  I believe this error occurs because DNS is not running.

Is there a way for me to create a subscription without using the actual server name?

Controlling SQL Server Replication using Powershell

$
0
0

Hi,

I have a Powershell script to refresh the databases

My requirement: 

I have a database which has replication in it. I used powershell to generate replication scripts and refreshes the database with another backup copy. After refreshing, I need to start the snapshot agent. 

How do I start the snapshot agent after refresh using powershell ?

Is it possible to monitor the replication synchronization using powershell ?

My ultimate goal is not to use Management studio, so that I can automate the nightly refresh process using powershell itself. 

Please advise. 

Changing the subscriber's server (IP and name)

$
0
0

Hello, I am facing a problem about subcriber's server. We have a replication configuration with a server that publishing changes from a table to another same table on a subsciber server. The subscriber server will change to another server with different IP and Name. I went to link servers that resides the subscriber server to see if there is somthing to change about but I couldn't find something. The setup of the replication from the beginning is not an option.

Thanks


Why I can not search all records in my fn_dblog

$
0
0

Hi All,

I am currently work with SQL 2008, I want search my transaction log which never truncate before and around sized 1XXGB,

When I doing search, it only show current date records, if I specify yesterday (for example) it return nothing

My Code:

===============

SELECT Operation,[Transaction ID], [Begin Time], [Transaction Name], [Transaction SID]
FROM fn_dblog(NULL, NULL) WHERE [Transaction ID] = ‘0000:00000752’
AND [Operation] = ‘LOP_BEGIN_XACT’ And [Begin Time] = cast(2015-12-02 as date)

===========================Return Nothing, If change today, it return records,

I don't know why, and hope all you can help me

Best Regards,

Calvin

Intermittenly replication doesn't bring across the insert statement to be executed on the subscriber

$
0
0

We are using SQL 2014 enterprise and transactional push publication. Distributor is on its own SQL server. The subscriber is on SQl 2012 enterprise.   We are a 4 node cluster using Always-ON.   Our replication process has been error-free for over two years until couple days ago.   I had two instances so far that the error alert indicates the problem was due to "The
row was not found at the subscriber when applying the replicated command".   Replication was trying to update a record but that record no longer exists.

To trouble shoot, I checked the permission on all users on that db and they are all read only.  I checked the profiler trace (server side trace) and searched for any delete statement issued by any users or by replication and found none.   I checked the inserting sequence which is based on an identity key, when a record was being inserted in the publisher db, say in a half our span, it inserted  record # 1001, 1002, 1003, 1004, the profiler trace on the subscriber showed the insert for #1001, 1002, 1004.  For reason,  SQL replication didn't replicate the change command for record #1003. 

In our replication setup, we don't use filter or any specialized custom settings.   Basically we use the default setup to keep thing simple to manage.   This is the very first time we see this type of 'skip insert' situation.    This past week our publisher server has been very busy and I did see some significant latency during the day time and night time was back to normal.   Strangely enough that this 'skip insert' problem happened in the evening.  One happened at about 8 pm CST and one happened at 11:40 pm.  Does anyone experience this type of problem or know how to track down the root cause? 

Thanks in advance,

OD


Ocean Deep

How to Stop and Start SQL DB replications

$
0
0
How do I stop and start a DB publication and then reinitialize the replication using a powershell script. New to PS and SQL need to identify how I parameterize it as well.

Priyantha Perera


The agent could not be started.

$
0
0
I created a snapshot publication (the engine is SQL2005 and the compatibility is 2000).
I got this message:

"The agent could not be started.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
SQLServerAgent Error: Request to run job REPLSM-6 (from User DOM\custuser) refused because the job has been suspended.
Changed database context to SM. (Microsoft SQL Server, Error: 22022)"

And when i'm trying to reinitialize the publication, I get this:

"Replication Monitor could not start the Snapshot Agent to generate a new snapshot. You must start the Snapshot Agent manually before the subscription(s) can be reinitialized..."

What can I do? Why it doesn't work?
thnx

Merge Replication - Client Type ReadOnly Prohibit Changes at Subscriber Subscription -Delete Operation Failure on Subscriber due to "Unable to synchronize the row because the row was updated by a different process outside of replication"

$
0
0

Hi all,

The merge replication on the table in question works fine for Updates and Inserts which I can see in replication monitor but when deletes occur I get this error when merge replication tries to delete the row on the subscriber.

Please note that below is a screenshot showing that referenced objects for deletions are correct and I have verified that the objects are present etc , all of that look Ok.

I tracked through the objects and tried to manually recall replication to deleted the row on the subscriber with the call

exec

[dbo].[MSmerge_del_sp_F76ED4C8192B4AA26845A21483954514]1,null,'820f2006-1529-e511-9403-40f2e9249f9a'

and that went through with no error and it looks like replication is no longer retrying to run the delete and subsequently causing another conflict to tick for this row.

My question is, having a look at the tombstone records below (Publisher is first and then the Subscriber) given that the generation and lineage are different, is this the cause?

Like I said Inserts and Updates go through to the subscriber with No issue and work fine, its just when delete operations get called it seems that this error gets raised.

Any advice appreciated.

Kind regards,

Matt


"The merge process is retrying a failed operation made to article ''TABLE1'' - Reason: ''Unable to synchronize the row because the row was updated by a different process outside of replication.".




Wrong type of field in updatedDataSet Custom BusinessLogicHandler

$
0
0

Hi,

In some cases, in update handler, I need to reject data modified by the subscriber (sql compact 3.5 sp2) and return the publisher's data (sql server 2008 R2 SP3).

Here is the problem because type of fields in updateddataset is wrong for decimal fields  (seen as string fields) or for long fields (seen as decimal) and updates fail. Decimal.parse fails except if I declare cultureinfo..InvariantCulture but in this case I get an error message "ERROR: ErrNo = 0x8004565a, ErrSrc = <null>, ErrType = 8, ErrStr = The Merge Agent failed because the schema of the article at the Publisher does not match the schema of the article at the Subscriber. This can occur when there are pending DDL changes waiting to be applied at the Subscriber. Restart the Merge Agent to apply the DDL changes and synchronize the subscription" 

This error was normally corrected by a fix in cumulative update 13 for SQL Server 2008 R2 SP2 but is back with SP3.

Any help will be appreciated.


remove replication consequences

$
0
0

Hi, 

we have replication setup for few tables to another database, lets take an example , we have a table PUB_TAB on publication which has trigger on insert PUB_Trigger same table on subscription has a different trigger SUB_trrigger on insert, now we are removing replication and merging databases tables in a single database now question here how triggerrs should be on a table PUB_TAB ? either both the trigger should be merged in one or we can have two triggers on a table both are doing different things, we are planning to keep two trigger on insert , what could be the consequences??

 


SQL Server DBA

class not registered, can't access start menu, no edge, no store

$
0
0

i can't access Edge, start menu or microsoft store and then i get a class not registered

these errors pop up 0xc0000605

0x80080005 - 0x90016

Oracle 12 to SQL Transactional replication

$
0
0

Is it a correct statement that you can't do transactional replication from Oracle 12C to SQL (using SQL replication)? You could in earlier versions of Oracle. But after an upgrade it looks like you can't. We've tried replicating to both DQL 2008 and 2014 with the same issue. The Publisher (on SQL) seems to be created properly. But there are problems creating the publication.

Bob

Does SQL Server Replication work with Oracle 12C?

$
0
0

Hi,

We've been using SQL Replication to pull down Oracle data for years using SQL 2008 R2 Enterprise Edition. Since we upgraded to Oracle 12C we can no longer create an Oracle Publisher on the SQL Server.  Same lack of results with SQL 2014.  However, existing replication subscriptions continue to work. 

The error we receive when creating a new Oracle Publisher is 21613.  'Constraint column 'PRIKEY' not found in table 'xxx'.  Changed database context to 'distribution'.

Any helpful advice?

Thanks.


The database cannot be enabled for Change Data Capture because a database user named 'cdc' or a schema named 'cdc' already exists

$
0
0

Hello,

I am doing refresh activity from PROD to no-prod. The non-prod database has cdc tables. I disabled cdc using sp_cdc_disable_db in non-prod.

Took a copy of the mdf and ndf from prod and and brought the non-prod DB online. 

Issue:

Now the mdf files taken from prod has cdc objects and i could verify cdc tables in sys.tables ( is_tracked_by_cdc=1).

When i try to enable cdc in non-prod DB with sp_cdc_enable_db, i am getting below error

The database cannot be enabled for Change Data Capture because a database user named 'cdc' or a schema named 'cdc' already exists in the current database. These objects are required exclusively by Change Data Capture. Drop or rename the user or schema and retry the operation.

When i try to disable cdc for individual table, i am getting below error

The database is not enabled for Change Data Capture. Ensure that the correct database context is set and retry the operation. To report on the databases enabled for Change Data Capture, query the is_cdc_enabled column in the sys.databases catalog view.

And because of all the above issues when i try to reinitialize subscription, i am getting below error

Cannot truncate table because it is either published or is CDC enabled

What is the workaround now, should i drop all cdc related objects from the non-prod DB and try to enable CDC?

If so, what is the best practice in removing cdc objects . Waiting for you suggestions.

Thanks


SQL SERVER 2008 Merge Replication (The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription(without upload).)

$
0
0

Hi All,

We are getting the below error in our production

The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription(without upload).

As per Microsoft its a know issue with 2008 with doc id 2733630 and fix is available as Cumulative update package 4 for SQL Server 2012. url : https://support.microsoft.com/en-us/kb/2758687

My question would be : Is this fix is applicable for both the below Publisher and Subscriber SQL SERVER 2008 versions :

SQL Server Version are :

Publisher : Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
    Feb 10 2012 19:39:15
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

Subscriber:Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (Intel X86)
    Dec 28 2012 19:06:41
    Copyright (c) Microsoft Corporation
    Express Edition on Windows NT 6.2 <X64> (Build 9200: ) (WOW64) (Hypervisor)

Some links are saying this hotfix is not working and there is some workaround to update cleanedup_unsent_changes=0.

Please provide your valuable views.

VSS restore steps leaking a couple of semaphore handles

$
0
0

This is a leak for semaphore, the stack was identified using htrace

Handle = 0x0000000000000df8 - OPEN

Thread ID = 0x00000000000015ec, Process ID = 0x0000000000000e94

0x0000000077ade41a: ntdll!ZwCreateSemaphore+0x000000000000000a
0x000007fefdae697a: KERNELBASE!CreateSemaphoreExW+0x000000000000005a
0x0000000077878e39: kernel32!CreateSemaphoreW+0x0000000000000019
0x000007fefa937233: VSSAPI!CVssBackupComponents::BasicInit+0x00000000000000cf
0x000007fefa9386c9: VSSAPI!CVssBackupComponents::InitializeForRestore+0x0000000000000329

.

.

----

This is a registry handle leak

Handle = 0x0000000000000eb0 - OPEN
Thread ID = 0x00000000000015ec, Process ID = 0x0000000000000e94

0x0000000077ade90a: ntdll!NtOpenKeyEx+0x000000000000000a
0x0000000077883692: kernel32!LocalBaseRegOpenKey+0x00000000000001f5
0x00000000778839d5: kernel32!RegOpenKeyExInternalW+0x0000000000000123
0x0000000077883a9d: kernel32!RegOpenKeyExW+0x000000000000001d
0x000007fefa914d83: VSSAPI!CVssRegistryKey::Open+0x00000000000001b6
0x000007fefa914fee: VSSAPI!CVssDiag::Initialize+0x0000000000000220
0x000007fefa9372ec: VSSAPI!CVssBackupComponents::BasicInit+0x0000000000000188
0x000007fefa9386c9: VSSAPI!CVssBackupComponents::InitializeForRestore+0x0000000000000329

I end my program with .release and routine calls. When I close my program, I do not want any leaks.

Any suggestions if these leaks could be eliminated?

The flow is pretty standard

InitializeForRestore

GatherWriterMetadata

SetSelectedForRestore

PreRestore

SetFileRestoreStatus

PostRestore

Release

thanks all,

-Vikrantl

SQL DB replication - bandwidth utilization is limited 4Mbps

$
0
0

Hello!

We have deployed SQL DB with HA and in cluster mode as well as DB replication through Always ON.

There is a dedicated 8Mbps MPLS bandwidth connectivity has been established between Primary DB server to Secondary DB server.

The data synchronization is behind for an almost 4-5 hours and MPLS bandwidth utilization also not getting utilized to 8Mbps rather limited to 4Mbps.

Can anybody suggest on how to resolve the data replication by utilizing the full MPLS bandwidth availability.

Replicate Image from SqlServer 2005 to Oracle12c

$
0
0

Hi,

I am trying to replicate a table that is containing an image from SqlServer 2005 to Oracle12c but i am getting an error when the distribution agent tries to apply the initial snapshot: "ORA-00932: inconsistent datatypes: expected file got binary". I did the same test between sql server 2005 and oracle 11g and it worked.

The problem is only with tables that have images, if it is only text, it works. (afte i am recreating MSREPL7

CREATE TABLE SCHEMA.MSREPL7
(
PUBSRV    VARCHAR2(128 BYTE),
PUBDB     VARCHAR2(128 BYTE),
PUBLCN    VARCHAR2(128 BYTE),
INDAGENT  NUMBER(1),
SUBTYPE   NUMBER(10),
DSTAGENT  VARCHAR2(100 BYTE),
TIMECOL   DATE,
DESCR     VARCHAR2(255 BYTE),
XACTTS    RAW(16),
UPDMODE   NUMBER(3),
AGENTID   RAW(16),
SUBGUID   RAW(16),
SUBID     RAW(16),
IMMSYNC   NUMBER(1)
))


Viewing all 4054 articles
Browse latest View live




Latest Images