Database Reference
In-Depth Information
If this shows the instance to be apver , review your progress so far to recall if you've already created
the database. If not, just shut down the template apver instance with the shutdown command. (Note
that if you stop the service and restart it (or reboot your computer), a template Oracle instance will be
started as apver.)
SHUTDOWN
However, if that SELECT query shows that you are connected to a different instance, you need to stop
the Oracle service that runs that instance and assure that your ORACLE_SID environment variable is set to
apver .
Continuing on, we will request that messages from our SQL*Plus session be spooled to a log file. We
will have to remember to close the spool file before we exit this session of SQL*Plus.
SPOOL apver.log
Now, we start a database instance defined by the init.ora parameters file. There are no database files
to mount, in fact we haven't even defined the database files yet, so we say NOMOUNT .
STARTUP NOMOUNT PFILE=D:\app\oracle\admin\apver\pfile\init.ora
This will show you the System Global Area memory allocation, which is available to Oracle database.
It is out of this memory pool that Java resources will be allocated (discussed later).
Total System Global Area 2522038272 bytes
Now call the script to create our database (modify this command with the path to your command
file). This will take a few minutes as the large database files are created. (This is an example of how you
call a file with SQL commands from within SQL*Plus; prefix the file name with an at (@) sign.)
@Chapter11\apver\ApVerDBCreate.sql;
You can examine the existence and sizes of the database files by browsing the directories we created
previously: D:\app\oracle\oradata\apver and D:\app\oracle\flash_recovery_area\apver . If you don't get
the “Database created” success message, you may have to delete files in those directories and start
over—it is probably a typo in the initialization or command files that you will need to fix.
Change the Passwords for SYS and SYSTEM Users
Even without logging in as a SYS user, we can and must set the passwords for both the SYS and SYSTEM
users. Substitute a complex password in each of the following commands:
ALTER USER SYS IDENTIFIED BY sys_password;
ALTER USER SYSTEM IDENTIFIED BY system_password;
Caution This is security step one. Do not proceed until you have accomplished this step.
Store Database Parameters in the Database
It is in our best interest to import our parameters settings from init.ora into a server parameter file. This
is done through a command on the database.
 
Search WWH ::




Custom Search