Wednesday, September 5, 2007

Finalizing the Oracle 10g instance

Finalizing the Oracle 10g instance

Learning objective

After completing this topic, you should be able to recognize how to set database storage settings and creation options, and delete a database using the Database Configuration Assistant

1. Database storage parameters

The Database Storage page of the Database Configuration Assistant (DBCA) enables you to view and configure the storage settings for control files, data files, and online redo log files.

Say, for instance, you want to view the control files for the database. You first need to access the Controlfile page.

You click Controlfile to do this.

Control files contain information about the physical structure of the database. The DBCA automatically creates three identical copies of a control file.

Ideally, each copy of a control file should be kept on a separate disk to protect against failure and maintain data integrity.

You can enter details for a new control file in the blank File Name field.

You can also change the location of an existing file by overtyping the entry in the File Directory field.

In this example, you want to create a new control file, so you enter the name of the file in the File Name field and the desired location in the File Directory field.

You next click Datafiles to view the data files associated with the database.

These files contain the information in the database. When creating a database from a template, you cannot add or alter any data files at this point.

You want to view the redo logs associated with the database, so you next select the Redo Log Groups folder.

Redo logs are managed in groups. Each redo log in a group is identical to the other members.

Ideally, each member of a redo log group should be kept on a separate disk to protect against failure and maintain data integrity.

Suppose you want to add a member to Redo Log Group 1.

You select the Redo Log Group 1 folder, enter redo04.rdo in the File Name field, and click Next.

This brings you to the Creation Options page of the DBCA.

Question

What database storage settings can you configure for a database using the DBCA?

Options:

  1. Add a member to a redo log group
  2. Change the location of a control file
  3. Change the password for a database
  4. Create a new control file

Answer

You can use the DBCA to add a member to a redo log group, create a new control file or change the location of an existing control file.

Option 1 is correct. The redo logs in a group are identical.

Option 2 is correct. Ideally, each copy of a control file should be kept on a separate disk to protect against failure and maintain data integrity.

Option 3 is incorrect. Changing the password for a database is not a storage setting. You use the Password Management window to change passwords and unlock database accounts.

Option 4 is correct. The DBCA automatically creates three identical copies of a control file, and you can create further copies if you wish.

Question

Suppose you are using the DBCA to configure your database storage settings. You need to create a new control file named "control04.ctl". You also need to add a member named "redo04.rdo" to Redo Log Group 1.

Which sequence of steps would you use to complete this task?

Options:

  1. You enter control04.ctl in the File Name field. Next, you select the Redo Log Groups folder 1 and enter redo04.rdo in the File Name field. Finally, you click Next.
  2. You click Create and enter control04.ctl in the File Name field. Next, you select the Redo Log Groups folder 1 and click Create. Then, you enter redo04.rdo in the File Name field.

Answer

You enter control04.ctl in the File Name field. Next, you select the Redo Log Groups\folder 1 and enter redo04.rdo in the File Name field. Finally, you click Next.

2. Database creation options

On the Creation Options page, you can choose to create the database immediately by selecting Create Database.

You also have the option of saving your database configuration as a template. This template can be used later to create databases using the same parameters.

You decide to create the database and save it as a template at the same time.

You select Save as a Database Template and click Finish.

The Confirmation window allows you to review the settings you have chosen for your database before it is created. These settings include common options, initialization parameters, data files, control files, and redo log groups.

You are satisfied with the options you have selected, so you click OK.

A Database Configuration Assistant dialog box appears, giving you the opportunity to unlock accounts and change passwords before completing the database configuration.

Say you want to unlock the HR database account and change its password. You first need to access the Password Management page.

You click Password Management to do this.

The Password Management dialog box now appears.

You need to unlock the HR account, so you click the blue checkmark beside it in the Lock Account? column.

To set the password, you enter pass in the New Password and Confirm Password fields and click OK.

Once you have succeeded in unlocking the HR account and changing its password, you click Exit to close the DBCA.

Question

Which of the following actions can you perform when configuring database creation options on the Creation Options page of the DBCA?

Options:

  1. Change passwords
  2. Create a database
  3. Delete a database
  4. Save your configuration as a database template

Answer

You can use the Creation Options page of the DBCA to create a database immediately or to save your configuration as a database template.

Option 1 is incorrect. You use the Password Management window to change passwords.

Option 2 is correct. Choosing the Create Database option creates the database immediately.

Option 3 is incorrect. To delete a database, you need to restart the DBCA and navigate to the Operations page.

Option 4 is correct. When you select Save as a Database Template, the template can be used later to create databases using the same parameters.

Question

Suppose you have created a database using the DBCA. You want to be able to log in under the OE username using the password "pass". However, this username is currently locked.

Which sequence of steps would you use to complete this task?

Options:

  1. You click Password Management and select the OE database account. Next, you click the blue checkmark beside it in the Lock Account? column. Finally, you enter pass in the New Password and Confirm Password fields and click OK.
  2. You click Password Management and select the OE database account. Next, you click the blue checkmark beside it in the Lock Account? column. Finally, you click OK.

Answer

You click Password Management and select the OE database account. Next, you click the blue checkmark beside it in the Lock Account? column. Finally, you enter pass in the New Password and Confirm Password fields and click OK.

3. Deleting a database

In addition to creating databases, the DBCA can be used to perform a number of other operations, such as deleting a database, configuring database options, and managing database templates.

You can specify which action you want to perform on the Operations page of the DBCA.

Suppose you no longer need the orcl8 database that you created, so you decide to delete it.

You select Delete a Database and click Next.

A list of available databases appears.

You want to delete the orcl8 database, so you select it and click Finish.

A confirmation window appears, asking if you are sure you want to delete the database.

You click Yes.

When the orcl8 database has been deleted, a window appears asking if you want to perform any other operations.

You click No and this closes the DBCA.

Question

Suppose you decide that you no longer need the orcl9 database. You want to remove this database from your system permanently.

Which sequence of steps would you use to complete this task?

Options:

  1. Select Delete a Database and click Next. Select the orcl8 database and click Finish. Finally, you click Yes to complete the deletion.
  2. Select Delete a Database and click Finish.

Answer

To delete a database, you select Delete a Database and click Next. Then you select the database and click Finish. Finally, you click Yes to complete the deletion.

Summary

The Database Storage page of the Database Configuration Assistant (DBCA) enables you to view and configure the storage settings for control files, data files, and online redo log files.

You can create a database, save your existing database configuration as a template or create and save as a template simultaneously. You can use the Password Management dialog box to unlock database accounts and change passwords.

As well as creating databases, the DBCA can be used for other operations, such as dropping a database, configuring database options, and managing database templates.

No comments: