Skip Headers

Oracle8i Server Installation and Database Administration Guide
Release 3 (8.1.7) for Fujitsu Siemens Computers BS2000/OSD

Part Number A95466-01
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

4
Creating/Migrating a Database

This chapter describes the process of creating or upgrading a database to run with your Oracle Server release 8.1.7 software. It describes:

Creating a Java enabled database is not part of this chapter. For more information about this topic see chapter "Java in the Database" below in this book.

Creating a Database

You can create a database either automatically or manually. Oracle Corporation recommends you to use the automatic creation procedure outlined in the section "Creating a Database Automatically" below. Instructions on how to create a database manually are given in the section "Creating a Database Manually". Before creating a database, either automatically or manually you first need to carry out the following pre-creation activities.

Pre-creation Activities

  1. Install the Oracle Server release 8.1.7 software under the installation userid. For details on how to do this, please refer to the chapter "Installing/Upgrading Oracle Server Software".

  2. The BS2000 System Administrator needs to create a JOIN entry for the account which will hold the Oracle Server database (the DBA userid).

    Required privileges for this account are as follows:

    	NTL=YES
    EXPRESS=YES
    TTYPL=TP
    CSTMP-MACRO=YES


    Note:

    The value of ADDRSPACE must be at least 128MB.


  3. Oracle Corporation 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

Creating a Database Automatically

  1. LOGON under the DBA userid.

  2. To start the automatic creation procedure, INSTALL.P.SUPER, enter the following:

    	/CALL-PROCEDURE $ORACL817.INSTALL.P.SUPER
    
    

    When invoking INSTALL.P.SUPER 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/NO 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.

    PL/SQL

    Enter NO to suppress automatic installation of the basic PL/SQL package. The default is YES.

    ROLLBACK

    Enter NO to suppress automatic creation of a second rollback segment. 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.

  3. Answer the prompts for the following information (if you enter nothing, the default shown on the screen will be used):
    Parameter Values

    DBASID

    Enter the 1 - 4 character system-id of the database you are installing. This is mandatory.

    JOBCLASS

    Enter the jobclass to be used for the Oracle8i Release 3 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 Server user SYS.

    Note: By default the SYS user has the password change_on_install. For security reasons, Oracle Corporation recommends that you change this password immediately after installation.

    SYSTEMPW

    Enter the desired password for the Oracle Server user SYSTEM

    Note: By default the SYSTEM user has the password manager. For security reasons, Oracle Corporation recommends that you change this password immediately after installation.

    DBSIZE

    Enter the size of the database file(s) in bytes, kilobytes or megabytes. The value you enter can have one of the following forms:

    44M

    44000K

    10000000

    The default is 50M.

    for 44megabytes

    for 44000 kilobytes

    for 10000000 bytes

    LOGSIZE

    Enter the size of the log files in bytes, kilobytes or megabytes. The value you enter can have one of the following forms:

    1M

    1000K

    1000000

    The default is 10000K.

    for 1 megabytes

    for 1000 kilobytes

    for 100000 bytes

    CHARSET

    Enter the character set with which you want the database to be created (the default is WE8BS2000).

    For more information see the chapter about National Language Support in Oracle8i Server for Fujitsu Siemens Computers BS2000/OSD User´s Guide.

    JAVA

    Enter NO if you don't need a Java enabled database (thus saving memory, CPU and disk space resources). For more information see chapter "Java in the Database" below.

    Unless specified otherwise $ORACL817.INSTALL.P.SUPER will generate and enter a batch job which:

    • calls INSTALL.P.DBA

    • creates the database file

    • creates the log files

    • initializes the database

    • runs CATALOG.SQL

    • runs CATDBSYN.SQL

    • runs CATPROC.SQL

    • installs the SQL Help tables

    • installs the DEMO tables

    • creates a second rollback segment

    • changes the system passwords if necessary

    • calls the verification procedure

    When $ORACL817.INSTALL.P.SUPER has completed, you should have an initialized, ready-to-use database, and a running Oracle Server 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.

