Quantcast
Channel: Database Mirroring forum
Viewing all 1024 articles
Browse latest View live

Restore the backups of all the databases at a time

$
0
0

Hi all,

I have a task where i need to configure database mirroring for 400 databases at a time. I need a single TSQL Script to restore all the databases full backups with no recovery mode at a time.

QUick answer will be really appreciated. 


SQL Job failed on mirror failover

$
0
0

We have a SQL Server 2005 database mirroring configuration on two Windows Server 2008 R2 servers.  There is a SQL Agent job that is triggered by a WMI Event Alert, using the query "SELECT * FROM DATABASE_MIRRORING_STATE_CHANGE WHERE State=8 AND DatabaseName=[DB]". 

The first step in the SQL job triggered by the alert is to execute a stored procedure in the database [DB] that has now just become principal on this server.  On a recent automatic failover test, forced by rebooting the principal server, the mirror-turned-principal fired the above alert, but the first job step failed with the error:  "Unable to connect to SQL Server '(local)'. The step failed."

Subsequent job steps that executed other stored procedures in the same database were successful.

Some time line information:
9:50:34 SQL Log entry:  "The mirrored database [DB] is changing roles from MIRROR to PRINCIPAL due to Auto Failover."
9:50:45 Alert fired
9:50:46 Job step 1 failed "Unable to connect to SQL Server '(local)'. The step failed."
9:51:32 Job step 2 "Changed database context to [DB]" (and the step succeeded)

This alert/SQL job combination has never failed in this manner on a similarly configured pair of mirror servers. 

Can anyone shed light on why that first step would fail?  Could the failover time be long enough that the database is not yet accessible?  Yet the error refers to the server itself, not the database. 

Since this is a production database, I have limited access to test the failover sequence, but any suggestions on what caused this job step to fail are welcome.

restarting mirrored server/pausing resuming mirroring

$
0
0

Hi,

I want to know if restarting the mirrored server (standby server)will have any effect on mirroring configuration. Is it the same as pausing and resuming mirroring from principle server.

Or is it advisable that mirroring be paused from primary server before mirroring server (standby server) is restarted.

 

Thanks

Testing DB in Standby Mode

$
0
0

I have a log shipping configuration and its working and restoring to another server just fine.  What Im wanting to do is connect a client to that standby database and test how to switch to the backup box in case of failure.  How do I do that?  And, once Im done, does shipping just pick up where it left off?

Thank you.

What are management issues when Principal and DR mirroring environments use different drive letters. 2008R2 Enterprise Edition.

$
0
0
I have to build a DR environment. The drive letters on principal are different than I HAVE to use on new DR server. Is 2008R2 mirroring able to handle that difference in drive letters. And what are the complexities for managing this setup and failing over from principal to DR?  Thank you for your reply!

How do I generate a dbml file?

$
0
0

How do I generate a dbml file?

In a Visual Studio file, A project contains a DBML file that, when opened, shows a very cool representation graphical of a database and all the interconnections between the tables.

I want that for another project for documentation purposes.  The database already exists.  So how do I get from the sql server database with all the key relationships and the proverbial whole nine yards to the cool graphic represenataion of ta DBML file as seen in visual studio.

I did some searching on the internet with several search engines and so far everything I see is working in the other direction such as "create database from DBML file? "

Database configured for Syncronous mirroring and connection lost during transaction.

$
0
0

Hi,

In a synchronous  mirroring session data commit on mirror first and then on the primary. But in a scenarion that data has commited on Mirror but when it goes to commit on primary then then primary server goes down or via any behaviour it is not able to commit on primary. then what is the flow, how we will get that data commit on primary.

Thanks in Advance.


Regards, Ashish Tripathi

an Error occured while starting mirroring

$
0
0

hi,

i am getting the below error when i am trying to start mirroring.

below is the screen shot.


sal


Database Mirroring Error 1456

$
0
0

Hi Everyone,

I doing some test on SQL DB Mirroring. I have set two VM one as principal server and another as mirror server. I can setup for High Safety mode to test Manual failover. The problem arise when i try to setup a witness to test auto failover. When i try to setup using SSMS, i encounter the below error.

"The alter database command could not be sent to the remote server instance 'TCP://Mywitnessserver:5022". The database mirroring configuration was not changed. Verify the server is connected and try again.(SQL Server, Error 1456)."

