Single Instance vs Multiple Instances

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.



5 Responses

  1. One reason you might need to run multiple instances is the collation of system databases, especially tempdb.

  2. [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.

  3. 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.

  4. 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.

    – Dat

  5. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trust DCAC with your data

Your data systems may be treading water today, but are they prepared for the next phase of your business growth?