Clustering walkthrough for SQL Server 2008 on Windows 2008
I recently stumbled across a great walk-through for clustering SQL Server on newer versions of Windows. It's really thorough - everything from setting up iSCSI (in this case, to simulate a shared disk when it's physically attached to one node - not ideal, but lets you test the walk-through), adding the required server roles, preparing the servers, and then a walkthrough of every screen in the SQL installation process. Thanks to the writer of this awesome blog!
http://dbperf.wordpress.com/2010/07/10/walkthrough-cluster-setup-sql-win-2008/
Slow SQL Server queries over a linked server from Windows Server 2008
We recently ran into an issue where linked server queries where sometimes taking significantly longer than they should have - queries that executed in under a second on the source server took two minutes when executed from a remote SQL Server over a linked server connection. We assumed it was something to do with our Windows Failover Cluster network connections, but it was happening on non-clustered servers as well.
After some digging, we discovered that it happened when the source server was Windows Server 2008 (or 2008 R2), regardless of what OS the remote linked server was running, and the issue wasn't tied to any particular version of SQL Server. As it turns out, it related to everybody's least favorite network setting, TCP Auto-Tuning - disabling it on the affected source servers resolved the problem immediately, and the queries returned instantly again.
To remedy the situation, follow these steps:
- On the source SQL Server (the one executing the query, not the linked server), open an elevated command prompt (Right click on CMD.EXE and click "Run as Administrator")
- To disable TCP Auto-tuning, run the following command:
netsh int tcp set global autotuninglevel=disabled
- To disable Windows Scaling Heuristics (another feature that can speed up clients, but is no good for servers), run:
netsh int tcp set heuristics disabled
- This will automatically take effect after Windows has the chance to refresh some network communications - you can either wait about an hour, or, if you'd prefer it take effect immediately, restart the SQL Instance. A reboot isn't necessary for this setting to take effect.
I'm not sure why these settings are on by default for servers - they seem to speed up internet browsing and other client-type activities (though there's no shortage of complaints online about them grinding Windows Vista/7 clients to a halt as well), but can cause big problems on servers.
Accessing a clustered SQL Server instance without the instance name
When I clustered SQL Server 2005 the first time, it bothered me that I had to access each clustered instance using both the cluster DNS name and the instance name. If my SQL Cluster is called SQL-CLUSTER and the DNS alias of my first instance is SQL-INSTANCE1, I had to connect to SQL-INSTANCE1\INSTANCE1. Since each instance has a dedicated name and IP address that uniquely identifies it, shouldn't that be enough? Why is the instance name required?
It turns out it's not! With a little tweaking, you can access the instance using just the SQL DNS name, without the instance name, and it works for as many SQL instances as you have on a cluster, not just one (you'll need to repeat this process for each instance). Here's how:
- On the active node for the instance you're adjusting, open the "SQL Server Configuration Manager" from the start menu.
- Expand "SQL Server Network Configuration" and select the instance you want to edit.
- In the right window, right-click "TCP/IP" and select "Properties."
- On the "Protocol" tab, ensure that "Listen All" is set to "Yes"
- On the "IP Addresses" tab, scroll all the way to the bottom, to the "IPAll" section.
- The "TCP port" box is blank by default - set it to 1433, the default port for SQL Server.
- Click "OK" - you'll receive a message that you need to restart the SQL Service.
- Restart the SQL Service on that node.
Presto - done! You can now access this SQL Server instance using either "SQL-INSTANCE1\INSTANCE1" or just "SQL-INSTANCE". It's also worth noting that this network settings follows the instance between active nodes - if you failover the SQL instance to the other node, it should still be addressable the same way, and if you check the protocol settings, you'll see that your change is active on that server now as well.
To me, it's so much easier to not have to use the instance name when addressing the server, and since the service is responding on port 1433, the default port, this change should be compatible with every application that connects, and I haven't had any problems at all.
If you try this and run into any problems, please leave a comment below.
UPDATE:
After playing with this a little more, it seems like it only works with the SQL Native Client. If you attempt to connect via the SQL Server OLEDB driver or the old SQL 2000 driver, you get the error that you're not able to connect to the specified instance. Switching your connection method to the SQL Native Client (SQLNCLI) allows you to connect, assuming your application allows that. Has anybody else experienced this problem?
Scheduled Task “Could not start” when installing SQL Server on a Windows Cluster
I ran into this error while deploying SQL Server 2005 Enterprise to a two-node Windows Server 2003 cluster. The SQL Server installation checked all the prereqs with no problems, and as soon as it was time to actually do the installation, it paused for about 5 minutes, with the message "SQL Server Setup is preparing to make the requested configuration changes..." After a few minutes with no activity, the installation fails with the following error message:

I checked the "Scheduled Tasks" list on the passive node, and found the following:

Starting the task manually, even while setup was still running on the active node, had no effect. Also, the following entry appeared in the Log (Advanced Menu -> View Log):
"SQL Server Remote Setup .job" (setup.exe) 5/1/2009 11:29:45 AM ** ERROR **
Unable to start task.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
SOLUTION:
It turns out it's not an "Access denied" message at all! This occurs when you're logged in to the desktop of the passive node while you're doing the SQL installation. I had a remote desktop session open to both nodes, which caused this problem. Simply logging out of the passive node, then attempting the installation again from the active node, will allow setup to complete successfully.
Please, Microsoft: Add a pre-check to the setup process, or at the very least, give me a real error!