Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- column dt new_value _dt
- select to_char(sysdate,'yyyymmdd_hh24mi') dt from dual;
- set line 10000;
- set pagesize 50000;
- set serveroutput on;
- spool .backupTEST_TABLE.sql
- select dbms_metadata.get_ddl(object_type, object_name)
- from user_objects
- where object_type in ('FUNCTION')
- and object_name = 'TEST_TABLE';
- Spool Off
- spool .!Run_&_dt..txt
- BEGIN
- raise_application_error( -20001, 'This is a custom error' );
- EXCEPTION
- WHEN OTHERS THEN
- Prompt ./backup/backup.sql
- @ ./backup/backup.sql
- END;
- Spool Off
- >> BEGIN
- raise_application_error( -20001, 'This is a custom error' );
- EXCEPTION
- WHEN OTHERS THEN
- Prompt ./backup/backup.sql
- @ ./backup/backup.sql
- END;
- Spool Off
- Error at line 18
- ORA-06550: line 6, column 11:
- PLS-00103: Encountered the symbol "/" when expecting one of the following:
- <an identifier> <a double-quoted delimited-identifier>
- current delete exists prior
- ORA-06550: line 6, column 49:
- PLS-00103: Encountered the symbol "SQL" when expecting one of the following:
- <an identifier> <a double-quoted delimited-identifier>
- current delete exists prior
Add Comment
Please, Sign In to add comment