1.用命令 echo $ORACLE_SID 查看当前默认的ORACLE_SID,如果不是要备份的SID,修改 export ORACLE_SID=PORTAL ,(PORTAL为要备份的数据库实例)。
2.以sysdba身份连接到数据库 sqlplus / as sysdba .
3.查看当前sid,确保备份实例正确: select instance from v$thread;
4.查看数据库的日志模式: select log_mode fromv$database;
SQL>select log_mode from v$database;
LOG_MODE
------------------------------------
ARCHIVELOG
5.查看存档的目的地 archive log list
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination/export/db/oracle/oradata/ARCH
Oldest online log sequence 1265
Next log sequence to ar