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

Hetrogenous replication in sql server 2008

$
0
0

I am trying to setup a transaction rpelication between a Oracle publisher (version 10.2) and sql server 2008 sp1 on windows 2008, 64 bit AMD Processor.
I have installed the oracle client 11.0.1 and followed the permissions for the login on the orcale server.
I was able to add the oracle publusher.
I am tryign to create the publication and atricles and i get the following error.


TITLE: Publication Properties
------------------------------

Cannot add article 'CACHE_LEVEL_LU'.

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Cannot publish the table 'SAT.CACHE_LEVEL_LU' from the Publisher 'CD15'. Verify connection information and ensure that you can connect to the Publisher through a tool like SQL*PLUS. Ensure that the replication administrative user schema has the required permissions.
Cannot add the Publisher triggers and the article log table to the Oracle Publisher for the article 'CACHE_LEVEL_LU'. Verify connection information and ensure that you can connect to the Publisher through a tool like SQL*PLUS. Ensure that the replication administrative user schema has the required permissions.
Changed database context to 'distribution'.
OLE DB provider "OraOLEDB.ORACLE" for linked server "CD15" returned message "ORA-00936: missing expression
ORA-06512: at "BIA_REPL.HREPL", line 1722
ORA-06512: at line 1".
Error: 7215, Sev: 17, State: 1, Msg: Could not execute statement on remote server 'CD15'. (Microsoft SQL Server, Error: 21790)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=21790&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Any idea?
Do you guys knwo fi the replication between Oracle and sql works?

thanks
uday


Sql Logshipping query

$
0
0

Hi team,

I have SQL Server Primary and Secondary and i am using SQL Log shipping to transfer my logs from primary server to Secondary server. during this process due to network issue if my replication get stuck it's getting restarting from sctrach

Example:-  i have initiated 30 GB logs transfer from my primary to secondary

it got completed 25 GB and 5 GB yet to be complete

during this time if my network get disconnected, this will start from 25 GB or again it will start from Scratch and initiate the whole 30 GB again.



k sivakumar

Can a subscriber DB to other server to be the publisher DB in a new merge replication?

$
0
0

Guys, I have an very urgent support request in my organization. And im new to Replication, but at least learned some during the setup, and worked on it for past months facing every kind of difficulties, Google search helped much, but after dozens try, I'm stuck here with one issue/question:

Can a subscriber DB to other server to be the publisher DB in a new merge replication?

If my statement is hard to understand, here's background.

We have Server A, B, C is running SQL 2005 which we need to retire them all.

Server A is a publisher setup merge replication with B & C respectively.

Now we setup X, Y, Z running SQL 2014 to replace the A, B, C.

Server X is a publisher setup merge replication with Y & Z respectively.

As there's no downtime can be allowed, there're multiple applications relies on the DB, we need to move app pointers in some period of time. So, we need both environment work for a couple of weeks, to slowly migrate to X,Y,Z. Any changes happened on server A need to be sync to X, and X is also getting new data but no need to sync back to A.

Because per MS, SQL 2005 to SQL 2014 beyond 2 version steps, replication may not work well may have unexpected result not suggested, so i have setup a interim server T running SQL 2008 R2 as broker to pass data between A & X,  A -> T setup transactional replication and verified working fine, and server T pass data to X for transactional replication is fine. (Oh yeah!)

as earlier said, X setup as publisher and merge with Y & Z, it is working as expected, verified if change occurred in X, it updated to Y & Z. (Oh yeah!!)

BUT, the change happened from A, pushed to T, pushed to X, it is not reflected in Y & Z. only direct change happened on X can be reflected in Y & Z. UNBELIEVABLE

I hope my description is clear enough for any suggestion.  I hope someone has also gone through the same complicated setup.

Any word would help.

thanks,

Jack

Transactional Replication insert only new Records

$
0
0

Hi,

I have done Transactional replication from one Server to other Server (both Sql server 2014).

When i do the replication from Publisher to subscriber it creates all the Tables and inserts all the records.

But i want to insert only the new records which is not available in Subscriber and available in Publisher.

Any ideas ?

Regards,

Raghu.G


raghu

system may be running low on virtual memory

$
0
0

"The merge process could not allocate memory for an operation; your system may be running low on virtual memory. Restart the Merge Agent."

Hi,

I noticed the same question asked in many discussions, but still i couldn't found a solution in any. I have a replication which has 7 subscribers but only 1 particular subscribers is troubling me. this also worked fine few days back and from 2 days this started to throw this memory low error. I'm on a online system which is connected by several areas and this occurs a very big problem in my system now.

