Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_metadata.get_ddl for tablespace

650105Dec 31 2009 — edited Jan 4 2010
hello
dbms_metadata.get_ddl use to generate script of table index schema etc. i want to generate script of my user tablespaces. normally i perform this task from toad now i want to do itself. for this i use following statement but i did not return plz help me to correct it


select dbms_metadata.get_ddl ('TABLESPACE', tablespace_name)
from
(select distinct a.tablespace_name
from dba_tablespaces a, dba_segments b
where a.tablespace_name = b.tablespace_name
and b.owner = 'A23R2');

Also try this
select dbms_metadata.get_ddl ('TABLESPACE', tablespace_name)
from
(select distinct b.tablespace_name
from dba_tablespaces a, dba_segments b
where a.tablespace_name = b.tablespace_name
and b.owner = 'A23R2');
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2010
Added on Dec 31 2009
19 comments
9,944 views