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

alter column size of table configured in transactional replication

0
0

dear Team,

please help me when I want to increase/decrease column size of table that table in configured in transaction replication,i am getting below error message.

Msg 5074, Level 16, State 1, Line 1
The index ' indexname' is dependent on column 'columnname'.
Msg 5074, Level 16, State 1, Line 1
The index 'indexname' is dependent on column ''columnname''.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE ALTER COLUMN ChequeNo failed because one or more objects access this column.


mastanvali shaik


How to see conflicts list reduced with sql statements on subscriber

0
0

Hello,

I'm querying the table dbo.MSmerge_conflicts_info on the publisher and the conflicts shown in that query are the real ones I can see on the View conflicts dialog within Microsoft Sql Server Management Studio. In the subscriber, I also see the conflicts in that table.

The problem is the following: If I resolve one conflict with the View Conflicts dialog, this table is updated on the publisher and the number of entries for this conflict table dbo.MSmerge_conflicts_info is reduced. However, after the sinchronization between the publisher and the subscriber, the query in the subscriber is still returnning the old conflict and new ones are added (never is updated deleting the solved ones), this table is not refreshed and I cannot see the real pending conflicts on the subscriber as I can see on the same table in the publisher.

Is there any way to obtain the real pending conflicts on the subscriber that were not solved in the publisher?

Thanks in advance!

Shrink Log file in log shipping and change the database state from Standby to No recovery mode

0
0

Hello all,

