baan iv oracle installation for baan iv

50
BAAN IV Oracle Installation for BAAN IV Installation Guide U7028B US

Upload: others

Post on 29-Apr-2022

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BAAN IV Oracle Installation for BAAN IV

BAAN IV

Oracle Installation for BAAN IV

Installation Guide U7028B US

Page 2: BAAN IV Oracle Installation for BAAN IV
Page 3: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

i

Document

Number : U7028B USType : Installation GuideName : Oracle Installation for BAAN IVVersion : BDate : November 1996

Document information

© Copyright 1996 Baan Development B.V. All rights reseved.

The information in this document is subject to change without notice. No part of this document may be

reproduced, stored or transmitted, in any form or by any means, electronical or mechanical, for any

purpose, without the express written permission of Baan Development B. V.

Baan Development B.V. assumes no liability for any damages incurred, directly or indirectly, from any

errors, omissions or discrepancies between the software and the information contained in this

document.

Page 4: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

ii

Page 5: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

iii

1 Preconditions 1.11.1 System variables 1.11.2 Terms and definitions 1.21.3 General guidelines 1.21.4 Selecting the BAAN Oracle driver level 1.3

2 Preparations for Installation 2.12.1 Creating initial users and groups 2.12.2 General hard disk configuration 2.22.3 Kernel tuning 2.22.4 Initial files 2.3

3 Installing Oracle Version 7.2 3.13.1 Installing from tape 3.13.2 Installing from CD-ROM 3.23.3 Prior checks 3.23.4 Installating the Oracle software 3.23.5 Setting Permissions 3.7

4 Installing Oracle Version 7.3 4.14.1 Installing from tape 4.14.2 Installing from CD-ROM 4.24.3 Installing the Oracle software 4.34.4 Setting permissions 4.8

5 Configuring the Oracle environment 5.15.1 Creating an Oracle Instance 5.15.2 Adjusting the initORACLE_SID.ora and oratab files 5.15.2.1 Adjusting the initORACLE_SID.ora file 5.25.2.2 Adjusting the oratab file 5.25.3 Adjusting the Rollback Segments 5.35.3.1 Viewing Rollback Segments 5.35.3.2 Creating Rollback Segments 5.45.3.3 Removing Rollback Segments 5.45.3.4 Adjusting the initORACLE_SID.ora File 5.45.4 Creating Tablespaces for BAAN IV 5.55.5 Enlarging a Tablespace 5.5

6 Linking Oracle to BAAN IV 6.16.1 The ora_inst6.1 script 6.1

7 Finishing steps 7.17.1 Creating new BAAN IV users 7.17.2 Oracle in startup and shutdown scripts 7.2

Table of contents

Page 6: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

iv

Appendix A Files in $BSE/lib/ora A.1The ora_users file A.1The ora_groups file A.1The ora_storage file A.2

Appendix B Different Oracle Modes B.1

Appendix C Use of sqldba, svrmgrl and SQL*Plus C.1 The sqldba and svrmgrl utilities C.1

SQL*Plus C.1

Page 7: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

v

This document describes how Oracle must be installed and prepared to enable theinstallation of BAAN IV software using Oracle as database. This document can beused by all persons who want to perform a fresh installation of Oracle to be used asRDBMS for a BAAN IV environment on a UNIX server. However, an elementaryknowledge of UNIX and Oracle is required.

The procedure for installing the BAAN IV software is described in the InstallationGuide for BAAN IV on UNIX (U7016A US). This document contains a set offlowcharts, illustrating the place of the Oracle installation in the whole process.

This guide is divided into the following seven chapters and three appendices:

Chapter 1 describes the prerequisites for installing Oracle, and also lists some terms.

Chapter 2 describes the preparation of the UNIX system.

Chapter 3 describes the installation of the Oracle RDBMS version 7.2.

Chapter 4 describes the installation of the Oracle RDBMS version 7.3.

Chapter 5 describes the configuration of the Oracle environment for BAAN IV.

Chapter 6 describes the creation of the final link between Oracle and the BAAN IVsoftware during the installation of BAAN IV.

Chapter 7 describes the finishing steps for the Oracle environment.

Appendix A describes the three Oracle-related files in the $BSE/lib/ora directory.

Appendix B gives a short overview of the different Oracle modes.

Appendix C gives an short explanation about the use of sqldba (for Oracle 7.2) andSQL*Plus.

This document describes an installation of Oracle for a single UNIX server. Theexamples and descriptions of actions on the UNIX prompt presuppose the use of thekorn-shell (ksh).

With regards to the notation the following can be said. Keystrokes are placed betweenbrackets. Pointy brackets for function keys, square brackets for letters and typograficcharacters. Examples: press <Ctrl>[C], use the <Shift> key; use [C] to edit the screen.

Unix keywords, variables, path names and so on are printed bold (case-sensitive).Example: the cpio command; use licmon6.1 -b; Go to $BSE/bin.

Variables of any kind are in italics. Example: create the directory pathname/baan(asking you to create a subdirectory baan somewhere in the filesystem, for example/usr3/baan or /disk1/temp/baan)

About this document

Page 8: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

vi

Page 9: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

1 - 1

Baan supports a number of Oracle versions. Be sure that your Oracle version iscertified by Baan to function in combination with BAAN IV. At the time ofwriting this document, Oracle V7.3.2 is the most recent Baan-certified versionfor BAAN IV. This guide contains chapters about the installation of both OracleVerion 7.2 and Oracle Version 7.3.

In Oracle 7.3, the server manager sqldba is not available anymore. In its placethe products svrmgrl (server manager in line mode) and svrmgrm (servermanager with Motif) are available. The product svrmgrl is similar to sqldbalmode=y and svrmgrm is the full-screen (graphic) version. In scripts it is best touse svrmgrl.

The Oracle database can be installed by following the instructions in theInstallation Guide supplied by Oracle. For matters that are unclear or differentin your specific situation, please refer to your Oracle Installation Guide.

This chapter supplies an introduction to the terms and definitions used witinOracle. It contains the following sections:

n The Oracle system variables.n The terms and definitions used by Oraclen General guidelines for an Oracle installationn The choice between Level 1 and Level 2

1.1 System variables

This section lists the system environment variables used by Oracle. Thefollowing environment variables are important for an Oracle installation:

nn ORACLE_HOMEThis environment variable defines the directory where the Oracleenvironment is located. For example, /usr1/oracle.

nn ORACLE_SIDThis environment variable defines the Oracle instance. It is also the Oracledatabase environment variable. For example, baanIV.

nn ORACLE_TERMThis environment variable defines the Oracle terminal driver. For example,vt100

nn ORACLE_DOCThis environment variable defines the path name of the directory where thedocumentation must be stored.

nn ORACLE_LINKThis environment variable defines the CD-ROM link directory.

1 Preconditions

Page 10: BAAN IV Oracle Installation for BAAN IV

1 Preconditions

Oracle Installation for BAAN IV

1 - 2

1.2 Terms and definitions

This section supplies a listing of terms used by Oracle. For each term a definitionis given.

nn BlockMultiple physical file blocks that are allocated form an existing data file.

nn ExtentA set of adjacent database blocks.

nn SegmentA set of one or multiple extents; contains all data for a specific tablespacestructure.

nn TablespaceA logical storage space for physically grouped data.

nn FileA physical data file belonging to a single tablespace.

nn DatabaseA logical collection of shared data stored in tablespaces.

1.3 General guidelines

Try to assign ORACLE_HOME the same directory as the home directory ofuser oracle. In the examples it is assumed that Oracle is installed in /usr1/oracle.Make sure there is sufficient free disk space for the Oracle installation and thatthe relevant disk is not too heavily burdened. Therefore Oracle should never beinstalled on the root disk.

