SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
SQL>
--linux:
orapwd file=/oracle/app/oracle/product/12.1.0/dbhome_1/dbs/orapwtardb password=orcL#2016 entries=5 force=y;
scp 172.16.28.40:/oracle/app/oracle/product/12.1.0/dbhome_1/dbs/orapwtardb /home/oracle/app/oracle/product/12.1.0/db_1/dbs
shutdown immediate
startup mount
alter database archivelog;
alter database open;
archive log list;
启用自动归档
Alter system set log_archive_start=true scope=spfile
参看参数
SQL> show parameter cluster_database
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
在一台主机上执行:
alter system set cluster_database=false scope=spfile sid='*';
在两台主机上执行:
shutdown immediate
在一台主机上执行:
startup mount(必需要等2台机器同时shutdown完毕即可)
alter database archivelog;
alter database open;
alter system set cluster_database=true scope=spfile sid='*';
shutdown immediate;
在两台主机上执行:
Startup
此时修改完毕即可启用归档,关闭归档方法类似。
vi initauxdb.ora
*.audit_file_dest='/home/oracle/app/oracle/admin/auxdb/adump'
*.audit_trail='db'
*.compatible='12.1.0.2.0'
*.control_files='/home/oracle/app/oracle/oradata/auxdb/control01.ctl','/home/oracle/app/oracle/oradata/auxdb/control02.ctl'
*.db_block_size=8192
*.db_name='auxdb'
db_file_name_convert=('+DATA','/home/oracle/app/oracle/oradata/','/oracle/app/oracle/oradata/oradb/','/home/oracle/app/oracle/oradata/oradb/')
log_file_name_convert=('+DATA','/home/oracle/app/oracle/fast_recovery_area/','+FLASH