I have configured sql server 2008 R2 log shipping for some databases and I have two issues:

  • can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No Truncate" option, but as I know this option will not affect the log file and it will shrink the data file only.

      I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge and it will take time to restore in the DR site, so the reconfiguration is not an option :( 

  • how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need to do this to change the mdf and ldf file location for the secondary databases.

can any one help?

Thanks in advance,

Faris ALMasri

Database Administrator

How to automatically replicate "All Existing"" tables of the database on an existing replication?

0
0

I have database in SQL Server 2008 r2 (e.g. Publisher). I replicate its tables and data to another database  (e.g. Subscriber).

Then I added a table (e.g. AddedTable), and dropped another table (e.g. DroppedTable) at the publisher.

Is there an option in replication that I can reload "all the existing" tables to the subscriber (and visa verse) automatically?To

be clearer, I do not want to let a job know what table has been added or dropped. What I want is, as soon as the database changed, the replication procedure re-load the all the article items in the publication (e.g. blindly) and does the replication again.

Regards

Amin



Attempting to "partition" my table via replication doesn't work as expected.

0
0

Greetings. We have some rather large tables in a 1.5 TB database. Due to the sizes, we typically initialize the Subscriptions via backup. 

However, I got to wonder what my other options for this might be, so I came up with a theory for replicating "table_1", and tested it out. Unfortunately so far it's an epic failure. 

Here's what I did:

  1. Created table_1, with an INT for a Primary Key.
  2. Create Publication1. This filters Table_1 on records <= 5. In Article Properties, I specify the Destination Object Name as Table_1LessThan6.
  3. Create Publication2. This filters Table_1 on records >= 6. In Article Properties, I specify the Destination Object Name as Table_1EqualGreaterThan6.

The logic being that on the Subscriber I have a View named Table_1 that unions the two tables together. I could then possibly Snapshot large tables fairly easily, and life would be great. 

Upon Snapshot of each Subscription, all data is in the correct table. However, I then add a value of 3 and a value of 9, and both new records wind up in Table_1LessThan6. 

No errors, the data is just winding up in the wrong table.

Thoughts?


TIA, ChrisRDBA

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

adding article replication

0
0

Hi TechNet friends,

I'm in the midst setup replication (transactional - pull type) between 2 sql servers.

sql1 = as publisher

sql2 = as distributor & subscriber as well.

I have done setup distributor at sql2 with no error, success all the way.

Now i'm at creating publication at sql1 where I currently stuck at adding article, showing in progress more than 2 hours. It hang at adding article 14 from total 197 articles (I only replicate table). so far configuring 'distributor' and creating 'publication' status is success.

Pending 'adding article' which is progress and 'starting snapshot agent' once adding article completed.

Please advice why this happen to me.

Thanks in advance.

Imra

Log Reader Agent error "could not execute sp_replcmds' and causes stack dump

0
0

Publisher/Subscriber db:  SQL 2008 R2, 2000 compatability mode
Distributor database is on separate server.

(note:  There is another database on this instance that is running replication without error, it is not in compatibility mode)

After snapshot agent finishes, the log reader agent starts and fails immediately with this error in the Agent Job.
Then I get a SEV20 error and stack dump in the error logs.

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

Date  6/12/2014 3:12:26 PM
Log  Job History (SERVER\INSTANCE-DBNAME-43)

Step ID  2
Server  ######RT02
Job Name  SERVER\INSTANCE-DBNAME-43
Step Name  Run agent.
Duration  00:00:01
Sql Severity  0
Sql Message ID  0
Operator Emailed  
Operator Net sent  
Operator Paged  
Retries Attempted  0

Message
2014-06-12 20:12:26.302 Copyright (c) 2008 Microsoft Corporation
2014-06-12 20:12:26.302 Microsoft SQL Server Replication Agent: logread
2014-06-12 20:12:26.302
2014-06-12 20:12:26.302 The timestamps prepended to the output lines are expressed in terms of UTC time.
2014-06-12 20:12:26.302 User-specified agent parameter values:
   -Publisher SERVER\INSTANCE
   -PublisherDB DBNAME
   -Distributor ######RT02
   -DistributorSecurityMode 1
   -Continuous
   -XJOBID 0x8958DF32810C6849B28A037A8FF8DD92
   -XJOBNAME SERVER\INSTANCE-DBNAME-43
   -XSTEPID 2
   -XSUBSYSTEM LogReader
   -XSERVER SERVER\INSTANCE
   -XCMDLINE 0
   -XCancelEventHandle 0000000000000F98
   -XParentProcessHandle 0000000000000F34
2014-06-12 20:12:26.459 Parameter values obtained from agent profile:
   -pollinginterval 5000
   -historyverboselevel 1
   -logintimeout 15
   -querytimeout 1800
   -readbatchsize 500
   -readbatchsize 500000
2014-06-12 20:12:26.493 Status: 4096, code: 20024, text: 'Initializing'.
2014-06-12 20:12:26.493 The agent is running. Use Replication Monitor to view the details of this agent session.
2014-06-12 20:12:27.885 Status: 0, code: 20011, text: 'The process could not execute 'sp_replcmds' on 'SERVER\INSTANCE'.'.
2014-06-12 20:12:27.886 The process could not execute 'sp_replcmds' on 'SERVER\INSTANCE'.
2014-06-12 20:12:27.886 Status: 0, code: 21, text: 'Warning: Fatal error 3624 occurred at Jun 12 2014  3:12PM. Note the error and time, and contact your system administrator.'.
2014-06-12 20:12:27.886 Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'SERVER\INSTANCE'.'.

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

I've tried removing replication and setting it back up again, restarting SQL, and restarting the server itself.

Let me know if you need any more information to help troubleshoot.  Thanks.

Please help, thanks. 

 


SQL Server 2012

0
0

Hi,

We have one Prod SQL server instance running SS '12, with multiple databases ranging from 5 GB to 80 GB per DB (and growing). We have ETL running from early in the morning to noon (and sometimes on demand after noon). We have a web app that users across country can log into and view/insert/update data. During the time of ETL, the SQL box get hit with performance issues (understandable effect of ETL). We are thinking about somehow splitting ETL from Web app.

Basically, we are trying to figure out a way to do ETL during the same time period w/o front end users facing any performance issues. We can open a new sql box to do ETL and then replicate data from ETL to web app SQL box's DBs. But this means that the data won't be in sync b/w ETL DBs and web app DBs in real time. ETL process will affect what users will see on web and users' action will affect ETL process so the data has to be in sync all the time.

What realistic options do we have if we want to improve the SQL box performance and keep data in sync in real time? We were thinking about scalling up but if there are better options available by scalling out, we would like to investigate.

Do you guys have any experience/suggestions in this matter?

Thank you

Snapshot Error When Adding Article to Transactional Replication

0
0

I am trying to add an table articles to my transactional replication setup.   When I do, the snapshot error fails with the following message:

Source: Microsoft.SqlServer.Smo
Target Site: Microsoft.SqlServer.Management.Smo.SqlSmoObject GetSmoObject(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
Message: Attempt to retrieve data for object failed for Server '<servername>'.
Stack:    at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn)
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.BuildSmoObjectArrayAndUrnLookupTable(IDictionary& dictUrnKeyArticleScriptingBundles)
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: Microsoft.SqlServer.Smo, Error number: 0)
Get help: http://help/0
Source: Microsoft.SqlServer.Smo
Target Site: Microsoft.SqlServer.Management.Smo.ObjectKeyBase CreateKeyFromUrn(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
Message: The input Urn must specify Name at level UserDefinedFunction.
Stack:    at Microsoft.SqlServer.Management.Smo.SchemaCollectionBase.CreateKeyFromUrn(Urn urn)
   at Microsoft.SqlServer.Management.Smo.Server.GetSmoObjectRec(Urn urn)
   at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn) (Source: Microsoft.SqlServer.Smo, Error number: 0)
