|Lesson 5||Deciding on File Locations|
|Objective||Choose the location for the initial database files on your project database. |
Deciding on File Locations
When you create an empty database, there are three types of files that you need to place. Oracle will create these when you create the database, but you need to tell Oracle where to put them.
The three file types are:
- Control files
- The system tablespace file
- Redo log files
You need to have at least one control file. Oracle recommends that you maintain at least three control files, kept on separate disks in case one is lost.
For purposes of the course, I am going to assume that you are experimenting on a Windows workstation, and that you only have one disk drive. We will still create three control files, just to be sure that you understand the syntax.
First, place the following lines in the
If you are running under UNIX, change the directory path to one that is appropriate for your system.
Next, go ahead and create the c:\oracle\oradata\COIN directory.
A datafile for the system tablespace is created when you issue the
CREATE DATABASE command.
We will not do that until the next module. For now, just keep in mind that the datafile will also go in the
The OFA recommendation for datafile names is to associate them with the tablespace, so we will use
system01.dbf for the filename. The number is there in case we ever need to expand the tablespace by adding a second file.
Finally we come to the redo logs. Redo logs are heavily used, and should always go on separate disks, away from any other database files.
We don't have that luxury for our experimental database, so they too will go into the
Placing all the database files on one disk is fine if all you need is a small database for experimentation, such as the one you will be building in this course. The default install of Oracle under Windows puts all the database files on one disk.
However, in a production environment placing all the database files on one disk would be very dangerous.
You can read about where we might place the database files
if we were creating a production database.
Optimal Flexible -Architecture - Quiz