I have try to ping the witness server from both principal and mirror server and the result is succesful. I also try to telnet the witness from both pricipal and witness server and the result is succesful.

I also have created same sql server user for all principal, witness and mirror server but still the same error come out.

When i checked the SQL Server error log in witness server it shows the below error.

"Database Mirroring login attempt failed with error Connection handshake failed. An OS call failed (8009030c) 0*8009030c(The login attempt failed) State 67.

Details:

Principal Server : Windows 2012 , Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)   Jul  9 2008 14:17:44   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (VM)

Mirror Server : Windows 2012, Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)   Jul  9 2008 14:17:44   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (VM)

Witness Server : Windows Server 2008, Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)   Jul  9 2008 14:17:44   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (VM)

Can anyone have idea on how to solve this error? I will apreciate your help.

Steps to change SQL server service account in Mirroring setup

$
0
0

I want to change the service account of my both sql server services on which mirror is setup in live environment.

What precautions & steps do i need to follow. please tell me in details.

Mirror on 2nd server

$
0
0

We run an inventory management and order management software on a Dell server that runs win 2008.

It runs 24/7/365 and uses SQL for the database.  Everything is located on the one server.  The database and the software.

About 30 people connect to it all day and about 5 at night along with constant streams of multiple API connections all day and night.

output is 5gb per day and input is 2gb per day.

It has yet to happen but if the server breaks, goes down etc our entire company will go down.  We have a constant backup running so we can get up and running without losing data but we would be down until we can either get a new server in or fix the server.

I want to somehow have something always running and duplicating the current server so if that goes down everything switches over to the backup server like a RAID 1 would do for a HDD.

Lets say the MB dies on the server it shoudl switch over to server 2 that already has the exact same data on there and we would have no down time.

I know it is simply database mirroring but can we benefit from the 2nd server while it is just being used as a live backup similar to striping hard drives?  Have the 2nd server not only be a mirror but also share the load of the main server.


logshipping shrink

$
0
0

hi team,

 

How can shrink the transaction log file in primary server can any body please guide me.

 

Tx


subu

DB mirroring - Manual failover with witness

$
0
0
Hi,

Scenario: Server 1 : Principal Server 2 : Mirror Server 3 : Witness

Mode: High-Performance (synchronous)

As I understand, witness is used for automatic failover. However, in our scenario we do not want that to happen (due to some network restrictions)

If witness is installed, both automatic failover is possible (initiated by witness itself) and manual failover (done from principal/mirror using SSMS or T-SQL). Is there a way to do ONLY manual failover using witness? i.e. Can we prevent automatic failover to happen even when witness is configured? According to me, this is not possible.

Can someone please help clarify this?

Thanks, Regards, Mandar
0

Hi,

Scenario: Server 1 : Principal Server 2 : Mirror Server 3 : Witness

Mode: High-Performance (synchronous)

Qs. 1 - As I understand, witness is used for automatic failover. However, in our scenario we do not want that to happen (due to some network restrictions)

If witness is installed, both automatic failover is possible (initiated by witness itself) and manual failover (done from principal/mirror using SSMS or T-SQL). Is there a way to do ONLY manual failover using witness? i.e. Can we prevent automatic failover to happen even when witness is configured? According to me, this is not possible.

Can someone please help clarify this?

Thanks, Regards, Mandar

ASYNC_NETWORK_IO

$
0
0

Hi

    We are fetching data from MSSQL 2012 from MS Excel - 2013 using MS Query. While querying the data from Excel, we are observing some ASYNC_NETWORK_IO entries in the activity monitor and the corresponding application is hanging and throwing error. The Task State is showing as suspended and wait resource as  "External External Resource = ASYNC_NETWORK_IO".

Please suggest

suspended database

$
0
0
How to resolve the suspended database in mirroring if database is set to High safety mode?

Table getting Replicated

$
0
0

Hi,

Facing an issue. Whenever I create a table in a database(for ex TEST) under one SQL instance(for ex, MSSQLSEVER), it is getting replicated in TEST under another SQL instance(for ex MSSQLSERVER\TEST).

I don't know why is this happening.

Please note- All the databases under MSSQLSEVER and MSSQLSERVER\TEST has the same number and name.

I checked replication option on each database but it is not enabled.

Kindly advise.

Regards
Jim