The ORACLE_SID should be named baanIV. If this name exists, then use asuffix to indicate the version. For example, baanIVa. If that name exists already,use another suffix. In this document we will use ORACLE_SID baanIV.

The tablespaces will be named:

Tablespaces

system system tables

temp temporary tablespace

rbsspace rollback segments

datspace BAAN IV tables

idxspace BAAN IV indices

The data file names will be built up from the short version of the tablespacename, followed by a sequence number for that tablespace, followed by theORACLE_SID, with the suffix .dbf. During the installation process the datafileof tablespace system will be named system1baanIV.dbf.

Page 11: BAAN IV Oracle Installation for BAAN IV

1 Preconditions

Oracle Installation for BAAN IV

1 - 3

1.4 Selecting the BAAN Oracle driver level

Before you start to install BAAN IV, you need to decide if you are going to workwith Level 1 or with Level 2. The BAAN IV Oracle driver with Level 1 uses rowlevel, whereas with Level 2 joins on multiple tables are facilitated. Generallyspeaking Level 1 will be faster than Level 2.

Page 12: BAAN IV Oracle Installation for BAAN IV

1 Preconditions

Oracle Installation for BAAN IV

1 - 4

Page 13: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

2 - 1

This chapter discusses the preparations to be performed before you can start theinstallation of Oracle. The following topics are described:

n The creation of initial users and groupsn The general hard disk configurationn The aspect of tuning the kerneln The creation of the initial files for Oracle

2.1 Creating initial users and groups

Take the following steps to create the user and group required by Oracle.

1 First determine the directory to install Oracle in. In Oracle terms this isknown as the ORACLE_HOME.

2 Create a UNIX group named dba with groupid 200 (if possible).

3 Create a UNIX user named oracle. The primary group for oracle should bedba. If possible, the home directory of oracle should equal that ofORACLE_HOME. It is recommended to reserve an entire disk or diskpartition for the Oracle installation.

4 Now log on as user oracle and place the following variables in a startupscript for user oracle (.profile in the case of a Korn shell, .cshrc in the caseof a C shell). Note that the ORACLE_LINK is not always necessary(depending on the type of UNIX operating system).

For a Korn shell:

ORACLE_HOME=Oracle software directoryORACLE_SID=instance nameORACLE_TERM=terminal variableORACLE_DOC=documentation directoryORACLE_LINK=link directoryexport ORACLE_HOME ORACLE_SID ORACLE_TERM ORACLE_DOCORACLE_LINKPATH=$PATH:$ORACLE_HOME/bin

According to the Baan installation standards, use the following value:

ORACLE_SID=baanIV

Do not forget to create the initial users and group(s) for the Baan installation.

See the Installation Guide for BAAN IV on UNIX (U7016A US).

2 Preparations for Installation

Example

Page 14: BAAN IV Oracle Installation for BAAN IV

2 Preparations for Installation

Oracle Installation for BAAN IV

2 - 2

2.2 General hard disk configuration

For a good setup of the Oracle environment it is essential to carefully considerthe hard-disk configuration. Once the hard disks have been partitioned andassigned, it will be time consuming to reassign them. Of course, factors such asdisk capacity, number of concurrent users, number of companies, and expectedusage of disk space are also important to prevent (performance) problems.Although the use of raw devices can improve performance by up to 15%, forsimplicitys sake we will base the examples in this document on tablespaces onUNIX file systems.

In this step we will only give estimated figures for the Oracle installation and thetablespaces. Figures on the required disk space for the BAAN IV installation canbe found in the Installation Guide for BAAN IV on UNIX.

The following guidelines can be used to determine the tablespaces for about 100users:

Dbspace Disk space Explanation

system 128 MB Stores information about all tables. The size depends onthe number of companies.

redolog 3 * 5 MB Space for roll forward data.

rbsspace 100 MB Space for uncompleted transactions.

temp 100 Mb Space for sorting, etc. This tablespace will not require toomuch space when you use Level 1. If you decide to useLevel 2, more space will be required (but this size will ingeneral be adequate).This is because under Level 2 thetemp tablespace is used to sort tables.

datspace 1GB Tablespace for tables. The size depends on the amount ofdata and companies.

idxspace 1GB Tablespace for indices. The size depends on the amountof data and companies.

The Oracle installation itself requires less than 300 MB of disk space. Try todistribute the tablespaces over different disks. For example, if you have four harddisks available for Oracle and the databases, the following configuration is agood initial choice:

Disk 1 Disk 2 Disk 3 Disk 4

Oracle + system tablespace +temp

Dat space Index space Redolog files

2.3 Kernel tuning

Before tuning the kernel for Oracle it is recommended to study the pre-installation tasks in the relevant chapter of the Oracle Installation andConfiguration Guide.

Page 15: BAAN IV Oracle Installation for BAAN IV

2 Preparations for Installation

Oracle Installation for BAAN IV

2 - 3

2.4 Initial files

The Oracle installation process assumes the availability of a number of files. Onsome systems these files are created automatically, on others they have to becreated manually.

The files concerned are:

/etc/oratab/etc/tnsnames.ora/etc/listener.ora

These files and the correct permissions can be created by the oracle user asfollows:

$ touch /etc/oratab

$ touch /etc/tnsnames.ora

$ touch /etc/listener.ora

$ chmod 644 /etc/oratab /etc/tnsnames.ora /etc/listener.ora

Create the Oracle documentation directory:

$ mkdir $ORACLE_DOC

$ chmod 755 $ORACLE_DOC

Page 16: BAAN IV Oracle Installation for BAAN IV

2 Preparations for Installation

Oracle Installation for BAAN IV

2 - 4

Page 17: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

3 - 1

Due to a number of system-specific features that can occur during the installationof Oracle, this document cannot give a 100% correct description for allsituations. There is also a difference between installing from tape and installingfrom CD-ROM. Both methods will be adressed in this chapter.

Please refer to the Oracle Installation Guide for the exact procedures for creatingthe Oracle installation environment and running the Oracle Installer for youroperating system and media type.

There are four possible steps when Oracle is installed:

1 Creating the Oracle installation environment (from tape or CD-ROM)2 Running the pre-installation checks (rootpre.sh; not always available)3 Running the Oracle Installer4 Setting the permissions (root.sh)

For creating the Oracle installation environment (from tape or CD-ROM), a fewmedia specific hints and points of attention are given instead of a full description.Next, the checks (before installation) are described.

The Oracle Installer script is described in more detail, to enable the installer toenter the right settings for BAAN IV. For naming conventions, see also Chapter4. Finally, the procedure of setting permissions is described.

If you install Oracle from tape, continue with the section 3.1 “Installing fromtape”, if you install from CD-ROM, continue with the section 3.2 “Installingfrom CD-ROM”.

3.1 Installing from tape

Log on as user oracle, and make sure that all parameters (ORACLE_HOME,ORACLE_SID, PATH, etc.) are set properly.

The general syntax for the cpio command is as follows:

cpio -icdvB < tape_device

After creating the installation environment, continue with the Prior checks sectionof this document.

If you install from tape the Oracle Installer script will at some point ask whetherthe installer bootstrap directory must be retained. Answer Yes to this question.

3 Installing Oracle Version 7.2

Note

Page 18: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 2

3.2 Installing from CD-ROM

If necessary, mount the CD-ROM. This is a system-specific action that is usuallydescribed in detail in the inlay of your CD-ROM.

