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

Get alerted on the message "The initial snapshot for publication xxx is not yet available'

$
0
0

hi Is it possible for the distribution agent to write this message to event log ?Because we would like to get alerted on the above message, whenever a new table is added to the publication a snapshot that needs to be generated, but we have seen few times this is missed by a dba or our deployment mechanism. We are running sql 2008 sp3. 

Thanks


Replication

$
0
0

Hi all,

when we configure transactional replication ,here three agents are created. those are

1)snapshot agent 

2)log reader agent

3)distributor agent 

here i have one doubt. 

where is the LOG READER AGENT running at publisher or distributor.

Distribution agent job getting deleted on SQL Server 2008 R2 Enterprise Edition

$
0
0

Distribution agent job getting deleted on SQL Server 2008 R2 Enterprise Edition. Part of the warning message of the SQL Server agent error log:  "... was deleted while it was executing: the outcome was (Unknown)"

This is the first time we face this kind of situation. The job was deleted by SQL no one deleted manually. Please can you provide any feedback regarding this? Is this a SQL bug?

Thanks

Trying to recover replication after a corrupt 'distribution' database

$
0
0

On a production server [SQL Server 2088 R2 RTM] I started to get alerts stating:

‘Replication-Replication Transaction-Log Reader Subsystem: agent ******* failed. Possible schema corruption. Run DBCC CHECKCATALOG.’

and,

‘Replication-Replication Distribution Subsystem: agent *******  failed. The provided statistics stream is corrupt.’

I ran DBCC CHECKCATALOG on the distribution database and this didn’t seem to work. So I ran CHECKDB and it failed complaining of corruption.

There is no backup of the distribution database, and I tried to create new distribution database with instdist.sql but this did not work. I tried attaching a clean distribution database.  I tried the repair utility on SQL Installation Center, and I also tried uninstalling then re-installing replication feature.

I’m now stuck with a production server that is not replicating.  The replication was a simple merge replication so I can easily set it up again. Is there any way to reset replication on this server?

Apply service pack3 to sql 2008 subscriber

$
0
0
I have a merge replication environment, and the version of the subscriber qnd the publisher is Sql 2008 sp2 , is it possible to upgrade the sp of the subscriber to sp3 without upgrading the version of the publisher

Cross Forest Transactional Replication with using FTP?

$
0
0

Hello,

Hopefully someone could help clarify if this is possible as search has returned similar questions but not exactly what im after.

I have the following -

SQLServerA.domain1.com (Publisher and Distributor)

Publisher Connection using a SQL account "SQLReplication"

Log Reader and Snapshot running as SQL Server Agent Account

SQLServerB.domain2.com (Subscriber)

Publisher Connection using a SQL account "SQLReplication"

Log Reader and Snapshot running as SQL Server Agent Account

There is no trust between domain1.com and domain2.com however there are DNS forwarders configured.  I understand that the Subscriber cannot connect to a Publisher by a name other than the one returned by @@SERVERNAME so I have aliased it on the subscriber.

I have created the Publication (also changing the snapshot folder to be a share eg \\SQLServerA.domain1.com\repldata) and Subscription without error in the process.  

The problem comes up when I try to run the Subscription job (to do its first initialization) that it cant connect.  I have even tried granting Everyone Share and Security permissions on the snapshot folder (as a test),  and it still failed (I expected this to resolve the issue).

Anyone any ideas or can I ONLY use FTP?

Thanks,
Peter

Entity Framework 5.1, Code First Approach + Merge Replication

$
0
0

Hi All,

Our company has been using Merge Replication as a standard for a couple of years now in all of our live websites which are mostly asp classic and MVC based. All of our live databases are running on merge replication and all of the development has been centered towards it.

Recenly, there is a need for us to use Entity Framework 5.1 using code first approach. I'm worried that I can't seem to find enough information about the compatibilities of the 2 technologies and how they can work with each other.

My questions are

  1. Is EF 5.1 and Merge Replication easily compatible?
  2. What are the things we need to do either with the dev side or DB side to make it work?
  3. Code First sometimes requires that tables and objects be deleted (re-created). Will this work with Merge Replication?
  4. Merge Replication does not include propagation of indexes. Does this mean we have to manually run all of the index creation statements of EF Code first?

Thanks in advance for any thoughts.

Regards,

Joseph


MCP, MCSD, MCDBA (ANXA)

How to schedule Merge Agent

$
0
0

Hi,

 We have two databases merge replicated to two subscribers. The merge agent is currently scheduled to run at 5PM everyday. Now I have this scenario.

The agent start to run on 15th March. The merge agent is running for almost an average of 18hours.Replication Agent shows that agent ran successfully with out any errors and completed on 16th March 8:30AM.

