点击(此处)折叠或打开
SQL> show parameter db_create_file_dest NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_create_file_dest string +DATADG ----------------------------------------------------------附件内容------------------------------------------------------------------------------ *.重做日志组的位置点击(此处)折叠或打开
SQL> show parameter DB_CREATE_ONLINE_LOG_DEST NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_create_online_log_dest_1 string +REDODG 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 *.db_recovery_file,归档和闪回日志。点击(此处)折叠或打开
SQL> show parameter DB_RECOVERY_FILE_DEST NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +FRADG db_recovery_file_dest_size big integer 1400000M ------------------------------------------------------------------附件内容-------------------------------------------------------------------- 这里,实操OMF管理表空间的特性。 2.建立test表空间。点击(此处)折叠或打开
SQL> create tablespace test; 3.查看数据库建立表空间的语句:点击(此处)折叠或打开
SQL> select dbms_metadata.get_ddl('TABLESPACE','TEST') from dual; DBMS_METADATA.GET_DDL('TABLESPACE','TEST') -------------------------------------------------------------------------------- CREATE TABLESPACE "TEST" DATAFILE SIZE 104857600 AUTOEXTEND ON NEXT 1048 4.OMF特性默认在数据文件中建立位置,如下:点击(此处)折叠或打开
SQL> select file_name from dba_data_files; FILE_NAME -------------------------------------------------------------------------------- +DATADG/racdb/datafile/users.259.960294561 +DATADG/racdb/datafile/undotbs1.258.960294561 +DATADG/racdb/datafile/sysaux.257.960294561 +DATADG/racdb/datafile/system.256.960294561 +DATADG/racdb/datafile/undotbs2.261.960294747 +DATADG/racdb/datafile/test.263.960295777 //新建立的表空间 5.查看使用OMF特性,建立表空间的属性。(表空间自动扩展)点击(此处)折叠或打开
SQL> select file_name,autoextensible,increment_by from dba_data_files; FILE_NAME -------------------------------------------------------------------------------- AUT INCREMENT_BY --- ------------ +DATADG/racdb/datafile/users.259.960294561 YES 160 +DATADG/racdb/datafile/undotbs1.258.960294561 YES 640 +DATADG/racdb/datafile/sysaux.257.960294561 YES 1280 FILE_NAME -------------------------------------------------------------------------------- AUT INCREMENT_BY --- ------------ +DATADG/racdb/datafile/system.256.960294561 YES 1280 +DATADG/racdb/datafile/undotbs2.261.960294747 YES 3200 +DATADG/racdb/datafile/test.263.960295777 YES 12800 6.删除表空间点击(此处)折叠或打开
SQL> drop tablespace test; Tablespace dropped. 7.主控性强的DBA,控制数据文件的大小,和自动扩展的大小。点击(此处)折叠或打开
SQL> CREATE TABLESPACE ARP DATAFILE SIZE 1024M AUTOEXTEND ON NEXT 1024M; Tablespace created.