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 > fenced id shared by multiple instances

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-09, 22:36
rdba rdba is offline
Registered User
 
Join Date: Aug 2009
Posts: 30
fenced id shared by multiple instances

Is it ok to use one fenced id for multiple instances or should we create one fenced id per instance? This is for 9.1 on AIX
Reply With Quote
  #2 (permalink)  
Old 09-11-09, 04:25
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Sharing is normal procedure.
__________________
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 09-11-09, 12:34
rdba rdba is offline
Registered User
 
Join Date: Aug 2009
Posts: 30
What are the advantages/disadvantages of using one fenced id?
Reply With Quote
  #4 (permalink)  
Old 09-11-09, 13:59
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Quote:
Originally Posted by rdba
What are the advantages/disadvantages of using one fenced id?

I'm not into fenced stuff... so I asked another person this question and here is the response:

"I would think its common to have one fenced id for all your instances.. but in terms of advantages the one i can think of is that its easier to maintain.. since its only one user.. the purpose of the id is for security.. so that udf/sp code is running under a specific id, and that id can be monitored.. if its better to have a separate fenced id for each instance then that's really up to the user.. that way you would know which instance is using a certain sp/udf, and can control that for each instance.. if you use one general fenced id, then it would be hard to detect which instance is using it at a certain time."
Reply With Quote
  #5 (permalink)  
Old 09-11-09, 20:52
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
The fenced user id exists for routines that are being created to run in fenced mode (outside of the DB2 address space). Very few people write such fenced routines.
  • All SQL SP's and UDF's are "not fenced" (they run inside DB2 address space).
  • C/C++ routines can be fenced or not fenced, at user option
  • Java routines are always fenced.

Since almost all DB2 customers create SQL routines, the fenced id is rarely ever used. Therefore it can be shared among instances.

Some routines that are shipped with DB2 are written in C and are fenced (such as the administrative stored procedures), but since they are already created the fenced user id is not used.

Running a routine in fenced mode means it will be slower than if it ran in "not fenced" mode, but the advantage of fenced mode is that if there is a bug or memory addressing error in the routine, it will not crash DB2.
__________________
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
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