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

Error in configuration sql server replication

0
0

I am configuring replication for a sql server 2005 on win server 2003. I get this error:

TITLE: New Publication Wizard
------------------------------

SQL Server could not configure 'aaa' as a Distributor.

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

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

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

Invalid destination path C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.
Changed database context to 'master'. (Microsoft SQL Server, Error: 14430)

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

I am administrator on that server.

I restart server and do this both in wizard and code. but I get same error.

Please Help.



replication and logshipping on same data source object

0
0

TWO QUESTIONS:

Question1:

I have a database "dbABC" on SERVER1 that is log shipped to REPORTSERVER and is recovered Standby, Read Only.

I also need to replicate a subset of same data "dbABC" to a different SERVER2.

When I add the publication to SERVER1, is appears on REPORTSERVER and flags the logshipped "dbABC" (readonly) as a published database and displays articles and subscriptions on REPORTSERVER. 

Is there a way NOT to push the replication to the Report Server, since it is read only?

Question2:

Also, when changing ownership of "dbABC", will the ownership also log ship to the Read Only copy on REPORTSERVER and syncronize ownership between SERVER1 and REPORTSERVER?


Janine

Growing transaction log file when using full recovery mode and principal-mirror databases

0
0

I have a problem with two MS SQL server 2012 standard versions.

One database is the Principal and one is the Mirror. Recovery mode is set to FULL (required with mirroring). Now the transaction log file on the Principal is at 80GB and still growing. I thought only unfinished transactions are kept in the log and these should amount to few megabytes in my system. In my opinion I shouldn't need the transaction log at all, since my mirroring is set to "confirm mirror write first and then accept principal transaction" or what ever that mode is called.

I have received plenty of advice like "set recovery to simple and delete the log", but I would like a solution that would actually work in a production environment.

I would like to know what tests to execute (like test that the principal can actually connect to the mirror) and then depending on test results what is the correct procedure to reduce the transaction log size.

Create Alerting System in Transcational replication

0
0

Hi,

Server A -->publisher and Distributor

Server B -->Subscriber

TX Replication,Pull Subscription.

Q:) we have configured replication and we are monitoring the replication using the following command

exec [distribution].sys.sp_replmonitorhelpsubscription @publisher = @@ServerName, @publication_type=0
GO

from this query we checking the status column for monitoring the replication.

at some time some subscription are missing where the data in publication and subscription are mismatch.

so,we execute the above query it looks fine that it cant displaying the subscription. In Replication monitor when we check particular publisher there is no subscription for that particular publisher. but in subscriber the subscription is present. so what we do that is delete the subscription and recreate the subscription and make the re-initilize the subscription.

what we want is --> why the subscription is missing how can we find out it reasons ?

how to create a alert for this type of monitoring when subscription is missing(we check the column never expire subscriptionies)?

Scenario of initializing subscription from backup file

0
0

Here is the scenario of initializing subscription from backup file.

1. I have database backfile from server 1.(This is no where in part of replication)

2. I need to restore that in to server 2 & server 3.

3. Server 2 will be acting as publisher & server 3 will be the subscriber.

4. So, I have restored server1 backup into server 2 & server 3. 

5. Created the publisher on server2 (By disabling all the ceanup jobs)

6. Now server2 & server3 are having same database that is restored from server 1(No transactions are happening on any of the databases currently)

7. Now when I create subscription with "initilizing database backup" from server1 backup file (which is same in both the servers currently), I am getting following error:

"The transactions required for synchronizing the nosync subscription created from the specified backup are unavailable at the Distributor. Retry the operation again with a more up-to-date log, differential, or full database backup."

PS: But when I take backup from server2 (publisher database - which of no changed), and then restore to server3(subscriber database), and initialize with differential backup, all works fine.

But I am not understanding, what is the reason behind, why the initilize is not working from the backup of server1, as there is no transactions are currently happening any of the databases.

Any ideas, kindly put through..?


Raj


Error: "The specified LSN {000...000} for repldone log scan occurs before the current start of replication in the log"

0
0

All,

We have a replication solution set up for one of our OLTP databases and we use the initialize from backup option to initialize the subscription.  We performed an upgrade of our OLTP software over the weekend and the admin who did it is not noticing this error in Replication Monitor:

  • The process could not execute 'sp_repldone/sp_replcounters' on ...
  • The specified LSN {00000000:00000000:0000} for repldone log scan occurs before the current start of replication in the log {00029ddb:00001bb3:010a}.
  • The process coult not set the last distributed transaction.

What is interesting is the LSN number for the log scan:  {00000000:00000000:0000}.  This would be the very beginning of the log file.  Is anyone familiar with the 'initalize from backup' option and this error (i.e., where it points to the beginning of the log)?

Also, we want to ensure the data in our subscriber is properly synched with what's in the publisher.  Is there a way to do this without having to go through the whole process of recreating the sucscription (which takes several hours)?

Also,

When I run sp_replshowcmds on the publisher I get the following:

xact_seqno originator_srvname originator_db article_id type partial_command hashkey originator_publication_id originator_db_version originator_lsn command command_id
0x00029DDB00001FE60004   0 0 0 0 NULL NULL NULL  1

And when I run DBCC OPENTRAN on the publisher this is what it tells me about replication:

Replicated Transaction Information:

        Oldest distributed LSN     : (171483:7091:266)

        Oldest non-distributed LSN : (171483:8166:1)

Any help is greatly appreciated!


Unable replicate articles in pull subscription?

0
0

Hi All,

Unable replicate articles in pull subscription, getting Warning: "uninitialized subscription" in replication monitor. I'm using the same credentials for both push and pull subscription but push subscription is working fine where pull subscription is not.

Please share your views on this. Thank You

Regards,

Kalyan


----Learners Curiosity Never Ends----

Index rebuild on subscriber database (TX replication) while replication is still running

0
0
Hello,

I am using transaction replication in my SQLServer 2008 r2 SE environment. I noticed there is index defrag required on the subscriber database. I am using the subscriber db for reports purpose. Now while the replication is still running can I run index rebuild in subscriber database?

Thanks for your inputs



Initialise Subscription from Backup for Pull subscription

0
0

Hi

I am doing something similar to what was posted here:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ac87e391-cff3-40c0-9ceb-4b8f73649e44/replication-why-cant-a-pull-subscription-be-initialized-from-backup-whereas-a-push-subscription?prof=required

However my question is that when I run the initial ssp_addsubscription a subscription is created on the publisher i.e. not a pull subscription.  Then when I run the scripts to create a pull subscription using sp_addpullsubscription and sp_addpullsubscription_agent another subscription with the same name is created on the subscriber.

This second (pull) subscription does not appear under the publication. I have been unable to get this working as I am unclear on which subscription is being used and hence which distribution jobs are used.

Can anyone clarify how this works?

Thanks

SQL Server 2008 R2 Replication - not applying snapshot and not updating all repliacted columns

0
0

We are using transactional replicating on SQL Server 2008 R2 (SP1) using a remote distributor. We are replicating from BaanLN, which is an ERP application to up to 5 subscribers, all using push publications. Tables can range from a couple million rows to 12 million rows and 100's of GBs in size. And it's due to the size of the tables that it was designed with a one publisher to one table architecture.  Until recently it has been working very smooth (last four years)) but we have come across two issues I have never encountered.

While this has happen a half dozen times before, it last occurred a couple weeks ago when I was adding three new publications, again a one table per publication architecture.

We use standard SS repl proc calls to create the publications, which have been successful for years. On this occasion replication created the three publications, assigned the subscribers and even generated the new snapshot for all three new publications. However,  while it appeared that replication had created all the publications correctly from end to end, it actually only applied one of the three snapshot and created the new table on both of the new subscribers (two on each of the publications).  It only applied the snapshot to one of the two subscribers for the second publications, and did not apply to any on the third.  I let it run for three hours to see if it was a back log issue. Replication was showing commands coming across when looking at the sync verification at the publisher and it would even successfully pass a tracer token through each of the three new publications, despite there not being tables on either subscriber on one of the publishers and missing on one of the subscribers on another.  I ended up attempting to reinitialize roughly a dozen times, spanning a day, and one of the two remaining publications was correctly reinitialized and the snapshot applied, but the second of the two (failed) again had the same mysterious result, and again looked like it was successful based on all the monitoring.  So I kept reinitializing the last and after multiple attempts spanning a day, it too finally was built correctly.  

