Oracle® Database Installation and Administration Guide 11g Release 2 (11.2) for Fujitsu BS2000/OSD Part Number E27508-02 |
|
|
PDF · Mobi · ePub |
This chapter describes how to create a new 11.2 database or upgrade an existing database to release 11.2. It contains the following topics:
Note:
Creating a Java enabled database is not part of this chapter. For more information about creating a Java enabled database, refer to Chapter 12, "Java in the Database".You can create a database either automatically or manually. Oracle recommends that you use the automatic creation procedure outlined in "Creating a Database Automatically". Instructions on how to create a database manually are given in "Creating a Database Manually".
This section describes the following:
Before creating a database, you first need to carry out the following pre-creation activities:
Install Oracle Database 11g Release 2 software under the installation user ID. For details on how to do this, refer to Chapter 3, " Oracle Database Installation and Deinstallation".
The BS2000 System Administrator must create a JOIN
entry for the account, which holds Oracle Database (the DBA
user ID).
The required privileges for this account are as follows:
NTL=YES EXPRESS=YES TTYPL=TP CSTMP-MACRO=YES
Note:
The value ofADDRSPACE
must be at least 512 MB.Oracle recommends that the BS2000 System Administrator should define a separate job class for the background tasks. This job class should have the following characteristics:
TP-ALLOWED=YES NO-CPU-LIMIT=YES JOB-TYPE=BATCH
Complete the following steps to create a database automatically:
Log in using the DBA user ID.
To start the automatic creation procedure, INSTALL.P.SUPER
, enter the following command:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.SUPER
When running INSTALL.P.SUPER
procedure, you can specify the value of the following keyword parameters (the default values are used if you choose not to modify the values):
Parameter | Values |
---|---|
BATCH | Enter YES to run the procedure in batch mode. The default is set to YES , so by default the procedure is run in batch mode. |
CPULIMIT | Sets the time limit for batch jobs. The default is NO. |
PLSQL | Enter NO to suppress automatic installation of the basic PL/SQL package. The default is YES . |
VIEWS | Enter NO to suppress automatic installation of the basic views (catalog, import/export, and so on). The default is YES . |
Answer the prompts for the following information (if you enter nothing, the default shown on the screen are used):
Parameter | Value |
---|---|
DBASID | Enter the 1 - 4 character system-id of the database you are installing. This is a mandatory parameter. |
JOBCLASS | Enter the jobclass to be used for Oracle Database 11g Release 2 background jobs. This is mandatory. |
UPDATE | Enter YES if you have existing files for this SID and you want to update them. |
SYSPW | Enter the desired password for the Oracle Database user SYS .
Note: By default the |
SYSTEMPW | Enter the desired password for the Oracle Database user SYSTEM .
Note: By default the |
JAVA | Enter NO if you do not need a Java enabled database (thus saving memory, CPU and disk space resources). For more information refer to Chapter 12, "Java in the Database". |
DBSIZE | Enter the size of the system tablespace files in bytes, kilobytes or megabytes. The value you enter can have one of the following forms:
The default is 250M. |
AUXSIZE | Enter the size of the sysaux tablespace file(s) in bytes, kilobytes, or megabytes. The value you enter can have one of the following forms:
The default is 200M. |
LOGSIZE | Enter the size of the log files in bytes, kilobytes, or megabytes. The value you enter can have one of the following forms:
The default is 20000K. |
UNDOSIZE | Enter the size of the undo tablespace file in bytes, kilobytes, or megabytes. The value you enter can have one of the following forms:
The default is 100M. |
LOCAL | Enter NO if you do not require a locally managed system tablespace. The default is YES . If you choose a locally managed system tablespace, then Oracle automatically creates a default temporary tablespace. |
DEFTS | Enter NO if you don't want to create a default permanent tablespace. The default is YES . |
TEMPTS | This prompt only appears if you don't want a locally managed system tablespace. Enter NO if you don't want a default temporary tablespace. The default is YES . |
CHARSET | Enter the character set with which you want the database to be created (the default is WE8BS2000 ).
For more information refer to the chapter about Globalization Support in Oracle Database User's Guide for Fujitsu BS2000/OSD. |
NCHARSET | Enter the national character set used to store data in columns specifically defined as NCHAR , NCLOB , or NVARCHAR2 . Valid values are AL16UTF16 and UTF8 . The default is AL16UTF16 . |
Unless specified otherwise, $ORAC1120.INSTALL.P.SUPER
generates and enter a batch job which:
Calls INSTALL.P.DBA
Creates the system and sysaux tablespace
Creates the default permanent tablespace, temporary tablespace, and undo tablespace
Creates the log files
Initializes the database
Runs CATALOG.SQL
Runs CATPROC.SQL
Installs the SQL Help tables
Installs the DEMO tables
Changes the system passwords if necessary
Calls the verification procedure
When $ORAC1120.INSTALL.P.SUPER
has completed, you should have an initialized, ready-to-use database, and a running Oracle Database system. The results of the job are listed in the file, L.
sid
.INSSUP.SYSOUT
, where SID
is the system ID of the database you have just installed.
Oracle recommends that you use the automatic creation procedure outlined in "Creating a Database Automatically". The following manual creation procedure performs the same steps as the automatic creation procedure. However, because you enter the individual steps manually, you can perform the installation at your own pace, and determine which of the optional of the following steps you want to perform and which you want to expand, omit, or save for another time.
Copy the DBA files from $ORAC1120
as shown below:
Log in using the DBA User ID
.
Call Oracle Database install procedure. This procedure copies the DBA
files from $ORAC1120
to the DBA User ID
account. When the procedure begins you are prompted to supply a 1 to 4 character Oracle Database ID for the database you are installing.
To install the DBA
files, enter the following command:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.DBA
This procedure prompts you for the following information:
Parameter | Value |
---|---|
DBASID | Enter the 1 - 4 character system ID of the database you are installing. |
JOBCLASS | Enter the BS2000 jobclass to be used for background and server tasks. |
You can also modify the following keyword parameters when invoking this procedure:
Parameter | Value |
---|---|
LOG | Enter WRITE-TEXT (the BS2000 command name) if you want to have install actions listed. |
UPDATE | Enter YES/NO to indicate whether existing files are to be updated. The default is NO. |
The $ORAC1120.INSTALL.P.DBA
procedure copies the following files into the DBA User ID
account:
sid
.P.ORAENV
: Oracle Database environment definition file
sid
.DBS.INIT.ORA
: Oracle Database initialization file
where sid
is the database ID for the database being installed.
After installing the DBA procedures, you must create the database. This section describes the procedure for creating the database, and for allocating the database file and the log files.
You can place the database file and the log files on the default volume set for the DBA
account, another Public Volume Set (PVS), or a specific private volume.
To create a database file or a log file on a private disk, you must first allocate the file using the BS2000 /FILE
command as shown:
/FILE sid.DBS.DATABASE1.DBF,SPACE=filesize - /[,DEVICE=device,VOLUME=volser] /FILE sid.DBS.SYSAUX.DBF,SPACE=filesize - //[,DEVICE=device,VOLUME=volser] /FILE sid.DBS.LOG1.DBF,SPACE=filesize - /[,DEVICE=device, VOLUME=volser] /FILE sid.DBS.LOG2.DBF,SPACE=filesize - /[,DEVICE=device, VOLUME=volser]
where:
sid
identifies the database that you are installing.
filesize
is the size of the file in PAM blocks. The file size specified in the /FILE
command must match the size specified to SQL*Plus in the CREATE DATABASE
statement when creating the database, plus 1 extra Oracle Database block used as an extra header. The size of this block is 1 to 16 PAM pages depending on the Oracle Database block size given in the init.ora
parameter DB_BLOCK_SIZE
, refer to Appendix C, "Initialization Parameters and the Parameter File".
For example, if you want to create a 2 MB database file, then you must specify 1024 plus 1 PAM pages extra Oracle Database block as the value of file size in the FILE
command.
device
specifies the device to be used to store the file.
volser
specifies the volume to be used to store the file.
The names used in the preceding examples are the default database and log file names. If you want to use other names, then remember to use these names in the SQL CREATE DATABASE
statement, when creating the database.
Determine what changes, if any, you want to make to parameters in the distributed initialization file, sid
.DBS.INIT.ORA
(where sid
is the database ID for the database). The SGA parameters may need to be adjusted to reflect memory limitations and the maximum number of users who can access the Oracle Database system at one time. Make the modifications using a BS2000 editor.
See Also:
Refer to Oracle Database Reference for an explanation of initialization parametersModify the environment definition file, sid
.P.ORAENV
, according to the specific requirements. Remember that a number of variables are evaluated during startup only. If you modify the ORAENV
file later on, then you may have to wait for the next startup for the changes to become effective.
The character set in the ORAENV
variable NLS_LANG
, however, must not be changed when you run some delivered SQL scripts.
Remember that you must call the applicable sid
.P.ORAENV
procedure before calling SQL*Plus. To execute SQL*Plus, enter the following command:
/START-PROGRAM $ORAC1120.SQLPLUS
* /NOLOG
SQL> CONNECT / AS SYSDBA
SQL> STARTUP NOMOUNT [PFILE=filename]
/NOLOG
omits being prompted for user name/password. CONNECT
gives you a connection to an idle instance. The last statement starts the Oracle Database instance. If you want to use your own copy of the initialization file (sid
.DBS.INIT.ORA
), then use the PFILE=
filename
option, as illustrated in the previous command.
SQL> CREATE DATABASE...;
This statement creates database and log files.
Note:
If you get an error before the firstSQL>
prompt, then it may be caused by either a missing ORAENV
file (or ORASID
not set in the ORAENV
), or sometimes by an address space conflict. For example, the address range you assigned to the kernel memory pool (KNL_BASE
) could be occupied by a subsystem.Data dictionary views provide easy access to dictionary information. If you want to use dictionary views, then you must install them by running SQL*Plus, by issuing the CONNECT / AS SYSDBA
command, and entering the following commands:
SQL> SPOOL filename
SQL> SET TERMOUT OFF
SQL> @$ORAC1120.RDBMS.ADMIN.CATALOG.SQL
Data dictionary views required for Export or Import are also installed in this sequence.
If you chose not to install the basic PL/SQL package automatically while running INSTALL.P.SUPER
, then you must perform the following task after the first STARTUP
, in order to make PL/SQL available.
Run SQL*Plus, issue the CONNECT / AS SYSDBA
command, and run the SQL script RDBMS.ADMIN.CATPROC.SQL
to install the PL/SQL dictionary tables:
SQL>@$ORAC1120.RDBMS.ADMIN.CATPROC.SQL
To install the online Help facility, enter the following command:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.HELP,(sid [,SYSTEMPW=systempw])
To install the demo tables, enter the following:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.DEMO,(sid [,SYSTEMPW=systempw])
To install the Sample Schemas, enter the following:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.SAMPLES,(sid -
/[,SYSTEMPW=systempw] [,SYSPW=syspw])
The procedure INSTALL.P.SAMPLES
installs the sample schemas human resources (HR), order entry (OE), info exchange (IX) and sales history (SH) with the default passwords. product media (PM) is not supported.
Note:
By default, the password for theSYSTEM
user is MANAGER
and the password for the SYS
user is CHANGE_ON_INSTALL
. For security reasons, Oracle recommends that you change these passwords and the sample schema passwords immediately after installation.To verify that the demonstration database was correctly created, enter the following:
/CALL-PROCEDURE $ORAC1120.INSTALL.P.VERIFY,(sid [,SYSTEMPW=systempw])
If the demonstration database was correctly created, then you see messages like the following one displayed on the screen:
*SCOTT'S TABLE EMP IS INSTALLED
Usage and installation of Oracle Text is summarized in the "Oracle Text" chapter of this book.
Using and installing of Java is summarized in the chapter "Java in the Database" in this book.
This section contains information about upgrading your Oracle database that are described in the following:
For upgrading from version 9 refer to "Upgrading to the New Release of Oracle Database" in Oracle Database Upgrade Guide.
This section explains the BS2000 specific steps of the upgrade path. We assume the reader to be familiar with Oracle Database 11g Release 2 upgrade documentation about upgrade preparation, space and backup requirements, release differences, and so on. Refer to Oracle Database Upgrade Guide for further information regarding database upgrades. Oracle recommends reading the appropriate section in the generic documentation, especially when you are using TIMESTAMP WITH TIME ZONE
data type.
We further assume your Oracle Database 10g is set up and the Oracle Database 11g Release 2 software is properly installed as explained in Chapter 3, " Oracle Database Installation and Deinstallation". Thereafter, complete the following steps:
Run the Pre-Upgrade Information Tool utlu112i.sql
from Oracle Database 11g installation id with SQL*Plus in your Oracle Database 10g environment to analyze required parameters as follows (assuming the database is running):
/START-PROGRAM $ORACL1020.sqlplus * /nolog SQL> connect / as sysdba SQL> SPOOL info.log SQL> @$ORAC1120.rdbms.admin.utlu112i.sql; SQL> SPOOL off
Check the sections in the spoolfile for Logfiles, Tablespaces, and Rollback Segments, and change the appropriate values of your database.
Shutdown the database and exit SQL*Plus
SQL> SHUTDOWN IMMEDIATE SQL> exit
Enter the following command to create an Oracle Database 11g Release 2 init.ora
and an Oracle Database 11g Release 2 ORAENV
file and save the original files under the suffix .OLD
.
/CALL-PROCEDURE $ORAC1120.INSTALL.P.DBA, (sid, jobclass, UPDATE=YES)
Modify the newly created files according to your special requirements (for instance PROCESSES
, DB_CACHE_SIZE
, and so on) and set the parameters in the INIT.ORA
file as recommended in the spoolfile. Ensure that the COMPATIBLE
initialization parameter is properly set for Oracle Database 10g Release 2 (10.2 or higher).
Set the Oracle environment variables using the ORAENV
file:
/CALL-PROCEDURE
sid
.p.oraenv
To avoid being prompted for many overflow acknowledgements on your screen, set the overflow to No:
/tchng oflow=no
Start the instance in upgrade mode:
/START-PROGRAM $ORAC1120.sqlplus * /nolog SQL> connect / as sysdba SQL> STARTUP UPGRADE
Start the upgrade script:
SQL> SPOOL upgrade.log; SQL> @$ORAC1120.rdbms.admin.catupgrd.sql; SQL> SPOOL off
Shut down and restart the instance to re-initialize the system parameters for normal operation:
SQL> SHUTDOWN IMMEDIATE SQL> STARTUP
Run the postupgrade script utlu112s.sql
to display the results of the upgrade and run catuppst.sql
to finish the upgrade. Finally run utlrp.sql
to recompile any remaining stored PL/SQL and Java code and verify that all expected packages and classes are valid:
SQL> SPOOL postupgrade.log; SQL> @$ORAC1120.rdbms.admin.UTLU112S.SQL; SQL> SPOOL off SQL> @$ORA11202.RDBMS.ADMIN.CATUPPST.SQL SQL> @$ORAC1120.rdbms.admin.utlrp.sql; SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID'; SQL> SELECT distinct object_name FROM dba_objects WHERE status='INVALID';
Now you should have an upgraded Oracle Database 11g Release 2 database. For troubleshooting, refer to "Upgrading to the New Oracle Database 10g Release" in Oracle Database Upgrade Guide.
This section describes the tasks you must complete after upgrading your database to Oracle Database 11g Release 2.
Re-compilation of C and COBOL Programmatic Interface Programs
All C and COBOL programs developed prior to release 11.2 must be precompiled using the new version of the precompilers and recompiled.
Re-Linking Programmatic Interface Programs
All user-written precompiler or Oracle Call Interface applications must be re-linked using the new Oracle Database libraries.
Rebuilding Oracle Database (openUTM) Applications
openUTM applications must be rebuilt. Refer to the chapters on openUTM in this manual and in Oracle Database User's Guide for Fujitsu BS2000/OSD for more information.
Your ORAUID
environment variable must reference the correct Oracle Database installation user ID. Check your ORAENV
files, and if necessary, amend the values of the ORAUID
and NLS_LANG
environment variables.