REM AUTHOR : FURTHERCHAN
REM DATE : 2010-01-04
REM DEP : TC
REM PURPOSE: DATABASE SCRIPT BACKUP
REM /*SOME SET*/
SET DEFINE OFF
REM NO ROW PROMPT
SET FEEDBACK OFF
REM NO ROW HEAD
SET HEADING OFF
REM NO RESULTE DISPLAY
SET TERMOUT OFF
SET PAGES 0
SET LONG 90000
SET ECHO OFF
REM /*GET OBJECTS FROM SPECIFIED SCHEMA*/
SPOOL c:/BK_DB_Script.sql;
REM YOU CAN CONNECT ORACLE DATABASE HERE, AS FOLLOW:
REM connect his3/his3
REM /*THE SELECT METHOD*/
SELECT DBMS_METADATA.GET_DDL(U.OBJECT_TYPE, U.OBJECT_NAME) FROM USER_OBJECTS U WHERE U.OBJECT_TYPE IN ('FUNCTION','PROCEDURE','PACKAGE');
SPOOL OFF;
REM /*EXIT*/
EXIT
使用DBMS_METADATA备份FUNCTION,PROCEDURE and PACKAGE
最新推荐文章于 2022-06-10 16:42:49 发布