Creating a Database Manually

You can create a database either automatically or manually. Oracle Corporation recommends you to use the automatic creation procedure outlined in the previous section "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 steps you want to perform and which you want to expand upon, omit or save for another time.

Copying the DBA Procedures

Copy the DBA procedures from $ORACL817 as shown below:

  1. LOGON under the DBA userid.

  2. Call the Oracle Server database install procedure. This procedure copies the DBA files from $ORACL817 to $DBA. When the procedure begins you will be prompted to supply a 1 to 4 character Oracle Server database ID for the database you are installing.

    To install the DBA files, enter the following:

        /CALL-PROCEDURE $ORACL817.INSTALL.P.DBA
    
    

    This procedure prompts you for the following information:

    Parameter Values

    DBASID

    Enter the 1 - 4 character system ID of the database you are installing.

    JOBCLASS

    Enter the BS2000 jobclass to be used for the background jobs.

    You can also modify the following keyword parameters when invoking this procedure:

    Parameter Values

    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 $ORACL817.INSTALL.P.DBA procedure copies the following files into the $DBA account:

    • sid.P.ORAENV: Oracle Server environment definition file

    • sid.DBS.INIT.ORA: Oracle Server initialization file

    where sid is the database ID for the database being installed.

Creating the Database

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.

Pre-allocating the Files

You can place the database file and the log files on the default volume set for the DBA account, or on another Public Volume Set (PVS), or on a specific private volume.

To create a database file or a log file on a private disk, you must first pre-allocate the file using the BS2000 /FILE command as shown below:

/FILE sid.DBS.DATABASE1.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 filesize specified in the /FILE command must match the size specified to Server Manager in the CREATE DATABASE statement when creating the database, plus 1 extra Oracle Server block used as an extra header. The size of this block is 1 to 16 PAM pages depending on the Oracle Server block size given in the init.ora parameter DB_BLOCK_SIZE, see Appendix C, "Additional Notes on Initialization Parameters".
For example, if you want to create a 2MB database file, then you need to specify 1024 plus 1 PAM pages extra Oracle Server block as the value of filesize 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 above examples are the default database and log filenames. If you wish to use other names, remember to use these names in the SQL CREATE DATABASE statement, when creating the database.

Modifying the Initialization File

Determine what changes, if any, you wish to make to parameters in the distributed initialization file, sid.DBS.INIT.ORA (where sid is the database ID for your database). The SGA parameters may need to be adjusted to reflect memory limitations and the maximum number of users who can access your Oracle Server system at one time. Make the modifications using a BS2000 editor.

Refer to the Oracle8i Reference manual for an explanation of initialization parameters.

Modifying the ORAENV File

Modify the environment definition file, sid.P.ORAENV, according to your 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 ORAENV variable NLS_LANG however must not be changed when you run some of the delivered SQL scripts.

Using Server Manager to Create the Database

Remember that you must call the applicable sid.P.ORAENV procedure before calling Server Manager. To execute Server Manager to create the database, enter the following:

/START-PROGRAM $ORACL817.SVRMGRL

The first time you execute Server Manager, the kernel is loaded into the common memory pool. This may take a few seconds.

At the prompt for the Server Manager parameters, which is then displayed, enter the following SQL statements:

SVRMGR> CONNECT INTERNAL

This statement connects you to the database.

SVRMGR> STARTUP NOMOUNT [PFILE=filename]

This statement starts the Oracle Server instance. If you want to use your own copy of the initialization file (sid.DBS.INIT.ORA), use the PFILE=filename option, as illustrated in the above command.

SVRMGR> CREATE DATABASE...;

This statement creates database and log files. Note that when you enter the statement:

Installating Data Dictionary Views

Data dictionary views provide easy access to dictionary information. If you wish to use dictionary views, you must install them by invoking Server Manager, issuing the CONNECT INTERNAL command and entering the following commands:

SVRMGR> SPOOL filename
SVRMGR> SET TERMOUT OFF
SVRMGR> @$ORACL817.RDBMS.ADMIN.CATALOG.SQL

