Recreate Oracle Database with Full Exp/Imp

Full Database Export

Start Database

* Start up database and listener if they are not already started.
* tnsping db instance to make sure it’s started.

C:\TEMP>tnsping orcl
...
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my.com)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (40 msec)

Full Export

* Export database in full mode.

C:\TEMP>exp system/orcl@orcl full=y file=fullexp.dump log=fullexp.log
...
About to export the entire database ...
. exporting tablespace definitions
....
Export terminated successfully with warnings.

Remove Database

* Start Database Configuration Assistant.
* Click Next on Welcome page.
* Select “Delete a Database” and click Next.
* Select database instance to be removed, e.g. ORCL
* Click Finish.
* Click Yes on “Do you want to proceed?” warning dialog.
* Click No on “Do you want to perform another operation?” dialog.

Create a New Database

* Start Database Configuration Assistant.
* Click Next on Welcome page.
* Select Create a Database and click Next.
* Select General Purpose and click Next.
* Enter
– Global Database Name: orcl.world
– SID: orcl
– Click Next
* On Step 4 of 12: Management Options, accept defaults and click Next
Checked:
– Configure the Database with Enterprise manager
– Use Database Control for Database Management
* On Step 5 of 12: Database Credentials screen,
– Select use the Same Password for All Accounts
– Password: orcl
– Confirm Password: orcl
– Click Next
* Select File System on Storage Options screen. Click Next.
* On Database File Locations screem,
– Select “Use Common Location for All Database Files” and enter
– Database Files Location: C:\prog\oracle\product\10.2.0\oradata
– Click Next
* On Recovery Configuration screen, accept default and click Next.
* Click Next on Database Content screen and click Next.
* On Initialization Parameters screen,
– Memory Tab
~ Typical -> Percentage: 40
– Sizing Tab
~ Processes: 150
– Character Sets Tab
~ Use Unicode (AL32UTF8)
~ National Character Set: AL16UTF16
~ Default Language: American
~ Default Date Format: United States
– Connection Mode Tab
~ Dedicated Server Mode
* Click Next on Step 11 of 12: Database Storage screen.
* On Step 12 of 12: Creation Options screen,
– Select Create Database
– Select Generate Database Create Scripts
~ Destination Directory: C:\prog\oracle\product\10.2.0\admin\orcl\scripts
* Click Finish.
* Click OK on confirmation screen.
* Click OK on script generation successful dialog.
* Click Exit when finished.

Full Import

* Start newly created database.

C:\TEMP>tnsping orcl
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my.com)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.world)))
OK (30 msec)

* Import

imp system/orcl@orcl full=y file=fullexp.dump log=fullimp.log
 
...
Import terminated successfully with warnings.
This entry was posted in oracle. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.