This is how you create a database dump of an oracle database and restore it.
1. First you need to connect to oracle as sysdba, create a user and grant him required privileges. Command line steps for creating a user and granting privileges are as below;
C:\app\Administrator\OraHome_1\BIN>sqlplus sys as sysdba; SQL*Plus: Release 11.1.0.7.0 - Production on Tue Jan 10 17:28:47 2012 Copyright (c) 1982, 2008, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> drop user yumani cascade; User dropped. SQL> Create user yumani identified by yumani account unlock; User created. SQL> grant create session, dba to yumani; Grant succeeded. SQL> grant connect to yumani; Grant succeeded. SQL> exit
2. Fill in your database with data.
3. Next, lets create a database dump.
$ expdp yumani/yumani schemas=yumani dumpfile=yumani100112_1657.dmpAn oracle dump with the name yumani100112_1657.dmp will be created in the location that you ran the above command.
4. After backing-up if you need to restore the dump, do as below.
$ impdp yumani/yumani schemas=yumani dumpfile=YUMANI100112_1640.DMP
impdp in simple formatted way
ReplyDeleteimpdp NEW_OWNER/NEW_OWNER_PW SCHEMAS=OLD_OWNER REMAP_SCHEMA=OLD_OWNER:NEW_OWNER DUMPFILE=YUMANI100112_1640.DMP LOGFILE=YUMANI100112_1640.DMP.log
Oracle Data Pump utility is used for exporting data and metadata into set of operating system files and it is newer, faster and flexible alternative to “export/import”
Thanks Amal. Good hint !!
ReplyDeleteFor us to make it working w've remove the schemas options.
ReplyDeleteOne thing to take care is the path of the dump file, no absolute path.
Another trick is to define the oracle_home and the oracle_sid and then you're !
Nice Post! I appreciate to you for this post. Really you are the best. Oracle Java Dumps
ReplyDelete