Replication Does Detect Mirrored Source Fail Over

Aug 3, 2007



I'm trying setup a proof of concept for a client but I€™m having issues with mirroring and replication.



With the help of http://technet.microsoft.com/en-us/library/ms151799.aspx I€™ve done the following..



The setup is as follows, I have several instances of SQL Server



A+B are mirrored with each other, with A being the principle and B the mirror

C is the distributor

E is subscribes to A, with parameters for PublicationFailoverPartner set to B



The mirroring between A+B works fine, I can manually fail each and the databases keep in step.



Without testing the mirroring failover, the replication between A+C+E also works.



However when I test the mirror to failover between A+B no transactions are replicated though to E. The publication moves from A to B in the Server Management Studio.



The logs state that the log reader agent can not gain access to A, however nothing is recorded regarding any attempts to contact B. In the replication monitor the error message



"The concurrent snapshot for publication ABCXYZ is not available because it has not been fully generated of the Log Reader Agent is not running to activate it. If generation of the concurrent snapshot was interrupted, the Spapshot Agent for the publica..." (cut off).



"the process could not execute 'sp_replcmds' on 'A'



I have checked that the SQL Server Agents are running on all agents,

I have checked that that server B is set at the PublisherFailoverPartner on server C agent configuration, I'm now at a lost as to what is wrong,



Any help or suggestions are greatly appreciated.

View 3 Replies


ADVERTISEMENT

SQL 2012 :: Restoring Mirrored Database To Different Server Occasionally Fail?

Oct 19, 2015

Every once in a while a scheduled restore of a production database backup to a development server will fail with the following error.

RESTORE cannot operate on database 'XXX' because it is configured for database mirroring or has joined an availability group

While it is true the production database is involved in database mirroring, the development server does not have database mirroring enabled. This error tells me something within the backup is telling the development server the database is configured for database mirroring.

However the perplexing part for me is that we only receive this error maybe 5% of the time, if that, and only on a couple of our databases. We have numerous other restores of mirrored production databases to development servers that have never produced this error. So my question is what is causing this error to occur, and why is it not happening all of the time? We get around this error by deleting the DEV database and re-running the restore job.

View 0 Replies View Related

Mirrored Subscriber In Transactional Replication ?

Apr 30, 2008

Hi,

I am trying to setup mirrored subcriber in Transactional Replication in SQL 2005. I am not able to do so as it don't work after failover.However I am able to setup mirrored publisher with distribution property "PublisherFailoverPartner" for snapshot and log reader agent profiles and it works even after failover.

However I need to know, do we have something called "Subscriberfailoverproperty" or any other method to set up mirrored subscriber in Transactional Replication in SQL 2005.


Thanks

Kiran Patil

View 6 Replies View Related

SSIS - Slowly Changing Dimension - Detect Deleted Rows From The Source

Nov 22, 2007



Hi all,

Can you help me to resolve my problem ? I have to do a simple daily backup system. Source : Flat File; Destination : SQL Server. I want to use the Slowly Changing Dimension component to backup only the new and updated row from my source (Flat File) and put them into SQL Server.

But how can I do to detect deleted rows from my source ?

Any suggestions ?

If it's not clear enough, please ask for more details !

GO

View 3 Replies View Related

How To Detect At The Subscriber That A Replication Is Being (re)initialized.

Feb 21, 2007

Is there a method/query to discover that the subscriber's databasereplication is being reinitialized?

The problem is that the applications which is connects to this database crashes when the replication is (re)initializing.

Thanx, Ralf

View 1 Replies View Related

How To Detect Replication Doesn't Work And Get Noticed?

Jul 15, 2004

I want to get notice by netsend, email or any other methods
when replication doesn't work or malfunction.

Does anyone know how to do this or any other solution you use for this kind of issue?

Thank you..

View 9 Replies View Related

Fail To Execute Store Procedure In OLD DB Source In Data Flow

Jun 20, 2006

Hi. I am trying to extract the data returned from a store procedure to a flat file. However, it fail to execute this package in the OLE DB Source.
I select the SQL Command in the Data Access Mode, then use:

USE [SecurityMaster]
EXEC [dbo].[smf_ListEquity]

It runs ok in the Preview, but not in the Run. Then the system returns during executing the package:

Error: 0xC02092B4 at Load TickerList, OLE DB Source [510]: A rowset based on the SQL command was not returned by the OLE DB provider.
Error: 0xC004701A at Load TickerList, DTS.Pipeline: component "OLE DB Source" (510) failed the pre-execute phase and returned error code 0xC02092B4.

Please give me some helps. Thanks.

View 13 Replies View Related

Integration Services :: Will Exceeding Command Timeout On OleDB Source Fail Pkg

Jun 16, 2015

We run std 2008 r2.  I'm trying out the commandtimeout property of an oledb source.  I set it to 30 expecting 30 seconds.  if connection and or execution exceed that threshold, will the pkg fail?  Either way is there a way I can detect that the threshold was exceeded? 

View 3 Replies View Related

SQL 2012 :: Re-initialization Of Transcational Replication Fail

Feb 13, 2015

I have configured three transactional replication one from DC - Data center & DB for database

DC1-DB1 to DC2-DB1 -- 1
DC2-DB1 to DC2-DB2 --2
DC2-DB2 to -DC2-DB3 --3

Before synching the data on DC2 databases I wanted to truncate / drop the objects on 1 and 2 setup as these are already participating in replication. Setup 1 and 2 are publisher as well as subscriber. I am not able to reinitialize these tables on these setup. I cannot use SSIS.

View 3 Replies View Related

SQL 2012 :: Replication To A Database With More Tables Than Source

Apr 14, 2015

We need to replicate data from a live database to a reporting database nightly.

There is data which is only needed for the reporting function - namely the selection criteria for reports which are to be run nightly or monthly.

Is it possible to have extra tables in the target database, holding the selection criteria?

If not, we'll have the reports running heterogeneous queries between the target database and a separate database with the selection criteria in it.

View 1 Replies View Related

Can A Log Shipping Destination DB Be Used As The Source For Transactional Replication Articles?

Aug 6, 2007

Hello,

My company is moving to a SQL Server-based packaged application early next year. We€™re planning our SQL Server architecture but have some questions that I can€™t readily find answers for. I€™m hoping someone here can point me in the right direction.

We have three servers, I€™ll call them A, B, and C. We want to duplicate all changes to certain databases on server A to server B, then duplicate changes to selected databases and tables on server B to server C.

Ideally we€™d run SQL Server 2005 Enterprise Edition on all three servers, but the packaged application vendor does not support SQL Server 2005 yet, only SQL Server 2000. Our license agreement with them does not allow us to use replication on server A. We€™re free to do whatever we want on our other SQL Servers, but server A must sit alone, untouched, like a monolith on a far-away moon. (I€™m lobbying to have the server named Tycho, or TMA2.) Stranger still, they€™re OK with log shipping from server A to other servers. We€™ve tried to explain that replication and log shipping are both core function built into SQL Server, and that if one is acceptable, then both should be. Their fear is that replication could cause performance and stability problems, and to eliminate this possibility they€™re ruling out replication on server A.

Given these constraints we€™re resigned to using SQL Server 2000 Enterprise Edition on servers A and B, and SQL Server 2005 Enterprise Edition on server C. We plan on periodically shipping logs from server A to server B and applying them at server B.

We€™d like to know if it is possible to also use transactional replication on server B to duplicate changes from server B to server C. I€™ve used log shipping and replication in the past, but never at the same time. My understanding is that a database goes into recovery mode while a transaction log is being applied and that any user changes to the database after the log has been applied will cause later log applications to fail. The scripts I€™ve seen that are used to apply the transaction logs put the database into single user mode after the log has been applied to prevent this.

This raises a few questions:



If we try to RESTORE a log to a database being used as a source for transactional replication articles, will the RESTORE fail? Or will the RESTORE start and break the transactional replication? I€™ll test this on my own, but it€™d be nice to know if anyone has already experienced this.


Is it possible for us to have a database in read-only mode serve as the source for transactional replication articles? (I can€™t imagine why not, ever though it seems counter-intuitive - why would you want to replicate transactions from a database that has no transactions?)

If the answer to number two is yes, can we suspend transactional replication on a database, RESTORE a log to the database, put the database into read-only mode after the RESTORE, and restart the replication on the database?
Thanks in advance for sharing your wisdom, everyone!

--
Thomas C. Mueller

View 1 Replies View Related

Mirrored Backups

Jul 14, 2007

Just want to know if anyone knows the actual syntax to do a Mirrored Backup
in SQL Server 2005 Ent Ed.

With Overwrite
with Verification
Disk to Disk

Also want to know if what their experience with Mirrored Backups.
Things to watch for etc.

Thanks in advance for you help on this.



Larry :-)

View 1 Replies View Related

Mirrored Sql Servers

Nov 3, 2005

