修改归档文件路径

SQL> alter system set log_archive_dest_1='+DATA' scope=both;
alter system set log_archive_dest_1='+DATA' scope=both
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
 
后察看了文档,是由于语法中的存在一些小的技巧。
alter system set log_archive_dest_1='location=d:oradata' scope=both;
在文件目标中加上 location的字样就可以了。不知 oracle中还存在多少这种技巧。

SQL> show parameter SPFILE;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /opt/ora10g/product/10.2.0/db_
                                                 1/dbs/spfileorcl.ora
SQL> alter system set log_archive_dest_1='location=+DATA' scope=both;
System altered.
SQL> alter system set log_archive_format ='arch_%s_%R_%T.arc' scope=spfile;
System altered.
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            +DATA
Oldest online log sequence     21
Next log sequence to archive   25
Current log sequence           25
SQL>

你可能感兴趣的:(oracle,职场,休闲)