Oracle RAC 11g如何修改归档到ASM FRA磁盘
程序员文章站
2022-05-05 08:01:33
...
1,创建ASM FRA DGselect PATH, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE from V$ASM_DISK;CREATE DISKGROUP fra EXTER
1,创建ASM FRA DG
select PATH, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE from V$ASM_DISK;
CREATE DISKGROUP fra EXTERNAL REDUNDANCY DISK '/dev/mapper/mpath50p1';
如果使用asmlib方式管理磁盘,则使用ORCL:FRADATA02'方式
CREATE DISKGROUP fra2 EXTERNAL REDUNDANCY DISK 'ORCL:FRADATA02';
ALTER DISKGROUP FRA ADD DISK '/dev/mapper/mpath51p1';
再次查看状态,,也可使用图形界面asmca
2、修改数据库参数文件
修改DB_RECOVERY_FILE_DEST_SIZE和DB_RECOVERY_FILE_DEST两个参数,分别制定了FRA区的大小和位置
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE = 1000G scope=both;
SQL> alter system set DB_RECOVERY_FILE_DEST = '+FRA' scope=both;
SQL> col name format a20;
SQL> SELECT * FROM V$RECOVERY_FILE_DEST;
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ----------- ---------- ----------------- ---------------
+FRA 1.0737E+12 0 0 0
3、修改数据库为归档状态
-- shutdown immediate all database instances
$ srvctl stop database -d tyolap
-- startup database in mount mode
$ srvctl start database -d tyolap -o mount
-- enable archvive logging
$ sqlplus / as sysdba
sql> alter database archivelog;
sql> exit;
-- stop database
$ srvctl stop database -d tyolap
-- restart all database instances
$ srvctl start database -d tyolap
-- verify archiving is enabled by means of:
sql> archive log list;
4、验证结果
SQL> alter system switch logfile;
ASMCMD> pwd
+FRA/TYOLAP/ARCHIVELOG/2012_02_01
ASMCMD> ls
thread_2_seq_49.258.774095981
thread_3_seq_42.256.774095973
thread_3_seq_43.257.774095979