Failover when disk is down

$
0
0

We are running on SQL Server 2008R2 ent. as a VM on an ESX.

We are planning to get a flash disk device (intel 910) to connect to our ESX and have the mdf/ldf files of our database migrated to it.

Since flash disk is not as as reliable as a SAN/NAS raid we wanted to have some kind of HA in place so we decided to try SQL's mirroring feature.

We set up mirroring with async mode since we do not want the slow disk of the mirror server to be a bottleneck.

Manual failover works fine when done through T-SQL (ALTER DATABASE database_name SET PARTNER FAILOVER) or through SMSS.

But the whole point of this is to be able to relatively quickly fail (manual or automatic) to the mirror server when hardware disaster occurs.

3 scenarios in mind:

1. only the DB (mdf/ldf) is on the flash disk and the disk crashes

2. all the VM is on the flash disk and the disk crashes

3. either DB only or whole VM is on disk but there is a different issue (networking/ESX server)

In none of those scenarios it apears that I can somehow take advantage of the mirror server.

when I tested offlining the flash disk while only the DB was on it and trying to manually failover I get this message:

Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
Msg 5120, Level 16, State 101, Line 2
Unable to open the physical file "G:\xxxx.MDF". Operating system error 3: "3(The system cannot find the path specified.)".
File activation failure. The physical file name "G:\xxxx_log.ldf" may be incorrect.

Which makes sense since the disk is down but as far as SQL server sees it there is no reason to failover

I think the other 2 scarious are no different as I cannot failover when the SQL server itself is not available.

It seems like I am missing something fundamental about this feature and how it should be used.

How exactly is this HA?

Any help would be greatly appreciated.

Thanks! 


Mirroring Issues

$
0
0

Hi,

Can anyone please share some mirroring issues faced in ur experience and how u resolved them in a detailed step by step process. It would be helpful  for my interviews.

Questions on Db Mirroring

$
0
0
Hi All,

I have below questions on database mirroring.
I am using sql server 2008 sp3 Developer Edition.
I am using High Availability mode (Syncronous, witness & Automatic failover).

Here is what I observed and wanted to know reason for the below behavior.

A - Principal Server
B - Mirror Server
C - Witness Server

Scenario-1

The mirroring state is SYNCRONIZED. Meaning no more log records to be sent to Mirror db.
Now, say, Witness is down
After 3 minutes later, Principal is down.

At this point, there is only my Mirror instance is running with role as Mirror.
My question here is, how can I make this Mirror as Principal.
Since my Principal and Witness is down, I cannot run below command

use master
go
ALTER DATABASE <database_name> SET PARTNER FAILOVER
go

Scenario-2
Its a continuation question on Scenario-1.

Mirroring state is SYNCRONIZED
witness is down
Principal is down
only mirror is up and running but couldnt come online.
I tried starting Witness , hoping that , mirror and witness are now connected and can form Quorum and make Mirror as Principal, but that didn't happen.
I checked below command
select name,state_Desc from sys.databases

and I can see it is in recovering state and couldn't come online.
I Even tried below so that startup is initiated and recovery can run on that database.

use <dbname>
go

IT throws me an error saying, quorum cannot be forum. Error is
Database %.*ls is enabled for Database Mirroring, but the database lacks quorum: the database cannot be opened.  Check the partner and witness connections if configured.

Question here is, even after starting my witness server , why it couldnt form a Quorum and why didnt Mirror wasnt able to become new Principal.
From the Database monitor tool, it is very evident that, Mirror and Witness are connected but only Pricipal is disconnected as it is down.

Eventually, when I started the Principal server (i.e A), it became as Principal and Mirror was Mirror (there's no change in role)

One more thing, I want to mention here is, I am not using FQDN's. Does it make any difference. I have installed 3 sql instances on my Desktop and worked on it.
Again, I have tested by bring the Principal down and it automatically failover to the Mirror server (i.e. B).

Principal  --> TCP://TESTING-PC:5022
Mirror     --> TCP://TESTING-PC:5023
Witness    --> TCP://TESTING-PC:5024

Appreciate if someone can provide comments/suggestions on Scenario-1 and Scenario-2.

Thank you in advance.

CDC and Trigger

$
0
0

Hi,

What is the major difference between CDC and Trigger.

Viewing all 1024 articles
Browse latest View live


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