分类: Oracle
2009-02-23 19:28:08
PROCEDURE NIDBEGIN
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
NEWDBNAME VARCHAR2 IN
OLDDBNAME VARCHAR2 IN
NEWDBID NUMBER IN
OLDDBID NUMBER IN
DOREVERT BINARY_INTEGER IN
DORESTART BINARY_INTEGER IN
EVENTS NUMBER IN
PROCEDURE NIDEND
PROCEDURE NIDGETNEWDBID
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
DBNAME VARCHAR2 IN
NDBID NUMBER OUT
PROCEDURE NIDPROCESSCF
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
CHGDBID BINARY_INTEGER OUT
CHGDBNAME BINARY_INTEGER OUT
SQL> DESC DBMS_BACKUP_RESTORE
ERROR:
ORA-04043: 对象 DBMS_BACKUP_RESTORE 不存在
C:\>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期三 5月 21 22:10:17 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database open;
数据库已更改。
SQL> select dbid from v$database;
DBID
----------
1465764760
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string eygle
SQL> exec dbms_backup_restore.nidbegin('eygle','EYGLE','3935589514','1465764760',0,0,10)
PL/SQL 过程已成功完成。
SQL> select dbid from v$database;
DBID
----------
1465764760
SQL> variable a number;
SQL> variable b number
SQL> variable c number;
SQL> exec dbms_backup_restore.nidprocessdf(0,0,:a,:b,:c);
PL/SQL 过程已成功完成。
SQL> print :a
A
----------
0
SQL> print :b
B
----------
1
SQL> print :c
C
----------
1
SQL> exec dbms_backup_restore.nidprocesscf(:a,:b);
PL/SQL 过程已成功完成。
SQL> print :a
A
----------
1
SQL> print :b
B
----------
1
SQL> exec dbms_backup_restore.nidend;
PL/SQL 过程已成功完成。
SQL> select dbid from v$database;
DBID
----------
3935589514