Data dictionary views required for Export/Import are also installed in this sequence.

Installing Data Dictionary Views for PL/SQL

If you chose not to automatically install the basic PL/SQL package when running INSTALL.P.SUPER, to make PL/SQL available for use now you must first perform a STARTUP and then:

  1. Include the following line in the ORAENV file:

    	SQLPATH=&ORAUID..RDBMS.ADMIN;  &ORAUID..PLSQL.DEMO; <other prefixes>;
    
    

    where <other prefixes> specifies the necessary prefix for scripts called by the PL/SQL demo scripts.

  2. Invoke Server Manager, issue the CONNECT INTERNAL command, and run the SQL script RDBMS.ADMIN.CATPROC.SQL to install the PL/SQL dictionary tables:

    	SVRMGR>@$ORACL817.RDBMS.ADMIN.CATPROC.SQL
    
  3. To install the PL/SQL demonstration tables, invoke SQL*Plus under the username SYSTEM 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 $ORACL817.SQLPLUS
    * SYS/<password>
    SQL> @EXAMPBLD
    SQL> @EXAMPLOD

Installing Data Dictionary Views for Replication

Replication views are required for the correct operation of replication. The space requirements for replication views are at least 32MB. To install replication views, invoke Server Manager, issue the CONNECT INTERNAL command and enter the following:

SVRMGR> SPOOL filename
SVRMGR> SET TERMOUT OFF
SVRMGR> @
$ORACL817.RDBMS.ADMIN.CATREP.SQL

To check the amount of free tablespace use the following statement:

select sum(bytes) from
dba_free_space where
tablespace_name ='SYSTEM';

Installing Online HELP Messages

To install the online Help facility, enter the following:

/CALL-PROCEDURE $ORACL817.INSTALL.P.HELP,(sid - [,SYSTEMPW=systempw])

Installing the SQL*Plus Demonstration Database

To install the SQL*Plus demonstration database, enter the following:

/CALL-PROCEDURE $ORACL817.INSTALL.P.DEMO,(sid - [,SYSTEMPW=systempw])

Verifying Successful Creation of the Database

To verify that the demonstration database was correctly created, enter the following:

/CALL-PROCEDURE $ORACL817.INSTALL.P.VERIFY,(sid - [,SYSTEMPW=systempw])

If the demonstration database was correctly created, you see messages like the following one displayed on your screen:

*SCOTT'S TABLE EMP IS INSTALLED

Installing Resource Manager

All installation scripts except Resource Manager installation can run in single-task mode. Before running Resource Manager installation you should set

DEFAULT_CONNECTION=

(i.e. no value) or

* DEFAULT_CONNECTION=S:

(outcomment)

in your ORAENV file. Thus two-task mode is enabled (for more information see ch.9 Net8)

Then perform the following steps:

start-program $ORACL817.SVRMGRL
connect sys/<password>
execute dbms_rmin.install;
execute dbms_resource_manager.set_initial_consumer_group('SYSTEM','SYS_GROUP');
execute dbms_resource_manager.set_initial_consumer_group('SYS','SYS_GROUP');
exit

After this Resource Manager is ready. You can now turn back the DEFAULT_CONNECTION parameter to the previous value.

Installing interMedia Text

Usage and installation of interMedia Text is summarized in Chapter 10.

Installing Java

Using and installing of Java is summarized in chapter "Java in the Database" below in this book.

Setting Up UTM on the Oracle Server


Note:

You must already have created the database before performing this task.


To set up UTM on the Oracle Server you must:

Migrating from Version 7

An Oracle8i Release 3 database's structure is different from an Oracle7 database. Migration is one way to transfer the Oracle7 structure into Oracle8i Release 3.

This section explains the BS2000 specific steps of the migration path. We assume the reader to be familiar with the Oracle8i Migration documentation.

Before you start to migrate an Oracle7 database you should have a general understanding of the overall migration process and follow the recommendations on backups and testing given in the Oracle8i Migration documentation.

