3.2.5 Setting up Oracle and building a database
Once you have installed Oracle, set up Oracle and build a database. For details about how to set up Oracle and build a database, see the Oracle documentation.
Points to consider when setting up an Oracle listener and building a database are explained below.
- Organization of this subsection
- (1) Building a database
- (2) Building Oracle listeners
(1) Building a database
This subsection explains the items that you need to set up in order to build a database compatible with the hot-standby configuration. Keep in mind the following requirements when building a database:
- Build the database from one of the hosts on which Oracle instance will run.
- Create the database in a file system that HA Monitor can control.
- Store the following files comprising the database on a shared disk:
- Server parameter file
- Control file
- Data file
- REDO log file
- Archive log file
If the server parameter file (SPFILE) has been created on a local disk, first move the file to the shared disk and then execute either of the following:
- Define the path to the server parameter file in the initialization parameter file (PFILE).
- Create a link in the server parameter file so that it can be referenced from the path that existed prior to the move.
- In the flash recovery area, specify the path on the shared disk.
(2) Building Oracle listeners
Build Oracle listeners on the hosts in all primary and secondary systems.
To use the IP address for client connection (alias IP address), set up the following after you have built Oracle listeners:
- Register in the /etc/hosts file the alias IP address and host name to be used. Use the same name in all hosts.
- Change the host of the net service name of Oracle's local naming parameter file (tnsnames.ora) to the alias IP address and host name registered in Step 1.
Setting examples follow:
- /etc/hosts file example
192.168.0.11 server1 # alias IP address |
- tnsnames.ora example
ORCL1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = orcl1)
)
) |
- Reference note
- At the client, connect using the tnsnames.ora file modified in Step 2 and the registered host name.
# sqlplus user/passwd@server1/ORCL1 |