Now the story only get a little stranger.  We just found out yesterday that on Friday the 17th at 7:45, the approximate time started the aforementioned deployment of the three new publications, we also had three transaction from a stable and vetted publication send over all changes except for a single status column. This publication has 12 million rows and is very active, with thousands of changes daily. , The three rows did not replicate a status change from a 5 to a 6. We verified that the status was in fact 6 on the publisher, and 5 on both subscribers, yet no messages or errors.  All the other rows successfully updated.  We fixed it by updating the publication from 6 back to 5 then back to 6 again on those specific rows and it worked.

The CPU is low and overall latency is minimal on the distributor.  From all accounts the replication is stable and smooth, but very busy. The issues above have only recently started.  I am not sure where to look for a problem, and to that end, a solution.

 

 

Not able to connect to Remote Distributor from Publisher using Administrative Link Password

0
0

I am not able to connect to Remote Distributor from Publisher using Administrative Link Password. I have configured the Distributor on 1 m/c and Publisher on another m/c. When i use the wizard to configure the publisher using remote distributor. I have also specified the same Admin Password link (distributor_admin) in the distributor m/c.

 

I am getting the following message:

 

 

TITLE: New Publication Wizard
------------------------------

SQL Server could not connect to the Distributor using the specified password.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=CantConnectAdminPassword&LinkId=20476

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

Connection to server [SANMENON] failed.
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" 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)

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

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

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

Stopping and starting the log reader agent

0
0
Does stopping and restarting the log reader agent cause it to start scanning from the beginning of the transaction log again? Or does it pick up where it left off?

John M. Couch

Subscription is pulling data from old snapshot.

0
0

Hi,

  I had published a database and there are many subscriber to it. All these days it was working fine. Recently I created subscriber, the subscription is downloading data from old snapshot instead of new one. I deleted old snapshot, created new one and the subscribed again. But again the subscription pointing to old snapshot though the snapshot folder does not exists.

  Not sure where I am going wrong. Can anyone help me how can I point to latest snapshot.

Thanks in advance,

Pavan


Pavan

Sql server 2012 to 2008 Replication with backup initialization is possible

0
0

Hi,

I have the sql server 2012 as a publisher and I want to create a subscription on my sql server 2008 server withbackup initialization. Is there any way to do this? As I am aware restoring 2012 backup to 2008 (highier to lower version) is not possible.

Please share your ideas..Thanks


Raj

Transactional replication cross-country - where should distributor go?

0
0

Hi All,

SQL Server 2005 standard edition using transactional replication from Montreal to Vancouver.

Our current distributor is region-based, so it is within our data centre in Toronto. So basically it goes MTL--> TO -> VAN.

However, i'm thinking that the extra step to TO is unnecessary because its in another physical location and the extra hope/latency from MTL-->TO before going to VAN adds overhead..

I know that a separate distributor is best practice but in this case, 3 physical locations, each with ~50ms latency between each one, is it better to have the publisher and distributor on the same server (in MTL) and then just go directly to the subscriber (VAN)? We don't have enough resource within MTL to build a separate distributor there so it would go on the same server as publisher.

DB size is 135 MB, all tables synchronizing.

Thanks in advance for any input.


SQL 2012 - Merge Replication's sp_mapdown_bitmap breaks SSIS updates

0
0

Since we have enabled Merge replication on our tables, some of our SSIS packages have broken.

The issue is always the same, update statements sent to certain tables through an OLE DB Command are broken.

The error message is

"The metadata could not be determined because statement ‘exec @retcode = sys.xp_mapdown_bitmap @mapdownbm, @bm output’ in procedure ‘sp_mapdown_bitmap’ invokes an extended stored procedure.

Unable to retrieve destination column descriptions from the parameters of the SQL Command."

Some Googeling brought us to this link, though it is for SQL 2005 and we are using SQL 2012: 

