Link to home
Start Free TrialLog in
Avatar of soadmin
soadmin

asked on

SQL Server 2012 automatic failover

Hello,

I just got my sql 2012 high availability group setup and it seems to be working fine; however in testing, it does not automatically failover like I thought it would.  I'm testing this by stopping sql services on one server and seeing if it fails over to the other server, which it does not.  I have synchronous commit on both servers as well as automatic failover set to automatic.

Am I missing something?

Thanks,
Avatar of edtechdba
edtechdba
Flag of United States of America image

Are you using an AlwaysOn Availability Group? If so, is it enabled?
http://msdn.microsoft.com/en-us/library/ff878259.aspx
Avatar of arnold
Stopping a service is not a failover test.  You need to either reboot the server or trigger an event on which you configured the cluster as a dependency.

The services are controlled by the cluster admin.

You should use the cluster administrator and use it to trigger a failure on the current active node that should trigger the transition.
Avatar of soadmin
soadmin

ASKER

Hello,

Yes, they are enabled and I am doing all of this testing logged in with my domain admin account.  Since these are VM's, another test I simply did was to turn off the vm (not shutdown) that way it will act like we lost power at the one site and immediately kills the primary server.  On the secondary server the database that is part of the availability group says resolving while the database, under the top level databases says recovery pending.  In instances like this, does it take time for it to "failover" or at least make the decision to fail over?
Avatar of soadmin

ASKER

On the secondary server that says "resolving" if I try and fail it over I get the attached message.  I've also included what the sql server is showing.
Capture.PNG
Capture.PNG
In real hosts, the transition is "quick" seconds.

Look at the cluster setup.

How are the quorum and other disks presented to the cluster?

The first suggests that the system to which the transition is occurring does not have the quorum resource nor did the main cluster transitioned from the host you just shutdown.

Host1 and host2 are OS clustered
You then have an application cluster, sql.
The first error suggests that the OS cluster IP and responsibility did not transition.
Avatar of soadmin

ASKER

One thing I never did was run the Cluster auto update GUI to check verification.  I had to install the auto-update portion to ensure all tests passed.  I'm going to see what happens now after I install all windows updates.
Avatar of soadmin

ASKER

Another issue I am running into is DFS replication is not working now.  Is this because these machines are clusters?
Avatar of soadmin

ASKER

I have a feeling, the reason I'm running into issues is because this is all VM with no attached storage.  Without that, it seems like I cannot change the quorum disk to node and disk, nor can I add storage to the cluster when it says to select storage.   Can anyone out there concur with this?
How are you deploying the "storage"
The shared storage must not be presented by the host, it must be through access to the resource since each VM must be able to reach the storage.

Do you have a single hyper-v host and the clustered VM are within this host?
If this is for a purpose of testing, the shared storage can be from the host.
Avatar of soadmin

ASKER

Hello,

I'm using windows 8 64bit as the VM host and created three guests: 1 x DC and 2 x File servers all with just one C drive.  The VM's are not running on a cluster, but rather a cluster is running within the VM's, all on one domain.  How would I publish storage to the 2 file servers running the WFC?
The storage has to be a resource from the windows 8 either as a virtual SAN, FC, SCSI attached storage.  What virtual server are you running? VMware, virtualbox, virtual-PC?
Avatar of soadmin

ASKER

I took an external USB drive offline and was able to add that to the settings of the VM under the scsi drive.  It seen it so I clicked apply.  I booted up the VM and it does see the drive but when I try and add a disk, it says a suitable disk could not be found.
To make it a shared resource, it must be provided by the virtualization.
As soon as you access the device as USB, it is no longer available as a shared resource within the cluster.

You need as part of the cluster group resource configuration locate the device.  Not sure whether a USB attached device is a valid option in cluster configuration.

On the host create a set of VM disks that are presented either as SCSI devices or VM Iscsi using is iscsi target with iscsi initiator on each VM.
Then within the cluster configuration, you will point to the discovery IP of the host.
Avatar of soadmin

ASKER

HI Everyone,

So just to be clear, if I wanted to setup SQL high availability groups, do I need some type of external storage to do so?  I guess I'm getting confused.  

I installed failover cluster role on both servers, and both are identical.  I have sql 2012 high availability group setup with no issues.  Do I need to create some type of disk for failover?  I'm just using two servers for all of this.

Thanks everyone.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of soadmin

ASKER

Hello,

So what is a good way to test the failover?  I ask because I have two servers that are both DC's.  They also have SQL and IIS installed.  If the primary at the first site, loses building power, isn't that the same test as just powering it off?   If so, the DB does not failover properly.

I've done this with SQL mirroring as well and have the same result.  Any ideas?
For database mirroring you need. Third system that functions as the witness.  If you only have two systems the mirroring does not auto transition.
Note if you use mirroring with a witness and ay two systems are down, so is the database.

You are looking at a geographic cluster I.e. a DR?
Avatar of soadmin

ASKER

Sorry, I misstated my last post.  If the building loses power, isn't it the same as me pulling doing a hard power down of the server?
It depends on your configuration.

Has the cluster ever failed over?
DCs are running on both nodes rather than as part of a cluster, correct?
Avatar of soadmin

ASKER

Hi Arnold,

Yes, the DC is independent and not part of the cluster.  Good question.