SQL> conn system/manager
Connected.
SQL> select name from v$datafile where rownum=1;
NAME
------------------------------------------
D:\ORACLE\ORADATA\ORA10\SYSTEM01.DBF
SQL> drop tablespace t2m including contents and datafiles;
drop tablespace t2m including contents and datafiles
*
ERROR at line 1:
ORA-00959: tablespace 'T2M' does not exist
SQL> CREATE TABLESPACE T2M DATAFILE 'D:\ORACLE\ORADATA\ORA10\T2M.DBF'
2 SIZE 1M AUTOEXTEND OFF;
Tablespace created.
SQL> CONN SCOTT/TIGER
Connected.
SQL> drop table e purge;
drop table e purge
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> CREATE TABLE E TABLESPACE T2M AS SELECT * FROM EMP;
Table created.
SQL> INSERT INTO E SELECT * FROM E;
14 rows created.
SQL> /
28 rows created.
SQL> /
56 rows created.
SQL> /
112 rows created.
SQL> /
224 rows created.
SQL> /
448 rows created.
SQL> /
896 rows created.
SQL> /
1792 rows created.
SQL> /
3584 rows created.
SQL> /
7168 rows created.
SQL> /
INSERT INTO E SELECT * FROM E
*
ERROR at line 1:
ORA-01653: unable to extend table SCOTT.E by 8 in tablespace T2M
SQL> select xidusn from v$transaction;
XIDUSN
----------
8
conn / as sysdba
grant RESUMABLE,alter session to scott;
SQL> ALTER SESSION ENABLE RESUMABLE TIMEOUT 3600;
Session altered.
SQL> select sid from v$mystat where rownum=1;
SID
----------
159
SQL> SELECT DBMS_RESUMABLE.GET_SESSION_TIMEOUT(159) FROM DUAL;
DBMS_RESUMABLE.GET_SESSION_TIM
------------------------------
3600
SQL> INSERT INTO E SELECT * FROM E;
14336 rows created.
SQL> commit;
Commit complete.
SQL>
SQL> spool off