Oracle设置omf自动管理文件功能

2022-03-14  本文已影响0人  与狼共舞666

如果使用Oracle Managed Files(OMF),则不需要直接管理构成Oracle数据库的各类系统文件。可以根据数据库对象而不是文件名指定specifes操作。对于以下数据库结构,可以按需要在数据库内部使用 标准文件系统接口 来创建和删除文件:

主要设置以下几个参数文件。
闪回区路径参数db_recovery_file_dest
闪回区空间大小参数db_recovery_file_dest_size

sys@ORCL 16:34:42> show parameter db_create_online_log_dest

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_1      string
db_create_online_log_dest_2      string
db_create_online_log_dest_3      string
db_create_online_log_dest_4      string
db_create_online_log_dest_5      string
sys@ORCL 16:35:11> show parameter recovery

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest            string
db_recovery_file_dest_size       big integer 0
recovery_parallelism             integer     0
sys@ORCL 16:35:26> alter system set db_recovery_file_dest_size=4g scope=both;

System altered.

sys@ORCL 16:36:33> show parameter db_recovery

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest            string
db_recovery_file_dest_size       big integer 4G
sys@ORCL 16:39:37> show parameter flashback

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target        integer     1440
sys@ORCL 16:40:21> archive log list
Database log mode          Archive Mode
Automatic archival         Enabled
Archive destination        /archivelog
Oldest online log sequence     80
Next log sequence to archive   84
Current log sequence           84
sys@ORCL 16:40:30> alter system set db_recovery_file_dest='/oradata/flash_recovery_area' scope=both;
alter system set db_recovery_file_dest='/oradata/flash_recovery_area' scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory


sys@ORCL 16:45:10> alter system set db_recovery_file_dest='/oradata/flash_recovery_area' scope=both;

System altered.

sys@ORCL 16:46:53> show parameter db_create_file_dest;

NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest          string
sys@ORCL 16:47:44> alter system set db_create_file_dest='/oradata/bear';

System altered.

sys@ORCL 16:50:08> create tablespace omf_test;

Tablespace created.

上一篇下一篇

猜你喜欢

热点阅读