Home » RDBMS Server » Server Utilities » Metadata of Entire DB. (windows 2012, oracle 12c)
Metadata of Entire DB. [message #638306] Tue, 09 June 2015 07:28 Go to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi ALL,

We are going to destroy a UAT server, before that we want to get the META DATA of all the objects of the entire DB.

I know, how to get it done through IMPDP, but we haven't generated any export, so kindly tell us any other idea.


Thanks
Muktha
Re: Metadata of Entire DB. [message #638309 is a reply to message #638306] Tue, 09 June 2015 07:31 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
DBMS_METADATA.GET_DDL
Re: Metadata of Entire DB. [message #638311 is a reply to message #638309] Tue, 09 June 2015 07:35 Go to previous messageGo to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi Blackswan,

Thanks for the help,

But in this method, we will have to run the script for every individual objects (function,procedure).
Am I right?

Thanks
Muktha
Re: Metadata of Entire DB. [message #638313 is a reply to message #638311] Tue, 09 June 2015 07:38 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
I would investigate writing a script that uses DBMS_METADATA.GET_DDL together with querying DBA_OBJECTS, for example, that generates the dynamic SQL to fulfil your requirement.
Re: Metadata of Entire DB. [message #638315 is a reply to message #638311] Tue, 09 June 2015 07:40 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Some, many, most Professional IT group maintain application source code, including all object's DDL, in a source code repository.
So just extract from your repository.

>Am I right?
yes, but easily accomplished by writing SQL to write SQL
Re: Metadata of Entire DB. [message #638316 is a reply to message #638315] Tue, 09 June 2015 07:42 Go to previous messageGo to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi All,

Thanks for your help.

I would now take an full export then import the meta data through SQLFILE parameter.

Regards
Muktha
Re: Metadata of Entire DB. [message #638317 is a reply to message #638316] Tue, 09 June 2015 07:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What prevents from doing so?
Note SQLFILE is only for metadata not for data.

[Updated on: Tue, 09 June 2015 07:49]

Report message to a moderator

Re: Metadata of Entire DB. [message #638318 is a reply to message #638317] Tue, 09 June 2015 07:50 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Quote:

we want to get the META DATA of all the objects of the entire DB.

@OP, using SQLFILE will also retrieve the metadata you require.
Re: Metadata of Entire DB. [message #638340 is a reply to message #638316] Tue, 09 June 2015 14:20 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
You could use expdp to export metadata only and then use impdp with the SQLFILE to get it tp text file.
Example:
expdp / directory=MYDIR full=y CONTENT=METADATA_ONLY
impdp / directory=MYDIR full=y SQLFILE=MyMetadata.txt

Re: Metadata of Entire DB. [message #638364 is a reply to message #638340] Wed, 10 June 2015 01:55 Go to previous message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi LKBrwn,

Thanks for the help.

It is a good idea.

Regards
Muktha
Previous Topic: Reading multiple text files
Next Topic: Extract date from a column in SQL Loader
Goto Forum:
  


Current Time: Thu Mar 28 13:16:47 CDT 2024