Reputation: 31
i have an existing database which is old version and i want to replace it with the latest version of database(.dmp file).i am newbie so Could someone show me step by step on how to import a full database to it.
Thanks in advance.
FYI: i put the oracle sql developer in virtualbox ,WIN7 64bit.
Upvotes: 0
Views: 1134
Reputation: 36987
To replace everything, it's usually easier and faster to just drop and recreate the schema instead of dropping all objects in the schema individually.
drop user WHATEVERMYNAMEIS cascade;
create user WHATEVERMYNAMEIS identified by MYSECREDPASSWORD default tablespace USERS;
grant CONNECT, RESOURCE to WHATEVERMYNAMEIS;
(Note that this is just an example. You need to supply your own username, password, tablespace name, privileges etc.)
Once that is done, the .dmp file can easily be imported from the command line:
imp WHATEVERMYNAMEIS/MYSECREDPASSWORD@MYDATABASE file=whatever.dmp fromuser=WHATEVERMYNAMEIS touser=WHATEVERMYNAMEIS
Upvotes: 1