DB2 Basics: What is an Instance?

You may also like...

11 Responses

  1. roger gilmartin says:

    Very useful definition.

  2. stellios missirlis says:

    very good article indeed
    so in DB2 after you defined an instance, can you have multiple databases?


  3. Shivraj says:

    Nice article 🙂 I was explaining this to novice db2 users and related instance concept with listener for simplicity.

    In db2, there is only one listener for each instance, each listener can serve only one instance, and it is started when the DB2 instance is started.

    Your article sheds light on how much more the db2 instance is with enough clarity. 🙂
    One doubt though, what’s the advantage of having multiple databases in one instance which DB2 provides. Does Oracle also allows multiple dbs in one instance too ?

    Best Regards

    • Ember Crooks says:

      The advantage of having multiple databases in one instance is usually ease of administration – each instance requires a certain amount of work (each is upgraded separately, usually scripts and other maintenance can run for multiple databases in the same instance, but not for databases in separate instances without root), and if you have a lot of small databases with compatible requirements for instance-level settings, it is easier to have them in one instance. For important databases or large databases one database per instance (per server, even) is better. I’m a firm believer in separate instances in a lot of scenarios, but not all.

      Oracle in recent versions has introduced the ability to have more than one database in an instance (called transportable databases) – BUT because of their different definition of an instance, this means that all databases in an instance share the same memory areas – unlike DB2 where some memory areas would be shared, but most are per-database (or per-connection). This is a distinct disadvantage in my opinion, but then DB2’s bufferpools have always been more configurable than Oracle’s buffer cache, in my opinion.

  4. krishna says:

    Thanks for all the work that you do in blogging about DB2.
    How it is different of having multiple databases under one instance from having the one database under one instance ? assuming the each database size as 10 GB and total number of databases as 8 in db2 v10.1
    Which is recommendable as per IBM.

    • Ember Crooks says:

      Generally for production, we prefer to see one database per instance. There are a number of parameters that can only be set at the instance level. The thing to keep in mind for non-production is that you want to ensure that the databases on the same instance would be upgraded together and would not have incompatible instance level settings. For small databases, grouping into one instance makes more sense – particularly if the databases are related in some way, such as configuration databases for the same tool or set of tools. If one database crashes, it can crash others or require an instance-level restart, so for keeping that separate, separate instances are also good. There are a lot of factors to consider, so no one rule of thumb.

  5. jordan says:

    Hello Guys,
    Newbie to database environment ,just need to ask instance account and the database account what is different ?

    • Ember Crooks says:

      Usually there is an instance owner. I have not heard of a “database account” so I cannot say how it is used in your enviornment.

  1. August 4, 2015

    […] First, if you don’t understand what an instance is, check out my earlier blog entry: DB2 Basics: What is an Instance? […]

  2. January 5, 2016

    […] DB2 Basics: What is an Instance? […]

Leave a Reply

Your email address will not be published. Required fields are marked *