You are on page 1of 80

MK

MK in the Oracle Environment


Version8.40212
Copyright © 2003 by SSA Global Technologies, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any
way or by any means, including, without limitation, photocopying or recording, without the prior written consent of
SSA Global Technologies, Inc.
Important Notices
The material contained in this publication (including any supplementary information) constitutes and contains
confidential and proprietary information of SSA Global Technologies, Inc.
By gaining access to the attached, you acknowledge and agree that the material (including any modification,
translation or adaptation of the material) and all copyright, trade secrets and all other right, title and interest therein,
are the sole property of SSA Global Technologies, Inc. and that you shall not gain right, title or interest in the material
(including any modification, translation or adaptation of the material) by virtue of your review thereof other than the
non-exclusive right to use the material solely in connection with and the furtherance of your license and use of
software made available to your company from SSA Global Technologies, Inc. pursuant to a separate agreement
(“Purpose”).
In addition, by accessing the enclosed material, you acknowledge and agree that you are required to maintain such
material in strict confidence and that your use of such material is limited to the Purpose described above.
Although SSA Global Technologies, Inc. has taken due care to ensure that the material included in this publication is
accurate and complete, SSA Global Technologies, Inc. cannot warrant that the information contained in this
publication is complete, does not contain typographical or other errors, or will meet your specific requirements. As
such, SSA Global Technologies, Inc. does not assume and hereby disclaims all liability, consequential or otherwise,
for any loss or damage to any person or entity which is caused by or relates to errors or omissions in this publication
(including any supplementary information), whether such errors or omissions result from negligence, accident or any
other cause.
Trademark Acknowledgements
SSA GT and SSA Global Technologies are trademarks of SSA Global Technologies, Inc. in the United States and/or
other countries.
Microsoft, Windows, Windows NT and the Windows logo are registered trademarks of Microsoft Corporation in the
United States and/or other countries.
UNIX is a registered trademark of The Open Group in the United States and/or other countries.
Oracle is a registered trademark of the Oracle Corporation in the United States and/or other countries.
All other company, product, trade or service names referenced may be registered trademarks or trademarks of their
respective owners.
Contents

Chapter 1: Introduction
About This Guide ............................................................................ 1–1
Installation Requirements .................................................................... 1–3
About the Oracle Database Driver ............................................................. 1–4

Chapter 2: Configuring Oracle For MK


Introduction ................................................................................. 2–1
Installing the Oracle Database................................................................. 2–2
Preparing the Oracle Environment ............................................................ 2–3
Installing MK with Oracle ................................................................... 2–10

Chapter 3: Setting Up MK for Oracle


Introduction ................................................................................. 3–1
Defining the Database in MK ................................................................. 3–2
Linking Companies to Oracle ................................................................. 3–3

Chapter 4: Maintaining Driver Files


Overview ................................................................................... 4–1
User File .................................................................................... 4–2
Group File .................................................................................. 4–3
Storage File ................................................................................. 4–4
Maintenance Tools ........................................................................... 4–7

Contents iii
Chapter 5: Tuning
Overview ................................................................................... 5–1
Testing Performance ......................................................................... 5–2
Setting Rollback Segment Size ................................................................ 5–3
Adjusting Parameters ........................................................................ 5–5
Using Import/Export ........................................................................ 5–7
Adjusting Log Files .......................................................................... 5–8
Managing Database Space ................................................................... 5–9
Additional Information ..................................................................... 5–11

Appendix A: Files and Executables


Executables ................................................................................. A–1
Driver Files ................................................................................. A–2

Appendix B: Oracle Utilities


Creating a New Database .................................................................... B–2
Creating a New Database Alias ............................................................... B–9
Tuning the Database ........................................................................ B–13

iv MK in the Oracle Environment


Chapter

Introduction
1

About This Guide


This guide provides information specific to the Oracle database driver for MK.
The Oracle database driver serves as the connecting layer between MK and the
Oracle database.

This guide describes the installation and maintenance of the Oracle database
driver and provides guidelines for using it in an Oracle environment and for
optimizing its performance.

This guide does not provide information about Oracle database administration
or database management. Refer to your Oracle documentation for that
information.

Intended Audience

This guide is intended for system administrators and system programmers who
are responsible for installing and maintaining the Oracle database, the Oracle
database driver, and MK. Before using this guide, you should be familiar with
the following:
■ Operating system and common commands
■ System administration tools
■ Oracle tools and RDBMS and Oracle documentation
■ Structured Query Language (SQL)
■ MK concepts (such as users, companies, and so forth)

What this Manual Covers

This guide was written for use with MK on both the Windows NT and UNIX
platforms. Information that is unique to either of these platforms is clearly
identified in the text.

Introduction 1–1
About This Guide

How This Guide Is Organized

The information in this book is organized as follows:


■ Chapter 1, Introduction, describes the purpose of this guide, what you should
know before getting started, and which additional documents you should
reference. It also provides a brief overview of the Oracle database driver.
■ Chapter 2, Configuring Oracle for MK, recommends Oracle parameters
settings, describes how to define Oracle environment variables, and explains
how to install the Oracle database driver.
■ Chapter 3, Using MK with Oracle, describes how to add the Oracle database
and link to companies within MK.
■ Chapter 4, Maintaining Driver Files, describes files that allow users to access
MK and describes the tools available to maintain those files.
■ Chapter 5, Tuning, provides methods of maximizing Oracle performance for
MK.
■ Appendix A, Files and Executables, describes the various executables and
files required by the Oracle driver.
■ Appendix B, Oracle Utilities, describes the various Oracle tools to create and
configure an Oracle database.

Additional References

Related documentation is listed below:


■ Oracle Installation and Operation Guide
■ Oracle Database Administrator’s (DBA) Guide
■ SLQ*PLUS Users Guide
■ SQL Language Reference Manual
■ Hardware and operating system documentation

1–2 MK in the Oracle Environment


Installation Requirements

Installation Requirements
You must install the Oracle database before installing MK. Refer to the Oracle
installation documentation for information on installing the Oracle database.

When creating the Oracle database be sure to choose the right character set. For
example:
create database < database> ...
CHARACTER SET < charset>......

where a common character set for Western European Languages is


WE8ISO8859P1.

Make sure that the Oracle environment variable NLS_LANG is correctly set. For
example:
NLS_LANG=<language>_<territory>.<terminalcharset>
AMERICAN_AMERICA.US7ASCII
FRENCH_FRANCE.WE8ISO8859P1
GERMAN_GERMANY.WE8DEC
FRENCH_CANADA.WE8DEC
JAPANESE_JAPAN.JEUC

Refer to Chapter 2, “Configuring Oracle for MK” for information on configuring


the Oracle database for MK.

Introduction 1–3
About the Oracle Database Driver

About the Oracle Database Driver


Using MK in an Oracle environment involves a communication layer referred to
as the database driver. The database driver is designed to meet the specific
needs of a particular database management system, so an application can operate
in the same manner regardless of the database environment. To this end, the
driver allows MK to access data stored in an Oracle database.

The MK shell surrounds or insulates the MK application. It is responsible for


communication with the operating system, MK user interface driver, and
database driver.

The relationship between Oracle and MK is depicted in the following diagram:

MK Shell

Database Driver

I-Record Data

Oracle
Database

How the Driver Works