For some operating systems you are asked to create a directory referred to asORACLE_LINK to store the links to the CD-ROM. This directory will containabout 40 MB of data. To group all Oracle-related data, you may want to create aseparate directory named olink as a subdirectory of the ORACLE_HOMEdirectory.

3.3 Prior checks

In some cases there is a rootpre.sh script available (depending on the specificcombination of Oracle version and operating system version). In this section thepurpose and usage of this script is explained. When it is available, it shouldalways be run before running the Oracle Installer.

The main purpose of this script is to check if certain things such as asynchronousI/O have been configured. If they are okay, then no further action is required.Otherwise, follow the instructions given in the script.

1 Log on as root and go to the appropriate directory, for example, the$ORACLE_LINK/orainst directory.

2 Start the rootpre.sh script (if available) by entering the following command:

# sh rootpre.sh

3.4 Installating the Oracle software

The Oracle installation process is only described in this document to make surethat you enter the appropriate values at the right places. There may bedifferences between this description and the actual Oracle Installer (for example,there may be extra checks).

See the Oracle Installation Guide for more details.

1 Log on as oracle.

2 When installing from tape, go to $ORACLE_HOME/orainst; when installingfrom CD-ROM, go to the appropriate directory such as$ORACLE_LINK/orainst.

Page 19: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 3

3 Start the Oracle Installer (orainst).

In this script, press <Tab> to move the cursor to the next field. Buttons such asOK and Cancel can be activated by pressing <Enter>.The options listed in a checkbox can be selected/deselected by pressing <Space>.

1 You will be asked to specify the ORACLE_HOME directory. If thisvariable is already known, the installer will automatically display the rightdirectory. Press OK to confirm.

2 The installer will tell you that all installation actions are stored in a logfile.Press OK to continue. When the installer is started for a second or thirdtime, you will be told that install.log already exists. Press OK to continue.New actions will be appended to the logfile.

3 Part of the README.FIRST file will be displayed. Press OK to continue.Then skip the step for reading the README.FIRST file by pressing Yes.

4 Some machines will now prompt you to run the rootpre.sh script. As wehave already done this, press Yes to continue.

5 Now a menu with a number of installation options appears. Choose theoption:

Complete software/database fresh

6 Now you are asked to select an installation method.−− When installing from tape, choose:

Install from tape

−− When installing from CD-ROM, choose:

Install from CD-ROM

7 As native language, choose:

American/English

8 The installer asks if the executables must be relinked. For a first-timeinstallation this is not necessary, so in this case press No. If you want to beable to add more executables later, press Yes.

9 If a message is displayed, saying that actions that cannot be started untilafter the installation will be written to the root.sh script, press OK tocontinue.

10 On the question concerning online support, choose:

For no products

Or, if you have sufficient disk space available:

For all products being installed

11 On the question, whether or not to install the documentation, choose:

For no products

Page 20: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 4

Or, if you have sufficient disk space available:

For selected products

12 On the question, which products must be installed, select at least:

ORACLE7 Server (RDBMS)SQL*Plus

If you want to use Oracle import and export products, also select:

PL/SQL V2

If you want to use SQL*Net, also select:

SQL*Net TCP (V2)

TCP/IP Protocol Adapter (V2)

It is also recommended to select:

Oracle*Terminal

13 On all questions, whether or not to install other products, answer:

No

14 On the question about the UNIX group for dba, enter:

dba

15 For the osoper group, enter:

dba

16 For the database name to be assigned to the instance, specify the instancename (to avoid confusion):

baanIV

17 Then select the character set for the database:

US7ASCII

It is important to select US7ASCII character set. A different character setwill almost certainly cause problems. For more information, refer to theOracle and Baan documentation.

18 Now you are asked to enter the passwords for the two database users systemand sys. Please be very careful with these passwords, as they are the Oracleequivalents of the root password for UNIX. Initially all passwords can be setto manager.

19 Although passwords can be defined for all internal users, we will not do so atthis point. So, for now, answer:

No

Note

Page 21: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 5

20 When asked to define the password for the TNS listener, initially enter:

manager

Do not forget to change this into a more appropriate password later!

21 On the question, whether the MTS must be configured and the SQL listenerstarted automatically, answer:

No

22 The database will now be configured. First, the location for the control filesmust be defined. It is recommended to assign different disks to each controlfile. Therefore, first answer:

No

Now you can assign different files to each control file. If you do not havethree different disks available, then you can choose the default option:

Yes

23 Now the installer will show a number of screens with default values bymeans of which the database can be set up. Press OK to continue to the nextscreen:

OK

24 The default values that Oracle uses to set up a database are not suitable for aBAAN IV installation. Answer:

No

25 For the path for the SYSTEM tablespace, specify the desired file or rawdevice. For naming conventions, see section 5.4, “Creating tablespaces forBAAN IV.) For example:

/usr1/oracle/dbs/system1baanIV.dbf

26 A system tablespace of 125 MB is sufficient, unless you will be using manycompanies. In that case you should increase the system tablespace:

125Mb

27 It is recommended to locate the redo log on (a) separate fast disk(s). In allthree cases, enter a logical file name. For example for the first:

/usr2/oracle/dbs/log1baanIV.dbf

28 Specify the same size for every redo log file. Initially a value of 5 MB willsuffice:

5Mb

Note

Page 22: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 6

29 The rollback segment can also be defined in for instance$ORACLE_HOME/dbs or (preferably) on yet another disk. For example:

/usr3/oracle/dbs/rbs1baanIV.dbf

30 The size of the rollback segment should be 100 MB:

100Mb

31 After this the selected products are copied from tape or CD-ROM. As soonas this process is completed, you will see a message to this effect. Press OKto continue:

OK

31a In most cases you are asked to specify the TEMPORARY tablespacelocation. Choose for instance the $ORACLE_HOME/dbs directory or adirectory (preferrably) on yet another disk. For example:

/usr4/oracle/dbs/temp1baanIV.dbf

31b The size of the TEMPORARY tablespace can be set to 100Mb:

100Mb

32 Then you are asked to specify the USER tablespace location. Choose, forinstance, the $ORACLE_HOME/dbs directory or a directory (preferably)on yet another disk. For example, select:

/usr5/oracle/dbs/user1baanIV.dbf

33 You can accept the default size of a MB as the size of the USER tablespace:

1Mb

34 The TOOLS tablespace can also be located in, for instance,$ORACLE_HOME/dbs, or a directory on (preferably) yet another disk.For example, select:

/usr6/oracle/dbs/tools1baanIV.dbf

35 The size of the TOOLS tablespace can be set to 1MB:

1Mb

36 After some time the system will state that the installation is completed. Thenpress OK to continue:

OK

37 As soon as the selection screen appears, press <Ctrl>[X] to close theinstallation program.

Page 23: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 7

3.5 Setting Permissions

1 Log on as root.

2 Go to the $ORACLE_HOME/orainst (or other appropriate) directory.

3 Start the root.sh script.

# sh root.sh

n The script will show the ORACLE_HOME, ORACLE_SID andORACLE_OWNER values. Press <Return> to confirm these values.Otherwise, press [N] to change these values.

n Then you can define the local bin directory. Press <RETURN> to confirmthe default or enter the right name.

The script will now run a number of checks and create some files in the /etc andthe local bin directory.

This step completes the Oracle installation process.

Page 24: BAAN IV Oracle Installation for BAAN IV

3 Installing Oracle Version 7.2

Oracle Installation for BAAN IV

3 - 8

Page 25: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

4 - 1

Due to a number of system-specific features that can occur during the installationof Oracle, this document cannot give a 100% correct description for allsituations. There is also a difference between installing from tape and installingfrom CD-ROM. Both methods will be addressed in this chapter.