Somebody please help me on this.

Thanks in advanced.

Chama

ANSI_PADDING issues when creating a Merge Publication

$
0
0

HELP!

I am trying to create a merge publication on SQL 2008R2 instance. I have no problems creating any other publications on this instance or creating a merge publication in 2012.

SET ANSI_PADDING ON;
use [DBA_maintenance]
go


exec sp_replicationdboption @dbname = N'DBA_maintenance', @optname = N'merge publish', @value = N'true';
go
select is_published, is_merge_published from sys.databases where name = 'DBA_Maintenance';
SET ANSI_PADDING OFF;
GO

Msg 1934, Level 16, State 1, Procedure AuditObjects, Line 92
INSERT failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

This code was generated in SSMS and therefore should work without me having to bury down and mess with system sps.

Question is HOW can I get it to work?

Force syncing for all publication at once.

$
0
0

Hi All,

[ SQL Server: 2014 Standard Edition ] , [ OS: Windows Server 2012 ]

I have several individual publications setup covering 1 or more tables. They all are transactional replication. I have a need to sync them at once and need to do it via T-SQL.

How can I do it?

Thanks,

Dhimant.

Error Restore DB with TDE and Availability Group

$
0
0
Good morning, yesterday i've tried to restore DB on server 192.168.1.201, this server has Availability Group "AGDATABASE" for synchronized with another server 192.168.1.202. 

But Restore give this error: 
RESTORE cannot operate on database 'EVOTING' because it is configured for database mirroring or has joined an availability group. If you intend to restore the database, use ALTER DATABASE to remove mirroring or to remove the database from its availability group. 

I've used this: 

alter database NAMEDB SET PARTNER OFF 

Error: Database is not configured for database mirroring. 

But, i've found this site https://support.microsoft.com/en-us/kb/2857849 

192.168.1.201 Node1 Primary DB 
192.168.1.202 Node2 Secondary DB 

I've tried this script for remove replica on 202 after used "alter availability group AG failover" 

After: 
alter availability group AG remove replica on 'server-DB1\DBALWAYSON' 

After: 
use master 
go 
create availability group ag for replica on 'server-DB1\DBALWAYSON' with 
(endpoint_url = 'TCP://server-DB1.server.local:5022', availability_mode=asynchronous_commit, failover_mode=manual) 

NOW, on 192*.201 is empty Availability Group AGDATABASE, restore is worked, but cannot synchronize with 192*.202, and i see on 192*.202 replica server-DB1 cannot connect. 

How i can resolve this problem? 
Thanks and greetings 

SQL Server Replication On Different Ports Than Main Agent

$
0
0

This might be a stupid question and I might already know the answer, but thought I would ask it anyway. We have our sql servers on blades and are thinking about setting up replication for reporting purposes from our main OLTP server to an OLAP server. Right now the 2 servers are on separate controllers on the blade.  Thinking about this and the processing of transactional replication we are thinking that this might cause a lot of network I/O slow down. One of our thoughts on a possible solution is to create a separate 2nd nick card on the 2 virtual servers that would serve as the sole traffic area for the replication.

Can you specify which port/ip address replication runs off of vs the regular sql server agent?  Or does it all just run from the SQL Server Agent itself.

Let me know if that was totally confusing.

Thanks in advance for your help.

Replication ActiveX Controls

$
0
0

Hi All,

Using SQL Replication ActiveX controls to synchronize 2008 R2 Express subscribers with a 2008 R2 publisher.

My question is will these ActiveX controls still work with subscribers/publishers running newer versions of SQL Server, such as 2012 or 2016?

Thanks in advance for your assistance!

Best Regards

Brad

MERGE replication with SQL Express

$
0
0

Hi all,

I see from the feature comparison chart that SQL Server Express supports MERGE replication as subscriber only. We're setting up a new app and some systems need to be able to work from the local db so we are currently thinking of SQL Server Standard or Business available via VPN, and Express on the workstations / laptops that might be disconnected occasionally. If I understand correctly a subscriber will receive writes if the publisher is accessible and it does so by sending the writes to the publisher which then is replicated back to the client. 

Is there a feature that will allow the changes to the local and perform the replication tasks when the publisher once again becomes available?

TIA
Mike

Monitoring transac replication

$
0
0

Hi,

I have 2 servers setup in a bi-directional transactional replication. At the moment I monitor these in an external tools by using:

* sp_replmonitorsubscriptionpendingcmds => gives me an aggregate of all the pending commands

* And the following that gives me the detail

 select article, UndelivCmdsInDistDB
from distribution.dbo.MSdistribution_status  X (nolock)
 join distribution.dbo.MSdistribution_agents Y (nolock) on   Y.id=X.Agent_id
 join distribution.dbo.MSarticles Z (nolock) on Z.article_id=X.article_id
 where UndelivCmdsInDistDB>0 and z.publisher_db = DB_NAME()
 order by 2 desc, 1

For one of the server the value pretty much matches. However for the other servers, the 'detailed' view has an order of magnitude higher of a 100 compared to the aggregate. The aggregate is also extremely flat compared to the details view.

What could explain the delta between the detailed view and the aggregate ?

Thanks

Inserting data while ignoring replication range constraints

$
0
0

Hi,

I have a backup of the 'permanent' data required for our application to run. That backup hits ranges from both publisher and subscriber. Instead of having to do an insert for each server, I'd like to do an insert with a no replication check just like the agent does in a sense.

Is that possible ?

I tried disabling all the constraints, do the insert, which worked, but on trying to reactivate the constraints, some failed saying they can't insert even though when I do a diff of the tables on both servers they actually are the same.

Thanks

Transaction Replication subscriber initialization not picking up the SnapShot

$
0
0

Team,

I am looking for help in SQL Replication 2008 R2 SP1. Before I start let me explain the scenario from Server prospective.

1. We have Transaction replication From Main Office (Server A Publisher) to Branch Office (Server B Subscriber) in Production.

2. Infra. team gave me Server A and Server B copy (From VMWare Snapshot) in different VLAN.

3. Server A VMWare Snapshot is bit older (around 30 Minutes) than Server B Snapshot.

Issue: After getting Server A and Server B to the different VLAN. I can connect both of the servers properly and can ping as well but when I am trying to initialize subscriber (Server B) Snapshot agent generating Snapshot properly but Distributor is not delivering to subscriber. I check all the network path and access from subscriber where my snapshot is sitting and it's accessible.

Note: Infra. team gave me the Domain Controller as well in different VLAN so everything is same from Infra. team prospective.Same time if my Server A VMWare snapshot is newer then Server B VMWare snapshot everything is working the we want.

