Oracle归档路径修改

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     72
Current log sequence           74
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2254952 bytes
Variable Size             213911448 bytes
Database Buffers          310378496 bytes
Redo Buffers                7917568 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     72
Next log sequence to archive   74
Current log sequence           74
[root@oracle ~]# mkdir /u01/app/arch
[root@oracle ~]# chown -R oracle:oinstall /u01/app/arch/
[root@oracle ~]#

修改归档路径为/u01/app/arch 
    mkdir -p /u01/app/arch    ---要修改的归档路径
    archive log list;            ---查看oracle归档
    shutdowm immediate;
    startup mount;            ---oracle需要 启动到mount状态
    alter database archivelog;
    alter system set log_archive_dest_1='location=/u01/app/arch' scope=both;  ---归档路径修改为 指定路径
    alter database open;  

 

THE END