The Oracle Installation Guide describes the exact procedures for creating theOracle installation environment and running the Oracle Installer for youroperating system and media type.

There are three steps when Oracle is installed:

1 Creating the Oracle installation environment (from tape or CD-ROM)2 Running the Oracle Installer3 Setting the permissions (root.sh)

This chapter outlines several media-specific hints and points of attention to createthe Oracle installation environment (from tape or CD-ROM).

The Oracle Installer script is described in more detail, to enable the installer toenter the right settings for BAAN IV. The stepwise description in section 4.3,“Installing the Oracle software”, helps you install the software in 53 steps. Fornaming conventions, see also Chapter 6, “Linking Oracle to BAAN IV”.

Finally, the procedure of setting permissions is described.

If you install Oracle from tape, continue with the section 4.1 “Installing fromtape”, if you install from CD-ROM, continue with the section 4.2 “Installingfrom CD-ROM”.

4.1 Installing from tape

If the Oracle distribution medium is a tape, you must perform the following stepsbefore you can start the installation process.

1 Log on as user oracle, and by entering the following commands read theinstaller software from tape:

$ mt -t /dev/tape_device$ cpio -icdvB < /dev/tape_device

2 Enter the following commands to start the Oracle installer:

$ cd newoi$ ./orainst

3 Enter the following commands to start the Oracle installer:

$ cd newoi$ ./orainst

4 The Install Type screen is displayed. Type No. You are asked to supply thevalue of ORACLE_HOME. Specify the value and press OK.

4 Installing Oracle Version 7.3

Page 26: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 2

5 The Installer Bootstrap: Mount Point screen is displayed. Here you mustenter the mount point of your Oracle directory structure. Note that this is notthe same as the directory defined by ORACLE_HOME. For example, ifyour ORACLE_HOME is /usr1/oracle, your mount point is /usr1. Enterthe mount point and press OK.

The user oracle must have write permission for the mount point of the Oracledirectory structure.

6 The Installer Bootstrap: Home Locator screen is displayed. Enter the Oraclerelease number, for example, 7.3.2.2, and press OK.

7 After two information screens, you are asked if you want to keep the installerbootstrap directory. Answer Yes.

8 Change directories to the orainst directory by entering the followingcommand:

$ cd $ORACLE_HOME/orainst

You are now ready to continue with the steps described in the section 4.3,“Installing the Oracle software,” later in this chapter. The procedures describedin this section are written for an installation from CD_ROM. Some of the screensmay not be displayed if you are installing from tape.

4.2 Installing from CD-ROM

If the Oracle distribution medium is a CD-ROM, you must perform the followingsteps before you can start the installation process.

1 Log on as user root and enter the following commands to create the directoryfor the mount point of the CD-ROM and the Oracle link directory.

# mkdir /cdrom# mkdir /oracle_link

Note that the /oracle_link directory will contain about 50 MB of data. Ifyour root file system does not contain sufficient free disk space, you mustcreate the /oracle_link directory in another file system.

2 Enter the following commands to set the proper access permission to thedirectories you created in step 1.

# chmod 777 /cdrom# chmod 777 /oracle_link

3 Enter the following command to mount the Oracle distribution CD-ROM on/cdrom.

# mount -e -F cdfs /dev/device for CD-ROM /cdrom

4 Log out and log on as user oracle. Enter the following command.

$ cd /cdrom/ORAINST

Note

Note

Page 27: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 3

5 Check that the ORACLE_TERM is set to the appropriate value and enterthe following command to run the start-up script.

$ ./START.SH

6 The start-up script asks you to supply the path name of the oracle_linkdirectory.

7 After the START.SH script exits, you must enter the following command.

$ cd /oracle_link/orainst

You are now ready to continue with the steps described in the section 4.3,“Installing the Oracle software,” later in this chapter.

4.3 Installing the Oracle software

The Oracle installation process is only described in this document to make surethat you enter the appropriate values at the right places. There may bedifferences between this description and the actual Oracle Installer (for example,additional checks). Refer to the Oracle Installation Guide for more details.

1 Enter the following command to start the Oracle installer.

$ ./orainst

In the orainst script, press <Tab> to move the cursor to the next field.Buttons such as OK and Cancel can be activated by pressing <Enter>.The options listed in a checkbox can be selected/deselected by pressing<Space>.

2 You will be asked to specify the ORACLE_HOME directory. If thisvariable is already known, the installer will automatically suggest the rightdirectory. Press OK to confirm.

3 The installer will tell you that all installation actions are stored in a logfile.Press OK to continue. When the installer is started for a second or third time,you will be told that install.log already exists. Press OK to continue. Newactions will be appended to the logfile.

4 The preamble.txt file is displayed. Press OK to continue.

5 The Installation Activity Choice screen is displayed. Select Install, Upgrade,or De-Install Software and press OK.

6 The Installation Options menu is displayed. Select Install New Product andpress OK.

7 The Installation Options: Mount Point screen is displayed. You must enterthe mount point of your Oracle directory structure. Note that this is not thesame as the directory defined by ORACLE_HOME. For example, if yourORACLE_HOME is /usr1/oracle, your mount point is /usr1. Enter themount point and press OK.

Page 28: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 4

The user oracle must have write permission for the mount point of the Oracledirectory structure.

8 The Installation Options: Home Locator screen is displayed. Enter the Oraclerelease number, for example, 7.3.2.2, and press OK.

9 The Oracle Directories screen is displayed. Enter the pathnames forORACLE_BASE and ORACLE_HOME and press OK. If the predefinedORACLE_HOME does not reside under ORACLE_BASE, thispredefined setting will be disgarded by the Oracle installer.

10 The DB Objects screen is displayed. You are asked to specify whether youwant to create a database or database objects for the products you areinstalling. If you press Yes, you will be prompted for the configurationdetails for the database (objects) to be installed. If you press No, only thesoftware will be installed. Press Yes.

11 The Logging and Status screen is displayed. Enter the path names for the logfiles (or accept the default values) and press OK.

12 The contents of the README file is displayed. Press OK twice to skip thisREADME file for the rest of the installation.

13 The Install Source screen is displayed. Enter the Oracle distribution mediumyou are installing from and press OK.

14 The NLS screen is displayed. Select the native language to be installed andpress OK. In this example installation American/English is selected.

15 The Relink All Executables? screen is displayed. For a first-time installationthis is not necessary, so in this case press No. If you want to be able to addmore executables later, press Yes.

16 An Information screen is displayed. Press OK to continue.

17 The OnLine Help Load screen is displayed. Select No Products (or AllProducts Being Installed, if you have sufficient disk space available) andpress OK.

18 The UNIX Documentation screen is displayed. Select No (or Yes, if you havesufficient disk space available) and press OK.

19 The Product Documentation Library CD-ROM install screen is displayed.Select No products (or All Products Being Installed, if you have sufficientdisk space available) and press OK.

20 The Software Asset Manager screen is displayed. Select No (or Yes ProductsBeing Installed, if you have sufficient disk space available). Select at leastthe following products by pressing the spacebar in the Products availablewindow:

−− ORACLE7 Server (RDBMS)−− SQL*Plus

Note

Page 29: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 5

If you want to use Oracle import and export products, you must also select:

−− PL/SQL V2

If you want to use SQL*Net, also select:

−− SQL*Net TCP (V2)−− TCP/IP Protocol Adapter (V2)

After you have selected the Oracle products to be installed, use the <Tab>key to select Install and press Enter.

21 The Official Hostname screen is displayed. Specify the hostname (includingdomain) of the server, for example, vico.baan.nl and press OK.

