Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399

    Unanswered: one instance for both client and server

    if our DB2 server is installed on the same machine as the application, how do we create one instance for both?

    ./db2icrt -a ?? -p n0000n -u inst1f1 inst1i1

    what is -a and -p in this case?

    we will not have client instance - one instance for both.
    are there any implications of doing it this way?
    security concerns?

    Thanks
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you install a server on a machine, it comes with a client and no separate client instance is required. However, you will need the client application userid to execute the appropriate db2profile command for that instance (or another instance if there is more than one).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by Marcus_A View Post
    If you install a server on a machine, it comes with a client and no separate client instance is required. However, you will need the client application userid to execute the appropriate db2profile command for that instance (or another instance if there is more than one).
    yes, that's the idea.

    will performance improve since there is not going via network any more?

    I am still wondering what port and authorizations should be used in this case (no port is used though). wll any port do?
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by MarkhamDBA View Post
    yes, that's the idea.

    will performance improve since there is not going via network any more?

    I am still wondering what port and authorizations should be used in this case (no port is used though). wll any port do?
    If you are using the Type 2 driver (DB2 Client) there is no TCPIP access, the user id must run the db2profile for the instance instance and then connect to one of the databases listed in "db2 list db directory". If you use UNIX, the command to run the db2profile is placed in the .profile (slightly different for Linux) file of the instance owner when the instance is created (so you can see what code to copy to .profile of the user who will access the db locally). If you are using Windows, I don't know where that is located.

    For a type 4 driver (Universal driver) I guess you would use localhost and the port number and database in the url connection string, but not sure.

    Hard to answer for certain, because you didn't state the OS platform and the type of application you are using.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by MarkhamDBA View Post
    yes, that's the idea.

    will performance improve since there is not going via network any more?
    Keep in mind that on AIX there is a limit for the number of shared memory segments an application can attach to. For 32-bit processes the limit is 11. Each local connection uses one shared segment, in addition to other segments used by the DB2 instance. If you are going to exceed this number, you will have to use TCP/IP loopback connections anyway.

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    To answer one of your questions, there is at least a theoretical performance benefit for not having to use the tcpip sockets layer if the app is on the same machine as the database. I know that DB2 avoids using tcpip in DPF (Data Partitioning Feature) when one partition communicates with another partition and both partitions happen to be on the same physical node (it must use tcpip if the partition is on another physical node). This is done specifically to gain a performance advantage, because there is often a significant amount of traffic between nodes in a DPF data warehouse application. That is not to say that any performance difference would actually be measurable or significant for your specific application.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  7. #7
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    Quote Originally Posted by n_i View Post
    Keep in mind that on AIX there is a limit for the number of shared memory segments an application can attach to. For 32-bit processes the limit is 11. Each local connection uses one shared segment, in addition to other segments used by the DB2 instance. If you are going to exceed this number, you will have to use TCP/IP loopback connections anyway.
    ours is 64-bit. how can i make sure that it is not going to be a problem?
    Last edited by MarkhamDBA; 05-05-10 at 23:33.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by MarkhamDBA View Post
    ours is 64-bit. how can i make sure that it is not going to be a problem?
    It's not going to be a problem if your instance and application are both 64-bit. If appl is 32-bit, then this limitation still applies. You can read more about this limitation here:
    IBM - Using EXTSHM with DB2 on AIX may cause performance degradation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •