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

Create snapshot database error on remote server

$
0
0

Environment:

OS: Windows 2008 R2
SQL Server : 2008 R2 EE
Shared NAS storage: NTFS (\\RemoteServerName\SharedFolderName)
Permisisons on Shared folder: Full control
Source DB model: Full recovery.

Snapshot DB Script:

CREATE DATABASE TestDB_Snapshot1 ON ( NAME = TestDB_data, FILENAME ='\\RemoteServerName\SharedFolderName\TestDB_Snapshot1.ss')
AS SNAPSHOT OF TestDB
GO

Error:
Msg 1823, Level 16, State 2, Line 1
A database snapshot cannot be created because it failed to start.
Msg 5119, Level 16, State 2, Line 1
Cannot make the file "\\RemoteServerName\SharedFilderName\TestDB_Snapshot1.ss" a sparse file.
Make sure the file system supports sparse files.


Questions

  1. Can't create snapshot database on remote server location if NTFS filesystem? Seen in below MS KL limitations, FAT32 not support snapshot databases. But our storage is NTFS filesystem(NAS storage).http://msdn.microsoft.com/en-us/library/ms175158.aspx#Prerequisites
  2. Any suggestion to create snapshot on NAS storage area wihtout any sparse files errors?
    Note: Able to create snapshot database if it is local disk on the server and
    not able to create if it remote server shared location

Thanks in advance.



what are prerequisites needs to follow to run rebuild index on publisher tables in Transactional Replication

$
0
0

What are prerequisites needs to follow to run rebuild index on publisher tables in Transactional Replication.

Total replicated tables size are around 1 TB. Last time when we ran rebuild index activity on 3 publisher tables whose sizes are around 200 GB, it took 3 hours to execute. But after that logreader agent job getting failed and ldf size reached 500 GB.

So please tell me any option or setting to avoid such issues in future.

Version: SQL Server 2008 R2 SP2

pull replication error

$
0
0

hi,

one of my coworker setup a bunch of pull transactional replication.  The snaps for this publication is compressed and is stored on the publisher+distributor.  There are 30GBs of disk space atm. all the publication are working fine except for one.  I keep getting the following error

Replication-Replication Distribution Subsystem: agent ABCDE39-pubname-subscribername-104 failed. The process encountered operating system error '՝'.

When i look at the replication, I see:

Command attempted:

if @@trancount > 0 rollback tran (Transaction sequence number: 0x0001A1AD000337A201D700000000, Command ID: 3275)

Error messages:

  • The process encountered operating system error 'ؓ'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20034) Get help: http://help/MSSQL_REPL20034
  • There is not enough disk space on the disk.  (Source: MSSQL_REPL, Error number: MSSQL_REPL112) Get help:http://help/MSSQL_REPL112
  • The process encountered operating system error 'ؓ'. (Source: MSSQL_REPL, Error number: MSSQL_REPL1779) Get help: http://help/MSSQL_REPL1779

at first I thought that the compressed cab file would be stored in the temp directory on the subscriber and that doesn't have a lot of space so I changed the system environment variable from c:\windows\temp to v:\temp.  This shut it up for a while but then the message started to show up again.

I have been monitoring the drive where repldata is stored but i don't see it reducing in size.  Does replication not even bother with using the disk space if the size isn't big enough, like the restore function?

if this has to do with the amount of free space where repldata reside, if I change its location, do i need to stop replication first or will it pick up that info automatically?

any help would be greatly appreciated.

thx

FInd number of transactions replicating every day

$
0
0

Hello All,

Can someone tell me how to find how many transactions are getting replicated (insert/update/delete) for each database on Transactional replication SQL 2008?

Thanks,

How to drop article and add article with new snapshot

$
0
0

Hello All,

I need to change property on one of the article at publisher's database. It won't let me do ti as the table is part of replication. How do I drop the article, change the property on source database and then re-add the article without reinitializing the data?

 I will have to take action on teo publishers as ServerA replicates to SerberB and ServerB to ServerC. And this article is part of this replication.

Can someone please help me?

I looked i the forums and found that these are the steps but need to confirm