When the MK shell requests an action from the Oracle database via the driver,
the driver uses the Oracle Call Interface (OCI) to translate the request, provide a
connection to the DBMS, and return the data. The OCI maintains the connection
so that if further manipulation is required on the table, the pointer has quick and
easy access to the table. This method has the following benefits:
■ Efficient use of database connections
■ Increased speed

1–4 MK in the Oracle Environment


About the Oracle Database Driver

Key Files

In addition to the files Oracle requires, an MK installation uses several key files
to manage access to the database. The following table describes these files:

Key File Description


ora_users Contains information about all MK users who are going to
access the Oracle driver.
ora_groups Defines groups of MK users and contains all Oracle
database names accessible by MK.
ora_storage Describes database storage specifications for MK tables and
indexes.

These files are discussed in more detail in Chapter 5, “Maintaining Driver Files.”

In addition, MK uses the files below to link tables to a particular database driver
and identify the communication protocol to be used between the shell and the
driver:

Key File Description


tabledef6.0 Identifies the type of the driver to use for accessing a table,
plus other driver parameters.
ipc_info Specifies the locations of the MK drivers and defines the
communication protocol information for each driver. This
file must reside on the host and remote machines.

The following diagram illustrates how these files work with MK.

tabledef6.0
ora_users ipc_info
Oracle ora_groups MK
Database ora_storage

Not
Specific to the
Database
Oracle Driver
Specific

Refer to Appendix A, “Files and Executables” and to the System Administrator’s


Guide for more information about these files

Introduction 1–5
Chapter

Configuring Oracle For MK


2

Introduction ................................................................................. 2–1


Installing the Oracle Database................................................................. 2–2
Preparing the Oracle Environment ............................................................ 2–3
Creating a Database Alias ................................................................. 2–3
Locating Oracle .......................................................................... 2–3
Defining Environment Variables .......................................................... 2–4
Creating Operating System Users .......................................................... 2–4
Setting Oracle Parameters................................................................. 2–5
Creating Tablespaces and Rollback Segments ............................................... 2–6
Creating Oracle Users .................................................................... 2–8
Verifying/Creating Log Files.............................................................. 2–9
Installing MK with Oracle ................................................................... 2–10
Oracle Drivers (For UNIX Only) .......................................................... 2–10
Configuring MK Oracle Drivers .......................................................... 2–10
Setting Up the MK-Oracle Environment ................................................... 2–13
Troubleshooting ........................................................................ 2–13
After Installation ........................................................................ 2–14
Linking MK with Oracle ................................................................. 2–14

Configuring Oracle For MK 2–i


Chapter

Configuring Oracle For MK


2

Introduction
When you install MK in the Oracle environment, an Oracle driver is
automatically installed. The Oracle driver is a tool we provide to enable MK to
store and retrieve data from the Oracle RDBMS.

Before you can install MK in the Oracle RDBMS environment, you must do the
following preliminary steps:
1. Prepare your particular UNIX or Windows NT system. See the appropriate
MK Installation and Upgrade Guide for more information.
2. Install the Oracle RDBMS. See the Oracle documentation for installation
instructions.
3. Prepare the Oracle environment for MK.

The majority of this chapter covers the last step and should be used with
information found in the MK Installation and Upgrade Guide and in the Oracle
Installation and Configuration Manual.

Configuring Oracle For MK 2–1


Installing the Oracle Database

Installing the Oracle Database


Using the standard Oracle installation instructions, install the Oracle database. If
you are installing Oracle, make a note of the values of ORACLE_HOME and
ORACLE_SID; you will need these values when you answer prompts in the MK
installation program.

It is recommended that the database has multiplexed log and control files. It is
recommended that the database is operated in ARCHIVELOG mode to protect
against instance and media failure. Refer to the Oracle Administrator’s Guide for
information on these actions.

2–2 MK in the Oracle Environment


Preparing the Oracle Environment

Preparing the Oracle Environment


After you install Oracle, you need to configure it for MK. This section describes
what you need to do, including:

For Windows NT only: 1. Creating a database alias


2. Locating Oracle
3. Defining environment variables for Oracle

For UNIX only: 4. Creating bsp group, bsp user, and mk user.
or

For Windows NT only: 4. Creating users mkadmin and mk with proper


authorization.
5. Setting Oracle parameters
6. Creating adequate tablespace
7. Creating Oracle database users
8. Verifying/creating log files

Creating a Database Alias

If you are using MK on a Windows NT platform, you need to create a database


alias (<database alias>) using the SQL*Net Easy Config tool. Refer to
Appendix B, Oracle Utilities, for more information

Locating Oracle

Locate the UNIX path to the following components:


■ Oracle RDBMS
■ SQLPLUS

Configuring Oracle For MK 2–3


Preparing the Oracle Environment

Defining Environment Variables

For UNIX Only For Oracle, you should add the following variables to your environment:
ORACLE_HOME=<file system where Oracle is installed>
ORACLE_SID=<Oracle system id>
PATH=${Oracle-HOME}/bin:${PATH}

If you have HP, add the following variable:


SHLIB_PATH=${ORACLE_HOME}/lib:/usr/lib

If you have SUN or DEC, add the following variable:


LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/lib

If you have AIX, add the following variable:


LIBPATH=${ORACLE_HOME}/lib:/usr/lib

If you have Oracle 9i on HP Release 11, add the following variable:


SHLIB_PATH=${ORACLE_HOME}/lib32:/usr/lib

Creating Operating System Users


For UNIX only: If they do not already exist, add the following group and users in UNIX:
■ Group: bsp
■ User: bsp (member of bsp group)
■ User: mk (member of bsp group and dba group)

The user bsp is the administrative user of the MK installation. The user mk is the
owner of the MK tables in Oracle.

For Windows NT only: If they do not already exist, add the following users in Windows NT:
■ User: mkadmin
■ User: mk

2–4 MK in the Oracle Environment


Preparing the Oracle Environment

Setting Oracle Parameters

Here are the recommended steps to take:


1. Choose the “LARGE” settings in the init <$ORACLE_SID> parameter file.
2. Check the recommended parameter values in the table that follows. Note
that these are minimum recommended values.

Parameter Recommended Minimum


Value
db_block_buffers 200
dml_locks 100
enqueue_resources 300 (see below)
log_buffer 16384
open_cursors 500

Note: For Oracle7 if the value of processes is greater than 130, use the
derived value for enqueue_resources.
3. Use your system editor (such as vi) to modify or add parameter lines and set
parameter values.
Note: You may need to modify these parameters depending on the size of
the database.
You might be required to add the following lines:
db_block_buffers=200
open_cursors=500

If the parameter line does not exist in the file, Oracle’s standard default is
used.
4. Shut down and restart the Oracle installation to activate the new parameters.

Configuring Oracle For MK 2–5


Preparing the Oracle Environment

Creating Tablespaces and Rollback Segments

Note: You can use the Oracle Database Administrator tools to create a database
and tablespace and rollback segments.

Following instructions in the Oracle RDBMS Installation Guide, use the Oracle
command create tablespace to create the following tablespaces:

mktables with at least 800 MB (add 250 MK data tables


MB for each additional localization)
mkindexes of the same size as mktables MK indexes
mktmp with at least 25 MB Temporary tables
mkrbs with at least 100 MB Rollback segments

Note: During Oracle RDBMS installation, a tablespace named SYSTEM is


automatically created; this tablespace should be at least 80 MB. If the SYSTEM
tablespace is less than 80 MB, add additional data files to the tablespace.

Following instructions in the Oracle RDBMS installation guide, use the Oracle
command create rollback segment to create rollback segments mk_rbs1, mk_rbs2,
mk_rbs3, and mk_rbs4 in tablespace mkrbs with initial extent of 250K and
minextents equal to 5. These are non-system rollback segments.

Edit the init<$ORACLE_SID>.ora file to include the new rollback segments in


the rollback_segments entry.

In Oracle, rollback segments can be brought online by executing the following


SQL statement in SVRMGRL or SQLPLUS:
alter rollback segment segment_name online;

2–6 MK in the Oracle Environment


Preparing the Oracle Environment

Example of Creating Tablespaces/Rollback Segments

Here is an example of using Oracle SVRMGRL and SQLPLUS commands to


create tablespaces:
create tablespace mktables
datafile '/disk1/mk_oracle_tables/mktables.dbf'
size 800 M;
create tablespace mkindexes
datafile '/disk1/mk_oracle_tables/mkindexes.dbf'
size 800 M;
create tablespace mktmp
datafile '/disk1/mk_oracle_tables/mktmp.dbf'
size 25 M;
alter tablespace mktmp temporary;
create tablespace mkrbs
datafile '/disk1/mk_oracle_tables/mkrbs.dbf'
size 50 M;
create rollback segment mk_rbs1
tablespace mkrbs
storage (initial 250K minextents 5 maxextents unlimited);
create rollback segment mk_rbs2
tablespace mkrbs
storage (initial 250K minextents 5 maxextents unlimited);
create rollback segment mk_rbs3
tablespace mkrbs
storage (initial 250K minextents 5 maxextents unlimited);
create rollback segment mk_rbs4
tablespace mkrbs
storage (initial 250K minextents 5 maxextents unlimited);

These amounts are only for startup purposes; if you add large tables later you
will need more space.

Note: Bring the rollback segment online and add the rollback segment to
init<ORACLE_SID>ora file prior to creating the mk_rbs rollback segment.

Configuring Oracle For MK 2–7


Preparing the Oracle Environment

Creating Oracle Users


For UNIX only: If they do not exist, add the following users in the Oracle RDBMS:
■ mk as dba

■ root with resource and connect privileges

■ bsp with resource and connect privileges

⇒ To create users:
1. Connect to the Oracle server as dba. While logged on as oracle, enter
svrmgrl
connect internal

2. Create mk as the database administrator (dba) by entering:


create user mk identified by <password>;
grant dba to mk;

3. Create root and bsp with resource privileges by entering:


create user root identified by <password>;
grant connect, resource to root;
create user bsp identified by <password>;
grant connect, resource to bsp;

For Windows NT only: If they do not exist, add the following users in the Oracle RDBMS:
■ mk as dba

■ mkadmin with connect and resource privileges

⇒ To create users:
1. Connect to the Oracle server as dba. Start the SQLPLUS utility and log on as:
■ User name: internal
■ Password: <internal password>
■ Host string: <database alias>
2. Create mk as database administrator (dba) by entering:
create user mk identified by <password>;
grant dba to mk;

3. Create bsp with resource privileges by entering:


create user mkadmin identified by <password>;
grant connect, resource to mkadmin;

2–8 MK in the Oracle Environment


Preparing the Oracle Environment

About Passwords
To facilitate the installation, you can temporarily use the same name for the user
name and password as is shown below:

User Name Password


mk mk
root root
bsp bsp
mkadmin mkadmin

After the installation is completed and you want to change the passwords, make
sure you change the Oracle database passwords before you change the Oracle
driver passwords.

Verifying/Creating Log Files

Verify redo log files are adequate for the installation procedure. You should
have a least 5 redo log files with a minimum size of 3 megabytes each for the
database. Information on current log files can be obtained using SQLDBA. Log
files can be added using SQLDBA (you can also use SVRMGRL or SQLPLUS).

To obtain information on log files in Oracle, enter:


$ svrmgrl mode=line
SQLDBA> connect internal;
SQLDBA> select * from v$log;

To add log files, execute the following:


$ svrmgrl mode=line
SQLDBA> connect internal;
SQLDBA> alter database mk add logfile group 3
('/mk/data/log3mk.dbf', 'mk/data/log3bmk.dbf')
size 3M;

where mk is the database name and the information in the parentheses is the
path and filenames of the new log files.

Configuring Oracle For MK 2–9


Installing MK with Oracle

Installing MK with Oracle


After you prepare the Oracle environment, you can install MK. Refer to the
appropriate MK Installation and Upgrade Guide for complete instructions about the
installation procedure.

Oracle Drivers (For UNIX Only)

The MK installation installs the Oracle drivers, and then starts a UNIX shell.
Within this shell, you can run the driver initialization program, ora_inst6.0 to set
up the Oracle database for MK.

You must set the following environment variables:


■ ORACLE_HOME
■ ORACLE_SID
■ Library Search Path (Platform-specific)

The driver initialization program automatically starts SQLPLUS so that you can
easily create the group mk and two users (root and bsp on UNIX or mkadmin
and mk on Windows NT) required by MK. You will also define the default
tablespaces, temporary tablespaces, and indexspaces to be used.

If you do not have SQLPLUS, you will have to create the group and users
manually using SVRMGRL.

Configuring MK Oracle Drivers

The MK Oracle Driver (ora_srv6.0) is linked to use the Oracle shared libraries.
This requires that you create an environment to deal with requirements imposed
by the use of shared libraries.

Configuring the Driver on a Single Server

When Oracle is running on the same machine as MK Application Server (mkas),


the environment variables should be defined and initialized before the mkas gets
executed.

For users that run the ASCII (ba6.0) or the X Windows (bx6.0) interface, a script
can provide this function. When MK is installed, the script “setmk” in the
bse6.0/etc directory is created to initialize other MK variables such as BSE and
BSE_TMP. Many sites augment this functionality with scripts of their own.
Whatever script your site uses should include definitions for:
export ORACLE_HOME=<your oracle home path>

2–10 MK in the Oracle Environment


Installing MK with Oracle

export ORACLE_SID=<your oracle SID>

If you have HP UNIX, include the following definition:


export SHLIB_PATH=<shared library path for Oracle>:${SHLIB_PATH}

If you have Sun, DEC OSF, or Compaq Tru64, include the following definition:
export LD_LIBRARY_PATH=<shared library path for Oracle>:${LD_LIBRARY_PATH}

If you have AIX, include the following definition:


export LIBPATH=<shared library path for Oracle>:${LIBPATH}

For users that run MK Desktop or the MK Classic Windows Client (both run on
Windows workstations), the environment that the mkas inherits comes from
MKspwnsrvr6.0. MKspwnsrvr6.0 is started during the execution of etc/rc.start.
By default, MKspwnsrvr6.0 scans the etc/setmk script. You can specify the
script to be scanned with the –e command line option. Whatever environment
variables MKspwnsrvr6.0 finds are added to environment that is passed to the
mkas. Hence, the variables must either already be in the environment when
MKspwnsrvr6.0 starts, or they must be in the script MKspwnsrvr6.0 scans.

Configuring the Driver in a Dual-Server Environment

When Oracle is running on a different machine than the mkas, the environment
variables need to be defined and initialized before the MK Oracle Driver
(ora_srv6.0) gets executed.

