how to get the script created tablespace [message #60876] |
Thu, 11 March 2004 15:00 |
Ellen
Messages: 5 Registered: April 2000
|
Junior Member |
|
|
In my db there are serveral tablespace
Now I want to create the same tablespace with same parameters on another server.
But I don't know how can I get the creation script.
Is there any oracle-tools or third-party tool to get the original scripts for db,tablespace,users.....??
Thanks
|
|
|
|
Re: how to get the script created tablespace [message #60893 is a reply to message #60876] |
Fri, 12 March 2004 04:16 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
works cool with 9i
you can spool the output...and create a ddl.sql
dbadmin@republic_lawp1 > get junk
1 set long 500000000000000
2 set pagesize 1000
3 set linesize 1000
4 set trimspool on
5 SET HEAD off
6 column DBMS_METADATA.GET_DDL('TABLESPACE',D.TABLESPACE_NAME)||';' format a300
7 SELECT DBMS_METADATA.GET_DDL('TABLESPACE',D.TABLESPACE_NAME) FROM DBA_TABLESPACES D
8* where tablespace_name = 'SYSTEM'
dbadmin@republic_lawp1 > @junk
3 /
CREATE TABLESPACE "SYSTEM" DATAFILE
'/dev/vx/rdsk/prod/system' SIZE 2147483648 REUSE
LOGGING ONLINE PERMANENT BLOCKSIZE 16384
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL
dbadmin@republic_lawp1 >
|
|
|