smachinesgetmorepowerfulandlessexpensive,peoplearemorelikelytouseasinglemachinetohostmorethanasingleSQLServerdatabase.Overtime,aSQLServermachinemightsupportmoreandmoredatabases.Buteventuallyyouwillneedtoreplaceyourhardware, yourdatabaseserverwillfailduetoahardwareproblem,oryourmulti-databasemachinemightbecomesaturatedwithactivityfrommultipleapplications,eventuallycausingperformanceofall applica-tions tosuffer.What are you to do when one of these situations occurs? How canyou minimize the work requiredto re-point your applications to anew database machine, or splityour environment into multipledatabase machines for perform-ance reasons? Let's look at oneway to design your databaseconnection strategy to simplifychanging application connec-tions so you can plug-and-playdatabases with less administrative overhead when theneed arises.
How Applications Connect
Each application needs to identify the database serverit will be connecting with to retrieve data. Applicationsdo this by using a connection string. A typical connec-tion string might look something like:Server=SSEDB01; Initial Catalog=AdventureWorks;Integrated Security=SSPI;In this example, the databaseserver is identified with amachine name, in this caseSSEDB01. Now a connectionstring doesn't have to have amachine name. It could be an IPaddress, an OBDC DSN name, aDNS alias name, etc. The name just needs to be something thatcan be resolved to an IP address.Name resolution can be done anumber of different ways.If your SQL Server machine islocated within a domain, it canbe registered with the domaincreating a DNS name. When amachine is registered with DNSthen a client or application canconnect to it using the machines registered name,which is how the connection string above works. Evenbetter, with DNS you can create a DNS alias, which is alogical name to represent your SQL Server machine. Byusing a DNS alias name in your connection string, DNStranslates the name to an IP address behind the scenes
Simplifying SQL Server Management, an Internet.com Storage eBook. © 2008, Jupitermedia Corp.
Simplifying SQL Server Management
Connection Strategy for MultipleDatabase Environments
By Gregory A. Larsen
Let's look at one way to design your database connection strategy to simplify changing applicationconnections so you can plug-and-play databases with less administrative overhead when the need arises.