home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / po7_win / db / rdbms71 / dbmsutil.sql < prev    next >
Encoding:
Text File  |  1994-08-07  |  21.5 KB  |  512 lines

  1. rem 
  2. rem $Header: dbmsutil.sql 7010300.1 94/02/24 18:25:58 snataraj Generic<base> $ 
  3. rem 
  4. Rem  Copyright (c) 1991 by Oracle Corporation 
  5. Rem    NAME
  6. Rem      dbmsutil.sql - packages of various utility procedures
  7. Rem    DESCRIPTION
  8. Rem      This file contains various packages:
  9. Rem         dbms_transaction    - transaction commands
  10. Rem         dbms_session    - alter session commands
  11. Rem         dbms_ddl        - ddl commands
  12. Rem         dbms_utility    - helpful utilities
  13. Rem    RETURNS
  14. Rem 
  15. Rem    NOTES
  16. Rem      The procedural option is needed to use these facilities.
  17. Rem
  18. Rem      All of the packages below run with the privileges of calling user,
  19. Rem      rather than the package owner ('sys').
  20. Rem
  21. Rem      Procedure 'dbms_ddl.alter_compile' and 'dbms_ddl.analyze_object
  22. Rem      commit the current transaction, perform the compilation, and 
  23. Rem      then commit again.
  24. Rem 
  25. Rem      The dbms_utility package is run-as-caller (psdicd.c) only for
  26. Rem      its name_resolve, compile_schema and analyze_schema
  27. Rem      procedures.  This package is not run-as-caller
  28. Rem      w.r.t. SQL (psdpgi.c) so that the SQL works correctly (runs as
  29. Rem      SYS).  The privileges are checked via dbms_ddl.
  30. Rem
  31. Rem    MODIFIED   (MM/DD/YY)
  32. Rem     wmaimone   02/07/94 -  add set close_cached_open_cursors to dbms_sessio
  33. Rem     dsdaniel   02/04/94 -  dbms_util.port_string icd
  34. Rem     adowning   02/02/94 -  split file into public / private binary files
  35. Rem     rjenkins   10/28/93 -  make comma_to_table more consistent
  36. Rem     rjenkins   10/12/93 -  adding comma_to_table
  37. Rem     rjenkins   09/03/93 -  adding name_parse
  38. Rem     hjakobss   07/15/93 -  bug 170473
  39. Rem     hjakobss   07/13/93 -  bug 169577
  40. Rem     dsdaniel   03/12/93 -  local_tid, step_id functions for replication  
  41. Rem     mmoore     01/11/93 -  merge changes from branch 1.37.312.1 
  42. Rem     mmoore     01/05/93 - #(145287) add another exception for discrete mode
  43. Rem     mmoore     12/11/92 -  disable set_role in stored procs 
  44. Rem     rkooi      11/24/92 -  fixes per Peter 
  45. Rem     rkooi      11/21/92 -  get rid of error argument to name_resolve 
  46. Rem     tpystyne   11/20/92 -  fix compile_all and analyze_schema 
  47. Rem     rkooi      11/16/92 -  fix set_label 
  48. Rem     rkooi      11/16/92 -  fix comments 
  49. Rem     rkooi      11/13/92 -  add name_res procedure 
  50. Rem     tpystyne   11/07/92 -  make analyze parameters optional 
  51. Rem     mmoore     11/04/92 -  add new analyze options 
  52. Rem     ghallmar   11/03/92 -  add dbms_transaction.purge_mixed 
  53. Rem     rkooi      10/30/92 -  get rid of caller_id and unique_stmt_id 
  54. Rem     rkooi      10/26/92 -  owner -> schema for SQL2 
  55. Rem     rkooi      10/25/92 -  bug 135880 
  56. Rem     mmoore     10/13/92 - #(131686) change messages 2074,4092,0034 
  57. Rem     rkooi      10/02/92 -  compile_all fix 
  58. Rem     mmoore     10/02/92 -  change pls_integer to binary_integer 
  59. Rem     tpystyne   10/01/92 -  fix Bob's mistakes 
  60. Rem     tpystyne   09/28/92 -  disallow commit/rollback force in rpc and trigge
  61. Rem     mmoore     09/25/92 - #(130566) don't allow set_nls or set_role in trig
  62. Rem     tpystyne   09/23/92 -  rename analyze to analyze_object 
  63. Rem     rkooi      08/24/92 -  handle delimited id's in alter_compile 
  64. Rem     tpystyne   08/06/92 -  add analyze_schema 
  65. Rem     epeeler    07/29/92 -  add function to get time 
  66. Rem     rkooi      06/25/92 -  workaround pl/sql bug with 'in' in SQL
  67. Rem     rkooi      06/03/92 -  add 'get unique session id' 
  68. Rem     jcohen     05/28/92 -  add = to alter session set label 
  69. Rem     jloaiza    05/12/92 -  add discrete 
  70. Rem     rkooi      04/22/92 -  put in checks for execute_sql for triggs, stored
  71. Rem     mmoore     04/14/92 -  move begin_oltp to package transaction 
  72. Rem     rkooi      04/06/92 -  merge changes from branch 1.4.300.1 
  73. Rem     rkooi      04/01/92 -  Creation - split/recombined from other files
  74. Rem     mroberts   02/21/92 -  call alter_compile, not sql_ddl 
  75. Rem     rkooi      02/06/92 -  testing 
  76. Rem     rkooi      02/03/92 -  compilation errors 
  77. Rem     rkooi      01/16/92 -  Creation 
  78.  
  79. REM ********************************************************************
  80. REM THESE PACKAGES MUST NOT BE MODIFIED BY THE CUSTOMER.  DOING SO
  81. REM COULD CAUSE INTERNAL ERRORS AND SECURITY VIOLATIONS IN THE
  82. REM RDBMS.  SPECIFICALLY, THE PSD* AND EXECUTE_SQL ROUTINES MUST NOT BE
  83. REM CALLED DIRECTLY BY ANY CLIENT AND MUST REMAIN PRIVATE TO THE PACKAGE BODY.
  84. REM ********************************************************************
  85.  
  86. create or replace package dbms_transaction is
  87.  
  88.   ------------
  89.   --  OVERVIEW
  90.   --
  91.   --  This package provides access to SQL transaction statements from
  92.   --  stored procedures.
  93.   --  It also provids functions for monitoring transaction activities
  94.   --  (transaction ids and ordering of steps of transactions )
  95.  
  96.   ----------------------------
  97.   --  PROCEDURES AND FUNCTIONS
  98.   --
  99.   procedure read_only;
  100.   --  Equivalent to SQL "SET TRANSACTION READ ONLY"
  101.   procedure read_write;
  102.   --  Equivalent to SQL "SET TRANSACTION READ ONLY"
  103.   procedure advise_rollback;
  104.   --  Equivalent to SQL "ALTER SESSION ADVISE ROLLBACK"
  105.   procedure advise_nothing;
  106.   --  Equivalent to SQL "ALTER SESSION ADVISE NOTHING"
  107.   procedure advise_commit;
  108.   --  Equivalent to SQL "ALTER SESSION ADVISE COMMIT"
  109.   procedure use_rollback_segment(rb_name varchar2);
  110.   --  Equivalent to SQL "SET TRANSACTION USE ROLLBACK SEGMENT <rb_seg_name>"
  111.   --  Input arguments:
  112.   --    rb_name
  113.   --      Name of rollback segment to use.
  114.   procedure commit_comment(cmnt varchar2);
  115.   --  Equivalent to SQL "COMMIT COMMENT <text>"
  116.   --  Input arguments:
  117.   --    cmnt
  118.   --      Comment to assoicate with this comment.
  119.   procedure commit_force(xid varchar2, scn varchar2 default null);
  120.   --  Equivalent to SQL "COMMIT FORCE <text>, <number>"
  121.   --  Input arguments:
  122.   --    xid
  123.   --      Local or global transaction id.
  124.   --    scn
  125.   --      System change number.
  126.   procedure commit;
  127.     pragma interface (C, commit);                          -- 1 (see psdicd.c)
  128.   --  Equivalent to SQL "COMMIT".  Here for completeness.  This is
  129.   --    already implemented as part of PL/SQL.
  130.   procedure savepoint(savept varchar2);
  131.     pragma interface (C, savepoint);               -- 2 (see psdicd.c)
  132.   --  Equivalent to SQL "SAVEPOINT <savepoint_name>".  Here for
  133.   --    completeness. This is already implemented as part of PL/SQL.
  134.   --  Input arguments:
  135.   --    savept
  136.   --      Savepoint identifier.
  137.   procedure rollback;
  138.     pragma interface (C, rollback);               -- 3 (see psdicd.c)
  139.   --  Equivalent to SQL "ROLLBACK".  Here for completeness. This is 
  140.   --    already implemented as part of PL/SQL.
  141.   procedure rollback_savepoint(savept varchar2);
  142.     pragma interface (C, rollback_savepoint);           -- 4 (see psdicd.c)
  143.   --  Equivalent to SQL "ROLLBACK TO SAVEPOINT <savepoint_name>".  Here for
  144.   --    completeness. This is already implemented as part of PL/SQL.
  145.   --  Input arguments:
  146.   --    savept
  147.   --      Savepoint identifier.
  148.   procedure rollback_force(xid varchar2);
  149.   --  Equivalent to SQL "ROLLBACK FORCE <text>"
  150.   --  Input arguments:
  151.   --    xid
  152.   --      Local or global transaction id.
  153.   procedure begin_discrete_transaction;
  154.     pragma interface (C, begin_discrete_transaction);      -- 5 (see psdicd.c)
  155.   --  Set "discrete transaction mode" for this transaction.
  156.   --  Exceptions:
  157.   --    ORA-08175 will be generated if a transaction attempts an operation 
  158.   --      which cannot be performed as a discrete transaction.  If this 
  159.   --      exception is encountered, rollback and retry the transaction.
  160.  
  161.   --    ORA-08176 will be generated if a transaction encounters data changed 
  162.   --      by an operation that does not generate rollback data : create index,
  163.   --      direct load or discrete transaction.  If this exception is
  164.   --      encountered, retry the operation that received the exception.
  165.   --    
  166.   DISCRETE_TRANSACTION_FAILED exception;
  167.     pragma exception_init(DISCRETE_TRANSACTION_FAILED, -8175);
  168.  
  169.   CONSISTENT_READ_FAILURE exception;
  170.     pragma exception_init(CONSISTENT_READ_FAILURE, -8176);
  171.  
  172.   procedure purge_mixed(xid varchar2);
  173.   --  When indoubt transactions are forced to commit or rollback (instead of
  174.   --    letting automatic recovery resolve their outcomes), there is a
  175.   --    possibility that a transaction can have a mixed outcome: some sites
  176.   --    commit, and others rollback.  Such inconsistency cannot be resolved
  177.   --    automatically by ORACLE; however, ORACLE will flag entries in
  178.   --    DBA_2PC_PENDING by setting the MIXED column to a value of 'yes'.
  179.   --    ORACLE will never automatically delete information about a mixed
  180.   --    outcome transaction.  When the application or DBA is sure all
  181.   --    inconsistencies that might have arisen as a result of the mixed
  182.   --    transaction have been resolved, this procedure can be used to
  183.   --    delete the information about a given mixed outcome transaction.
  184.   --  Input arguments:
  185.   --    xid
  186.   --      This must be set to the value of the LOCAL_TRAN_ID column in 
  187.   --      the DBA_2PC_PENDING table.
  188.  
  189.   FUNCTION local_transaction_id(create_transaction BOOLEAN := FALSE)
  190.     RETURN VARCHAR2;
  191.   --  Return local (to instance) unique identfier for current transaction
  192.   --  Return null if there is no current transction.
  193.   --  Input parmaeters:
  194.   --     create_transaction 
  195.   --       If true , start a transaciton if one is not currently 
  196.   --       active.
  197.   --
  198.   FUNCTION step_id RETURN NUMBER;
  199.   --  Return local (to local transaction ) unique positive integer that orders
  200.   --  The DML operations of a transaction.
  201.   --  Input parmaeters:
  202.  
  203. end;
  204. /
  205. drop public synonym dbms_transaction
  206. /
  207. create public synonym dbms_transaction for sys.dbms_transaction
  208. /
  209. grant execute on dbms_transaction to public
  210. /
  211.  
  212. create or replace package dbms_session is
  213.   ------------
  214.   --  OVERVIEW
  215.   --
  216.   --  This package provides access to SQL "alter session" statements, and
  217.   --  other session information from, stored procedures.
  218.  
  219.   ----------------------------
  220.   --  PROCEDURES AND FUNCTIONS
  221.   --
  222.   procedure set_role(role_cmd varchar2);
  223.   --  Equivalent to SQL "SET ROLE ...".
  224.   --  Input arguments:
  225.   --    role_cmd
  226.   --      This text is appended to "set role " and then executed as SQL.
  227.   procedure set_sql_trace(sql_trace boolean);
  228.   --  Equivalent to SQL "ALTER SESSION SET SQL_TRACE ..."
  229.   --  Input arguments:
  230.   --    sql_trace
  231.   --      TRUE or FALSE.  Turns tracing on or off.
  232.   procedure set_nls(param varchar2, value varchar2);
  233.   --  Equivalent to SQL "ALTER SESSION SET <nls_parameter> = <value>"
  234.   --  Input arguments:
  235.   --    param
  236.   --      The NLS parameter. The parameter name must begin with 'NLS'.
  237.   --    value
  238.   --      The value to set the parameter to.  If the parameter is a
  239.   --      text literal then it will need embedded single-quotes.  For
  240.   --      example "set_nls('nls_date_format','''DD-MON-YY''')"
  241.   procedure close_database_link(dblink varchar2);
  242.   --  Equivalent to SQL "ALTER SESSION CLOSE DATABASE LINK <name>"
  243.   --  Input arguments:
  244.   --    name
  245.   --      The name of the database link to close.
  246.   procedure set_label(lbl varchar2);
  247.   --  Equivalent to SQL "ALTER SESSION SET LABEL <label specification>"
  248.   --  Input arguments:
  249.   --    lbl
  250.   --      Either 'DBHIGH', 'DBLOW', or a text literal.
  251.   procedure set_mls_label_format(fmt varchar2);
  252.   --  Equivalent to SQL "ALTER SESSION SET MLS_LABEL_FORMAT <format>"
  253.   --  Input arguments:
  254.   --    fmt
  255.   --      Format specification for the label.
  256.   procedure reset_package;
  257.   --  Deinstantiate all packages in this session.  In other words, free
  258.   --    all package state.  This is the situation at the beginning of
  259.   --    a session.
  260.   function unique_session_id return varchar2;
  261.   --  Return an identifier that is unique for all sessions currently
  262.   --    connected to this database.  Multiple calls to this function 
  263.   --    during the same session will always return the same result.
  264.   --  Output arguments:
  265.   --    unique_session_id
  266.   --      can return up to 24 bytes.
  267.   function is_role_enabled(rolename varchar2) return boolean;
  268.   --  Determine if the named role is enabled for this session.
  269.   --  Input arguments:
  270.   --    rolename
  271.   --      Name of the role.
  272.   --  Output arguments:
  273.   --    is_role_enabled
  274.   --      TRUE or FALSE depending on whether the role is enabled.
  275.   procedure set_close_cached_open_cursors(close_cursors boolean);
  276.   --  Equivalent to SQL "ALTER SESSION SET CLOSE_CACHED_OPEN_CURSORS ..."
  277.   --  Input arguments:
  278.   --    close_cursors
  279.   --      TRUE or FALSE.  Turns close_cached_open_cursors on or off.
  280. end;
  281. /
  282.  
  283. drop public synonym dbms_session
  284. /
  285. create public synonym dbms_session for sys.dbms_session
  286. /
  287. grant execute on dbms_session to public
  288. /
  289.  
  290. create or replace package dbms_ddl is
  291.   ------------
  292.   --  OVERVIEW
  293.   --
  294.   --  This package provides access to some SQL DDL statements from
  295.   --  stored procedures.
  296.  
  297.   ----------------------------
  298.   --  PROCEDURES AND FUNCTIONS
  299.   --
  300.   procedure alter_compile(type varchar2, schema varchar2, name varchar2);
  301.   --  Equivalent to SQL "ALTER PROCEDURE|FUNCTION|PACKAGE [<schema>.]
  302.   --    <name> COMPILE [BODY]".  If the named object is this package,
  303.   --    or any packages upon which it depends (currently "standard" or 
  304.   --    "dbms_standard") then the procedure simply returns (since these
  305.   --    packages are clearly successfully compiled).
  306.   --  Input arguments:
  307.   --    type
  308.   --      Must be one of "PROCEDURE", "FUNCTION", "PACKAGE" or "PACKAGE
  309.   --      BODY".
  310.   --    schema
  311.   --      The schema name.  If NULL then use current schema.  Case sensitive.
  312.   --    name
  313.   --      The name of the object.  Case sensitive.
  314.   --  Exceptions:
  315.   --    ORA-20000: Insufficient privileges or object does not exist.
  316.   --    ORA-20001: Remote object, cannot compile.
  317.   --    ORA-20002: Bad value for object type.  Should be one of PACKAGE,
  318.   --      PACKAGE BODY, PROCEDURE, or FUNCTION.
  319.   procedure analyze_object
  320.     (type varchar2, schema varchar2, name varchar2, method varchar2,
  321.      estimate_rows number default null, 
  322.      estimate_percent number default null);
  323.   --  Equivalent to SQL "ANALYZE TABLE|CLUSTER|INDEX [<schema>.]<name>
  324.   --    [<method>] STATISTICS [SAMPLE <n> [ROWS|PERCENT]]"
  325.   --  Input arguments:
  326.   --    type
  327.   --      One of 'TABLE', 'CLUSTER' or 'INDEX'.  If none of these, the
  328.   --      procedure just returns.
  329.   --    schema
  330.   --      schema of object to analyze.  NULL means current schema.  Case
  331.   --      sensitive.
  332.   --    name
  333.   --      name of object to analyze.  Case sensitive.
  334.   --    method
  335.   --      NULL or 'ESTIMATE'.  If 'ESTIMATE' then either estimate_rows
  336.   --      or estimate_percent must be non-zero.
  337.   --    estimate_rows
  338.   --      Number of rows to estimate
  339.   --    estimate_percent
  340.   --      Percentage of rows to estimate.  If estimate_rows is specified
  341.   --      than ignore this parameter.
  342.   --  Exceptions:
  343.   --    ORA-20000: Insufficient privileges or object does not exist.
  344.   --    ORA-20001: Bad value for object type.  Should be one of TABLE, INDEX
  345.   --      or CLUSTER.
  346. end;
  347. /
  348.  
  349. drop public synonym dbms_ddl
  350. /
  351. create public synonym dbms_ddl for sys.dbms_ddl
  352. /
  353. grant execute on dbms_ddl to public
  354. /
  355.  
  356. create or replace package dbms_utility is
  357.   ------------
  358.   --  OVERVIEW
  359.   --
  360.   --  This package provides various utility routines.
  361.  
  362.   ----------------------------
  363.   --  PL/SQL TABLES
  364.   --
  365.   type uncl_array IS table of VARCHAR2(227) index by BINARY_INTEGER;
  366.   --  Lists of "USER"."NAME"."COLUMN"@LINK should be stored here
  367.  
  368.   type name_array IS table of VARCHAR2(30) index by BINARY_INTEGER;
  369.   --  Lists of NAME should be stored here
  370.  
  371.   type dblink_array IS table of VARCHAR2(128) index by BINARY_INTEGER;
  372.   --  Lists of database links should be stored here
  373.  
  374.   ----------------------------
  375.   --  PROCEDURES AND FUNCTIONS
  376.   --
  377.   procedure compile_schema(schema varchar2);
  378.   --  Compile all procedures, functions and packages in the specified
  379.   --  schema.  After calling this procedure you should select from view
  380.   --  ALL_OBJECTS for items with status of 'INVALID' to see if all objects
  381.   --  were successfully compiled.  You may use the SQLDBA command "SHOW
  382.   --  ERRORS <type> <schema>.<name>" to see the errors assocated with
  383.   --  'INVALID' objects.
  384.   --  Input arguments:
  385.   --    schema
  386.   --      Name of the schema.
  387.   --  Exceptions:
  388.   --    ORA-20000: Insufficient privileges for some object in this schema.
  389.   procedure analyze_schema(schema varchar2, method varchar2, 
  390.     estimate_rows number default null, 
  391.     estimate_percent number default null);
  392.   --  Analyze all the tables, clusters and indexes in a schema.
  393.   --  Input arguments:
  394.   --    schema
  395.   --      Name of the schema.
  396.   --    method, estimate_rows, estimate_ercent
  397.   --      See the descriptions above in sql_ddl.analyze.object.
  398.   --  Exceptions:
  399.   --    ORA-20000: Insufficient privileges for some object in this schema.
  400.   function format_error_stack return varchar2;
  401.     pragma interface (C, format_error_stack);            -- 1 (see psdicd.c)
  402.   --  Format the current error stack.  This can be used in exception
  403.   --    handlers to look at the full error stack.
  404.   --  Output arguments:
  405.   --    format_error_stack
  406.   --      Returns the error stack.  May be up to 2000 bytes.
  407.   function format_call_stack return varchar2;
  408.     pragma interface (C, format_call_stack);            -- 2 (see psdicd.c)
  409.   --  Format the current call stack.  This can be used an any stored
  410.   --    procedure or trigger to access the call stack.  This can be
  411.   --    useful for debugging.
  412.   --  Output arguments:
  413.   --    format_call_stack
  414.   --      Returns the call stack.  May be up to 2000 bytes.
  415.   function is_parallel_server return boolean;
  416.   --  Find out if this database is running in parallel server mode.
  417.   --  Output arguments:
  418.   --    is_parallel_server
  419.   --      TRUE if this instance was started in parallel server mode,
  420.   --      FALSE otherwise.
  421.   function get_time return number;
  422.   --  Find out the current time in 100th's of a second.
  423.   --  Output argukments:
  424.   --    get_time
  425.   --      The time is the number of 100th's of a second from some
  426.   --      arbitrary epoch.
  427.   procedure name_resolve(name in varchar2, context in number,
  428.     schema out varchar2, part1 out varchar2, part2 out varchar2,
  429.     dblink out varchar2, part1_type out number, object_number out number);
  430.   --  Resolve the given name.  Do synonym translation if necessary.  Do
  431.   --    authorization checking.
  432.   --  Input arguments:
  433.   --    name
  434.   --      The name of the object.  This can be of the form [[a.]b.]c[@d]
  435.   --      where a,b,c are SQL identifier and d is a dblink.  No syntax
  436.   --      checking is performed on the dblink.  If a dblink is specified,
  437.   --      of the name resolves to something with a dblink, then object
  438.   --      is not resolved, but the schema, part1, part2 and dblink out
  439.   --      arguments are filled in.  a,b and c may be delimted identifiers,
  440.   --      and may contain NLS characters (single and multi-byte).
  441.   --    context
  442.   --      Not currently used, must be set to 1 for future compatibility.
  443.   --  Output arguments:
  444.   --    schema
  445.   --      The schema of the object.  If no schema is specified in 'name'
  446.   --      then the schema is determined by resolving the name.
  447.   --    part1
  448.   --      The first part of the name.  The type of this name is specified
  449.   --      part1_type (synonym, procedure or package).
  450.   --    part2
  451.   --      If this is non-null, then this is a procedure name within the
  452.   --      package indicated by part1.
  453.   --    dblink
  454.   --      If this is non-null then a database link was either specified
  455.   --      as part of 'name' or 'name' was a synonym which resolved to
  456.   --      something with a database link.  In this later case, part1_type
  457.   --      will indicate a synonym.
  458.   --    part1_type
  459.   --      The type of part1 is
  460.   --        5 - synonym
  461.   --        7 - procedure (top level)
  462.   --        8 - function (top level)
  463.   --        9 - package
  464.   --      If a synonym, it means that 'name' is a synonym that translats
  465.   --      to something with a database link.  In this case, if further
  466.   --      name translation is desired, then you must call the 
  467.   --      dbms_utility.name_resolve procedure on this remote node.
  468.   --    object_number
  469.   --      If non-null then 'name' was successfully resolved and this is the
  470.   --      object number which it resolved to.
  471.   --  Exceptions:
  472.   --    All errors are handled by raising exceptions.  A wide variety of
  473.   --    exceptions are possible, based on the various syntax error that
  474.   --    are possible when specifying object names.
  475.   procedure name_tokenize( name    in  varchar2,
  476.                    a       out varchar2,
  477.                    b       out varchar2,
  478.                        c       out varchar2,
  479.                    dblink  out varchar2, 
  480.                            nextpos out binary_integer);
  481.   --  Call the parser to parse the given name as "a [. b [. c ]][@ dblink ]".
  482.   --  Strip doublequotes, or convert to uppercase if there are no quotes.
  483.   --    Ignore comments of all sorts.  Do no semantic analysis.  Leave any
  484.   --      missing values as null. 
  485.   --  For each of a,b,c,dblink, tell where the following token starts
  486.   --    in anext,bnext,cnext,dnext respectively.
  487.   PROCEDURE comma_to_table( list   IN  VARCHAR2,
  488.                             tablen OUT BINARY_INTEGER,
  489.                             tab    OUT uncl_array);
  490.   --  Convert a comma-separated list of names into a PL/SQL table of names
  491.   --  This uses name_tokenize to figure out what are names and what are commas
  492.  
  493.   PROCEDURE table_to_comma( tab    IN  uncl_array, 
  494.                             tablen OUT BINARY_INTEGER,
  495.                             list   OUT VARCHAR2);
  496.   --  Convert a PL/SQL table of names into a comma-separated list of names
  497.  
  498.   FUNCTION port_string RETURN VARCHAR2;
  499.   --  Return a string that uniquely identifies the version of Oracle and 
  500.   --  the port (operating system).  EG "VAX/VMX-7.1.0.0"
  501.   --  maximum length is port specific.
  502.  
  503. end;
  504. /
  505.  
  506. drop public synonym dbms_utility
  507. /
  508. create public synonym dbms_utility for sys.dbms_utility
  509. /
  510. grant execute on dbms_utility to public
  511. /
  512.