The mkas uses the rexec function call to create the MK Oracle Driver (ora_srv6.0)
process on the machine running Oracle. What mkas actually spawns on the
remote machine is a ipc_boot6.0 process. Mkas then passes to ipc_boot6.0 a
token representing the process it wants started. Ipc_boot6.0 scans the
bse6.0/lib/ipc_info file looking for the first line that begins with that token.

The ipc_info file consists of a set of lines. Each line begins with a token, then
several parameters and, finally, a path to the program to execute. Mkas passes to
ipc_boot6.0 the token “oracle” in order to create an ora_srv6.0 process. An
example of an “oracle” line in an ipc_info file is:
oracle s 306 360 s ${BSE}/bin/ora_srv6.0

Because of how the ipc_boot6.0 process is created, it has very little environment
to pass onto ora_srv6.0 it creates. To get around this problem, the line for
“oracle” in the ipc_info is changed to execute a shell script instead of ora_srv6.0.
The changed line should look like:
oracle s 306 360 s ${BSE}/bin/ora_shell

Configuring Oracle For MK 2–11


Installing MK with Oracle

Next, the script ora_shell needs to be created in the ${BSE}/bin directory. The
script needs to create the enviroment for MK and include the Oracle variables
discussed above, then invoke ora_srv6.0. There are many ways to do this in a
shell script. Below is an example. You need to substitue the correct values for
the phrases delimited by “<>”.
#!/bin/ksh
#
# Set up MK Environment
#
export BSE=<your bse6.0 path>
export BSE_TMP=${BSE}/tmp
#
# Set Up Oracle Variables
#
export ORACLE_HOME=<your oracle home path>
export ORACLE_SID=<your oracle SID>
#
# Adjust Path and Shared library path
#
export PATH=${BSE}/bin:${PATH}
#

# Pick the platform that applies and discard the rest


# For HP UNIX
export SHLIB_PATH=${ORACLE_HOME}/lib:${SHLIB_PATH}
#
# For Sun, DEC OSF, Compaq Tru64
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
#
# For AIX
export LIBPATH=${ORACLE_HOME}/lib:${LIBPATH}

#
# Invoke ora_srv6.0
#
$BSE/bin/ora_srv6.0 $1 $2 $3 $4 $5 $6 &
#
# End of script
#

After the script is created, do a “chmod 0755 ora_shell” to make the script
executable.

2–12 MK in the Oracle Environment


Installing MK with Oracle

Setting Up the MK-Oracle Environment

To set up your Oracle environment, run ora_inst6.0. These scripts are used to:
■ Create an Oracle login code for an initial group to own the objects to be
created.
■ Grant privileges and default and temporary tablespaces to the created group.
(A role is created and users are given privilege to the role when they are
added to the group).
■ Add the created group and users to the files ora_groups and ora_users.
■ Add a default line for tables and a default line for indexes to the ora_storage
file. (You must specify the default tablespaces.)

For Windows NT Only Use the sample scripts in %BSE%\install\OracleScripts to create user, group,
and tablespaces.

Troubleshooting

On some machines the address used when shared memory is loaded does not
work well with the Oracle driver. The Oracle driver fails to connect to the Oracle
RDBMS correctly and you receive an fd_cread error during mk.install6.0

The workaround for this error is as follows:

For UNIX only: 1. Examine the $BSE/log/log.oracle file.


2. Use su to log in as root.
3. Shutdown shared memory using $BSE/etc/rc.stop.
4. Edit the $BSE/lib/shm_param file to change the value of SHM_START to
the address in the $BSE/log/log.oracle file.
5. Start up shared memory using $BSE/etc/rc.start.
6. Restart mk.install6.0.

For Windows NT only: 1. Examine the %BSE%\log\log.oracle file.


2. Log on as mkadmin.
3. From the Control Panel, select Services. Stop the shared memory service.
4. From the Control Panel, select Services. Start the MK Server service.
5. Restart the MK install program.

Configuring Oracle For MK 2–13


Installing MK with Oracle

After Installation

After the installation is completed, you may want to change the passwords used
during installation or add new users. Make sure you add any new users to the
Oracle database or change the Oracle database passwords before you add users
to the Oracle driver or change the Oracle driver passwords.

To add regular users so they can access the Oracle driver, run ora_admin6.0. See
Chapter 4, “Maintaining Driver Files,” for more information.

Note: Remember to use SVRMGRL or SQLPLUS to access the Oracle database.


Use ora_admin6.0 (UNIX only) to access the Oracle driver information (for
example, users and passwords).

Linking MK with Oracle

If Oracle was not selected as a database for any company during the installation
of MK and you wish to set up data in Oracle, copy the appropriate binaries from
$BSE/bin/drivers to $BSE/bin. Set up the MK-Oracle environment by running
ora_inst6.0 as ‘root’ or ‘oracle.’

You must set the following environment variables:


■ ORACLE_HOME
■ ORACLE_SID
■ Library Search Path (Platform-specific)

2–14 MK in the Oracle Environment


Chapter

Setting Up MK for Oracle


3

Introduction ................................................................................. 3–1


Defining the Database in MK ................................................................. 3–2
Linking Companies to Oracle ................................................................. 3–3

Setting Up MK for Oracle 3–i


Chapter

Setting Up MK for Oracle


3

Introduction
You need to add or modify some MK data before you can create any Oracle
tables:
■ Add Oracle as a database in Maintain Database Definitions (ttaad4110m000).
■ Create at least one company with Maintain Companies (ttaad1100m000).
■ Link the company to the Oracle database with Assign Tables to Databases
(ttaad4111m000).

After you have completed these steps, you can post data to the Oracle database.

Setting Up MK for Oracle 3–1


Defining the Database in MK

Defining the Database in MK


After you have installed both Oracle and MK, you need to define the database
within MK.

⇒ To add Oracle as an MK database:


1. Run the Maintain Database Definitions (ttaad4110m000) session.

2. Identify the database.


3. In the Parameter field, specify two environment variables: ORACLE_HOME
and ORACLE_SID.
Use a comma (,) as a separator with no spaces between the fields and
commas.

3–2 MK in the Oracle Environment


Linking Companies to Oracle

Linking Companies to Oracle


⇒ To create new companies or convert existing companies to Oracle:
1. Run the Maintain Companies (ttaad1100m000) session.

Make sure the company you want to create has been entered in the company
tables.
2. If Oracle has not been added already, add Oracle as a database in the
Maintain Database Definitions (ttaad4110m000) session. Refer to the
previous section, Defining the Database in MK.
3. Run the Assign Tables to Databases (ttaad4111m000) session to specify that
the database for the company is Oracle.

Setting Up MK for Oracle 3–3


Linking Companies to Oracle

4. Run the Convert to Runtime Data Dictionary (ttaad4200m000) session. This


produces corresponding entries in $BSE/lib/tabledef6.0.

You are now ready to post data to the Oracle database.

3–4 MK in the Oracle Environment


Chapter

Maintaining Driver Files


4

Overview ................................................................................... 4–1


User File .................................................................................... 4–2
Group File .................................................................................. 4–3
Storage File ................................................................................. 4–4
Index Optimization ...................................................................... 4–5
Storage.................................................................................. 4–6
Maintenance Tools ........................................................................... 4–7
MK Sessions ............................................................................. 4–7
Interactive Maintenance .................................................................. 4–7
Command Line Maintenance on a UNIX Platform........................................... 4–8
Command Line Maintenance on a Windows NT Platform.................................... 4–9

Maintaining Driver Files 4–i


