Solved

Purge ddl

Posted on 2011-03-15
9
792 Views
Last Modified: 2013-11-11
How do I purge any ddl statments. I really appreciate your help
0
Comment
Question by:hussainkhan22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35142292
What do you mean 'purge' ddl?

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

Expert Comment

by:Huseyin KAHRAMAN
ID: 35142338
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
ID: 35142381
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:hussainkhan22
ID: 35142620
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
 
LVL 4

Expert Comment

by:Alex Matzinger
ID: 35142656
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 77

Expert Comment

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

Author Comment

by:hussainkhan22
ID: 35295758
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 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35296085
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 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 35314154
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle Distributed Transaction Lock Error ORA-01591 8 69
Password_rules_securitty.. 12 35
Cannot connect to Oracle database, python not recognizing cx_Oracle 2 32
Linux 3 37
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

726 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