Solved

How to get a complete schema dump of an Oracle database?

Posted on 2014-11-03
4
316 Views
Last Modified: 2014-11-14
Hello,

I'm trying to export the schemas (Tables, Procedures, Packages, etc.) I have access to, into a .sql file.

I'm not the root user/or the person who owns the schemas, but I'd like to copy all the schemas I have access to; so that I can recreate the database in another location.

Is there a simple way to do this? Or do I need to go log in as each schema's ID and export the objects under that ID?

Appreciate any help on this!
0
Comment
Question by:Errang Genevre
4 Comments
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 100 total points
ID: 40420722
Unless you have elevated privs I don't think you can.

There are some cool scripts out there that use dbms_metadata.get_ddl to grab all the DDL but you need the select_catalog_role role to be able to grab the DDL from a different schema.  Then you just go against all_objects to get all the DDL.  Examples are out there.

If you were granted the export privs, you could export using the indexfile or sqlfile (classic exp or datapump export).
0
 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 400 total points
ID: 40420923
In that case, if you don't have privileges,
this kind of approach should work..

select * from all_source where owner='USR1';

you should be able to view the source code, though in a table form.. substitute object names to get the object source code, this should bring you the basic ddl, however to get other things ddl like constraints, etc., you have to get it via all_dependencies or by via user_tab_cons
0
 

Author Closing Comment

by:Errang Genevre
ID: 40444036
Thanks!
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
Fill Null values 5 36
Need help on decision table structure 7 45
DECLARATION OF CURSOR IS INCOMPLETE OR MALFORMED 5 38
scheduler notification 9 27
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

679 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