Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: tablespaces ddl extract script
Perform a set long 2000 and then try again
Set long 2000
SELECT DBMS_METADATA.GET_DDL('TABLESPACE', tablespace_name) FROM DBA_tablespaces;
CREATE TABLESPACE "SYSTEM" DATAFILE
'/u01/oradata/WLINT1DB/system_01.dbf' SIZE 314572800 REUSE ,
'/u02/oradata/WLINT1DB/system_02.dbf' SIZE 314572800 REUSE
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL
John
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Norman Dunbar
Sent: 12 October 2005 11:49
To: davidsharples_at_gmail.com; sjaffarhussain_at_gmail.com
Cc: oracle-l_at_freelists.org
Subject: Re: tablespaces ddl extract script
Unfortunately, on my 9.2.0.4 system, it is incomplete :
SQL>select dbms_metadata.get_ddl('TABLESPACE','NORMAN') as fred from dual;
FRED
CREATE TABLESPACE "NORMAN" DATAFILE
'/u00/oracle/oradata/lccsdev/norman_01
Which is a tad upsetting :o(
I would suggest doing a full export with no actual rows etc being exported, then run an import with SHOW=YES LOGFILE=SHOW.LOG and extracting the commands from SHOW.LOG if the metadata thing doesn't work for your system either.
Cheers,
Norman.
Norman Dunbar.
Contract Oracle DBA.
Rivers House, Leeds.
Internal : 7 28 2051
External : 0113 231 2051
>>> David Sharples <davidsharples_at_gmail.com> 10/12/05 11:29am >>>
SQL> select dbms_metadata.get_ddl('TABLESPACE','TS_NAME') from dual;
google and metalink are your friends
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Wed Oct 12 2005 - 11:00:26 CDT