Chapter

Maintaining Driver Files


4

Overview
There are three files used to assign access privileges to MK driver users and to
link MK driver users to Oracle databases:
■ ora_users (user file)
■ ora_groups (group file)
■ ora_storage (storage file)

For UNIX only: These files reside in $BSE/lib/ora and can be created and maintained using MK
optimization sessions, the script ora_admin6.0, or the executable ora_maint6.0.

For Windows NT only: These files reside in %BSE%\lib\ora. You can maintain the above files using
ora_maint.exe.

This chapter describes the content and structure of these files. It also describes
how to use the database administration tools to maintain the files.

Maintaining Driver Files 4–1


User File

User File
The user file contains information about all MK users who can access Oracle
tables. On a UNIX platform, this information is stored in the file
$BSE/lib/ora/ora_users. On Windows NT, this information is stored in the file
%BSE%\lib\ora\ora_users. Each line in this file consists of four fields, which
are separated by a colon (:). The format is as follows:

<MK user>:<Oracle user>:<encrypted user password>:<group name>

Variable Value
MK user Name by which the user is known to MK. This
should be a valid login name.
Oracle user User name that is accessing the database. This is the
same as the MK user name.
Encrypted password User's encrypted password for the Oracle database
(not the driver).
Group name Group to which the user belongs; the default is mk.

Note: Whenever you add or change user information, you must first do so in
the Oracle database, and then use ora_admin or the MK maintenance sessions to
modify the user file for the driver.

For Windows NT only: This file is maintained using ora_maint.exe. If you have created an alias name
for the database, specify the Oracle users’ password as
<user_password>@<database alias name>.

4–2 MK in the Oracle Environment


Group File

Group File
The group file contains information about Oracle groups in MK. These groups
specify the name of the database where MK finds the Oracle tables. On a UNIX
platform, this information is stored in $BSE/lib/ora/ora_groups. On a
Windows NT platform, this information is stored in
%BSE%\lib\ora\ora_groups. Each line in this file consists of two fields,
separated by a colon (:). The format is as follows:

<group name>:<group encrypted password>

Variable Value
Group name Default name is mk.
Group password Group’s encrypted password.

For UNIX only: Both the Oracle database and ora_admin refer to mk as a group (with its
password mk).

For Windows NT only: The group referred to is mk group with its password <group password alias
name>.

Maintaining Driver Files 4–3


Storage File

Storage File
The storage file contains information about the storage structure of the MK
Oracle tables and specifies various object parameters. The Oracle driver refers to
this file when creating objects and executing queries. The storage information is
held in $BSE/lib/ora/ora_storage. Each line in this file consists of seven fields,
separated by a colon (:). The format is as follows:
[ {user} ] table_name : company : [object : owner] :
[optimization] : [refresh time] : [storage]

Note: Fields in square brackets [ ] are optional; you can use wildcards for the
table name and the company name.

Variable Value
User Links table information to a specific user or users. Separate multiple users by a
comma. If you do not specify a user, the information applies to all users.
Table_name Specifies the name of the MK table. This is a combination of the package,
module, and table name. If the package is specified, you must also specify the
module.
Company Specifies the company number. Use a wildcard (*) to specify all companies or
list several companies separated by commas.
Object Specifies whether the table belongs to the group or a specific user.
Index optimization Specifies the type of index optimization used. Values 3 and 4 are allowed.
Refresh time By setting a refresh time (in seconds), you determine the validity period of a
query’s result set. The default value is 0.
Storage Specifies the storage structure when a table or index is created. All parts of the
storage field are optional and can be put in any order.

When installing, use the default parameters for the storage file. After
installation, you can modify the ora_storage file to minimize database
fragmentation, modify index optimization, and better manage extents.

Note: The ora_storage file is read from top to bottom. The entry that is found in
the file first will be used. The last two lines in the file must be the default values
for tables and indexes, as shown in the example below.

4–4 MK in the Oracle Environment


Storage File

Examples ttadv995:000:T:group::: STORAGE ( INITIAL 3M NEXT 2K)


ttadv999:000:T:group::: STORAGE ( INITIAL 4M NEXT 100K)
tttxt001:000:T:group::: STORAGE (INITIAL 1800K NEXT 50K)
tttxt002:000:T:group::: STORAGE ( INITIAL 4M NEXT 100K)
tttxt003:000:T:group::: STORAGE ( INITIAL 31M NEXT 200K MINEXTENTS 20)
*:*:T:group:1:5: PCTFREE 5 TABLESPACE mktables INITRANS 3
*:*:I:group:1:5: PCTFREE 5 TABLESPACE mkindexes INITRANS 3

Note: Each entry must have a newline character at the end of the line.

Index Optimization

The setting in the index optimization field can help improve database response
time.
Optimization Levels ■ If set to 3, there is no indexing. Next and previous keys are
for Oracle not recognized in MK. This setting is not recommended.
■ If set to 4, indexing is provided for retrieving the next and
previous record in a sequence.

Impact of Setting Index optimization takes additional space in the database and adds overhead
Index Optimization when updating or inserting records, but can significantly improve data retrieval
time. You can customize optimization for specific tables or indexes to meet the
needs of your environment.
Changing Index If you want to change the index optimization for a table, you need to re create
Optimization the table with the new index structure
1. Modify ora_storage to reflect the change in optimization.
2. Extract the table's data from the database using either:
− bdbpre6.0 for UNIX
− bdbpre.exe for Windows NT
3. Drop the table, using Oracle SVRMGRL or SQLPLUS.
4. Rebuild and repopulate the table with the new optimization scheme using
either:
− bdbpost6.0 for UNIX
− bdbpost.exe for Windows NT

Maintaining Driver Files 4–5


Storage File

Storage

The following options are available in the storage clause portion of the
ora_storage entry. The elements are optional and can be used in any order.

Element Description
PCTFREE Percentage of the Oracle page that is kept free
for later changes.
PCTUSED Percentage of Oracle page that must be used
before it is available for new inserts.
INITRANS Initial number of concurrent transactions in a
block.
MAXTRANS Maximum number of concurrent transactions.
Default is 255.
TABLESPACE Tablespace to create the table or index in.
STORAGE Storage characteristics of the table or index in
Oracle. All options in the Oracle STORAGE
clause are available. The Oracle defaults are
used if this clause is not specified.

The following is an example of the storage clause components:


PCTFREE X PCTUSED Y INITRANS Z MAXTRANS Q TABLESPACE
tablespace_name STORAGE (Oracle storage parameters)

4–6 MK in the Oracle Environment


Maintenance Tools

Maintenance Tools
You can maintain the user, group, and storage files with a special administration
tool. Depending on the user interface you want to use, you can access different
versions of this tool. To maintain the driver files, you can use any of the
following:
■ MK Oracle database maintenance sessions
■ Interactive utility ora_admin6.0 (on UNIX platforms)
■ Command line utility ora_maint6.0 (on UNIX platforms) or ora_maint (on
Windows NT)

Note: Before adding groups of users with these tools, they must be defined as
valid UNIX or Windows NT and Oracle RDBMS users.

MK Sessions

As part of its system management functionality, MK provides several sessions


for maintaining database information. To access the administration tools from
within MK, select Maintain Oracle Parameters (mttdba2000m000) under the
Database Management menu.

From this menu, you can select the appropriate sessions for adding, removing,
and reporting user and group information and for editing and viewing the
storage file. You can also print Oracle user information, and run Oracle SQL
Plus (from the Oracle Utilities parallel menu). For information on how to use
these sessions, refer to the online documentation for individual sessions.

Interactive Maintenance

The ora_admin6.0 executable is stored in $BSE/bin and used for Oracle.

Before using this command, the Oracle database should be up and running. If
the Oracle database is installed and operational, enter ora_admin6.0 at the
operating system prompt to access the interactive Oracle maintenance command.
(You are prompted for the BSE environment variable if it is not already set.)

Choose the function to be performed from the menu. Each option will prompt
for the additional information to complete the action.

Maintaining Driver Files 4–7


Maintenance Tools

Command Line Maintenance on a UNIX Platform

Use ora_maint6.0, stored in $BSE/bin, to maintain the Oracle MK driver files


directly from the command line. Use the provided syntax for each maintenance
option.

⇒ To add a user to group:


ora_maint6.0 -a <MK user> -m <oracle user> -G <group> [-B <$BSE
path>]

Adds the specified user the $BSE/lib/ora/ora_users and grants the user access
to all group tables.

⇒ To remove user from group:


ora_maint6.0 -d <MK user> -G <group> [-B <$BSE path>]

Revokes all privileges to group tables for a user and automatically deletes the
user's line in ora_users.

⇒ To add group:
ora_maint6.0 -A <group> [-B <$BSE path>]

Adds the group to the file $BSE/lib/ora/ora_groups.

⇒ To remove group:
ora_maint6.0 -D <group> [-B <$BSE path>]

Revokes all privileges to group tables for a user and automatically deletes the
user's line in ora_users.

⇒ To list users:
ora_maint6.0 -1 [-B <$BSE path>]

Lists all the users in ora_users file. For each user, displays the MK name, Oracle
name, and group.

⇒ To list groups:
ora_maint6.0 -L [-B <$BSE path>]

Lists all groups in ora_groups file, including each group name and all its users.

⇒ To list storage:
ora_maint6.0 -S <table> -C <custno> -u <user> -O <object> [-B
<$BSE path>]

Retrieves information for a table or index from ora_storage file.

4–8 MK in the Oracle Environment


Maintenance Tools

Command Line Maintenance on a Windows NT Platform

Use ora_maint, stored in %BSE%\bin, to maintain the Oracle MK driver files


directly from the command line. Use the provided syntax for each maintenance
option.

⇒ To add a user to group:


ora_maint -a <MK user> -m <oracle user> -G <group> -P <group password>@<database
alias name> [-B <%BSE% path>] –y <mksystem name>

Adds the specified user to the /%BSE%\lib\ora\ora_users and grants the user
access to all group tables.

⇒ To remove user from group:


ora_maint -d <MK user> -G <group> -P <group password>@<database alias name> [-B
<%BSE% path>]
–y <mksystem name>

Revokes all privileges to group tables for a user and automatically deletes the
user’s line in ora_users.

⇒ To add group:
ora_maint -A <group> -P <group password>@<database alias name> [-B <%BSE% path>]
–y <mksystem name>

Adds the group to the file %BSE%\lib\ora\ora_groups.

⇒ To remove group:
ora_maint -D <group> -P <group password>@<database alias name> [-B <%BSE% path>]
–y <mksystem name>

Revokes all privileges to group tables for a user and automatically deletes the
user's line in ora_users.

⇒ To list users:
ora_maint -l [-B <%BSE% path>] –y <mksystem name>

Lists all the users in the ora_users file. For each user, displays the MK name,
Oracle name, and group.

⇒ To list groups:
ora_maint -L [-B <%BSE% path>] –y <mksystem name>

Lists all groups in ora_groups file, including each group name and all its users.

⇒ To list storage:
ora_maint -S <table> -C <custno> -u <user> -O <object> [-B <%BSE% path>] –y
<mksystem name>

Retrieves information for a table or index from ora_storage file.

Maintaining Driver Files 4–9


Chapter

Tuning
5

Overview ................................................................................... 5–1


Testing Performance ......................................................................... 5–2
Setting Rollback Segment Size ................................................................ 5–3
Monitoring Rollback Usage ............................................................... 5–3
Guidelines for Tuning Rollback Segments .................................................. 5–4
Adjusting Parameters ........................................................................ 5–5
Oracle Initialization ...................................................................... 5–5
Oracle Driver Parameters ................................................................. 5–6
Using Import/Export ........................................................................ 5–7
Adjusting Log Files .......................................................................... 5–8
Managing Database Space .................................................................... 5–9
Additional Information...................................................................... 5–11

Tuning 5–i
Chapter

Tuning
5

Overview
Tuning the Oracle database typically involves determining the requirements of
your environment and how data is being accessed, and then modifying data
structures as necessary. This chapter provides information to help you identify
performance bottlenecks, adjust initialization parameters, and manage the
database.

Since identifying and eliminating performance bottlenecks can significantly


impact database performance, this chapter examines some of the most common
problem areas. However, there are many additional ways to enhance database
performance, and you should refer to the Oracle RDBMS Performance and
Tuning Guide for further information.

Tuning 5–1
Testing Performance

Testing Performance
To determine which table actions are time-consuming, you can set the ORAPROF
environment variable to a number of seconds. All actions that take longer than
that are written to a file called oraprof. This file lists information such as the time
for executing the cursor and retrieval of the result. The oraprof file is stored in
the directory where the Oracle driver was started.

You can specify the ORAPROF variable in the tabledef6.0 file for a particular
table, as follows:
tccom010:000:Oracle(ORAPROF=4.0)

In this example, the ORAPROF variable is set to 0.4 seconds for the table
tccom010. If a database action takes more than 0.4 seconds, an entry is generated
for the oraprof file.

Note: If two tables have different ORAPROF values, a separate driver is started
when the second table is accessed.

Using the information in this file, you can determine when results are retrieved
from cache memory and how long it takes to fetch and execute various actions.

5–2 MK in the Oracle Environment


Setting Rollback Segment Size

Setting Rollback Segment Size


This size and number of rollback segments can have a significant impact on
database performance. MK's use of rollback segments is highly dependent on
the number of users and type of transactions executed. These items will vary
from customer to customer.

Transactions in MK are short in most cases. Rollback segments with smaller


extents should perform effectively in these cases. However, certain sessions
generate very long transactions Ideally, rollback segments should be small
enough to handle everyday processing and extendible enough to handle the long
transactions of batch type sessions (MRP, for example).

Monitoring Rollback Usage

In order to determine the best rollback size, use the Oracle monitoring tools to
gather data on rollback segment usage. The most effective way to do this is with
SVRMGRL or SQLPLUS.

In SRVRMGRL or SQLPLUS, execute the monitor rollback statement to view the


current rollback statistics. The best information on rollback segment utilization
will be when the system is heavily loaded or when batch-type processing is being
executed. This command will accumulate and update rollback segment usage
data as the command is run.

Look for the following problem areas in the monitor tool:


■ If the Waits/sec or number of extents in a rollback segment are high, more
rollback segments should be added.
■ Gets/sec should be about equal for all rollback segments. If the numbers
vary widely, then verify that rollback segments are of uniform size.

Tuning 5–3
Setting Rollback Segment Size

Guidelines for Tuning Rollback Segments

When setting rollback segments, you should keep the following guidelines in
mind:
■ Create uniformly sized rollback segments.
■ Put the rootback segment tablespace on a separate disk to minimize I/O
contention.
■ The number rollback segments should be approximately equal to the number
of transaction divided by the number of transactions per segment.
Rollback segments = Transaction / Transactions per segment

Number of Transactions
Rollback Segments
Less than 16 4
Less than 32 8
More than 32 Transactions / 4 (Not greater than 50)

■ The rollback segment size, minus minextents multiplied by extent size


should be greater than the average size.
Rollback segment size - (minextents * size of extent) > Average size
■ Use the optimal parameter on rollback segments. The optimal values should
be set slightly higher than the average size.
■ Use one large rollback segment for large batch jobs.

5–4 MK in the Oracle Environment


Adjusting Parameters

Adjusting Parameters
The most common way to tune the database or the driver is by changing the
values for certain parameters. The parameter values provided in Chapter 3 are
recommended minimums. You can adjust some parameters to increase
performance.

Oracle Initialization

Although you should refer to the Oracle RDBMS Performance Tuning Guide for
complete information about Oracle initialization parameters, this section
provides guidelines for tuning the following parameters:
■ db_block_buffers
■ log buffer

db_block_buffers

This parameter determines the number of database blocks cached in shared


memory. This parameter should be set high enough to maintain a hit ration
above 60%. This hit ratio should be monitored when the system is in heavy use.

To monitor the hit ratio, use SVRMGRL.


$ svrmgrl
SVRMGRL> connect internal
SVRMGRL> monitor systemio

Calculate the hit ration using the following equation:

hit_ratio = (Log.reads - Phy. reads) / Log.reads

If you find that the hit ratio value us less than .6, the db_block_buffers value may
be set too low.

Note: This parameter should not be set above the available memory needed. A
value that is too high will cause excess paging and decrease performance.

Tuning 5–5
Adjusting Parameters

log_buffer

This parameter determines the number of bytes allocated to the redo log buffer
in the SGA. A higher value should reduce redo log file I/O. The default setting
of this parameter is too low in almost all cases. It is not unreasonable for this
value to be 64K or higher on a busy system.

The redo log space requests value should be monitored when the system is heavily
utilized. To monitor this value, use the SVRMGRL command.

Execute the following:


$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> monitor systemstatistic ;

If the value of redo log space requests is not zero, then the value of log buffer is
too low.

Oracle Driver Parameters

In addition to the Oracle initialization parameters, you may want to tune the
following driver parameters:
■ Index optimization
■ Refresh time

Index Optimization

Index optimization involves managing the effects of the hash column which has
a value obtained by combining all key field values using an algorithm. The
index is created on this column, instead of the conventional key fields. This
reduces search time since the index consists of a single column that maintains the
sort order of the components. You can indicate single level index optimization in
the storage file ora_storage to improve performance.
Refresh Time

Refresh time can be changed to control fetch optimization and caching. You can
set the refresh time in the storage file ora_storage.

Refer to Chapter 4, “Maintaining Driver Files,” for more information on editing


the ora_storage file.

5–6 MK in the Oracle Environment


Using Import/Export

Using Import/Export
Periodically, use the Oracle Import/Export facility to reduce the number of
extents a table uses and to defragment the database. This should prevent a table
reaching the maximum number of extents. A small increase in performance may
be obtained as well. (The impact on performance will be more significant as the
database grows in size.)

Tuning 5–7
Adjusting Log Files

Adjusting Log Files


It is recommended that the database is run in Archive mode to allow system
recovery in the event of system or media failure. However, log file size and
number will vary from installation to installation. It is not uncommon to
generate anywhere from 100 to 500 (or more) megabytes of log files in a business
day. Refer to Oracle documentation to determine a reasonable number of log
files and reasonable size for log files.

5–8 MK in the Oracle Environment


Managing Database Space

Managing Database Space


The size of the Oracle database will grow over time. The growth of a table will
depend on the size of the table (the number of columns and the size of each
column), the number of indexes on the table, and index optimization on the
table.

The following examples are ways to monitor the amount of available free space
in a tablespace, estimate table growth, and obtain other information on space
usage.

⇒ To determine the space currently used for an MK table and its indexes:
Execute the following:
$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> select SUM (bytes) from sys.dba_segments where segment_name like
'T<Package><Module><Table #><Company #>% ;

or start SQLPLUS and log in as:


User name: internal
Password: oracle
Host string: MK (database alias for MK database)
SQL> select SUM (bytes) from sys.dba_segments where segment_name like
‘T<Package><Module><Table #><Company #>%

⇒ To determine the space currently used for an entire MK company:


Execute the following:
$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> select SUM (bytes) from sys.dba_segments where segment_name like
'T%<Company #>%' ;

or start SQLPLUS and log in as:


User name: internal
Password: oracle
Host string: MK (database alias for MK database)
SQL> select SUM (bytes) from sys.dba_segments where segment_name like
‘T%<Company #>%

Tuning 5–9
Managing Database Space

Examples The following examples illustrate how to estimate the space needed for a
specified number (X) of additional records in table.

⇒ To determine the space needed by the table:


Execute the following:
$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> select sum (DATA_LENGTH) * X from sys.dba_tab_columns where
table_name like 'T<Package><Module><Table #><Company #> ;

or start SQLPLUS and log in as:


User name: internal
Password: oracle
Host string: MK (database alias for MK database)
SQL> select sum (DATA_LENGTH) * X from sys.dba_tab_columns where table_name
like ‘T<Package><Module><Table #><Company #>

⇒ To determine the space needed by the index(es):


Execute the following:
$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> select sum (COLUMN_LENGTH) * X from sys.dba_ind_columns where
index_name like 'T<Package><Module><Table #><Company #>% IDX%;

or start SQLPLUS and log in as:


User name: internal
Password: oracle
Host string: MK (database alias for MK database)
SQL> select sum (COLUMN_LENGTH) * X from sys.dba_ind_columns where index_name
like ‘T<Package><Module><Table #><Company #>% IDX%

⇒ To determine the amount of free space in a particular tablespace (X),


Execute the following:
$ svrmgrl
SVRMGRL> connect internal ;
SVRMGRL> select sum (BYTES) from dba_free_space where tablespace_name = 'X";

or start SQLPLUS and log in as:


User name: internal
Password: oracle
Host string: MK (database alias for MK database)
SQL> select sum (BYTES) from dba_free_space where tablespace_name = “X”;

To identify which tables grow and which remain static, use the Count Number of
Records by Table (ttaad4222m000) session to obtain a record count of the tables
for your production company. Run this report weekly to identify "growth" tables
and static tables. Use the SQL statements above to analyze the space
requirements for the growth tables.

5–10 MK in the Oracle Environment


Additional Information

Additional Information
See Chapter 4, “Maintaining Driver Files,” for more information about these
Oracle storage parameters and editing the storage file. For more information
about tuning and optimizing Oracle performance, consult the following:
■ Oracle Administrator's Guide
■ Oracle RDBMS Performance and Tuning Guide

Tuning 5–11
Appendix

Files and Executables


A

Executables ................................................................................ A–1


Driver Files ................................................................................ A–2
Table Definition (tabledef6.0) ............................................................ A–3
IPC File (ipc_info) ....................................................................... A–4

Files and Executables A–i


Appendix

Files and Executables


A
This appendix lists various executables and files required by the Oracle driver
and the directories where they are located.

Executables
The following table lists the Oracle executable files used by MK.

File Description
ora_admin6.0 Shell script for Oracle administration. This script calls
ora_maint6.0. It is located in $BSE/bin.
ora_maint6.0 (UNIX) Program internally called by ora_admin6.0 and
ora_inst6.0 for performing various driver administration
functions, such as adding user to group. It is located in
$BSE/bin.
ora_maint.exe (NT) Program for performing various driver administration
functions, such as adding user to group. It is located in
%BSE%\bin.

Files and Executables A–1


Driver Files

Driver Files
The following table lists the MK Oracle driver files.

Driver File Description


ora_users Contains information about all MK users who are going to
access the Oracle driver. It maps MK users to an Oracle
database. It is created by ora_inst6.0 during installation. It
is located in $BSE/lib/ora for UNIX or in %BSE%\lib\ora
for NT.
ora_groups Contains all Oracle database (group) names accessible by
MK users. It is created by ora_inst6.0 during installation. It
is located in $BSE/lib/ora for UNIX or in %BSE%\lib\ora
for NT.
ora_storage Contains database storage specifications for MK tables and
indexes. It is created by ora_inst6.0 during installation. It is
located in $BSE/lib/ora for UNIX or in %BSE%\lib\ora for
NT.
tabledef6.0 Identifies the type of the driver to use for accessing a table,
plus other driver parameters. It is maintained through thee
Assign Tables to Databases (ttaad4111m000) session. It is
located in $BSE/lib for UNIX or in %BSE%\lib for NT.
ipc_info Defines the UNIX path name for the driver executables and
the protocols used for communication between the MK
shell and driver process. It is located in $BSE/lib for UNIX
or in %BSE%\lib for NT.

For more information about these files, refer to the MK System Administrator's
Guide and the MK Installation and Upgrade Guide.

A–2 MK in the Oracle Environment


Driver Files

Table Definition (tabledef6.0)

Each line in this file consists of four fields separated by a colon


( : ). The format of the line is as follows:
[{<user>}]<table_name>:<company number>:<driver specification>:<audit trail>

In this file, you identify the database used for the table; for example, oracle or
informix, a host name for a remote table, or a list of drivers and remote sites,
separated by an ampersand ( & ). In addition to specifying the database driver as
Oracle, you can use this file to assign values for the following Oracle parameters:

Parameter Description
ORACLE_HOME Contains the full path name of the directory where the
Oracle database is installed. If there are multiple versions
of Oracle on your system, it should contain the name of the
directory containing the version you want to access.
When starting the Oracle driver, the MK shell reads and
sets this environment variable so that the Oracle driver uses
the corresponding database installation.
ORACLE_SID Contains the system identification for the Oracle database.
It should contain the identifier mk for MK databases.
ORAPROF Time for profiling statement execution time.

Sample Entries
tiitm990:*:oracle(ORACLE_HOME=/storm/oracle,ORACLE_SID=mk):N
tiitm999:*:darkman:N
*:*:oracle(ORACLE_HOME=storm/oracle,ORACLE_SID=mk) :N

In this example, table tiitm990 for all companies (*) is in the Oracle database; all
tiitm999xxx tables are on the system darkman; and all other tables for all other
companies are stored in Oracle.

Files and Executables A–3


Driver Files

IPC File (ipc_info)

Information about the database communication method is stored in the ipc_info


file, which contains the following:
■ Driver name (name of driver specified in tabledef6.0)
■ Operation mode
■ Semaphore key
■ Message key
■ Communication protocol
■ Path of the server program, which may include environment variables such
as ${BSE}

For example, a typical ipc_info file might look like this:

driver
operation mode
semaphore key
message key

protocol (s/p)

path of executable

ba6.0 s 601 610 p ${BSE}/bin/ba6.0


audit s 501 510 p ${BSE}/bin/audit_srv6.0
bx6.0 s 302 320 p ${BSE}/bin/bx6.0
oracle s 306 360 p ${BSE}/bin/oracle_srv6.0

For more information about defining databases and the ipc_info file, refer to the
MK System Administrator's Guide.

A–4 MK in the Oracle Environment


Appendix

Oracle Utilities
B

Creating a New Database ..................................................................... B–2


Creating a New Database Alias ............................................................... B–9
Tuning the Database ........................................................................ B–13

Oracle Utilities B–i


Appendix

Oracle Utilities
B
This appendix tells you how to:
■ Create a new database using the Oracle Database Assistance utility
■ Create a new database alias using the Oracle Net8 Config Easy utility
■ Tune the database using the Oracle Enterprise Manager utility

Oracle Utilities B–1


Creating a New Database

Creating a New Database


This section tells you how to create a new database using the Oracle Database
Assistance utility.

⇒ To create a new database:


1. Start the Oracle Database Assistant utility:

Choose the option to create a database.


2. Click Next:

Indicate the type of database that you want to create. Choose Custom to
create a user-defined database.

B–2 MK in the Oracle Environment


Creating a New Database

If you select Typical, a new database is created with default SID equal to
ORCn (where n = 1, 2, and so forth) and default parameter values, control
files, tablespaces, and so forth.
3. Click Next:

You can accept or modify the displayed database information. Enter the
internal password.
4. Click Next:

Accept or modify the System tablespace information.

Oracle Utilities B–3


Creating a New Database

Accept or change the User tablespace information.

Accept or change the Rollback tablespace information.

B–4 MK in the Oracle Environment


Creating a New Database

Accept or change the Index tablespace information.


5. Click Next:

Accept or modify the redo log file information.

Oracle Utilities B–5


Creating a New Database

6. Click Next:

Accept or modify the archive log parameter information.


7. Click Next:

Accept or modify the SGA parameter information.

B–6 MK in the Oracle Environment


Creating a New Database

8. Click Next:

Accept or modify the trace file configuration information.


9. Click Next:

Choose the first option to create the test database immediately.

Oracle Utilities B–7


Creating a New Database

10. Click Finish:

Choose Yes to create the database and start the services.

B–8 MK in the Oracle Environment


Creating a New Database Alias

Creating a New Database Alias


This section tells you how to create a new database alias for the “test” database
(created in the previous section) using the Oracle Net8 Config Easy Utility.

⇒ To create the database alias:


1. Start the Oracle Net8 Config Easy utility:

Choose the Add New Service option. Enter TEST as the alias for the
database.
2. Click Next:

Choose the networking protocol.

Oracle Utilities B–9


Creating a New Database Alias

3. Click Next:

Enter MKPDC as the Oracle server Host Name.


4. Click Next:

Enter the system identifier (SID) for the database to which you want to
connect.

B–10 MK in the Oracle Environment


Creating a New Database Alias

5. Click Next:

Click Test Service if you want to test the connection: This tests the newly
created alias for logging into the Oracle test database.

Click Test to test the connection. Click Done when you are finished.

Oracle Utilities B–11


Creating a New Database Alias

6. The following dialog box displays:

Click Finish to complete this process. The new alias TEST is created; you use
this alias as the host string for loging in to Oracle test database, as shown in
the following dialog box:

B–12 MK in the Oracle Environment


Tuning the Database

Tuning the Database


This section tells you how to tune an Oracle database using the Oracle Enterprise
Manager utility.

⇒ To tune the database:


Start the Instance Manager:

Oracle Utilities B–13


Tuning the Database

You can modify initialization parameters as needed and then click Save to save
the new configuration as a stored configuration:

B–14 MK in the Oracle Environment

You might also like