"http://social.technet.microsoft.com/Forums/sqlserver/en-US/67519e6a-d4cf-49ba-93dd-b0eb5229fb92/replication-trigger-problem-sql-2005-assistance-please?forum=sqlreplication"

And indeed, since then we have found out that the issue only occurs on tables whose Merge Replication trigger contain a call to sp_mapdown_bitmap. Different from the article above, we only have the issue in SSIS. The same update statement executed from SSMS works without a problem. We even tried makeing a SP that performs the update, and then calling that SP from SSIS, but no luck. The SP runs perfectly from SSMS but won't validate on SSIS.

Offcourse, recreating the tables in question would solve the problem for now, but we need a more permanent solution. Columns will be added and removed in the futur, and recreating a table each time that happends isn't realistic.

Unexpected failure releasing an application lock. Ensure that the account under which the Merge Agent runs is a member of the publication access list. If there is a lot of activity on the server, run the Merge Agent when there are more server resources av

0
0

Hi,
We have a SQL Server 2008 Merge Publication (Merge Pull Replication)
All subscribers are running SQL Server Express 2008.
The replication has been working fine for 2 years with 40 subscribers; suddenly 1 subscriber is being unable to sync.

The error is always the same: “Unexpected failure releasing an application lock. Ensure that the account under which the Merge Agent runs is a member of the publication access list. If there is a lot of activity on the server, run the Merge Agent when there are more server resources available”

Here is the log with -OutputVerboseLevel 1:

2014-01-30 08:44:31.279 Connecting to Subscriber 'ARosario-01\SQLEXPRESS'

2014-01-30 08:44:32.844 Connecting to Distributor 'SRVR-IPOINT'

2014-01-30 08:44:34.024 Initializing

2014-01-30 08:44:34.069 Connecting to Publisher 'SRVR-IPOINT'

2014-01-30 08:44:56.249 Thread id 2184 is attempting to re-establish the connection to Publisher 'SRVR-IPOINT'.

2014-01-30 08:44:56.439 Thread id 2184 successfully re-established connection to Publisher 'SRVR-IPOINT'.

2014-01-30 08:44:56.489 The merge process could not acquire application locks successfully

2014-01-30 08:44:56.604 Category:NULL

Source:  Merge Replication Provider

Number:  -2147199472

Message: The merge process could not acquire application locks successfully

2014-01-30 08:44:56.659 Category:SQLSERVER

Source:  SRVR-IPOINT

Number:  21415

Message: Unexpected failure releasing an application lock. Ensure that the account under which the Merge Agent runs is a member of the publication access list. If there is a lot of activity on the server, run the Merge Agent when there are more server resources available.

What I find very strange is that always it’s throwing:  
Thread id xxx successfully re-established connection to Publisher 'SRVR-IPOINT'.

Using -OutputVerboseLevel 4 and tracing the process, I found that the entire problem is in sp_MSacquireSlotLock:

{call sp_MSacquireSlotLock (N'ReplicationMergeAgent047a5d7a17b44af98f8bb9c9773eddd7',?, ?, ?) }

The procees acquires the lock fine in line 101:

exec @retcode=sys.sp_getapplock @Resource=@slot_name,@LockMode=N'Exclusive', @LockOwner='Session',@LockTimeout=0,@DbPrincipal=@DbPrincipal

but later on line 115, fails releasing the lock.

 exec @retcode=sys.sp_releaseapplock @process_name,@LockOwner=N'Session',@DbPrincipal=@DbPrincipal


First of all, what it’s very strange is that inside the code, the lock is requested for @Resource=@slot_name but it’s released for @process_name.

Nevertheless, it’s working fine for all the rest of subscribers.

The only thing that I’m thinking is that maybe the loose of connection is releasing the lock before the release command execute:

439 Thread id 2184 successfully re-established connection to Publisher 'SRVR-IPOINT'.

Troubleshooting, I created new subscriptions with new databases in the same subscriber but I get the same error. Also, using another “HOST_NAME” to sync.

Please, I will appreciate all your help as we have a subscriber with 3 days of information that we can’t upload to the server.

Best Regards,