22 The TCP Service Port screen is displayed. Specify the TCP/IP network portfor the Oracle Web Listener (you can accept the default port number) andpress OK.

23 The Password screen is displayed. Specify the password for the web useradmin (you are asked to reenter the password) and press OK.

24 The DBA Group screen is displayed. Accept the default name dba as UNIXgroup name for the Oracle DBA group and press OK.

25 The OSOPER Group screen is displayed. Accept the default name dba asUNIX group name for the Oracle OSOPER group and press OK.

26 The ORACLE_SID screen is displayed. Enter the ORACLE_SID youdefined earlier in the section 2.1 “Creating initial users and groups” andpress OK.

27 The Create DB Objects: Storage Type screen is displayed. Indicate if youwant to use a raw device or a file system as storage type for the database andpress OK.

28 The Create DB Objects (F/S): Control File Distribution screen is displayed.It is recommended to assign different disks to each control file. Therefore,answer Yes. Now you can assign different mount points for each controlfile. Press OK to accept each mount point.

29 The Character Set screen is displayed, asking you to select the character setfor the database. Select US7ASCII and press OK.

It is important to select US7ASCII character set. A different character setwill almost certainly cause problems. For more information, refer to theOracle and Baan documentation.

30 You are asked to enter the passwords for the two database users system andsys. Note that these passwords must offer real protection, as they are theOracle equivalents of the root password for UNIX. Initially all passwordscan be set to manager.

31 The dba password screen is displayed. At this point you can define thepasswords for the internal users. Select NO and press <Enter> to continue.

Note

Page 30: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 6

32 The TNS Listener Password screen is displayed. Enter and reenter (in thenext screen) manager and press Enter twice to continue.

Do not forget to change this into a more appropriate password later!

33 The Configure MTS and start SQL*Net listener? screen is displayed.Answer the question, whether the MTS must be configured and the SQLlistener started automatically, by selecting NO. Press Enter to continue.

34 The Create DB Objects (F/S): Control File Distribution screen is displayedagain, showing the path names for the control files you inserted before.Select Yes and press <Enter> to accept the path names.

35 Now the installer will show a number of screens with default values bymeans of which the database can be set up. Press OK twice.

36 The Default Database screen is displayed. The default values that Oracleuses to set up a database are not suitable for a BAAN IV installation. SelectNo and press <Enter>.

37 The Create DB Objects (RAW): System File Locator screen is displayed.For the path for the SYSTEM tablespace, specify the desired file or rawdevice, for example, /usr1/oracle/dbs/system1baanIV.dbf. Select OK andpress <Enter>. For naming conventions, see Chapter 5.

38 The SYSTEM Data File Size screen is displayed. A system tablespace of125 MB is sufficient, unless you will be using a large number of companies.In that case you should increase the system tablespace. Enter the size for thesystem tablespace, select OK and press <Enter>.

39 The Create DB Objects (F/S): Redo Log Locator screen is displayed. It isrecommended to locate the redo log files on (a) separate fast disk(s). For allthree redo log files, enter a logical file name, for example, for the first:/usr2/oracle/dbs/log1baanIV.dbf. Select OK and press <Enter>.

40 The Redo Log File Size screen is displayed. Specify the size for the first redolog file. A value of 5 MB is a good initial value. Specify the size for the redolog file, select OK and press <Enter>.

41 You must repeat the last two steps for the second and third redo log files.Specify the same size as for the first redo log file.

42 The Create DB Objects (F/S): Rollback Segment File Locator screen isdisplayed. The rollback segment can also be defined in, for example,$ORACLE_HOME/dbs or (preferably) on another disk. For example:/usr3/oracle/dbs/rbs1baanIV.dbf. Select OK and press <Enter>.

43 The Rollback Segment File Size screen is displayed. The size of the rollbacksegment must be 100 MB. Enter the size for the rollback segment, select OKand press <Enter>.

Note

Page 31: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 7

44 The Create DB Objects (F/S): Temporary Segment File Locator screen isdisplayed. Choose, for example, the $ORACLE_HOME/dbs directory or adirectory (preferably) on another disk. For example,/usr4/oracle/dbs/temp1baanIV.dbf. Select OK and press <Enter>.

45 The Temporary Segment File Size screen is displayed. The size of theTEMPORARY tablespace can be set to 100 MB. Enter the size for thetemporary segment file, select OK and press <Enter>.

46 The Create DB Objects (F/S): USER Data File Locator screen is displayed.You are asked to specify the USER tablespace location. Choose, forexample, the $ORACLE_HOME/dbs directory or a directory (preferably)on another disk. For example: /usr5/oracle/dbs/user1baanIV.dbf. SelectOK and press <Enter>.

47 The USER Data File Size screen is displayed. You can accept the defaultsize of 1MB for the USER tablespace, select OK and press <Enter>.

48 The Create DB Objects (RAW): TOOLS Data File Locator screen isdisplayed. The TOOLS tablespace can also be located in$ORACLE_HOME/dbs, or a directory on (preferably) another disk.

49 For example, /usr6/oracle/dbs/tools1baanIV.dbf. Select OK and press<Enter>.

50 The TOOLS Data File Size screen is displayed. The size of the TOOLStablespace can be set to 1 MB. Select OK and press <Enter>.

51 The Demo Tables screen is displayed, asking you if you want to load theSQL*Plus Demo Tables. Select Yes and press <Enter>.

52 An information screen displays the message that the software is installed.Press OK. You can exit the next screen by selecting No and pressing<Enter>.

53 53 After some time the system will state that the installation is completed.Press OK to continue.

54 As soon as the selection screen appears, select Exit and press <Enter> toclose the installation program.

Page 32: BAAN IV Oracle Installation for BAAN IV

4 Installing Oracle Version 7.3

Oracle Installation for BAAN IV

4 - 8

4.4 Setting permissions

1 Log on as root.2 Go to the $ORACLE_HOME/orainst (or another appropriate) directory.3 Start the root.sh script.

# sh root.sh

n The script will show the ORACLE_HOME, ORACLE_SID andORACLE_OWNER values. Press <Enter> to confirm these values.Otherwise, press <N> to change these values.

n Then you can define the local bin directory. Press <Enter> to confirm thedefault or enter the right name.

The script will now run a number of checks and create some files in the /etc andthe local bin directory.This step completes the Oracle installation process.

Page 33: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

5 - 1

This chapter describes the Oracle configuration aspects to be performed after theinstallation of oracle. The topics discussed are:

n Creating an Oracle instancen Adjusting the initORACLE_SID.ora and oratab filesn Adjusting the rollback segments

5.1 Creating an Oracle Instance

If Oracle is already installed, but an instance for BAAN IV is not yet available, anew instance can be created as follows. For more information, see also thechapters 3 and 4.

1 log on as user oracle and change directories to the appropriate installationdirectory, for example $ORACLE_HOME/orainst.

2 Start the installation script by entering the following command:

$ sh orainst

3 Follow the steps described in the section “Installing the Oracle software” inChapter 3 or 4 (depending on the Oracle version) up to the point that theInstallation Options screen is displayed.

4 Select the following option in the Installation Options screen:

Create New Database Objects

5 In the screen, asking you which products to install, select the followingoption:

ORACLE7 Server (RDBMS)

6 Follow the remaining steps described in the section “Installing the Oraclesoftware” in Chapter 3 or 4.

5.2 Adjusting the initORACLE_SID.ora and oratab files

After having created a standard instance, the files$ORACLE_HOME/dbs/initORACLE_SID.ora and /etc/oratab files must beadjusted before Oracle can run properly. The changes to be performed in thesefiles are described in the sections below.

