Export Users Trigger Code
2006-08-04 11:59:33 来源:WEB开发网This tip comes from Alessandro Maestri, DBA at Saritel S.p.A. in Pomezia, Italy.
Last year, Thomas Marikle submitted a script to export the current user's PL/SQL source code into a directory.
This was not enough for me, because I had need the current user's trigger code, too.
This script exports the trigger code into a directory. It is derived from Marikle's scripts.
-------------------
export_triggers.sql
-------------------
SET SERVEROUTPUT ON SIZE 1000000
SET ECHO OFF VERIFY OFF FEEDBACK OFF TRIMSPOOL ON PAGES 0 LINES 512
SET TERMOUT OFF
/*
---------------------------------------------------------------------------------------------
--
-- SCRIPT: export_triggers.sql
--
-- AUTHOR: Alessandro Maestri
-- a.maestri@saritel.it
--
-- PURPOSE: Exports the current user's triggers code into a
subdirectory
-- called .\triggers.
--
-- PARAMETERS: none
--
-- DEPENDENCIES: extract_triggers.sql - SQL used to extract triggers
code from the
-- Oracle data dictionary and
perform some
-- simple formatting on it. It
also
-- strips trailing spaces from the
source code.
--
-- REVISIONS:
-- Ver Date Author Description
-- --------- ---------- ------------------
------------------------------------
-- 1.0 03/29/2001 Alessandro Maestri Initial implementation
--
---------------------------------------------------------------------------------------------
*/
更多精彩
赞助商链接