views:

32

answers:

3

Hi,

I'm looking for a bit of advice setting up a SQL cluster to be accessed via an alias.

At present, say my cluster is called 'SQLCLUSTER' and I want to set up an alias to redirect to it. Ideally, I'd like any attempt to connect to '(local)' on either of the machines in the cluster to redirect to 'SQLCLUSTER'. I'm using SQL server 2008.

Is this possible with clusters?

Thanks in advance,

Dave

A: 

All of your connection strings should refer to the SQL virtual cluster name, not the individual machine names. This is the only way to guarantee that they will continue to connect properly in the event of a failover. For more details on how clustering works with SQL Server, see Brad McGehee's article here.

Joe Stefanelli
That makes perfect sense, but I'm not sure this answers my question... Surely if I can have an alias for one sql isntance, I can create an alias for a cluster's name? Thanks for the input though.
Dave
A: 

I was able to get this working in the end. It was a case of configuring named pipes correctly, and tweaking a few more SQL server properties (external connections, connection methods and others..)

Thanks for the contributions.

Dave
+2  A: 

You're missing the point.

  • SQLCLUSTER is just an alias to an IP address
  • A request will go to the IP address
  • The IP address is "owned" by one of the nodes in the cluster. It is impossible for > 1 physical node to own it
  • That node will be running SQL Server and will respond to requests
  • It is transparent to the client.

The fact you had to tweak named pipes rings alarm bells. Who uses named pipes still unless you have some shitty 3rd party app. There should be no tweaking at all

gbn
Nhibernate with linq uses named pipes. The SQL cluster is called 'sqlcluster' and all development has been done as part of a large team assuming a local database (localhost). The big issue, mainly is that our installers (created as part of a fully unit tested vs2010 solution) are pointed at localhost. We have automated tools to populate the database with the most basic set of data, run as part of the windows installer, all we need is a method to install to the cluster which works the same for our many test envs and dev machines. Sure we could switch out build files and database.XML etc,
Dave
But that would not be benificial for anyone, I'd like to keep the install method identical so it's tried and tested at every dev env setup and test env setup too. Hope this gives. Little more detail, that would maybe be beneficial in the question, but it's sorted now. Essentially once im past this initial setup I can direct all app servers to the cluster through a simple config change, Thanks for your input and time though, I'll keep it in mind :) Dave
Dave
Nhibernate with linq uses named pipes? That's a wrong setting somewhere. I'd also fix your installers. Don't hack your environment because someone can't configure a connection or a VS project properly.
gbn
Thanks, I've had a look and tweaked a few settings in the database.xml - tcp/ip connection now. Thanks GBN
Dave
Thanks for the advice and help with this gbn.
Dave