5 Configuring the Oracle environment

Page 34: BAAN IV Oracle Installation for BAAN IV

5 Configuring the Oracle environment

Oracle Installation for BAAN IV

5 - 2

5.2.1 Adjusting the initORACLE_SID.ora file

The initORACLE_SID.ora file in the $ORACLE_HOME/dbs directorycontains some Oracle parameters. Every instance has its own file with the nameinitORACLE_SID.ora. For example, for the ORACLE_SID baanIV, the filewill be named initbaanIV.ora.

The following variables (and the indicated values) should be added to theinitORACLE_SID.ora file:

open_cursors = 5000

db_files = 50

The initORACLE_SID.ora file further contains a number of options whoseSMALL value is enabled by default, and whose MEDIUM and LARGE valuesare disabled. You must change these options in the circumstances listed below.n With more than 25 users, enable the MEDIUM value and disable the other

values.

n With more than 75 users, enable the LARGE value and disable the othervalues.

This is only the first tuning step. The remaining steps are up to you. For allremaining steps you will have to verify if the kernel can handle these numbers ofusers. See also the chapter on pre-installation tasks in the Oracle Installationand Configuration Guide.

If you change any parameters in the initORACLE_SID.ora file, you must closedown and start up ORACLE7 by using the dbshut and dbstart commands(being logged on as oracle) to effect the changes.

5.2.2 Adjusting the oratab file

During the execution of the root.sh script (described in the section “Settingpermissions” in the chapters 3 and 4) the Oracle configuration file /etc/oratab iscreated. This file contains the real path of the Oracle7 installation directory. Forthe instance baanIV, the /etc/oratab file contains, for example, the followingdefault entry:

baanIV:/usr1/app/oracle/product/7.3.2.2:N

You must read this entry as follows:

n The first field is the system identifier (ORACLE_SID) of the database.

n The second field is the home directory (ORACLE_HOME)of the database.

n The third field indicates whether the database should (Y), or should not (N)be brought up at system boot time.

You must change the value of the third field from N to Y.

Note

Page 35: BAAN IV Oracle Installation for BAAN IV

5 Configuring the Oracle environment

Oracle Installation for BAAN IV

5 - 3

5.3 Adjusting the Rollback Segments

The number of rollback segments to be used can be taken from the followingtable:

1 - 40 users 1 rollback segment per 4 users

41 - 60 users 1 rollback segment per 6 users

61+ users 1 rollback segment per 8 users

These values are only initial values. If they prove to be unsatisfactory, they canbe changed at any time.

To view, create, or remove rollback segments, use SQL*Plus or sqldba. Formore information about these tools, see Appendix C.

To arrive at the right rollback segments, go through the following steps:

1 View rollback segments2 Create new rollback segments3 Remove old rollback segments4 Adjust initORACLE_SID.ora file

5.3.1 Viewing Rollback Segments

Log on as user Oracle and connect as sys, system or internal (using SQL*Plusor sqldba in version 7.2 and svrmgrl or svrmgrm in version 7.3) and view therollback tablespaces by following the steps described below. In the examplebelow the svrmgrl utility is used and is connected as internal.

1 Log on as user oracle and enter the following command:

$ svrmgrl

2 Enter the following command to connect as user internal:

SVRMGR> connect internal

3 View the rollback segments by entering the following query:

SVRMGR> select segment_name, status 2> from dba_rollback_segs;

4 View the rollback tablespaces by entering the following query:

SVRMGR> select name, status 2> from v$rollstat stat, v$rollname name 3> where stat.usn = name.usn;

Page 36: BAAN IV Oracle Installation for BAAN IV

5 Configuring the Oracle environment

Oracle Installation for BAAN IV

5 - 4

5.3.2 Creating Rollback Segments

The new rollback segments should be named as follows:

rbssequence_numberORACLE_SID

For example, the first new rollback segment in our example installation should benamed rbs1baanIV.

A new rollback segment can be created using the following query(in this examplethe svrmgr utility is used):

SVRMGR> create rollback segment segment name 2> tablespace rollback tablespace 3> storage (initial 200K next 200K optimal 10M);

For example, to create the first rollback segment for BAAN IV, follow the firsttwo steps described in the section 5.3.1 “Viewing Rollback Segments”, and enterthe following query:

SVRMGR> create rollback segment rbs1baanIV 2> tablespace rbsspace 3> storage (initial 200K next 200K optimal 10M);

A new rollback segment can be brought online, using the following query:

SVRMGR> alter rollback segment segment name online;

For example, to bring the first rollback segment on-line, enter the followingquery:

SVRMGR> alter rollback segment rbs1baanIV online;

5.3.3 Removing Rollback Segments

A rollback segment can be removed if it is offline. At least two rollback segmentsmust remain active. On-line rollback segments can be brought offline by usingthe following query (being connected as sys, system or internal):

SVRMGR> alter rollback segment segment name off-line;

To remove the offline rollback segment, enter the following query:

SVRMGR> drop rollback segment segment name;

5.3.4 Adjusting the initORACLE_SID.ora File

Any change made in the rollback segments must also be carried through in theinitORACLE_SID.ora file. The initORACLE_SID.ora file contains therollback_segments parameter. The new rollback segments (in parentheses) shouldbe inserted after the equal sign. For example, if there are 8 rollback segments, thenew line will look as follows:

rollback_segments =(rbs1baanIV,rbs2baanIV,rbs3baanIV,rbs4baanIV,rbs5baanIV,rbs6baanIV,rbs7baanIV,rbs8baanIV)

Page 37: BAAN IV Oracle Installation for BAAN IV

5 Configuring the Oracle environment

Oracle Installation for BAAN IV

5 - 5

5.4 Creating Tablespaces for BAAN IV