There are two special sources of problems you have to overcome:

The database to be migrated should be of version 7.3.2.

If this is not the version of your database, upgrade the database to version 7.3.2 (refer to Oracle7 for Siemens Installation and Database Administration Guide for more information).

Requirements on space, block size, replication, different computer architectures and character encoding as explained in Oracle8i Migration are valid for BS2000/OSD as well.

Prepare the Version 7 Source Database for Migration

  1. If your database release number is lower than 7.3.2 upgrade the database to 7.3.2

  2. Make sure all datafiles and tablespaces are online.

  3. Make sure

    • no user or role has the name MIGRATE

    • SYSTEM rollback segment is large enough

    • no redo information or uncommited transaction is outstanding

    • SYSTEM tablespace is large enough

    (for more information refer to Oracle8i Migration, ch.3)

  4. Shutdown the database NORMAL or IMMEDIATE and save it according to recommendations

We assume that Oracle8i Release 3 (including the Migration utility) is already installed as explained in this chapter before.

Migrate the Version 7 Source Database

  1. Run your Oracle7 ORAENV procedure (old_sid.p.oraenv) and ORAPWD

    /do old_sid.p.oraenv
    /start-prog $ORACLE7.orapwd
    *file=my_password_file password=my_password entries=100
  2. Update your Oracle7 ORAENV file to enable remote login

    SSSIDPWF=my_password_file
    
    
  3. Update Oracle7 INIT.ORA file to enable remote login

    REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
    
    
  4. Start SQL*Net v2 listener

  5. Copy your Oracle7 old_sid.p.oraenv to sid-x.p.oraenv and replace resp. update in sid-x.p.oraenv:

    the SYSCMD-Parameter of ORAENV's BEGIN-PROCEDURE command (line 2):
    SYSCMD=sid.P.ORAENV -> SYSCMD=sid-x.P.ORAENV

    /SET-FILE-LINK ORALOAD,$ORACLE7.ORALOAD.LIB  ->
    /SET-FILE-LINK ORALOAD,$ORACL817.ORALOAD.LIB

    ORAUID=$ORACLE7 -> ORAUID=$ORACL817

    according to your SQL*Net settings to enable two-task mode for Migration utility:

    DEFAULT_CONNECTION=TNS:alias_name
    
    

    add (below /SET-FILE-LINK oraload,...):

    /SET-FILE-LINK oramesg,$ORACL817.ORAMESG.LIB
    
    

    remove the line:

    /SET-FILE-LINK BLSLIB01 $ORACLE7.UTM.ORAUTM.LIB
    
    
  6. Run your newly created and updated sid-x.p.oraenv

    /do sid-x.p.oraenv
    
    
  7. Start Migration utility

    To avoid being prompted for many overflow acknowledgements on your screen set oflow=no

    /tchng oflow=no
    /start-prog $ORACL817.migrate
    *dbname=old_sid new_dbname=new_sid

    You are prompted for the password (my_password) defined by the orapwd utility.
    Migration utility is starting an Oracle8i Release 3 instance, creating a convert file (old_sid.dbs.convert.ora) and shutting down the instance.
    For more parameters of the Migration utility refer to Oracle8i Migration ch. 3

  8. Stop SQL*Net v2 listener

  9. Create an Oracle8i Release 3 ORAENV and INIT.ORA file

    /do $ORACL817.install.p.dba,new_sid
    
    
  10. Update Oracle8i Release 3 INIT.ORA file according to Oracle7 settings, DB_BLOCK_SIZE must not differ in both versions

    DB_BLOCK_SIZE=value_of_your_ORACLE7_database
    
    

    If you want to specify a special name for your control file, you can update the CONTROL_FILES parameter in your Oracle8i Release 3 INIT.ORA. This control file must not exist before conversion.

  11. Rename old_sid.dbs.convert.ora -> new_sid.dbs.convert.ora

  12. Run Oracle8i Release 3 ORAENV procedure, startup instance nomount, do the conversion, open database with RESETLOGS, run the Oracle8i Release 3 catalog scripts and shut down the instance

    /do new_sid.p.oraenv
    /start-prog $ORACL817.svrmgrl
    SVRMGR> connect internal;
    SVRMGR> startup nomount;
    SVRMGR> alter database convert;
    SVRMGR> alter database open resetlogs;
    SVRMGR> spool my-catout.log
    SVRMGR> set termout off
    SVRMGR> @$ORACL817.rdbms.admin.u0703040.sql
    SVRMGR> @$ORACL817.rdbms.admin.catrep.sql (for Advanced Replication only)
    SVRMGR> @$ORACL817.rdbms.admin.r0703040.sql (for Advanced Replication only)
    SVRMGR> @$ORACL817.rdbms.admin.utlrp.sql (see Oracle8i Migration)
    SVRMGR> spool off
    SVRMGR> set termout on
    SVRMGR> shutdown normal
  13. You can perform full table scans to change all existing ROWIDs at once (instead of waiting until all rows are touched by chance) by doing a full export of the database.
    To avoid disk write overhead and addtional space requirements use a *DUMMY file, e.g.

    /FILE *DUMMY,LINK=empty
    /START-PROG $ORACL817.EXP
    *scott/tiger ... file="link=empty"
    

Upgrade from Version 8.1.5

For differences between migration and upgrading see Oracle8i Migration ch.1 and ch.7.

This section explains the BS2000 specific steps of the upgrade path. We assume the reader to be familiar with the Oracle8i Release 3 upgrade documentation (s. Oracle8i Migration ch.7) about upgrade preparation, space and backup requirements, release differences etc.

We further assume your Oracle8 database is shutdown normal and the Oracle8i Release 3 software is properly installed as explained in ch.3 of this manual.

Then follow these steps:

  1. /CALL-PROCEDURE $ORACL817.INSTALL.P.DBA, (sid, jobclass, UPDATE=YES)

    will create an Oracle8i Release 3 init.ora and an Oracle8i Release 3 oraenv file and save the original files under the suffix .OLD.

  2. Modify the newly created files according to your special requirements (for instance PROCESSES, DB_BLOCK_BUFFERS etc.) and set

    _SYSTEM_TRIG_ENABLED = FALSE
    
    

    in INIT.ORA file.

  3. /CALL-PROCEDURE sid.p.oraenv

    To avoid being prompted for many overflow acknowledgements on your screen set

    /tchng oflow=no
    
    
  4. /START-PROGRAM $ORACL817.svrmgrl

    SVRMGR> connect internal
    SVRMGR> startup restrict
    SVRMGR> spool my-catout.log SVRMGR> @$ORACL817.rdbms.admin.u0801050.sql
    SVRMGR> @$ORACL817.rdbms.admin.catrep.sql (for Advanced Replication only)
    SVRMGR> spool off
    SVRMGR> alter system disable restricted session;
    SVRMGR> shutdown immediate

    Now you should have an upgraded Oracle8i Release 3 database. For upgrading specific components and troubleshooting see Oracle8i Migration ch.7.

    When you try to upgrade from version 8.0.4 use script $ORACL817.rdbms.admin.u0800040 (instead of u0801050) and call $ORACL817.rdbms.admin.r0800040 after catrep when you want to use replication.
    For more information see Oracle8i Migration ch. 7.

Post-Upgrade and Post-migration activities

Re-compilation of C and COBOL Programmatic Interface Programs

All C and COBOL programs developed prior to release 8.1.7 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 Server libraries.

Rebuilding Oracle Server (UTM) Applications

UTM applications that use any older version of Oracle Server need to be preprocessed and built again, as the interfaces have changed significantly. See the chapters on UTM in this manual and in the User's Guide for more information.

Updating ORAENV Files

Your ORAUID environment variable must reference the correct Oracle Server installation userid. Check your ORAENV files and, if necessary, amend the values of the ORAUID and NLS_LANG environment variables.


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index