SQL Server with Mr. Denny

Aug 3 2009   11:00AM GMT

Single Instance vs Multiple Instances

Denny Cherry Denny Cherry Profile: Denny Cherry


I see this question quite a bit, should I use a single instance or one instance per application database on my server.

The answer to this is it depends.

If you need a clear security buffer between the databases so that someone with sysadmin rights to one database can’t have sysadmin rights to another database then seperate instances will be the way to go.  However this separation will come at a cost.  You now have to use twice as much memory loading up the SQL Server binaries into memory, and you now have to tell the instances how much memory each one can use.

With a single instance you simply tell the SQL Server leave 1 Gig of RAM for the OS (or how ever much you leave) and manage the rest for all the databases on the instance.  When you have more than one instance you have to decided how much memory each instance, and therefor each database will get.  If you guess incorrectly your database performance will suffer greatly because of it.

Another place where you may see some pain is your tempdb performance (assuming that both instances use the same tempdb).  Because you are using two difference instances the SQL Server doesn’t know anything about the load that the other one is trying to place on the disk.  If they both try to hit the disk at the same time with a large amount of load you could end up with additional queuing at the disk that you may not see when using a single instance.

Generally speaking I would recommend using a single instance unless you absolutly had to have a security seperation with the RAM settings being my biggest reason for a single instance.

As for reasons to need a seperate instance databases that need access to features that other databases shouldn’t have access to like xp_cmdshell would be one reason.  Applications which require sysadmin rights to the instance thanks to crappy coding would be another.  And a vendor which requires that there support account on the database have sysadmin rights would be a third.  Off the top of my head those would be about the only reason to seperate the instances.


6  Comments on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.
  • Robboek
    One reason you might need to run multiple instances is the collation of system databases, especially tempdb.
    0 pointsBadges:
  • Crunchie
    [I]Another place where you may see some pain is your tempdb performance (assuming that both instances use the same tempdb). [/I] Different instances cannot share tempdb. Databases in the same instance do. Sharing physical disks is a whole different issue and affects not just tempdb but all databases. RAM is probably one of the easiest issues to address when running multi-instance. It becomes a nightmare to manage in a single instance unless you are running SQL Server 2008 Enterprise Edition with Resource Governor. Even then, it's better, not truly easy. Availability, collation (as per Robboek's comment) and jobs are also tough issues to address in a single instance with multiple DBs.
    75 pointsBadges:
  • Mldba
    One other reason that may drives the decision to take more than one instance is SLA. We can have one instance where databases are available during business hours and one instance where databases are available 24/7.
    0 pointsBadges:
  • PowerEdge
    Hi, I need help to create second instance on SQL 2008 Cluster. I have active/passive Windows 2008 R2 cluster and currently using a default instance of SQL. Most of the blogs mention that installation of new instance is same as the first one and you need to provide IP, network-name and disk resource. But when I use SQL installer to create new instance, it never asks me for IP and network name. As a result the new instance get created at the same location as the default one. I don't know where I am making a mistake. Is there a step by step guide for creating multiple instances on SQL 2008 cluster? Thanks for your help. Regards - Dat
    5 pointsBadges:
  • Denny Cherry
    When you launch the SQL Installer on of the options will be to install a new SQL Cluster instance. This is a separate installer which will walk you through the cluster installation. It is the same procedure for installing the first clustered instance on the cluster.
    69,130 pointsBadges:
  • Blog Year 2012 In Review | Malaysia Software Reseller | Dealer | PCWare2u
    [...] Single Instance vs. Multiple Instances - 4.4k views 9. Back to Basics: The BACKUP DATABASE command - 5.4k views 8. New INSERT syntax in [...]
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: