Results 1 to 8 of 8

Thread: Fenced

  1. #1
    Join Date
    Feb 2007
    Posts
    9

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    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

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

  6. #6
    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

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  8. #8
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

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