home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 42.ddi / lib / ORACA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-04  |  4.6 KB  |  132 lines

  1. /*
  2.  * $Header: oraca.h,v 1030600.1 88/09/28 11:33:04 rcs Exp $ oraca.h Copyr (c) 1987 Oracle
  3.  */
  4.  
  5. /* V1PCC10306,DISK$DEV6:[PCCSRC.DEFS.10306] */
  6. /* Copyright (c) 1985 by Oracle Corporation. */
  7.  
  8. /*
  9. NAME
  10.   ORACA : Oracle Communications Area.
  11. FUNCTION
  12.   Contains no code. Provides supplementary communications to/from
  13.   Oracle (in addition to standard SQLCA).
  14. NOTES
  15.   oracchf : Check cursor cache consistency flag. If set AND oradbgf
  16.         is set, then directs SQLLIB to perform cursor cache
  17.         consistency checks before every cursor operation
  18.         (OPEN, FETCH, SELECT, INSERT, etc.).
  19.   oradbgf : Master DEBUG flag. Used to turn all DEBUG options
  20.         on or off.
  21.   orahchf : Check Heap consistency flag. If set AND oradbgf is set,
  22.         then directs SQLLIB to perform heap consistency checks
  23.         everytime memory is dynamically allocated/free'd via
  24.         sqlalc/sqlfre/sqlrlc. MUST BE SET BEFORE 1ST CONNECT
  25.         and once set cannot be cleared (subsequent requests
  26.         to change it are ignored).
  27.   orastxtf: Save SQL stmt text flag. If set, then directs SQLLIB
  28.         to save the text of the current SQL stmt in orastxt
  29.         (in VARCHAR format).
  30.   orastxt : Saved len and text of current SQL stmt (in VARCHAR
  31.         format).
  32.   orasfnm : Saved len and text of filename containing current SQL
  33.         stmt (in VARCHAR format).
  34.   oraslnr : Saved line nr within orasfnm of current SQL stmt.
  35.  
  36.   Cursor cache statistics. Set after COMMIT or ROLLBACK. Each
  37.   CONNECT'd DATABASE has its own set of statistics.
  38.  
  39.   orahoc  : Highest Max Open OraCursors requested. Highest value
  40.         for MAXOPENCURSORS by any CONNECT to this DATABASE.
  41.   oramoc  : Max Open OraCursors required. Specifies the max nr
  42.         of OraCursors required to run this pgm. Can be higher
  43.         than orahoc if working set (MAXOPENCURSORS) was set
  44.         too low, thus forcing the PCC to expand the cache.
  45.   oracoc  : Current nr of OraCursors used.
  46.   oranor  : Nr of OraCursor cache reassignments. Can show the
  47.         degree of "thrashing" in the cache. Optimally, this
  48.         nr should be kept as low as possible (time vs space
  49.         optimization).
  50.   oranpr  : Nr of SQL stmt "parses".
  51.   oranex  : Nr of SQL stmt "executes". Optimally, the relation-
  52.         ship of oranex to oranpr should be kept as high as
  53.         possible.
  54.  
  55.  
  56.   If the symbol ORACA_INIT is defined, then the ORACA will be
  57.   statically initialized. Although this is not necessary in order
  58.   to use the ORACA, it is a good pgming practice not to have
  59.   unitialized variables. However, some C compilers/OS's don't
  60.   allow automatic variables to be init'd in this manner. Therefore,
  61.   if you are INCLUDE'ing the ORACA in a place where it would be
  62.   an automatic AND your C compiler/OS doesn't allow this style
  63.   of initialization, then ORACA_INIT should be left undefined --
  64.   all others can define ORACA_INIT if they wish.
  65.  
  66. OWNER
  67.   Clare
  68. DATE
  69.   10/19/85
  70. MODIFIED
  71.   Clare      02/20/86 - PCC [10101l] Feature: Heap consistency check.
  72.   Clare      03/04/86 - PCC [10101r] Port: ORACA init ifdef.
  73.   Clare      03/12/86 - PCC [10101ab] Feature: ORACA cuc statistics.
  74. */
  75.  
  76. #ifndef  ORACA
  77. #define  ORACA       1
  78.  
  79. struct     oraca
  80.      {
  81.      char       oracaid[8];           /* Reserved                  */
  82.      long       oracabc;           /* Reserved                  */
  83.  
  84. /*     Flags which are setable by User. */
  85.  
  86.      long       oracchf;           /* <> 0 if "check cur cache consistncy"*/
  87.      long       oradbgf;           /* <> 0 if "do DEBUG mode checking"    */
  88.      long       orahchf;           /* <> 0 if "do Heap consistency check" */
  89.      long       orastxtf;           /* SQL stmt text flag              */
  90. #define  ORASTFNON 0               /* = don't save text of SQL stmt       */
  91. #define  ORASTFERR 1               /* = only save on SQLERROR          */
  92. #define  ORASTFWRN 2               /* = only save on SQLWARNING/SQLERROR  */
  93. #define  ORASTFANY 3               /* = always save               */
  94.      struct
  95.        {
  96.        unsigned short orastxtl;
  97.        char       orastxtc[70];
  98.        } orastxt;               /* text of last SQL stmt           */
  99.      struct
  100.        {
  101.        unsigned short orasfnml;
  102.        char       orasfnmc[70];
  103.        } orasfnm;               /* name of file containing SQL stmt    */
  104.      long       oraslnr;           /* line nr-within-file of SQL stmt     */
  105.  
  106.      long       orahoc;           /* highest max open OraCurs requested  */
  107.      long       oramoc;           /* max open OraCursors required          */
  108.      long       oracoc;           /* current OraCursors open          */
  109.      long       oranor;           /* nr of OraCursor re-assignments      */
  110.      long       oranpr;           /* nr of parses                  */
  111.      long       oranex;           /* nr of executes              */
  112.      };
  113.  
  114. struct oraca oraca
  115. #ifdef ORACA_INIT
  116.      =
  117.      {
  118.      {'O','R','A','C','A',' ',' ',' '},
  119.      sizeof(struct oraca),
  120.      0,0,0,0,
  121.      {0,{0}},
  122.      {0,{0}},
  123.      0,
  124.      0,0,0,0,0,0
  125.      }
  126. #endif
  127.      ;
  128.  
  129. #endif
  130.  
  131. /* end oraca.h */
  132.