Metadata repository and version control
As a DBA, I'm always looking for proactive ways to allow me to be prepared in case of a disaster strike or if an emergency release rollback is required (I always love to use the "what if" methodology); and due to these reasons, having a metadata repository and version control of it is always useful.
But, how can I easily create it? Easy; first do a full backup of your database using Data Pump as shown in the following command:
$ expdp fcomunoz/alvarez@pdborcl content=metadata_only full=y directory=datapump dumpfile=metadata_06192013.dmp
Note
If you want to create a repository only for objects such as procedures, packages, triggers, and so on, all you need to do is add the parameter INCLUDE=<procedure,package,trigger,…>
to your expdp
command; I usually include the date of the dump in the dump filename for reference purpose and best practice.
Then use the impdp
tool to create the SQL file that will allow you to create all objects in your database...