Tablespaces can be created using SQL*Plus or sqldba in version 7.2 andsvrmgrl or svrmgrm in version 7.3. For more information about these tools,refer to Appendix C, “Use of sqldba, svrmgrl and SQL*Plus”. To be able tocreate a tablespace you must have DBA permissions by connecting as system,sys or internal (as described in the section 5.3.1 “Viewing Rollback Segments”,earlier in this chapter.

The syntax of the query to create a tablespace is (in this example the svrmgrutility is used):

SVRMGR> create tablespace tablespace name 2> datafile ‘file name‘ 3> size size;

Separate tablespaces must be created for tables and for indices. It isrecommended to include a sequence number in the file name and the$ORACLE_SID and to use the .dbf suffix. For example, to create the tables in/usr2/oracle/dbs and the indices in /usr3/oracle/dbs, the queries must be asprinted below.

To create the tablespace for the tables, enter the following query (in this examplethe svrmgr utility is used):

SVRMGR> create tablespace datspace 2> datafile ‘/usr2/oracle/dbs/dat1baanIV.dbf’ 3> size 1024M;

To create the indices, enter the following query (in this example the svrmgrlutility is used):

SVRMGR> create tablespace idxspace 2> datafile ‘/usr3/oracle/dbs/idx1baanIV.dbf’ 3> size 1024M;

5.5 Enlarging a Tablespace

If a tablespace must be enlarged because it is almost full or if you want to createextra space in advance, you can add an extra data file to an existing tablespace.To be able to enlarge a tablespace you must have DBA permissions byconnecting as system, sys or internal (as described in the section 5.3.1 “ViewingRollback Segments”, earlier in this chapter.

The syntax of the query to enlarge a tablespace is (in this example the svrmgrutility is used):

SVRMGR> alter tablespace tablespace name 2> add datafile ‘file name‘ 3> size size;

Page 38: BAAN IV Oracle Installation for BAAN IV

5 Configuring the Oracle environment

Oracle Installation for BAAN IV

5 - 6

For example, to enlarge the tablespace datspace in /usr2/oracle/dbs by 512Mb,enter the following query (in this example the svrmgrl utility is used):

SVRMGR> alter tablespace datspace 2> add datafile ‘/usr2/oracle/dbs/dat2baanIV.dbf’ 3> size 512M;

Page 39: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

6 - 1

Now that the preparations on the Oracle side have been completed, the BAAN IVinstallation can be started. Refer to the Installation Guide for BAAN IV onUNIX (U7016A US).

In this chapter we will only deal with the Oracle-specific actions. After startingthe BAAN IV installation, at some point you will be asked to specify thedatabase type. When using an Oracle database, specify oracle7 for all companies(do not use more then one database type in one BAAN IV environment). Theinstallation script will then ask for the ORACLE_HOME and ORACLE_SID,and also for the level you want to use: Level 1 or Level 2 (see section 1.4). Afteryou have specified these values, the installation program will continue with someother questions and the rest of the installation process.

Keep monitoring the installation script. Just before the installation process leavesthe temporary environment (this takes place within half an hour), you will beasked to go to the shell in order to link BAAN IV and Oracle. All steps to do thiscan be executed by the ora_inst6.1 script, as indicated in the installation process.At this point of the installation it is recommended to start a new shell for theseactions. This can be done by answering Yes to the question from the installationscript. The advantage of starting a new shell is that you do not have to specify arange of variables, as they will then be set automatically.

6.1 The ora_inst6.1 script

Before starting ora_inst6.1, the parameters ORACLE_HOME andORACLE_SID must be set. Running the ora_inst6.1 script will establish thelink between BAAN IV and Oracle and also do the following:

n Create an ORACLE login code for the initial group.n Create an ORACLE login code for the users root and bsp.n Update the files ora_users and ora_groups.n Update the file ora_storage with defaults.n Create the view file_free_bytes for ora7_admin6.1.

All these commands can, of course, also be executed without runningora_inst6.1, but the script makes it easier. Before running ora_inst6.1, it isuseful to know how the files ora_users, ora_groups, and ora_storage in the$BSE/lib/ora are structured. Some extra information can be found in AppendixC, “Use of sqldba, svrmgrl and SQL*Plus”.

When running ora_inst6.1 please consider the following points:

n Oracle must be online.n The script still contains the default name triton. Change this into baan every

time it occurs.n The passwords that are asked are Oracle passwords.n Steps that have already been taken can be skipped.

6 Linking Oracle to BAAN IV

Page 40: BAAN IV Oracle Installation for BAAN IV

6 Linking Oracle to BAAN IV

Oracle Installation for BAAN IV

6 - 2

If the conditions listed above are met, ora_inst6.1 can be started:

bshell6.1> ora_inst6.1

The steps to be taken during execution of ora_inst6.1 are listed below:

n In the first screen, answer the question whether or not to continue, with Yes.

n The dba account is requested. The dba account is necessary to be able tocreate an Oracle group. You can accept the default account system. Enter thepassword for the dba account.

The next step is to create the group. Use the group name baan instead of thedefault triton. Use a secure password.

group name: baan

group password: bananafour

default tablespace: datspace

temporary tablespace: temp

Now the users root and bsp can be linked to this group. The passwords areOracle passwords that you can choose yourself because the script will alsocreate these users in the Oracle environment.

group name: root

group password: drft

default tablespace: datspace

temporary tablespace: temp

group name: bsp

group password: gtfr

default tablespace: datspace

temporary tablespace: temp

n Answer [Y] to all following prompts to create the new Oracle group andusers.

n The $BSE/lib/ora/ora_storage file can be modified. If you use multipletablespaces within Oracle, then you can specify that in the ora_storage file.For more information about the ora_storage file, refer to Appendix A, “Filesin $BSE/lib/ora”.

n The final step is to generate a file_fee_bytes view. Although this view iscreated under user system, sys permissions are required. That is why youmust enter the passwords for system and sys.

The script is self-explanatory. The script can be repeated without any problems.Questions that were answered in the first run, can be skipped in the second run.

After all steps in ora_inst6.1 have been completed, you are returned to the bshellprompt.

Page 41: BAAN IV Oracle Installation for BAAN IV

6 Linking Oracle to BAAN IV

Oracle Installation for BAAN IV

6 - 3

Now you can change the ora_storage file to the values that you want to use. Foran explanation of the ora_storage file, refer to Appendix A. If you have chosenfor Level 2, you are strongly advised to change the index optimalization methodin the ora_storage file to 034.

Choose exit to return to the installation script. Now you can continue theinstallation process.

Page 42: BAAN IV Oracle Installation for BAAN IV

6 Linking Oracle to BAAN IV

Oracle Installation for BAAN IV

6 - 4

Page 43: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

7 - 1

This chapter desribes the last steps to be taken in the installation process ofOracle and BAAN IV and contains the following sections.

n Creating new BAAN IV users.n Oracle in startup/shutdown scripts.

7.1 Creating new BAAN IV users

After the installation process, you must create some new BAAN IV users.BAAN IV users do not have direct access to Oracle user data. Theora7_admin6.1 script can be used to view and/or maintain Oracle users andgroups.

Before a new Baan user can be added by using ora7_admin6.1, the user and hispermissions must be defined in Oracle. For example, to define user applic withpassword applic123, you must log on as user oracle and connect as sys, systemor internal (using SQL*Plus or sqldba in version 7.2 and svrmgrl or svrmgrmin version 7.3) and create the user and his permissions by following the stepsdescribed below (in the example below the svrmgr utility is used and isconnected as internal).

1 Log on as user oracle and enter the following command:

$ svrmgr

2 Enter the following command to connect as user sys:

SVRMGR> connect internal

3 Create the user applic by entering the following query:

SVRMGR> create user applic identified by applic123;

4 Grant permissions to user applic by entering the following query:

SVRMGR> grant connect to applic;

After that, the BAAN user and the Oracle user can be linked by means ofora7_admin6.1.

7 Finishing steps

Page 44: BAAN IV Oracle Installation for BAAN IV

7 Finishing steps

Oracle Installation for BAAN IV

7 - 2

7.2 Oracle in startup and shutdown scripts

To start Oracle and Baan immediately after system startup, use the followingOracle commands in the appropriate files/directories:

n to start Oracle: dbstartn to stop Oracle: dbstop

Make sure that the database is always up before the BAAN IV application isstarted, and shut down after the BAAN application has been closed.

These scripts that are created by root.sh are capable of starting and stoppingvarious Oracle environments. The ORACLE_HOME and ORACLE_SIDvariables are taken from the /etc/oratab file. The third field in /etc/oratabindicates if the relevant Oracle instance must be started [Y] or not [N].

For further information about start and stop scripts see the Chapter “Shutdownand Boot Procedure” in Installation Guide for BAAN IV on UNIX (U7016AUS).

For example, if the two last lines of /etc/oratab as shown below, dbstart willstart the baanIV instance in /usr1/oracle and not the D1 instance in/usr1/oracle7.3.

D1:/usr1/oracle7.3:N

baanIV:/usr1/oracle:Y

Stopping and starting Oracle can only be executed by user oracle, or by userroot, as indicated in the following startup script:

if [ -f /etc/oratab -a -f /usr/local/bin/dbstart ]

then

echo Start oracle database

su - oracle -c /usr/local/bin/dbstart 2>&1

echo done

fi

Another alternative is to start an Oracle instance using the following constructionin your own scripts (in this case in combination with a ksh):

ORACLE_HOME=/usr/oracle

ORACLE_SID=baanIV

export ORACLE_HOME ORACLE_SID

PATH=$PATH:$ORACLE_HOME/bin

sqldba lmode=y <<EOT

connect internal

startup

EOT

Note

Page 45: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

A - 1

The $BSE/lib/ora directory contains (among other things) three files that areneeded for connecting BAAN IV and Oracle. These files are: ora_users,ora_groups, and ora_storage.

The ora_users file

The database calls from BAAN IV to Oracle are processed by theora7_server6.1 script. The ora_users file controls the way this server will callOracle. The file content should be as follows:

Baan User:Oracle User:Oracle User Password:User Group

The fields of an entry in the ora_users file are listed below:

n BAAN UserThis is the name by which the user is known to BAAN IV.

n Oracle UserThis is the name by which the user in known to Oracle. A user can alsoaccess the Oracle database by using another person's UNIX login.

n Oracle User PasswordThis is the Oracle password of the Oracle user. The password is stored inencrypted form.

n User GroupThis is the group the user belongs to. This should be a valid Oracle loginname.

An example of a line in the ora_users file is:

bsp:bsp:PUTCHNb!4tkeQ=8>Wn=&n;;uk\Db@+f?:baan

The ora_groups file

The ora_groups file contains the groups and the associated encryptedpasswords. The syntax of an entry in the ora_groups file is:

Group Name:Group Password

These groups are the groups as they may appear in the last column of theora_users file. The password is the encrypted Oracle password. An example ofan entry in the ora_groups file is:

baan:5tT'"I*/qmn;7cORtYP:8*Hksop*9`g6

Appendix A Files in $BSE/lib/ora

Page 46: BAAN IV Oracle Installation for BAAN IV

Appendix A Files in $BSE/lib/ora

Oracle Installation for BAAN IV

A - 2

The ora_storage file

The ora_storage file is used to specify various object parameters for the Oracledriver. This file is usually referred to as the storage file. The Oracle driver refersto this file for the creation of objects as well as during data manipulation. Thesimplest format of each line in the file is as follows:

Table Name:Company:Object:Owner Type:Index Optimization:Refresh Time:[StorageSpecifications]

The fields of an entry in the ora_storage file are listed below:

n Table NameThis is the table name, wildcards are allowed.

n CompanyThis is the company, wildcards are allowed.

n ObjectThis is the table [T] or index [I]. The index may be followed by the indexnumber. Wildcards are allowed.

n Owner TypeThis field defines whether the owner type is group or private.

n Index Optimization011 for Level 1and 034 for Level 2.

n Refresh TimeThis field is used to set the validity period of a table set. Refresh time ismeaningful only for tables; for indexes it is ignored. The refresh time is innumber of seconds. If none is specified, the default value is zero.

n Storage SpecificationsThe Oracle driver provides a facility for controlling various parameters forcreating tables.

An example of a line in the ora_storage file is shown below.

tfgld106:004:T:group:011:5:PCTFREE 5 TABLESPACE datspace INITRANS 3 STORAGE (INITIAL 518140KNEXT 518140K PCTINCREASE 0)

For more details, see the Oracle server documentation.

Page 47: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

B - 1

Like any other database, Oracle must first be started (brought on-line) before itcan be used. Afterwards (or, for example, for a reboot of the system) it must bestopped (taken offline). Oracle has the following states:

State Description

Shutdown No part of the instance is running

Nomount initORACLE_SID.ora file is being read; shared memory is beingstarted

Mount Control files are being opened and the presence of the database filesis being checked.

Open The Oracle instance is completely active

A change of mode can only be effected through sqldba (for Oracle version 7.2)or svrmgrl (for Oracle version 7.3). For more details on how to use this tools,refer to Appendix C. To change mode, log on to Oracle as internal. Login codeinternal does not have a password, but only UNIX user oracle can use this login.

An instance can be started in one of the following ways:

startup Starts the database completely

startup open Permits users to access the database

startup nomount Creates the database for SGA and starts backgroundprocesses

startup mount Mounts the database without user access

startup recover Media recovery if the database is started

startup force Aborts a running instance {reboot}

startup exclusive Only the current instance has access to the database

startup paralll Multiple instances have access to the database

startup pfile=parfile Non-default parameter file is used for configuration of instance

startup restrict Only users with restricted session privilege have access to theinstance

An instance can be shut down in one of the following ways:

shutdown Waits for a shutdown of all sessions of the connected users.

shutdown abort Fastest shutdown procedure, does not wait for users to closetheir commands or to exit Oracle.

shutdown immediate Aborts current SQL statements and executes a rollback onthese transactions.

shutdown normal Waits until all sessions of the connected users are closed.

In practice there are many different methods for starting and stopping. Forfurther details, you are referred to the documentation on this subject.

Appendix B Different Oracle Modes

Page 48: BAAN IV Oracle Installation for BAAN IV

Appendix B Different Oracle Modes

Oracle Installation for BAAN IV

B - 2

Page 49: BAAN IV Oracle Installation for BAAN IV

Oracle Installation for BAAN IV

C - 1

The sqldba and svrmgrl utilities

The sqldba utility allows novice users to execute dba commands in an easy way.Depending on the type of machine, the user can access the menu bar or executedba commands with one keystroke. It is also possible to execute commandsdirectly from the prompt. The sqldba utility is not supported in Oracle version7.3. In this version it is replaced by the svrmgrl utility, that offers its user thesame functionality as the sqldba utility in line mode and the svrmgrm, thatoffers its user a graphical interface..

Before a command can be executed, the user must log on. This is done byentering the connect command, followed by the users login code, if requiredfollowed by a slash / and a password. For example:

connect system/manager

This can be used to log on to Oracle as user system with password manager.

The sqldba utility can also be used in line mode. This means you will not get tosee the graphical screen, but you can only enter commands. This can be usefulfor executing specific scripts or for starting and stopping an Oracle instance. Thecommand to switch sqldba to line mode is:

$ sqldba lmode=y

Example of a script to start the Oracle instance in line mode:

sqldba lmode=y <<EOTconnect internalstartupEOT

To quit sqldba, use the exit command.

SQL*Plus

The SQL*Plus is very useful to run interactive database queries. The extensivefunctionality of SQL*Plus allows you to produce simple listings as well asreports with professional layouts. In this section we will only deal with a fewbasic features. For further details, refer to the relevant Oracle documentation.

The syntax for starting SQL*Plus is:

sqlplus [ users[/password ] [ @<file with query ] ]

For example:

$ sqlplus triton/triton

Appendix C Use of sqldba, svrmgrl and SQL*Plus

Page 50: BAAN IV Oracle Installation for BAAN IV

Appendix C Use of sqldba, svrmgrl and SQL*Plus

Oracle Installation for BAAN IV

C - 2

To log on as another user, type the connect command on the prompt or onSQL*Plus:

connect [ users[/password ] ]

As soon as you are in SQL*Plus and logged on to Oracle, you can enter a queryor a command. A query can be entered in multiple lines. SQL*Plus will not sendthe query until it is ended by typing [;]. Other commands usually do not have tobe ended with a semicolon. Oracle will execute the SQL command and return theanswer to SQL*Plus. SQL*Plus then formats and prints or displays the answer.

To quit SQL*Plus type exit.

Examples:

n To log on to Oracle as user triton with password triton123, type:

$ sqlplus triton/triton123

n To execute a query from sqlplus:

SQL> select * from cat;

n To execute a query that is stored in the file all_users.sql, type:

SQL> @all_users

n To execute a query from the UNIX prompt, enter:

$ sqlplus triton/triton123 @all_users