I tried many ways to find out any show stopper at distributor but so far no luck. :( 

Appreciate any help on this.

Thanks,

Mehul

snapshot agent missing

$
0
0
Hi, I dropped transactional replication and trying to recreated it in lower environment. Scripted out publication script before dropping. I got below error.

Msg 14266, Level 16, State 1, Procedure sp_verify_schedule, Line 96
The specified '@freq_type' is invalid (valid values are: 1, 4, 8, 16, 32, 64, 128).

also created the subscription manually. but it did not start the snapshot automatically at end and received below error.Snapshot agent is missing

Could not find the regular snapshot job for the specified publication 'abcd'.
Supply either @job_id or @job_name to identify the job.
Changed database context to 'OLTP'. (Microsoft SQL Server, Error: 20678)

I tried below options but no luck. Please advise

Deleted the replication subscription and publication
ran sp_removedbreplication
disabled publishing for distributer and reconfigured the distributer
enabled the replication database
retried configuring replication but still snapshot agent is missing

Merge Replication Issue

$
0
0

I had added two new tables to our merge replication publication couple of months ago. It created the snapshot, and the agent replicated the snapshot and everything ran fine. However, today we made a change (added two new columns) to one of other replicated table from the same publication (not the tables added in beginning of the description; an altogether different table) and the replication started having deadlock issues on the subscriber. Deadlocking customer transactions.

Our merge replication agent is set to run every minute and on every execution the merge agent would try to initialize those two tables added in the beginning of the narrative and thereby causing deadlocks.

Has anybody seen a situation like this? I am not being able to explain the RCA to myself left alone the business folks.

Any help will be highly appreciated.

Replication

$
0
0

Hi
First time I am going to do replication of Head Office database with the branch offices [SQL SERVER 2008 R2]. A vb.net application will be running in all branches including Head Office. Branches are in remote locations and connected through DYNDNS with firewall protection. database INSERt, UPDATE, DELETE queries will be coming from all locations. Please suggest the best replication method for this criteria.

If its a snapshot replication,it says that "the Publisher sends a snapshot of the published data to Subscribers at scheduled intervals". My question is, If a table, for eg., tblItemMaster, an Item name is updated from a branch, which is a subscriber, will it be reflected in all locations?

Please advise

Thanks in advance


Arun Madhav


Error while setting up Transactional Replication

$
0
0

Hi Team,

I am getting below error while configuring Transactional Replication.
Specifically, when I started configuring the distributor that when I am getting below error. I am getting this in GUI as well TSQL script as well.

SQL Server could not configure 'TEST-PC\SQL2K8' as a Distributor.
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Destination path D:\SQL2K8DATA is not valid. Unable to list directory contents. Specify a valid destination path.
Changed database context to 'master'. (Microsoft SQL Server, Error: 14430)

Background of the error.
========================
I installed 3 sql instances of "SQL Server 2008 Developer edition, SP3 (x64)".
I started configuring a remote distributor using one of the instance and error started popping up.
Initially I had the replication running fine and I removed it and tried to reconfigure distributor thats when the error starting popping up.
The folder physically exists and the service account has full permissions and I have logged in as service account and trying to setup Transactional Replication.
He is local administrator on the box and also sysadmin login at sql server level.
Not sure why this error is popping up.....

After wasting a lot of time. I tried to install 3 new fresh instances with same service pack level i.e. sp3, but still the error remains the same.

Appreciate if anyone can guide me resolving this issue.

Thank you.

CDC capture job fails with error #2601

$
0
0

Hello.

I used CDC feature for a time to collect application data and send it to data warehouse and everything worked well. Then few weeks ago I noticed that my function that retrieves net changes (in my case [cdc].[fn_cdc_get_net_changes_dbo_info_rg_3830]) became to work very slow. I found article (https://support.microsoft.com/en-us/kb/2989478) about poor performance for cdc.fn_cdc_get_net_changes_<capture_instance> in SQL Server 2012 SP2 and since my SQL Server version was 11.0.5343.0 (2012 SP2) I decided to update Microsoft SQL Server 2012 to Service Pack 3 (version 11.0.6020.0).

So, after update I'm unable to use CDC at all. Each time I try to start capture job in Agent it fails and raises a bunch of errors first of those is 2601:

Entry Time 2016-03-10 11:58:44.173, Msg 2601, Level 14, State 1, Cannot insert duplicate key row in object "cdc.dbo_info_rg_3830_CT" with unique index "dbo_info_rg_3830_CT_clustered_idx". The duplicate key value is (0x00e6dd33000043080012, 0x00e6dd33000042d0000d, 1). For more information, query the sys.dm_cdc_errors dynamic management view.

Neither sys.dm_cdc_errors nor sys.dm_cdc_log_scan_sessions DMV provide any valuable information.

That clustered index on the changes table is defined as follows:

CREATE UNIQUE CLUSTERED INDEX [dbo_info_rg_3830_CT_clustered_idx] ON [cdc].[dbo_info_rg_3830_CT]
(
	[__$start_lsn] ASC,
	[__$seqval] ASC,
	[__$operation] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [com_cdc_fg]
GO

Of course specific values of index columns that cause error every time are different. But I noticed that [__$operation] is always 1. So duplicates are always about deleting rows.

I tried do disable/re-enable CDC on database and table, tried to enable different table in the same database, tried to backup/shrink transaction log and then re-enable CDC and result was always the same. The database I try to enable CDC for doesn't participate in mirroring, replication etc.

What is interesting is that I can enable CDC on different database on the same server instance and it works well, collects data and writes it to the changes tables just as it should. So the problem is relevant with that specific database.

Any ideas?

Replication Stored Procedure Parameter Names

$
0
0

We have set up replication between two SQL Server 2014 databases. Because of some custom logic required for replication, we are using the delivery format of CALL/SCALL/MCALL/XCALL (as appropriate) to call a stored procedure. For this, we let the wizard generate stored procedures for us and add our custom logic in the generated stored procedures, as required.

I see that the generated stored procedure parameters are named @c1, @c2, ..., while primary key (passed to update/delete procedures) is named @pkc1.

When I inserted custom logic, I also changed the parameter names to make these more meaningful (like @Id, @Name etc.). However someone from our team says that it (changing parameter names from default to some other) may break replication as these procedures are called with named parameters. On my machine, the replication appears to be working fine though, even with changed parameter names!

Could someone please clarify if this (changing parameter names) could indeed be an issue (or if it used to be an issue with earlier versions of SQL Server but has been fixed now)?


RS

Viewing all 4054 articles
Browse latest View live




Latest Images