I want to create an sql script that can recreate a DB that I already have. I want to recreate the DB without data inside.
So is there anyway with sqlplus of exporting a DB of a user?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two basic approaches.
The first is to export a dump file. This can be with the Datapump utility:
Find out more.
Datapump was introduced in Oracle10g. In earlier versions of the database we could use the EXP utility to do the same thing.
To import the file we use the matching
impdp(orimp) utilities.That is the OS approach. To generate actual SQL scripts we can use the built-in DBMS_METADATA package, introduced in Oracle 9i. This is a bit more work but offers much finer control over the details of the exported objects. Find out more.