Home » RDBMS Server » Server Administration » how to get the script created tablespace
how to get the script created tablespace [message #60876] Thu, 11 March 2004 15:00 Go to next message
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 #60880 is a reply to message #60876] Thu, 11 March 2004 17:13 Go to previous messageGo to next message
Tushaar
Messages: 4
Registered: March 2004
Junior Member
Ellen,
this is what I would do

1.export with no rows
2.import with show=y
3.the log file has the script for creating tablespaces

Of course there are tools that can script tablespaces
-Tushaar
Re: how to get the script created tablespace [message #60893 is a reply to message #60876] Fri, 12 March 2004 04:16 Go to previous message
Mahesh Rajendran
Messages: 10707
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 >
Previous Topic: SMON taking 80% of CPU
Next Topic: a few questions
Goto Forum:
  


Current Time: Sat Jul 06 21:52:36 CDT 2024