Hello:I have 2 MS SQL Servers 2000 Developer edition.Both have same settings and databases. I'd like to have them as mirroredservers - all transaction on one server must be performed on the otherautomatically. More than that I'd like to get possible if something happenedto one server, all transactions will be performed on another one.Please, give me a hint how to do that.Thanks,GB

View 6 Replies View Related

Failover When The Dbb Is Not Mirrored

Jan 2, 2008



Hi there!

I use different udls for a website which is partly asp pages and partly aspx pages.
Every database is mirrored, so each udl indicates a "failover partner". However we decided recently that one of the database would not be mirrored anymore. For this database we still use in the udl a "failover partner" to redirect the connection to the second database in case of a failover. For the asp pages the failover works fine even if the database is not mirrored, but it doesn't work for the aspx pages.

It would be great if anyone had an idea why the behaviour is not the same for the aspx pages, and if we can still use a "failover partner" in udls even if the database is not mirrored.. if not, what should we use to connect to another database?

Any help is welcome!

idel

View 3 Replies View Related

How To Connect To A Mirrored SQL Server?

Jan 30, 2006

SQL Configuration:  Two 2003 Servers (OS Std ver) with SQL 2005 (Std ver) configured for db mirroring.  (The servers aren't clustered.)
Web.config configuration string is using "ServerA".
If we fail Server A, then Server B will change roles to "primary" in about 20 seconds (we have confirmed this via SQL Mgt Console).  BUT...our web app is still pointing to Server A and doesn't seem to know there is a fail over.  SO - how can I make the web app aware of the failure?
Server A and Server B aren't in a cluster - and I understand a cluster's virtual server would be referenced in the connection string.  Is there a way to make the web app automatically switch to Server B (without a cluster configuration)?
From what I understand, the cluster configuration would require Ent Ed. of OS and SQL and a big fat check!! 
Thanks.
-Kevin

View 3 Replies View Related

Delete Of Mirrored Rows

Oct 6, 2005

hi.I've seen ways to delete duplicate rows.Can someone give me some sql to do this?I have a table with varchar table_name_start, varchar column_name,varchar table_name_end;it has rows like this:table1 col1 table2table1 col2 table 3table2 col1 table1I'd lke to delete the rows if they exist with the names swappedaround, i.e. like above since the first and third share a column nameand the table_name_start/end matches the others table_name_end/start,I'd like to delete one and leave the other.I'm scratching my head trying to figure this out.thanks

View 6 Replies View Related

Snapshot Of Mirrored Databases

Sep 25, 2007

Can I take a database snapshot of a mirrored database and restored that backup for use for reporting or production support?

Thansk in advance,

Ed

View 3 Replies View Related

Backup Of Mirrored Databases Using TSM

Nov 30, 2006

Hi,

I currently have 2 mirrored servers and would like to implement a backup solution using an existing TSM server. The first thing that comes to mind is using the TSM client or Litespeed by Quest, but I'd like to know the effects of performing backups on principal and mirrored servers first.

Will using one of these products cause errors or problems should the backup client try to backup a mirrored database? Can anyone make any recommendations on the effects of using TSM client or Litespeed for a mirrored environment?

Thanks.

View 4 Replies View Related

Unable To Add More Then 59 Mirrored Databases

Sep 24, 2006

The following problem occurs when trying to mirror multiple databases using SQL Server 2005:

After mirroring about 40 databases, an error occurred concerning a lack memory availability on the mirror-server.
I added the parameter /3GB to the boot.ini file and enlarged virtual memory space.

Now I was able to mirror a total of 59 databases. When trying to add the 60th database on the principal server, it won't get through.
I don't get any error message, neither the mirror starts.
However the SQL Server Management Studio on the mirror-server doesn€™t seem to respond to any commands given until the mirror is again removed for one or more databases on the principal server.
Adding the parameter /PAE to the boot.ini file, or enlarging the virtual memory again didn't bring the solution.

Both principal- and mirror-server are dual processor servers.

The principal is a Windows 2003 Server Standard x64 Edition service Pack 1 and runs:

SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790

It has 4GB of memory.

The mirror is a 32-bit Windows 2003 Server Enterprise service Pack 1 and runs:

SQL SERVER 2005:
Microsoft SQL Server Management Studio 9.00.2047.00
Microsoft Analysis Services Client Tools 2005.090.2047.00
Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.1830
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790

It has 2GB of memory.


Is there a work-around for this problem?

Thanks for any help in advance.

View 2 Replies View Related

Upgrading Mirrored Databases

Apr 24, 2006

I am in the process of architecting SQL 2005 HA options and of course mirroring is at the top of the list. Does anybody know what the requirements are regarding upgrading mirrored databases, for example, applying hotfixes and service packs? Is it a requirement for the principal and mirror (and witness if applicable) to be at the same build level? Is there any requirement to upgrade one first and then the other as there is with replication topologies?

I had a look in BOL but can't find anything covering this (perhaps I missed it).

Thx, Simon.

View 5 Replies View Related

ADODB And Mirrored SQL-Server

Aug 24, 2006


I did setup a Mirrored Database. Connecting from it using ADO.NET works well. It goes to the Mirror if the Principal fails.

But ADODB does not work. I get the error following error:
80004005 Invalid connection string attribute

When trying to connect to the DB in case the principal failed and the mirror is active. (MyProductiveDB is in failover state)

What do I do wrong?


Here is the code:

ADOConn = New ADODB.Connection
ADOConn.Open(CS)

CS is my Connections-String:
"Provider=SQLNCLI.1;Data Source=MyProductiveDB;Failover Partner=MyMirror;Initial Catalog=MyCat;Persist Security Info=True;User ID=MyUser;Password=xxxxxx;Pooling=True;Connect Timeout=5;Application Name=MyApplic"

Remark: When I try to add "Network Library=dbmssocn" to the connection String, I get the same error, even if the Principal is active.

Your help is very much appreciated.
Beat

View 4 Replies View Related

Shrinking The Log File On A DB That Is Mirrored

Nov 17, 2006



Hello,

I'm having couple of DB that are mirrored.

my concerne is regarding the Log file size.

I'm running the following steps:

BACKUP DATABASE [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, INIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10

then

BACKUP LOG [DBName] TO DISK = N'Backup_File' WITH NOFORMAT, NOINIT, SKIP, NOREWIND, NOUNLOAD, STATS = 10

if I try to run a SHRINKFILE (DBName_log, 20)

I receive the following info:

Cannot shrink log file 2 (DBName_log) because all logical log files are in use

I'n a bit tense using a

BACKUP LOG [DBName] WITH TRUNCATE_ONLY

as it's part of a mirroring.

but I need to reduce the size of the log file.

thank four your suggestions

Eric

View 10 Replies View Related

Rebooting Mirrored Servers

Jun 7, 2007

New to SQL. Can you reboot the principal server after running updates without causing a failover?

If not what would the correct procedure be.

View 2 Replies View Related

Mirroring :: How To Shrink Transaction Log On Mirrored DB

Oct 7, 2015

Today, I became an involuntary DBA until my company finds someone else. We have an SQL R2 DB that is mirrored that failed dur to the transaction log growing and filling up the disk. As a band aid remedy, I was able to add 20GB to the disk (it is a VM) and then I backed up the Transaction log and did select log_reuse_wait_desc from sys.databases where name = 'mydb' and the result showed that the backup was successful (NOTHING, I think was the result).

After this I was able to resume the mirror and everything has been running fine. What I need to do now is to shrink the Transaction log so that if it starts to grow again, I will get an alert and can avoid today's issue. From what I have read, I can just use DBCC SHRINKFILE [logname] after I do a backup and the changes will be reflected on the mirror as well. I have shrunk the T-log in non-mirrored servers before, just don't know if there are any key differences.

View 6 Replies View Related

Mirrored Linked Server Failover.

Sep 18, 2006

We have a mirror setup, with a third server that needs to be linked to this mirrored setup. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

View 1 Replies View Related

The Mirrored Server Is Always In The State Of Restoring Only

Jun 6, 2006

The database in Mirrored server is always in the state of restoring only.

the database in mirrored server is restored with norecovery

then we started mirroring.

the status of mirroring is successfull and is synchronized.

but the Mirrored server is always in the state of restoting

not allowing use to open the database.



could any one know why this problem is comming and give some solution for this problem so that the mirrored database can be accessible opened and queryed to really verfiy that the changes made in principal database is mirrored to Mirrored database.

View 3 Replies View Related

Mirrored Linked Server Failover.

Sep 18, 2006

We have a mirrored db setup, with a third server that needs to be linked to this mirrored setup as a linked server. The link server setup only allows you to specify the primary server. How will the linked server setup know what the secondary server is? Thanks

View 1 Replies View Related

Accessing Mirrored DBs On SQL2k5 (x86) From SQL2k

Sep 14, 2007

Hi


I'm trying to select data from a mirrored database situated on a SQL2k5 server, via a linked server on SQL2k.



I can select the data fine using SQLOLEDB but it's not aware of the mirroring so if the DB fails-over it errors.



To get around this, I installed SQLNCLI.msi to install the SQL2k5 provider and created a linked server like this:



exec sp_addlinkedserver @server=N'TEST2',@srvproduct=N'SQLNCLI',@provider=N'SQLNCLI',@provstr=N'Server=server1;failover partner=server2;'
exec master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TEST2',@useself=N'False',@locallogin=NULL,@rmtuser=N'user',@rmtpassword='password'



Executing the statement: select * from test2.database.dbo.table



gives the following error:



Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'SQLNCLI' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error: Column 'IsActive' (compile-time ordinal 2) of object '"database"."dbo"."table"' was reported to have changed. The exact nature of the change is unknown].



If i change the statement to



select * from openquery(test2,'select * from database.dbo.table')



It works. I don't really want to have to go and refactor all the SQL though!



I've seen similar posts related to Oracle and SQL2k5 64bit but they don't seem to be relevant to this situation.



Here's the version info:



2000 server (SP3):



Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

2005 mirrored servers (SP2 3054):



Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

I've also tried applying the following to the 2005 servers: sp2(3159) sp2(3161) but makes no difference.


Any ideas?

TIA

View 1 Replies View Related

Problem When Failing Over To Mirrored Database

Oct 11, 2006

I'm having a problem with SQL2005 Database mirroring.

I have an ASP application that loops for a certain amount of interations and in each iteration I create a SQL Connection object and use the failover partner in the connection string. The object then writes a simple record and then the connection is closed and the process starts again.

About half way through my loop I force a failover to the server mentioned as the failover partner in the connection string. At this point my application encounters a SQL Exception error and the application fails.

I read in this article, http://msdn2.microsoft.com/en-us/library/ms366199.aspx, that this is expected and that you shoud request a new connection using the same connection string but this isn't working for me and unfortunately no examples are given anywhere.

I would appreciate any help. Thanks

Luis Bonilla

Here is a sample of my code:

Dim k As Integer = 1
Dim constring As String = "Server=SVR01.XXX.XXX.comInstanceName;Failover Partner=SVR02.XXX.XXX.comInstanceName;" _
& "Database=test;" _
& "Integrated Security=SSPI;"

Do Until k = 60
Using con As New SqlConnection(constring)

Dim cmd As New SqlCommand()

Try
con.Open() '<--------This is where the exception occurs
Catch ex As SqlException
Dim en As String = ex.ErrorCode
Dim em As String = ex.Message
Dim emm As String = ex.Number
Dim enn As Integer = ex.State
End Try

lblprimary.Text = "Current Primary Database = " & con.DataSource

cmd.Connection = con
cmd.CommandText = "INSERT INTO SystemsTest (FirstName, LastName)VALUES ('SQLWriter" & CStr(k) & "','" & con.DataSource & "')"

Try
cmd.ExecuteNonQuery()
Catch
lblresult.Text = "Results = Error with record number " & CStr(k)
End Try

con.Close()
cont:
End Using
Sleep(1000) 'For testing
k = k + 1 'For testing
Loop

View 3 Replies View Related

Change The Schema Of A Mirrored Database

Aug 8, 2007



Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?

Thanks,

View 6 Replies View Related

How Service Broker Queues Can Be Mirrored?

Jan 4, 2007

Hi,
I want to know that how is it possible to achieve mirroring for the service broker queues in the database?

View 1 Replies View Related

How To Attach And Detach Mirrored Databases

Apr 15, 2008

Hello all,

We are planning to change the location of the log files from my production server. We have setup the mirroring also for those databases. I know for the databases without mirroring job i could detach the database, copy the log file to the target location and attach the database with the new logfile location. But for the mirroring databases I don't have any idea how to do that. Could some body guide me thorugh the process on how to do this task? thank you very much for all your help!

View 16 Replies View Related

Recovering Mirrored Database From Snahshot

Feb 28, 2008



I have a mirred database and have snapshot created from the mirroed database. I can do data selecting from the snapshot. But when the pricipal server is down , I can re-active the mirroed database.( I did succesfully upto this). Then I need to restore the database from snapshot and which failing with following error message.




Code Snippet
Msg 5123, Level 16, State 1, Line 3
CREATE FILE encountered operating system error 3(error not found) while attempting to open or create the physical file 'E:sql_datadevitst_mirrorlog st_mirror_log.ldf'.
Msg 5024, Level 16, State 2, Line 3
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 3
The system could not activate enough of the database to rebuild the log.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved