If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > one instance for both client and server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-10, 13:17
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #2 (permalink)  
Old 05-05-10, 13:43
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 05-05-10, 13:54
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #4 (permalink)  
Old 05-05-10, 17:29
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 05-05-10, 19:49
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #6 (permalink)  
Old 05-05-10, 21:00
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #7 (permalink)  
Old 05-05-10, 22:29
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
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?
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS

Last edited by MarkhamDBA; 05-05-10 at 22:33.
Reply With Quote
  #8 (permalink)  
Old 05-05-10, 23:34
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On