Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tbs_P1: create, change and delete tablespaces

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

SQL > conn system/oracleSQL > CREATE TABLESPACE tbs_peenbooDATAFILE'/oradata/tbs_peenboo_01.dbf' size 10mEXTENTMANAGEMENT LOCAL AUTOALLOCATESEGMENTSPACE MANAGEMENT AUTO; SQL > create table t_newtab (C1 date) tablespace tbs_peenboo;SQL > select extent_id,bytes from dba_extentsWhere owner='system' and segment_name='T_NEWTAB'; SQL > ALTERTABLE 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 timeSQL > ALTERTABLESPACE 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 tweak newtabling; SQL > alter tablespace tbs_peenboo read write;-enable OMF to create data files SQL > alter system set db_create_file_dest ='/ oradata';-- create tablespaces SQL > create tablespace tbs_omfnew with minimal syntax -- determine the characteristics of the OMF file SQL > selectfile_name,bytes, autoextensible,maxbytes,increment_byFromdba_data_files where tablespace_name = 'TBS_OMFNEW';-- adjust the OMF file to make the characteristics reasonable. 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;-- delete tablespace SQL > droptablespace tbs_omfnew including contents and datafiles

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report