Backup And Restore Oracle 10 Express

July 20, 2009 at 7:30 am | Posted in Database | Leave a comment

BACKUP

Open Command prompt / Cmd then type “exp grips_front/grips123 @dyware-valkiry/xe  file=”test.dmp” ”

The Pattern was “exp [username]/[passpowrd] @[your host name]/[your database instance] file=”[ the dmp file that store database backup ]” .

The Details were:

  1. exp was the command to export the scheme of database.
  2. grips_front was the user name/owner  of the current database  scheme that already have administrator privilege.
  3. grips123 was the password of the current user name.
  4. file=”test2.dmp” was the target file that will store all data and scheme of the database that belong to the current user.
  5. @dyware-valkiry/xe, @dyware-valkiry was your computer name and xe was the name of the database instance.
Export Oracle Database scheme

Export Oracle Database scheme

RESTORE

Like to backup the Database, the command was almost same

Open Command prompt / Cmd then type “imp grips_front/grips123  file=”test.dmp” @dyware-valkiry/xe

The single different of this Restore command was just only it’s command, by calling “imp” file.

sometimes if we would to update current of the  database scheme, we should to delete the current user of the current database owner, this is automatically delete the scheme that belong to the that user.

The hierarchy steps were like this:

  1. Log in as system to the database  “sqlplus system/hikari @xe” the pattern was like this  “sqlplus [database administrator]/[password of administrator] @[your database instance]“.
  2. Call the delete user command “drop user grips_front cascade“, you should call  cascade after user name, unless the system will request for it.
  3. Create the same user by “create user grips_front identified  by grips123“, by doing this, we were still lack privilege of importing database scheme, so type this command “grant dba to grips_front” after we have created that user, then Exit from sqlplus by type “Ctrl+c” or “Exit” on Command Prompt,  then type “imp grips_front/grips123 file=”grips.dmp”  full=y, the pattern was equal to export command.
Importing Oracle Database Scheme

Importing Oracle Database Scheme

Advertisement

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.