Get help: http://help/0

Specifics:

  • Transactional replication:  Both Immediate Sync and Allow Anonymous are set to 0.
  • Publisher and Distributer are same server:  SQL Server Standard 2008 R2 (10.50.4000.0) on Windows 2008 R2 SP1
  • If I add even one table article (doesn't matter, I've tried different ones), I get the error above when I run the snapshot agent.
  • If I remove the table just added and rerun the snapshot agent, it succeeds with the message "A snapshot was not generated because no subscriptions needed initialization", so at least I don't have to reinitialize (thank goodness!).

Any ideas as to what might be causing this, and how I can add articles to my existing publication?

Thanks in advance for your help.

Operand clash

0
0

I have merge replication that has been working for 2 years. Recently the replmerge.log contains quite a few of these lines:

CommitBatchedUpdates failed with error Operand type clash: varbinary is incompatible with real

There does not seem to be any holes in my data that I can find. The error message is troubling. Any clue where I should start looking?

Table Dropped in Subscriber

0
0

Hi all,

  What will happen to replication, if table dropped from subscriber. How to reinitialize the replication after that.

Thanks

Selva

Creating a Job for publication in Sql Server with select statement for passing a parameter

0
0

I am creating a job for adding article to a publication.  the second step (e.g. for adding article) gives me error. I pass the name of the table as follow:

     EXEC sp_addarticle
           @publication = 'TTB', --THE NAME OF MY PUBLICATION
           'select top (1)' @article = 'Name from TableAdded Order by create_date Desc',
           'select top (1)' @source_object = 'Name from TableAdded Order by create_date Desc',
            @force_invalidate_snapshot = 1;

TableAdded is a table I have in my publisher which contains the name of the newly added table.

I believe it fails because the way I pass the name of the article to the store procedure is not correct. Can anyone please help me on that?

Kind regards

Amin

Snapshot agents are disabled but still run!

0
0
So I have merge replication setup. I have a lot of publishers. We only need to refresh the snapshot when we push a new subscriber, rare at best. Or when we add new articles. So I don't want the snapshots to run on a schedule as it occupies too much resources on the server. I've disabled all the agent jobs for the snapshot in SSMS. However, the snapshot are still running automatically for some reason. How do I completely disable the job so it does not run automatically?

Removing Replication in SQL Server 2008 R2

0
0

Hi,

I had issues to remove replication. I was trying to remove all articles from replication..it was taking quite long time to complete the process and found blocking while doing it. I stopped the SQL agent and tried but still it was slow..to remove 3 tables from replication it took more than 30mi. Is there any other preriquisites to do for this process. I searched a lot in the web but didn't get proper help.

Thanks.


Same SQL Server Replication

0
0

Does Microsoft officially support same server replication of a db to two different instances?  From previous forum postings I see it can be done but my question is more if Microsoft will support it in a production environment?

Thanks,

Vic

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

Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

0
0

I am using .net application built in .net 2.0 using SQL server Express 2005 Replication publication functionality. Application setup is in 32 bit.

Now i am running this .net application setup on Windows-7 [64 bit]. It gets installed successfully with SQL server Express 2005.

But when starting the application getting below error while performing Synchronization of subscription and publication via .net app.  I have checked that Microsoft.SqlServer.Replication.dll file is installed in GAC having same version [Version=9.0.242.0]. It is working fine on 32-bit OS.    

Below is error details.

TITLE: SETSynchConsole

Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Problem with Merge replication

0
0

Hi,

I have two servers with Sql Server 2012, and with Merge replication configured.  They were working correctly, but because a network problem, the Subscriber was some days off line, and when the connection returned, the Publisher is deleting the data that was saved on the Subscriber during the off line period.  I tried to delete and reconfigure the Replication, but not working.

Can someone help me?



Thanks!

BCP commands used by Replication Snapshot generation and apply

0
0
Hello Gurus,


I understand replication internally uses the BCP commands to extract data out of a table and again uses BCP or Bulk Insert to put it in the subscriber table. 
If somebody has the sample of these commands saved, please provide me with those. 

Thanks in advance. 
Viewing all 4054 articles
Browse latest View live




Latest Images