Tuesday, December 6, 2011

Script to generate DDL of the Tablespace


SQL> SELECT DBMS_METADATA.GET_DDL('TABLESPACE','USERS') FROM dual;

the output of the above statement would be some thing like this

CREATE TABLESPACE "USERS" DATAFILE

'D:\ORACLE\ORADATA\USERS01.DBF' SIZE 5242880
AUTOEXTEND ON NEXT 1310720 MAXSIZE 32767M
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE
MANAGEMENT AUTO;

No comments:

Post a Comment