Home > Ask the SQL Server Experts > Archive: SQL Server 2005 Questions & Answers > Setting up automatic switchover between SQL Server instances
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Setting up automatic switchover between SQL Server instances

Adam Machanic EXPERT RESPONSE FROM: Adam Machanic

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 29 November 2005
We have two identical boxes, both running SQL Server 2000 Standard Edition with Service Pack 4 on Windows 2003. We are using transactional replication to keep these our application database on the primary and secondary instances 'in synch.'

If we have a primary meltdown, we'd like to kill replication on the secondary and make the secondary the new primary. We have about 200-300 Visual Fox Pro 9.0 users who should now be directed to the new primary instance of SQL Server. What I'm wondering about is the least painful way to make this happen.

Our instances of SQL Server are named instances ... in other words, we did not go with the MachineName = SQL Server InstanceName default. Let's assume our Instance names are Machine1Primary and Machine2Secondary and our Primary has a meltdown. What I would like to do is have our 200-300 users 'magically' point to the Machine2Secondary instance of SQL Server without having to change the client connect strings for several hundred users. I was hoping the 'magic' involves some SQL Server stuff that I'm just not aware of.

As a follow up, is there a way to have the secondary instance not be visible? Since it's participating in replication as the subscriber, the database cannot be read-only because the replication function needs to write to it. I'd like to ensure that nobody accidentally or purposefully got connected to it.



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
SQL Server Replication
SQL Server Mailbag: Migrating down to Standard Edition
Push vs. pull: Configuring SQL Server replication
Top load balancing methods for SQL Server
New replication features in SQL Server 2008 and what they mean to you
SQL Server database replication tutorial
Licensing a standby server for SQL Server replication
Upgrade live applications to SQL Server 2005 for high availability
Tool to synchronize two SQL Server databases
Simplify SQL Server replication
Replication techniques in SQL Server

Microsoft SQL Server 2000
Track changes to SQL Server 2000 and 2005 with one simple utility
Is it possible to find disabled indexes in SQL Server 2000?
FAQ: Creating and altering SQL Server tables
FAQ: SQL Server comparison features
SQL Server DBMS' growing popularity is no coincidence
What is a SQL Server instance?
Strange error when installing SQL Server 2000 Developer Edition
Working with multiple versions of SQL Server
Test for hardware problems with PHYSICAL_ONLY
How to get started learning about SQL Server
Microsoft SQL Server 2000 Research

SQL Server High Availability, Scalability and Reliability
SQL Server high availability: Options and caveats
High availability and the database
Are data warehouses made for the cloud?
Top load balancing methods for SQL Server
Maintaining high availability of SQL Server virtual machines
Creating fault-tolerant SQL Server installations
Scaling up vs. scaling out with SQL Server 2008
How to configure storage in SQL Server database with more writes than reads
SQL Server database replication tutorial
Licensing a standby server for SQL Server replication
SQL Server High Availability, Scalability and Reliability Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
replication  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


As I am not an expert when it comes to SQL Server high availability, I consulted my friend Hilary Cotter (http://www.nwsu.com), master of all things replication-related.

Hilary noted that replication cannot help with the automatic failover. It can only provide mirroring. In his opinion, you'll "have to either come up with a code solution to redirect to the secondary or somehow update the DNS cache so that all clients are redirected to the secondary. Basically, you need to have some sort of geospatial load balancing which virtualizes the IP. The code solution would involve a checking to make sure the database is online each time any data access occurs and if it is not, it will try the secondary."

I should also note that what you're describing is exactly what SQL Server 2005's database mirroring feature provides. If you can upgrade, you might want to start testing that as a possible solution. It will be available early next year, so you won't have to wait too long to roll it into production.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts