您好,登錄后才能下訂單哦!
SQL>conn system/oracle SQL>CREATE TABLESPACE tbs_peenboo DATAFILE'/oradata/tbs_peenboo_01.dbf' size 10m EXTENTMANAGEMENT LOCAL AUTOALLOCATE SEGMENTSPACE MANAGEMENT AUTO; SQL>create table t_newtab(c1 date)tablespace tbs_peenboo; SQL>select extent_id,bytes from dba_extents Where owner='system' and segment_name='T_NEWTAB'; SQL>ALTER TABLE t_newtab ALLOCATE EXTENT; SQL>ALTERTABLESPACE T_PEENBOO OFFLINE; SQL>INSERT INTO T_NEWTAB VALUES (SYSDATE); ----ora-00376:file 6 cannot be read at this time SQL>ALTER TABLESPACE T_PEENBOO ONLINE; SQL>INSERT INTO T_NEWTAB VALUES (SYSDATE); ----1 rowcreated SQL>alter tablespace tbs_peenboo read only; SQL>INSERT INTO T_NEWTAB VALUES (SYSDATE); ----ora-00372: file 6 cannot be modified atthis time SQL>droptable t_newtab; ----tabledropped; SQL>alter tablespace tbs_peenboo read write; ----啟用OMF來創建數據文件 SQL>alter system set db_create_file_dest = '/oradata'; --用最少的語法創建表空間 SQL>create tablespace tbs_omfnew; --確定OMF文件的特性 SQL>selectfile_name,bytes, autoextensible,maxbytes,increment_by Fromdba_data_files where tablespace_name ='TBS_OMFNEW'; --調整OMF 文件,使特性趨于合理。 SQL>alter database datafile '/oradata/ORACLE11G/datefile/o1_mf_tbs_omfnew_3olpn462.dbf' Resize500m; SQL>alter database datafile '/oradata/ORACLE11G/datefile/o1_mf_tbs_omfnew_3olpn462.dbf' Autoextendon next 100m maxsize 2G; --刪除表空間 SQL>droptablespace tbs_omfnew including contents and datafiles;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。