Oracle9i Recovery Manager Reference Release 1 (9.0.1) Part Number A90136-02 |
|
RMAN Commands , 55 of 60
To execute a SQL statement or a PL/SQL stored procedure from within Recovery Manager.
SQL
command at the RMAN prompt or within the braces of a
RUN
command.
SQL
keyword must be enclosed in double quotes. For example, use the following syntax:
SQL "CREATE TABLESPACE temp1 DATAFILE ' '/oracle/dbs/temp1.f' ' SIZE 10M TEMPORARY"
If you attempt to use single quotes for the string following the SQL keyword or use only one set of single quotes for the filename, then the command fails.
SELECT
statements.
This example backs up a tablespace and then archives all unarchived online logs:
BACKUP TABLESPACE users; SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";
This example specifies a filename by using duplicate single quotes within the context of a double-quoted string:
SQL "ALTER TABLESPACE tbs_1 ADD DATAFILE ''/oracle/dbs/tbs_7.f'' NEXT 10K MAXSIZE 100k;"
This example issues a PL/SQL stored procedure called scott.update_log
:
RUN { SQL ' BEGIN scott.update_log; END; '; }
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|