Wednesday, September 5, 2007

Creating an Oracle 10g database

Creating an Oracle 10g database

Learning objective

After completing this topic, you should be able to create an Oracle database, and delete one, using the Database Configuration Assistant.

Exercise overview

In this exercise, you're required to create a database and delete a database using the Database Configuration Assistant (DBCA).

This involves the following tasks:

  • starting the DBCA
  • creating a database
  • configuring a database
  • deleting a database

Let's say you're a database administrator and you've installed Oracle Database 10g software on your system. You now need to create a new database.

Task 1: Starting the DBCA

Start the DBCA from the terminal window.

Steps list
1. Type dbca in the terminal window and press Enter

Task 2: Creating a database

Using the DBCA, create a new database using the General Purpose template. Name the database "orcl2", accept the default management options, and set the password for all accounts to "oracle". Use the file system for database storage.

Steps list
1. Click Next
2. Select Create a Database and click Next
3. Select General Purpose and click Next
4. Enter orcl2 in the Global Database Name field and click Next
5. Click Next
6. Enter oracle in the Password and Confirm Password fields and click Next
7. Select File System and click Next

Task 3: Configuring a database

You have already configured a number of options for the new orcl2 database and now you want to complete the steps of the DBCA, starting by specifying locations for the database files.

Specify "/home/oracle/oradata" as the common area for storing all your database files. Use the default location for storing your backup and recovery files, and set "2048" as the size for this location. Finally, instruct Oracle to archive your database redo logs and finish the database on step 8 of the DBCA .

Steps list
1. Select Use Common Location for All Database Files
2. Enter /home/oracle/oradata in the Database Files Location field and click Next
3. Select Specify Flash Recovery Area and enter 2048 in the Flash Recovery Area Size field
4. Select Enable Archiving
5. Click Finish
6. Click OK

Task 4: Deleting a database

After you create the orcl2 database, you realize that another database on your system - orcl8 - is now redundant. You start the DBCA and navigate to the Operations page.

You have restarted the DBCA and navigated to the Operations page. Drop the orcl8 database and then exit the DBCA.

Steps list
1. Select Delete a Database and click Next
2. Select the orcl8 database and click Finish
3. Click Yes
4. Click No

The orcl2 database has now been created and configured, and the orcl8 database has been deleted.

No comments: