Note:Creating a Java enabled database is not part of this chapter. For more information about this topic refer to Chapter 12, "Java in the Database" in this book.
You can create a database either automatically or manually. Oracle recommends you to use the automatic creation procedure outlined in the "Creating a Database Automatically" section. Instructions on how to create a database manually are given in the "Creating a Database Manually".
Before creating a database, you first need to carry out the following pre-creation activities:
Install the Oracle Database 10g release 2 software under the installation user ID. For details on how to do this, refer to Chapter 3, " Installing Oracle Database Software".
The BS2000 System Administrator must create a
JOIN entry for the account, which will hold the 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 of
ADDRSPACEmust be at least 512MB.
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:
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):
|BATCH||Enter YES to run the procedure in batch mode. The default is set to
|CPULIMIT||Sets the time limit for batch jobs. The default is NO.|
|PL/SQL||Enter NO to suppress automatic installation of the basic PL/SQL package. The default is
|ROLLBACK||Enter NO to suppress automatic creation of a second rollback segment. The default is
|VIEWS||Enter NO to suppress automatic installation of the basic views (catalog, import/export, and so on). The default is
Answer the prompts for the following information (if you enter nothing, the default shown on the screen are used):
|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 the Oracle Database 10g 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
Note: By default the
|SYSTEMPW||Enter the desired password for the Oracle Database user
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 file(s) 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.
|LOCAL||Enter NO if you do not require a locally managed system tablespace. The default is
|DEFTS||Enter NO if you don't want to create a default permanent tablespace. The default is
|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
|CHARSET||Enter the character set with which you want the database to be created (the default is
For more information refer to the chapter about Globalization Support in Oracle Database User's Guide for Fujitsu Siemens BS2000/OSD .
|NCHARSET||Enter the national character set used to store data in columns specifically defined as
Unless specified otherwise
, $ORAC1020.INSTALL.P.SUPER will generate and enter a batch job which:
Creates the system and sysaux tablespace
Creates the default permanent tablespace and temporary tablespace
Creates the log files
Initializes the database
Installs the SQL Help tables
Installs the DEMO tables
Creates a second rollback segment
Changes the system passwords if necessary
Calls the verification procedure
$ORAC1020.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,
sid is the system ID of the database you have just installed.
Oracle recommends that you use the automatic creation procedure outlined in the "Creating a Database Automatically" section. 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 steps you want to perform and which you want to expand upon, omit, or save for another time.
Copy the DBA files from
$ORAC1020 as shown below:
Log in using the
DBA User ID.
Call the Oracle Database install procedure. This procedure copies the
DBA files from
$ORAC1020 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:
This procedure prompts you for the following information:
|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:
|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.|
$ORAC1020.INSTALL.P.DBA procedure copies the following files into the
DBA User ID account:
.P.ORAENV: Oracle Database environment definition file
.DBS.INIT.ORA: Oracle Database initialization file
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]
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
DB_BLOCK_SIZE, refer to Appendix C, "Initialization Parameters and the Parameter File".
For example, if you want to create a 2MB database file, then you need to specify 1024 plus 1 PAM pages extra Oracle Database block as the value of file size in the
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 wish to use other names, remember to use these names in the SQL
CREATE DATABASE statement, when creating the database.
Determine what changes, if any, you wish to make to parameters in the distributed initialization file,
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 the Oracle Database Reference for an explanation of initialization parameters
Modify the environment definition file,
.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, you may have to wait for the next startup for the changes to become effective.
The character set in the
NLS_LANG, however, must not be changed when you run some of the delivered SQL scripts.
Remember that you must call the applicable
.P.ORAENV procedure before calling SQL*Plus. To execute SQL*Plus, enter the following command:
START-PROGRAM $ORAC1020.SQLPLUS * /NOLOG SQL> CONNECT / AS SYSDBA SQL> STARTUP NOMOUNT [PFILE=filename]
/NOLOG omits being prompted for username/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 (
.DBS.INIT.ORA), use the
filename option, as illustrated in the previous command.
SQL> CREATE DATABASE...;
This statement creates database and log files. Note when you enter the statement:
Unless you have allocated the database file and the log files and specified these files in the
CREATE DATABASE statement, the files will be created by SQL*Plus on the default public volume set.
When you create the files using SQL*Plus, the actual file size is 1 Oracle Database block larger than you specified. This extra block is automatically added by SQL*Plus and contains header information, which is used by the Oracle Database. For example, if you select a file size of 5120 2K blocks by specifying a file size of 10 Mb in SQL*Plus, you get a file of 5121 PAM pages (5120 Oracle Database blocks for use, plus the header block).
Note:If you get an error before the first
SQL>prompt, it may be caused by either a missing
ORASIDnot 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 wish to use dictionary views, 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> @$ORAC1020.RDBMS.ADMIN.CATALOG.SQL
Data dictionary views required for Export/Import are also installed in this sequence.
Include the following line in the
SQLPATH=&ORAUID..RDBMS.ADMIN; &ORAUID..PLSQL.DEMO; other prefixes;
other prefixes specifies the necessary prefix for scripts called by the PL/SQL demo scripts.
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:
To install the PL/SQL demonstration tables, run SQL*Plus under the
SYSTEM username and run the scripts
EXAMPBLD.SQL (which creates the demo tables) and
EXAMPLOD.SQL (which loads the demo data into the tables:
SQL> START-PROGRAM $ORAC1020.SQLPLUS * SYS/password SQL> @EXAMPBLD SQL> @EXAMPLOD
To install the online Help facility, enter the following command:
/CALL-PROCEDURE $ORAC1020.INSTALL.P.HELP,(sid [,SYSTEMPW=systempw])
To install the SQL*Plus demonstration database, enter the following:
/CALL-PROCEDURE $ORAC1020.INSTALL.P.DEMO,(sid [,SYSTEMPW=systempw])
To install the Sample Schemas, enter the following:
/CALL-PROCEDURE $ORACL1020.INSTALL.P.SAMPLES,(sid - /[,SYSTEMPW=systempw] [,SYSPW=syspw])
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
SYSTEMuser has the password manager and the
SYSuser has the password 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 $ORAC1020.INSTALL.P.VERIFY,(sid [,SYSTEMPW=systempw])
If the demonstration database was correctly created, 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 chapter "Oracle Text" in this book.
This section contains information about upgrading your Oracle database.
If you are using
NCHAR data types in a version 8 database, Oracle recommends that you analyze your
SQL NCHAR data before migration. For upgrading from version 8 refer to Chapter 3: Upgrading to the New Oracle Database 10g Release in the Oracle Database Upgrade Guide.
This section explains the BS2000 specific steps of the upgrade path. We assume the reader to be familiar with the Oracle Database 10g release 2 upgrade documentation ( Oracle Database Upgrade Guide.) about upgrade preparation, space and backup requirements, release differences, and so on. Oracle also recommends reading the appropriate section in the generic documentation, especially when you are using
TIMESTAMP WITH TIME ZONE data type.
We further assume your Oracle9i database is set up and the Oracle Database 10g release 2 software is properly installed as explained in Chapter 3 of this manual. Then follow these steps:
Run the Pre-Upgrade Information Tool
utlu102i.sql from Oracle Database 10g installation id with SQLPLUS in your Oracle9i environment to analyze required parameters as follows (assuming the database is running):
/START-PROGRAM $ORACL920.sqlplus * /nolog SQL> connect / as sysdba SQL> SPOOL info.log SQL> @$ORAC1020.rdbms.admin.utlu102i.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 SQLPLUS
SQL> SHUTDOWN IMMEDIATE SQL> exit
Enter the following command to create an Oracle Database 10g release 2
init.ora and an Oracle Database 10g release 2
oraenv file and save the original files under the suffix
/CALL-PROCEDURE $ORAC1020.INSTALL.P.DBA, (sid, jobclass, UPDATE=YES)
Modify the newly created files according to your special requirements (for instance PROCESSES, DB_BLOCK_BUFFERS, and so on.) and set the parameters in
INIT.ORA file as recommended in the spoolfile. Make sure the
COMPATIBLE initialization parameter is properly set for the new Oracle Database 10g release (9.2.0 or higher).
To avoid being prompted for many overflow acknowledgements on your screen set
Invoke SQLPLUS with the following scripts:
/START-PROGRAM $ORAC1020.sqlplus * /nolog SQL> connect / as sysdba SQL> STARTUP UPGRADE
SYSAUX tablespace. The Pre-Upgrade Information Tool estimated the minimum required size in the SYSAUX Tablespace section of the spoolfile:
SQL> CREATE TABLESPACE sysaux DATAFILE 'sysaux01.dbf' SIZE 500M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE;
Start the Upgrade script and run
utlu102s.sql to display the results of the upgrade:
SQL> SPOOL upgrade.log; SQL> @$ORAC1020.rdbms.admin.catupgrd.sql; SQL> @$ORAC1020.rdbms.admin.utlu102s.sql; SQL> SPOOL off
Shut down and restart the instance to re-initialize the system parameters for normal operation:
SQL> SHUTDOWN IMMEDIATE SQL> STARTUP
utlrp.sql to recompile any remaining stored PL/SQL and Java code and verify that all expected packages and classes are valid:
SQL> @$ORAC1020.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 Oracle10g release 2 database. For troubleshooting, refer to Chapter3 in the Oracle Database Upgrade Guide.
All C and COBOL programs developed prior to release 10.2.0 must be precompiled using the new version of the precompilers and recompiled.
All user-written precompiler or Oracle Call Interface applications must be re-linked using the new Oracle Database libraries.
As Oracle Database 10g on BS2000 exclusively supports the XA interface and the interfaces have changed significantly, you have to rebuild your openUTM application. Refer to the chapters on openUTM in this manual and in the Oracle Database User's Guide for Fujitsu Siemens 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. Remember that you do not need the file link for ORAUTM anymore.