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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-21-07, 11:02
tbl1 tbl1 is offline
Registered User
 
Join Date: Feb 2007
Posts: 9
Fenced

Hi,

I am using DB2 8.2 for Linux, in dbm cfg I have set KEEPFENCED = YES, but developers creating Stored procedure with not fenced (syscat.procedures column fenced has 'N' value) option.. Is this ok to have stored procedure with not fenced?

Please suggest me

Thanks,

Allian
Reply With Quote
  #2 (permalink)  
Old 05-21-07, 13:05
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, it is OK to have Stored Procedures to be not fenced--as long as you can guarantee that they will not bring down the database. This excerpt from the documentation should give you more insight:

http://publib.boulder.ibm.com/infoce...n/c0005286.htm

Andy
Reply With Quote
  #3 (permalink)  
Old 05-21-07, 14:17
tbl1 tbl1 is offline
Registered User
 
Join Date: Feb 2007
Posts: 9
When creating SQL stored procedure by using development centre 'not fenced' is default.. Is there any way to change all stored procedure to have 'fenced' option

Thanks,

Allian
Reply With Quote
  #4 (permalink)  
Old 05-21-07, 14:30
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You can only set them to "Fenced" ad create time. You can use the Development Center to change the create statement from "NOT FENCED" to "FENCED". Then rebuild them. This should drop them and create them anew.

Andy
Reply With Quote
  #5 (permalink)  
Old 05-22-07, 10:01
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can use the ALTER PROCEDURE statement and switch them to FENCED.

http://publib.boulder.ibm.com/infoce...n/r0008168.htm

Note that fenced procedures and UDFs incurr a communication overhead. The parameters have to be passed to the fenced mode process (db2fmp) via shared memory, whereas non-fenced routines do this in-process. The separation of the processes gives you the safety you need in a production system. So using fenced routines is highly recommended in most cases.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 05-22-07, 14:09
tbl1 tbl1 is offline
Registered User
 
Join Date: Feb 2007
Posts: 9
In the development manual there is no keyword 'FENCED' or 'NOT FENCED' mentioned for CREATE PROCEDURE statement, when I try from development centre I am getting an error for the word 'FENCED'.

that means sql stored procedure always will be created as NOT FENCED ? ..any suggestion

Thanks,

Allian
Reply With Quote
  #7 (permalink)  
Old 05-22-07, 14:15
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by tbl1
In the development manual there is no keyword 'FENCED' or 'NOT FENCED' mentioned for CREATE PROCEDURE statement, when I try from development centre I am getting an error for the word 'FENCED'.

that means sql stored procedure always will be created as NOT FENCED ? ..any suggestion

Thanks,

Allian
You can only specify FENCED/NOT FENCED on non-sql (external) Stored Procedures.

Andy
Reply With Quote
  #8 (permalink)  
Old 05-22-07, 16:00
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Stored procedures with LANGUAGE SQL were translated to C code, which was compiled - but that's only in Version 7 (which is out of service). These days, all LANGUAGE SQL stored procedures are compiled into so-called "sections", a DB2 internal structure for SQL statements. Since DB2 knows what it is doing (contrary to developers of external procedures), there is no point to execute such sections in a fenced process.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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