Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have installed failover clustering feature on two servers with Windows Server 2012 and then I installed SQL Server 2012 on both of them. I also enabled SQL Server 2012 AlwaysOn feature. Now I can access each node by instance name. I can also connect using failover cluster name. What is the difference between accessing SQL Server by instance name and cluster name?

share|improve this question
1  
If you have a failover cluster instance, you can't "access each node" - only one node will have the instance online at any one time. It is unclear to me how many instances of SQL Server you've installed. Can you show the different server names you're using to connect, and indicate whether they truly are separate instances? Also, if you are using Availability Groups (AlwaysOn isn't a "feature"), indicate which instances have replicas for what groups. –  Aaron Bertrand Apr 30 '13 at 14:44
    
I have two nodes. I can connect to eash node separately or by using cluster name. When i create a database with cluster name, database will be created on one node.I dont have shared storage and that is not the requirement of AlwaysOn. –  Yazdkhasti Apr 30 '13 at 16:40
2  
I'm still so very, very confused. shrug –  Aaron Bertrand Apr 30 '13 at 16:43
    
Ok consider the secanrio that you created a failover cluster using two nodes. you dont have a shared storage. you install SQL server on both nodes and you can connect to each node separately. you can also connect to cluster using cluster name. Is there any advantage in creating a database by connecting to the cluster? Does it fail over automatically to another node when on node is down without using AlwaysOn? –  Yazdkhasti Apr 30 '13 at 16:56
1  
Are you sure you installed a clustered instance of SQL Server? Or did you install standalone instances of SQL Server that happen to be on two different nodes of a Windows Server Failover Cluster? –  Aaron Bertrand Apr 30 '13 at 16:59
show 1 more comment

closed as not a real question by Aaron Bertrand, RolandoMySQLDBA, Max Vernon, Jon Seigel, Mark Storey-Smith May 1 '13 at 0:14

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

Clustering works very differently in 2012, and using your knowledge from SQL Server 2008 could be confusing you.

Try the following from PowerShell (as admin):

Import-Module failoverclusters
Get-ClusterGroup

If you see something like:

Name                            OwnerNode                State
----                            ---------                -----
Cluster Group                   server1                 Online

Then you haven't configured AlwaysOn yet - all you've done is set up an initial cluster.

In this case, connecting to cluster name/IP is meaningless. All it will do is connect you to the server that owns the Windows Failover Cluster, which is arbitrary and completely unrelated to your database configuration.

Once you've correctly configured your SQL Server AlwaysOn Availability groups - basically, additional mini-clusters with their own name and IP address - then the additional names/IP addresses will be meaningful.

For example, you might have three databases configured like this:

Server1:

Database1 (Active - Availability group sqlcluster1)
Database2 (Active - Availability group sqlcluster1)
Database3 (Standby - Availability group sqlcluster2)

Server2:

Database1 (Standby - Availability group sqlcluster1)
Database2 (Standby - Availability group sqlcluster1)
Database3 (Active - Availability group sqlcluster2)

At this point, the server you're connecting to becomes extremely important.

You will never want to use applications to directly connect to Server1 or Server2, because which databases are online and which are in recovery will depend on when you last failed over. Instead, all of your applicatons should connect to sqlcluster1 or sqlcluster2 (which have their own IP addresses), and they will automatically reach the database server that currently has that database online.

Additional configuration of your server will be required if you don't have any Availability Groups set up yet.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.