SQL> conn / as sysdba
Connected.
SQL> grant select on dba_objects to a;
Grant succeeded.
SQL> conn a/a
Connected.
SQL> select count(*) from dba_objects;
COUNT(*)
----------
9602
SQL> create table test as select * from sys.dba_objects;
create table test as select * from sys.dba_objects
*
ERROR at line 1:
ORA-01652: unable to extend temp segment by 8 in tablespace A_TBS
SQL> conn / as sysdba
Connected.
SQL> desc dba_data_files;
Name Null? Type
----------------------------------------- -------- ----------------------------
FILE_NAME VARCHAR2(513)
FILE_ID NUMBER
TABLESPACE_NAME VARCHAR2(30)
BYTES NUMBER
BLOCKS NUMBER
STATUS VARCHAR2(9)
RELATIVE_FNO NUMBER
AUTOEXTENSIBLE VARCHAR2(3)
MAXBYTES NUMBER
MAXBLOCKS NUMBER
INCREMENT_BY NUMBER
USER_BYTES NUMBER
USER_BLOCKS NUMBER
ONLINE_STATUS VARCHAR2(7)
SQL> select file_name,file_id,tablespace_name,bytes/1024/1024 MB,status,autoextensible from dba_data_files;
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk1/system01.dbf 1 SYSTEM 335 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/undotbs01.dbf 2 UNDOTBS 210 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/sysaux01.dbf 3 SYSAUX 325 AVAILABLE YES
/u01/app/oracle/oradata/PROD/disk1/tools.dbf 4 TOOLS 10 AVAILABLE YES
/u01/app/oracle/oradata/PROD/disk1/users.dbf 5 USERS 40 AVAILABLE YES
/u01/app/oracle/oradata/PROD/disk1/example.dbf 6 EXAMPLE 40 AVAILABLE YES
/u01/app/oracle/oradata/PROD/disk1/oltp.dbf 7 OLTP 48 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/indx.dbf 8 INDX 40 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/registration.dbf 9 REGISTRATION 70 AVAILABLE YES
/u01/app/oracle/oradata/PROD/disk1/test01.dbf 10 TEST 500 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/p1.dbf 11 P1 100 AVAILABLE NO
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk2/p2.dbf 12 P2 100 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk3/p3.dbf 13 P3 100 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk4/p4.dbf 14 P4 100 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk5/p5.dbf 15 P5 100 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/a_tbs.dbf 17 A_TBS 1 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/idx_test.dbf 16 IDX_TEST 1 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/b_tbs.dbf 18 B_TBS 1 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk01.dbf 19 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk02.dbf 20 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk03.dbf 21 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk04.dbf 22 GYK 5 AVAILABLE NO
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk2/gyk05.dbf 23 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk06.dbf 24 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk07.dbf 25 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk08.dbf 26 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk09.dbf 27 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gyk10.dbf 28 GYK 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx01.dbf 29 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx02.dbf 30 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx03.dbf 31 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx04.dbf 32 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx05.dbf 33 GYKIDX 5 AVAILABLE NO
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk4/gykidx01.dbf 34 GYKIDX4 10 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk4/gykidx02.dbf 35 GYKIDX4 10 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk4/gykidx03.dbf 36 GYKIDX4 10 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk4/gykidx04.dbf 37 GYKIDX4 10 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk4/gykidx05.dbf 38 GYKIDX4 10 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx06.dbf 39 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx07.dbf 40 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx08.dbf 41 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx09.dbf 42 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk2/gykidx10.dbf 43 GYKIDX 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale01.dbf 44 TBS_SALE01 5 AVAILABLE NO
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk1/tbs_sale02.dbf 45 TBS_SALE02 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale03.dbf 46 TBS_SALE03 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale04.dbf 47 TBS_SALE04 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale05.dbf 48 TBS_SALE05 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale06.dbf 49 TBS_SALE06 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale07.dbf 50 TBS_SALE07 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale08.dbf 51 TBS_SALE08 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale09.dbf 52 TBS_SALE09 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale10.dbf 53 TBS_SALE10 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale11.dbf 54 TBS_SALE11 5 AVAILABLE NO
/u01/app/oracle/oradata/PROD/disk1/tbs_sale12.dbf 55 TBS_SALE12 5 AVAILABLE NO
55 rows selected.
SQL> alter database datafile 17 autoextend on;
Database altered.
SQL> select file_name,file_id,tablespace_name,bytes/1024/1024 MB,status,autoextensible from dba_data_files where file_id=17;
FILE_NAME FILE_ID TABLESPACE_NAME MB STATUS AUT
------------------------------------------------------------ ---------- ------------------------------ ---------- --------- ---
/u01/app/oracle/oradata/PROD/disk1/a_tbs.dbf 17 A_TBS 1 AVAILABLE YES
SQL> conn a/a
Connected.
SQL> create table test as select * from dba_objects;
Table created.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-754267/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23898243/viewspace-754267/