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

  1. rem 
  2. rem $Header: dbmspexp.sql 7010300.1 94/02/24 18:23:57 snataraj Generic<base> $ 
  3. rem 
  4. Rem  Copyright (c) 1992 by Oracle Corporation 
  5. Rem    NAME
  6. Rem      dbmspexp.sql - procedural extesnions to export
  7. Rem    DESCRIPTION
  8. Rem      This file defines a pl/sql package containing 
  9. Rem      functions that are called by export to dynamically link in 
  10. Rem      pl/sql logic in the export process.  These routines 
  11. Rem      interpret the expact$ table.
  12. Rem    RETURNS
  13. Rem 
  14. Rem    NOTES
  15. Rem      <other useful comments, qualifications, etc.>
  16. Rem    MODIFIED   (MM/DD/YY)
  17. Rem     adowning   02/02/94 -  split file into public / private binary files
  18. Rem     dsdaniel   01/31/94 -  Branch_for_patch
  19. Rem     dsdaniel   12/29/93 -  Creation
  20.  
  21. CREATE OR REPLACE PACKAGE DBMS_EXPORT_EXTENSION AS 
  22. ------------------------------------------------------------
  23. -- Overview
  24. --
  25. -- This package implemts PL/SQL extensions to Export as described by the
  26. -- ...
  27. ---------------------------------------------------------------------
  28. -- SECURITY
  29. -- This package is owned by SYS,  and is  granted to PUBLIC.
  30. -- The procedures dynamically called by the package are called using
  31. -- The parse_as_user option
  32. ------------------------------------------------------------------------------
  33. -- EXCEPTIONS
  34. -- 
  35.    unExecutedActions EXCEPTION;
  36. -- A function was not called with the same parameters until it returned NULL.
  37. -- This indicates an internal error in EXPORT.
  38. -- CONSTANTS
  39. -- 
  40. --   Function codes for the expact$ table.
  41. -- 
  42.   func_pre_table   CONSTANT NUMBER := 1;     /* execute before loading table */
  43.   func_post_tables CONSTANT NUMBER := 2; /* execute after loading all tables */
  44.   func_pre_row     CONSTANT NUMBER := 3;       /* execute before loading row */
  45.   func_post_row    CONSTANT NUMBER := 4;        /* execute after loading row */
  46.   func_row         CONSTANT NUMBER := 5;   /* execute in leiw of loading row */
  47. ------------------------------------------------------------------------------
  48. -- PROCEDURES AND FUNCTIONS
  49.   FUNCTION pre_table(table_schema IN VARCHAR2,
  50.                      table_name   IN VARCHAR2)
  51.     RETURN VARCHAR2;
  52. -- execute pre_table functions from the expact$ table, for a specific table
  53. -- Input Parameters:
  54. --   table_schema 
  55. --     The schema of the table being exported.
  56. --   table_name
  57. --     The name for the table beign exported.
  58. -- Result:
  59. --   A string containg a procedure invocation to be put in the export stream.
  60. --   If non-null, this procedure should be called again (immediatly) for the
  61. --   same table.  If NULL, there are no additional pre_table calls to 
  62. --   be exported to the
  63. --   stream for this table and function.
  64. -- Exceptions:
  65. --   unExecutedActions
  66. --   Any error encountered during executing of the action
  67.  
  68.   FUNCTION post_tables(table_schema IN VARCHAR2,
  69.                        table_name   IN VARCHAR2)
  70.     RETURN VARCHAR2;
  71. -- execute post_tables functions from the expact$ table, for a specific table
  72. -- Input Parameters:
  73. --   table_schema 
  74. --     The schema of the table being exported.
  75. --   table_name
  76. --     The name for the table beign exported.
  77. -- Result:
  78. --   A string containg a procedure invocation to be put in the export stream.
  79. --   If non-null, this procedure should be called again (immediatly) for the
  80. --   same table.  
  81. --  If NULL, there are no additional post_tables calls to be exported to the
  82. --   stream for this table.
  83. -- Exceptions:
  84. --   unExecutedActions
  85. --   Any error encountered during executing of the action
  86. ----------------------------------------------------------------------------
  87. -- ROW FUNCTIONS WILL BE ADDED IN THE FUTURE
  88. ----------------------------------------------------------------------------
  89. END DBMS_EXPORT_EXTENSION;
  90. /
  91.  
  92. GRANT execute ON sys.dbms_export_extension to public; 
  93.  
  94.