SQL> alter system set log_archive_dest='location=/u01/app/oracle/archivelog' scope=spfile;
SQL> shutdown immediate
SQL> startup
ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux Error: 2: No such file or directory
[oracle@even ~]$ mkdir -p /u01/app/oracle/archivelog
SQL> startup mount
ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux Error: 2: No such file or directory
//建立该目录,还是开启不了数据库
[oracle@even ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:30:38 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create pfile from spfile;
File created.
SQL> exit
[oracle@even dbs]$ vi initemrep.ora
#*.log_archive_dest='location=/u01/app/oracle/archivelog'
//把该行注释掉或删除,重新创建spfile。
[oracle@even ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 7 15:31:20 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1346052 bytes
Variable Size 390071804 bytes
Database Buffers 117440512 bytes
Redo Buffers 14249984 bytes
Database mounted.
Database opened.
百度发现原来语法不对。
log_archive_dest 和 log_archive_duplex_dest 是不需要写 'location=' 这个前缀的。因为这两个参数就是为了本地归档存在的。
而log_archive_dest_1-9 这10个参数不但可以设置本地归档 也可以设置远程归档!语法如下:
本地归档:alter system set log_archive_dest='location=xxx';
远程归档:alter system set log_archive_dest='SERVICES=xxx';
SQL> alter system set log_archive_dest='/u01/app/oracle/archivelog' scope=spfile;
重启OK