There was some updated to the replicated table on 16th March 2:30AM. This updates have not gone through the subscriber. Currently the merge agent is running , that is the agent started on 16th March 5PM.

Will the updates happened to the table at 2:30 AM on March16th be propagated to the subscriber only on this run.? How can I reduce the latency at the subscriber?

How should I determine what is the best way to schedule the merge agent?

Please advice me on this

Thanks


Troubles with replcation for special characters to Oracle

$
0
0

Hello,

We are replicating some tables to our websitedatabase. Al our internally DB are SQL Server, our webapp is build on a oracle.

Wgen replication tables that contain varchar's with special charaters such as é ö it goes 100% correct with the initial snapshot (and then bulk insert i supose), but when we update a record (even on a other field) the varchar contains wrong characters ....

Any ideas on how to work arround this ?

sql replication problem - need to drop column in tables

$
0
0
when building a merge replication a column was added to all of my tables. I need to remove this column. I have run the following in querry anaalyzer

alter table tablename
drop column  rowguid

I get the following error

Server: Msg 5074, Level 16, State 1, Line 1
The object 'DF__FAHead__rowgui__2DB1C7EE' is dependent on column 'rowguid'.
Server: Msg 5074, Level 16, State 1, Line 1
The index 'index_165575628' is dependent on column 'rowguid'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE DROP COLUMN rowguid failed because one or more objects access this column.

This column must be remover ASAP. I have tried to remove it by right clicking and selecting delete but delete is not available.

How do I delete this column?

If I drop an article from publication and then drop it from the database can I avoid a FULL snapshot

$
0
0