Daniel.


Error during exec sp_addsynctrigger with reinitializing subscription.

0
0
--------------Version:--------------
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 

Transactional Replication with Updateable Subscribers

--------------Actions:--------------
Tried Add filter_clause to article. When do the Reinitialize Subscription rise error:
"Invalid column name 'InSecur eZone'" (in name insertes the space).

The filter is:
select s.[id] from [dbo].[reports] s join [dbo].[ReportDateRanges] dr on dr.[ReportId] = s.[id] join [dbo].[organizations] o on s.[organization_id] = o.[ID] join [dbo].[ReportStates] rs on dr.[Id] = rs.[ReportForm_Id] where o.[InSecureZone] != 1 
union 
select s.[id] from [dbo].[reports] s join [dbo].[AnnualReportSet] ars on ars.[ReportId] = s.[id] 
join [dbo].[organizations] o on s.[organization_id] = o.[ID] join [dbo].[AnnualReportStates] rs on ars.[id] = rs.[AnnualReport_Id] where o.[InSecureZone] != 1

Tried to text the filter in one row, rise error:
"Invalid syntax near 'un'"

There is no way to resql syntax query, couse in some tables no FK, and needed to write many joins for each filter of articles.

The article didnt help:
http://support.microsoft.com/kb/935563/en-us
--------------Error discription:--------------
Incorrect syntax near "un"

if (@@microsoftversion >= 0x080002C0) begin exec sp_addsynctriggers N'Reports', N'dbo', N'SGUK-SERV-2', N'GSNMRW', N'ReplicaReports', N'sp_MSsync_ins_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MSsync_upd_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MSsync_del_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MScft_ReplicaReportsToCZ_Reports', N'dbo', 'null', 'null', N'id in (select s.[id] from [dbo].[reports] s join [dbo].[ReportDateRanges] dr on dr.[ReportId] = s.[id] join [dbo].[organizations] o on s.[organ
(Transaction sequence number: 0x00002FC20000018F005000000000, Command ID: 27)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=21805&LinkId=20476

--------------Question--------------
What do I wrong?
Is this a bag?

UPDATETEXT is not allowed error when trying to create stored procedure.

0
0

One of our client's Train databases is getting the following error when we try to create a stored procedure that uses the UPDATETEXT statement:

"UPDATETEXT is not allowed because the column is being processed by a concurrent snapshot or is being replicated to a non-SQL Server Subscriber or Published in a publication allowing Data Transformation Services (DTS) or tracked by Change Data Capture."

I have checked and confirm this database is not a subscriber, is not part of any kind of replication topology, nor does it have CDC enabled on it or the table in question.  I have also run sp_removedbreplication to drop any subscription information for the database but I still get this error when trying to create the proc.

Is anyone else familiar with this error and know how to resolve it? 

Error distribution agent -output parameter value.

0
0

--------------Version:--------------
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 

--------------Actions:--------------
Tried to input a text value "C:\Dist_Agent_log.txt"(without qoutes) in filed in front of "-output" parameter.

--------------Path:--------------
MS SSMS->Replication->Distributor properties->General->Profiles Defaults->Distribution Agents->New->Default agent profile(default for new agents)->
->uncheck "Show only parameters used in this profile"->"-Output" parameter->"Value" field

As shown in arcticle about agents parameters: http://go.microsoft.com/fwlink/?LinkId=79491, the "-output" parameter must be the text value.

--------------Error discription:--------------

TITLE: Microsoft SQL Server Workbench
------------------------------

Microsoft SQL Server Workbench could not create the new agent profile.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.ReplicationDialogErrorSR&EvtID=CantCreateNewAgentProfile&LinkId=20476

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

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

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

The agent profile creation process cannot validate the specified agent parameter value. 'C:\Dist_Agent_log.txt' is not a valid value for the '-Output' parameter. The value must be an integer. Verify that replication is installed properly and that sp_add_agent_parameter is invoked with a valid value.
Changed database context to 'master'. (Microsoft SQL Server, Error: 21805)

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

--------------Question--------------
Is this a bag?


Viewing all 4054 articles
Browse latest View live




Latest Images