Solved

Purge ddl

Posted on 2011-03-15
9
785 Views
Last Modified: 2013-11-11
How do I purge any ddl statments. I really appreciate your help
0
Comment
Question by:hussainkhan22
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
What do you mean 'purge' ddl?

There is a purge command for the recycle bin but that's not ddl.
0
 
LVL 51

Expert Comment

by:HainKurt
Comment Utility
did you deleted/updated some important data @ your company and you want to hide what sql's executed on server?
0
 
LVL 4

Expert Comment

by:Alex Matzinger
Comment Utility
By purge do you mean export.  You can use the exp command and set rows=n to just get the ddl.

EXP FULL=Y ROWS=N
0
 

Author Comment

by:hussainkhan22
Comment Utility
Sorry for confusion. I need to find the SQL statement executed for creating an existing tablespace so that I can create use tablespaces using that SQL statement.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 4

Expert Comment

by:Alex Matzinger
Comment Utility
This is a way to do that:

exp userid=user/password TABLESPACES=<list of the tablespaces>

Open in new window


i beleive that is what you are looking for
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
Try dbms_metadata.get_ddl('TABLESPACE','SOMENAME')
0
 

Author Comment

by:hussainkhan22
Comment Utility
Getting error when I issue dbms_metadata.get_ddl.   Can you please provide me the exact command for oracle 11g database on linux . I really appreciate your help.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
I provided the correct syntax.  Please refer to the online docs for further assistance with the command or post your code and error message.
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
Since you never posted back I guess you never referred to the docs?

http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_metada.htm#BGBIEDIA

Table 87-11 DBMS_METADATA: Object Types

In Table 87-11 you see TABLESPACES?




SQL> select  dbms_metadata.get_ddl('TABLESPACE','SYSTEM') from dual;

  CREATE TABLESPACE "SYSTEM" DATAFILE
  'C:\JUNK\SYSTEM01.DBF' SIZE 2147483648
  AUTOEXTEND ON NEXT 52428800 MAXSIZE 65535M
  LOGGING ONLINE PERMANENT BLOCKSIZE 16384
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS  SEGMENT SPACE MANAGEMENT MANUAL

Open in new window

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now