1. sp_dropsubscription
2. sp_droparticle ( @force_invalidate_snapshot = 1   - what's this parameter for?)

3. Change the table property and add the article bac.

4. sp_addarticle 

Thanks much

generate sp_dropsubscription statements to drop many but not all

$
0
0

Hello,

I have been asked to update 60 articles (tables) that are in replication so I want to generate a script that automatically gets the articles and plugs them into an sp_dropsubscription statement so that I can run all 60 rather than unchecking the 60 boxes in SSMS.  I would like to add them back in via a script as well.

Here's a rough version of what I have been trying to do:

select "sp_dropsubscription ''my publication nameHardCoded'', ''" || article ||"'', ''myPublisherHardcoded'', ''myPubDBhardcoded''"

from MSpublications pub
inner join MSsubscriptions sub
	on pub.publication_id = sub.publication_id
inner join MSarticles art
	on sub.article_id = art.article_id
where article like 'Specimen_%'
and subscriber_db like 'mySubscriberDBhardcoded'


Is this a decent approach or is there a better (safer) way?  If this ok, do you know why I am getting a syntax error objecting to the concatenation bars.  Says:

.Net SqlClient Data Provider: Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '|'.  

Thanks!

Possible to Configure Pull Subscription On SQL Server Express 2012?

$
0
0

Hi all,

     I was searching for a article which demonstrates how to configure a Pull Subscription in Merge Replication Topology on SQL Server Express 2012 edition machine as Express does not have any Agents to run the subscription jobs. In Earlier versions there is Windows http://msdn.microsoft.com/en-us/library/ms151193(v=sql.105).aspx

Synchronization Manager. But for SQL Server Express 2012 No such link is available as for SQL Server Express 2008/2005 as below

   Can any one tell me where can I find same for SQL Server Express 2012 or there is some other alternative for Pull Subscription ?

Help will be appreciated

Nilkanth

Does MS SQL Server Express Edition supports MSDTC service

$
0
0

We are using SQL express Edition,after creating a linked server we are facing a problem in executing a query.

Query Im running:

BEGIN DISTRIBUTED TRANSACTION

select * from [xxx.xx.xxx.xxx].STEMI.dbo.Mast_patientInfo

Commit Transaction

Error:

Server: Msg 7391, Level 16, State 1, Line 1

The operation could not be performed because OLE DB provider "%ls" for linked server "%ls" was unable to begin a distributed transaction.

Please help me.


sadankumar


transactional replication data conversion error

$
0
0

i have replication between two databases ,the replication is not for all tables, i just replicate some columns on some tables i have a problem with one of tables that when i try to sync the DB's i got this error

Agent message code 20037. The process could not bulk copy into table '"dbo"."L_MAILITMS"'.
2013-05-22 15:35:11.089 Category:NULL
Source:  Microsoft SQL Native Client
Number:  
Message: Data conversion failed
2013-05-22 15:35:11.089 Category:NULL
Source:  
Number:  20253
Message: 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.
2013-05-22 15:35:11.104 Category:NULL
Source:  
Number:  20253

the columns are the same in both tables and the bcp command could nt copy the data also

but the error log file is empty

i wish u help me with this error

best regards

Identity Column Management in Replication

$
0
0

I m trying to add one of the tables to existing publication. The table has identity column. I ran the below scripts, but inserts are failing on "cannot insert a value into identity column without specifying set identity insert on" errors. Can someone help me what I m doing wrong here? Its one way transactional replication, no updates at the subsrciber. Version : SQL Server 2008 R2

 Thanks

EXEC sp_addarticle @publication = N'Master_Publication',

             @article = N'TableA',
    @source_owner = N'dbo', @source_object = N'TableA',
    @type = N'logbased', @description = N'', @creation_script = N'',
    @pre_creation_cmd = N'truncate', @schema_option = 0x0000000000030051,
    @identityrangemanagementoption = N'manual',
    @destination_table = N'TableA', @destination_owner = N'dbo',
    @status = 16, @vertical_partition = N'false',
    @ins_cmd = N'SQL', 
    @del_cmd = N'SQL',
    @upd_cmd = N'SQL'
go

exec sp_addsubscription  @publication = 'Master_Publication',
     @article =  'TableA',
     @subscriber = 'SQLServer21',
     @destination_db = 'MasterDB',
     @sync_type =  'automatic',
    @subscription_type = N'Push',
     @update_mode = N'read only',
    @frequency_type = 64, 
    @frequency_interval = 1,
    @frequency_relative_interval = 1, 
    @frequency_recurrence_factor = 0,
    @frequency_subday = 4, 
    @frequency_subday_interval = 5,
    @active_start_time_of_day = 0, 
    @active_end_time_of_day = 235959,
    @active_start_date = 0, 
    @active_end_date = 0, @offloadagent = 0,
    @dts_package_location = N'Distributor'

Sql server Data Base Synchronization Scenario

$
0
0

I want to achieve below illustrated scenario via sql server replication.

Client A and Client B are client databases containing same article Table A. This article needs to be published by Client A and Client B whose changes need to be merged at the server.

Server is the destination database where article Table A should contain the changes made by both Client A and Client B. The trio consisting of Server, Client A and Client B are running Sql Server 2008 R2.

This is what I've tried in vain. Made Client A and Client B publishers and initially subscribed Server to Client A (went well). Next I tried subscribing Server to Client B (went haywire, found this msdn where I figured out the reason behind the failure )

Is this even possible? If yes, any ideas how?

How to configure sql server replication to cancel when MSSQL_REPL-2147199368 detected;

$
0
0

Hi;

When an error MSSQL_REPL-2147199368 (The merge process could not connect to the Publisher 'sfraprmok871:MOBILITE_PRODUCTION'. Check to ensure that the server is running.) appear, it's not stop action, he try to get an instance withcall sp_MSensure_single_instance, and at the end he decalre to that ther'isAnother merge agent for the subscription or subscriptions is running, or the server is working on a previous request by the same agent.

How to configure configure replication to stop when ther'is error as  MSSQL_REPL-2147199368?

Or how to resolve my problem?

Thank you;

Best regards;

Microsoft.SqlServer.Replication.ComErrorException; cannot change properties to "Any CPU"

$
0
0

Hello,

As the title states, I am having issues with the MergeSynchronizationAgent class in C#. When I try to create my syncagent using the following call:

syncAgent = subscription.SynchronizationAgent;

whereI receive an error that states Microsoft.SqlServer.Replication.ComErrorException, "Class not registered". Now, I've read solutions to this problem and the most common one is to set my platform to "Any CPU". This will fix the check out functionality of the tool but unfortunately there is other functionality in the program that looks up 32-bit databases, and setting the project's Platform to "Any CPU" breaks this look up functionality. This functionality is much more rigid than the checkout functionality so we have to set the project's platform to "x86" and have the checkout functionality work around this. My question is are there any other fixes to this ComErrorException issue where our project platform must be "x86"? I am using Sql Server 2008 R2.

subscription = new MergePullSubscription(); 

Trying to Delete a Publication and Receiving Error

$
0
0

Hello -

I am trying to delete a local publication and receiving the following error:

"Cannot execute as the database principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission."

I am logged into an account with server admin privs....

Any assistance is greatly appreciated!  Thank you

Replication Queue reader stopped due to Comm failure

$
0
0

Hello,

I have replication (subscription with updateable subscribers) (pull) running on sql 2008 subscriber with 5 sql 2000 publishers.  all seem well except the Queue agent stops at loss of network connectivity.  It dosen't appear to restart until I manually restart it.   It will run for hours until it stops or a shorter period.   Usually, early in the morning before any server activity.  

It is not all the Queue readers stopping at the same time, seems random.

I have looked for competing jobs or heavy server activity,   I do not see any.

Per the error logs it is a network loss. (the network is a VPN  and is know to have short down times.) (mostly seconds.  not hours) (this is the reason I am doing queued transactions)

Is there a way to have the queue agent restart itself if down or to keep trying to start until the problem clears.   if so what affect will it have on the publishers overhead.

Is there something else I am missing as I am fairly new to replication.

The other agents seem to just jug along doing their jobs and the trans actions are followed through.

Thanks for any help

Barry


CDC issue cannot modify column name even is not being tracked

$
0
0

I am having this error in my test database, which is a restore from the main that has cdc enable for that table :

TITLE: Microsoft SQL Server Management Studio
------------------------------

Unable to rename RefRangfe. (ObjectExplorer)

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

Rename failed for Column 'RefRange'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2500.0+((KJ_PCU_Main).110617-0038+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Rename+Column&LinkId=20476

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

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

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

Cannot alter column 'RefRange' because it is 'REPLICATED'.
A severe error occurred on the current command.  The results, if any, should be discarded.
Caution: Changing any part of an object name could break scripts and stored procedures. (Microsoft SQL Server, Error: 4928)

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

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

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

The database where  I am trying to modify the columna is not being tracked ...

SQL 2005: moving databases on replication subscriber

$
0
0

Hi. I need to move databases on the subscriber to another drive.

Do I need to remove subscriptions, then detach databases, copy files, attach databases and then setup subscriptions again? Or I can leave subscriptions intact? Thank you.


Lana Feldman


Trans Repl between SQL-2012 / SQL-2008 / SQL-2000

$
0
0

Upcoming large projects place us in world where my currently replicated databases (in SQL-2000) will be split between SQL-2012 and SQL-2000 instance installations for a few months.  Using below as my reference, I decided to use interum SQL instance (SQL-2008) to be my distributor, and peform publisher/subscriber work between the SQL-2012 and SQL-2000 instances. 

Is my understanding of the below information correct in assuming that SQL-2008 can handle job as Repl "engine" between SQL-2012 and SQL-2000 instances? 

Has anyone solved the Repl between SQL-2012 and SQL-2000 instances any other way?

======================================================.

"A Subscriber to a transactional publication can be any version within two versions of the Publisher version. “

http://msdn.microsoft.com/en-us/library/ms143699(v=sql.105).aspx (doco for SQL 2008r2)

“For example: …

a SQL Server 2000 Publisher running can have SQL Server 2008 Subscribers; and

a SQL Server 2008 Publisher can have SQL Server 2000 Subscribers.”

======================================================.

http://msdn.microsoft.com/en-us/library/ms143699(v=sql.110).aspx (doco for SQL 2012)

“For example: …

a SQL Server 2005 Publisher can have Subscribers running SQL Server 2005, SQL Server 2008 (including SQL Server 2008 R2), or SQL Server 2012;

a SQL Server 2012 Publisher can have Subscribers running SQL Server 2005, SQL Server 2008 (including SQL Server 2008 R2), or SQL Server 2012."

======================================================.



Push subscription across a one way trust to a different domain

$
0
0

Hey all,

I have a sql 2008 R2 instance that I'm attempting to setup replication of several tables to a SQL 2012 server in a different domain .  I need to use a push subscription because the domains are connected using a one way trust.  I've configured the publishing and distribution properties on my 2008 instance and also created a local publication.  I next tried to create a local subscription (push) to the outside machine.  When I open the subscribers dialogue I see my current server.  If I click add a subscriber and input the fully qualified server name and credentials I get the error message

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'WAREHOUSE'. (Replication.Utilities)

Not sure what the problem is.  It seems I can't get the new subscriber dialogue to see the outside machine.  I'm able to add the server as a linked server and access the data but it seems to fail as the endpoint of a push subscription.

This is my first foray into replication across domains so any help would be greatly appreciated.

Thanks in advance.

Replication to Oracle using custom stored procedures failing

$
0
0

I'm having trouble using custom stored procedures to ins/upd/del to an Oracle subscriber using SQL Server 2008 R2 SP2 with transactional replication.

My custom 'create procedures' are located at the end of the creation script. However, it appears that during the Distributor to Subscriber process, it may be attempting to create the procedures also, even though the stored procedures already exist on the Oracle database. This results in an error ORA-00900 'invalid SQL statement' while attempting to do:

if object_id(N'[dbo].[sp_ins_a_test_msrepl_ccs]', 'P') > 0
    drop proc [dbo].[sp_ins_a_test_msrepl_ccs]

I know this code is not from my creation script because I have removed '[dbo].' entirely from my script.

I must use custom stored procedures because some of the column names in the SQL Server table are longer than 30 characters and I needed to change them in the create table statement. Without the custom stored procedures, we will be unable to replicate updates for columns for which the name has changed.

Here is my sp_addarticle:

exec sp_addarticle
@publication = N'test5',
@article = N'a_test',
@source_owner = N'dbo',
@source_object = N'a_test',
@type = N'logbased',
@description = N'',
@creation_script = N'c:\test\a_test.sql',
@pre_creation_cmd = N'drop',
@schema_option = 0x00,
@identityrangemanagementoption = N'none',
@destination_table = N'a_test',
@status = 0,
@vertical_partition = N'false',
@ins_cmd = N'CALL sp_ins_a_test',
@del_cmd = N'CALL sp_del_a_test',
@upd_cmd = N'CALL sp_upd_a_test'

If you can help, thank you!

Viewing all 4054 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>