I'm sorry to be asking a question that's already been answered (I believe) by this post (I am unable to add hyperlinks (I need to find out how to verify my account): http://social.msdn.microsoft.com/forums/en-us/sqlreplication/thread/41A6A539-A2F2-40AB-91C1-0F48FADE7D8C but the stakes are high for me and I really want to be sure ( a full snapshot take 20 hours):  

If I want to rename an empty table that is an article in an existing publication with a subscriber, can I un-check the article from the publication (using the GUI in SSMS), start the snapshot agent so that it replicates that one change and be all right? I would then create an empty table with the same structure and add it to the publication and run the snapshot agent. Then I would say "drop table oldtablename"  to take it out of the database.

This will be in production.  I tried this in my small test replication and the whole snapshot was generated. Do you definitely have to drop and recreate a subscription if you drop an article from an existing publication with at least one subscriber? I have a coworker who is "sure" he never had to do this before.  But from what I'm reading dropping is more serious than adding.

Update: my coworker says he just drops the article but doesn't run the snapshot. That's his method.  He then drops the table from the database.  So he says he knows it's still in the subscriber.  Does this seem ok to you?  He's been taking care of replication for a few months since the last DBA came and I arrived.  

Thanks.



unable to enable weblog logging on replisapi.dll needed due to error on subscriber CWinHttpClient::CopyDataFromWinHttpIntoBuffer: WinHttpQueryDataAvailable failed, got error 12030

$
0
0

Hi All.

I checked the forum but didn't find something that works.

For a new subscriber, i found the following error on his sqlmerx log file

=> CWinHttpClient::CopyDataFromWinHttpIntoBuffer: WinHttpQueryDataAvailable failed, got error 12030

I want to have maybe more log on my replisapi.dll virtaul directory, but even after set up correctly the regisitry  and restart iis, i still have "logging enable = false".

i'm on a x64 server, so to be sure i put the value on Wow and on soft/microsoft xxx / sql / 100 / replication

And there i've got WebSyncLoggingOff dword 0

On SQL publisher, i have no error no problem. So i guess it's something between my subscriver and replisapi.dll

Using RMO info on the subscriber, i've got that

12:12:08:0%,Status:InProgress,Message:The connection with the server was terminated abnormally
12:11:55:0%,Status:InProgress,Message:Downloaded snapshot file 'MSmerge_tombstone.bcp'.

Sometilmes it's after a specific file bcp, sometimes it's an other

sp_addarticle SQL Server 2008R2 Standard Edition

$
0
0

I am trying to create a publication and add an article to the publication. The publication part runs fine however; when adding a the article I get the following error. "Msg 207, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 2355 Invalid column name 'objid'", I have looked at the table I am trying to replicate and there is not a column named 'objid' so I am assuming it is comming from the sp_MSrepl_addarticle stored proc, but I can't find that sp anywhere.

Can someone please help me with this problem. Here is my script

Urgent: Oracle replication failed

$
0
0

Some replication jobs failed and it shows 'data conversion failed' error MSSQL_REPL20037.  Any idea on it ?  I can't find the error in online book.  THanks in advance!

Table error running snapshot in a merge replication under server 2008 R2 and SQL Server 2005 SP4

$
0
0

Environment: Windows server 2008 R2 - SQL Server 2005 SP4 enterprise.

When you run the snapshot for replication I got the following error with one table:

Message: Data from string or binary is truncated.
Not to seek the object 'MSmerge_sel_58FB50383B1944C359CF39D2861D48C0' because it does not exist or the user does not have permission.
Failed to generate stored procedures for the article 'mdt_hist_odo' merge replication.
The statement was completed.

sp_MS_marksystemobject: Invalid object name '[MSmerge_sel_58FB50383B1944C359CF39D2861D48C0]'
Command Text: sp_MSsetartprocs
Parameters:     @publication = ODO   

@article = mdt_hist_odo
I eliminated the datetime columns in the table and the snapshot it did work. But I can`t do that as I use those fields. What can I do? this it is happening with one table only. Other tables also have this fields and they pass through the process with no error.

The table has 202 fields. If I eliminate 3 datetime columns I can run the snapshot. Also run after taken out text and varchar columns.

This was working successfully under windows server 2003  with SQL Server 2005 enterprise SP2.

What can be happening?


José


T-SQl for Replication

$
0
0

Hi All,

I need to configure replication through T-SQL, can any one give me T-sql scripts to configure sanshot and transactional replication.  

OS Error 5

$
0
0

I am getting the following error when trying to get replication to work. 

Command attempted:

D:\DB\Replication\SKYTableUpdater\unc\KIAWE001$APTCUST1_DBSKYENG002_SKYTABLEUPDATER\20130325065441\T_291_DataEntryf60b2a96_50.pre

(Transaction sequence number: 0x000000610000FC1F004200000008, Command ID: 4)



Error messages:

The process could not read file 'D:\DB\Replication\SKYTableUpdater\unc\KIAWE001$APTCUST1_DBSKYENG002_SKYTABLEUPDATER\20130325065441\T_291_DataEntryf60b2a96_50.pre' due to OS error 5. (Source: MSSQL_REPL, Error number: MSSQL_REPL20024)

Get help:

http://help/MSSQL_REPL20024

Access is denied.

(Source: MSSQL_REPL, Error number: MSSQL_REPL5)

Get help:
http://help/MSSQL_REPL5

Publisher: SQL Server 2008 R2

Subscriber: SQL Server 2008 R2

I have granted the user Everyone full access to the directory and all files.  I have changed the login for the SQL Agent to LocalService.

I have added the SQL Server login to the Access List for the Publisher.

Not sure what else to do....

 


Baja Bound

Configure Distributor for Replication in 2008

$
0
0
I am trying to configure a distributor for replication in SQL Server 2008. For some reason when I right-click on Replication there isn't a "configure distribution" choice? Does it need to be enabled first?

Transactional replication does not create snapshot files when start up snapshot agent

$
0
0

The snapshot agent for the transaction replication does not create file in unc folder.

What should I look into? The snapshot agent started and went to 0% after updating a lot of statistics and then keep waiting for response. Thanks,

error_text
Message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.   Command Text: sp_MSactivate_auto_sub  Parameters:  @publication = 'a_tran'   @article = %   @status = initiated    Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)     at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteReader(SqlCommand command, Int32 queryTimeout, CommandBehavior commandBehavior)     at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.SetPublisherTranSequenceNumViaAutoSub(PublicationActivationState publicationActivationState, SqlConnection connection)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ActivateCSSPublicationAndSetTranSequenceNums(PublicationActivationState publicationActivationState, SqlConnection connection)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ConcurrentPreArticleFilesGenerationTransaction(SqlConnection connection)     at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoConcurrentPreArticleFilesGenerationProcessing()     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoPreArticleFilesGenerationProcessing()     at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()     at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()     at Microsoft.SqlServer.Replication.AgentCore.Run()


js01sqlserver

Recommendations sought for best failover of replicated databases

$
0
0

Hello,

I have a more complicated set of servers and databases than this but to simplify the example to get at the question I would like answered let's say I just have two servers, both with SQL Server Enterprise Edition, one in our local server room and the other in a nearby state.  Each has two databases of interest to this case:

Server One has:

Database A that's a publisher and distributor

Database B_repl that a subscriber to Database B on Server Two

Server Two has:

Database B that's a publisher and distributor

Database A_repl, that's a subscriber to Database A on Server One

If I want to improve failover from Server A to Server B or vice versa, would database mirroring be a good choice?  I was looking into log shipping but Microsoft recommends using database mirroring rather than log shipping when I read this page:  http://msdn.microsoft.com/en-us/library/ms151224.aspx

If there's another option, please let me know.  I have done a lot of reading but would really appreciate some advice and opinions.

Thanks in advance.


Viewing all 4054 articles
Browse latest View live


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