Tags

Moving an Oracle Company From Level 1 to Level 2

Setup

Please go through the Oracle Driver chapter in the Triton/Baan Tools Technical Manual. This document is part of the online help. This will tell you about $BSE/bin/ora7_inst6.1, $BSE/bin/ora7_admin6.1, $BSE/lib/ora/ora7_maint6.1, $BSE/lib/ora/ora_storage file. You need to know the format of the $BSE/lib/tabledef6.1 file.

These following values need to be tuned. These parameters are meant as only starting points and further tuning has to be done based on business processes.

Oracle initialization parameters: open_cursors=2000, dml_locks=2000, enqueue_resources=2100 and shared_pool_size should be at least 35mb.

Sizes of the tablespaces storing level 1 tables should work fine with level 2 tables.

The temporary tablespace should be large enough to let the temporary segment to grow.

First, you need to take sequential dumps of your company tables as they are now. The recommendation for taking these kinds of sequential dumps for Oracle is to get dumps which are ASCII separated files in UNIX and have one per table.

Baan will do this easily by using the following options in the session Tools | Database Management(MISC) | Create Sequential Dump of Table. You can take a dump by running the bdbpre6.1 command from Unix prompt.

If you are going to move company 000 to level2 then do the following process for company 000first then you do the similar steps for any other company.

For moving company 000 follow these steps:

1. Take a backup of your current database.

2. Do rc.stop and shutdown Oracle database

3. Startup Oracle and rc.start

4. No user should be logged on to Triton/ Baan

5. Take bdbpre6.1 dump of the current company.

(e.g. bdbpre6.1 -doracle7 -t’^_’ -o/tmp/dumpdir -I[list_of _tables_file] -C[comp#]

where list_of_tables_file format is

[pkg][mod][tablename]

e.g.

ttaad001

tttxt001

.

.

(Continued on next page)

there should be enough space in the dumpdir. You can do this from session ttaad4226m000 with field separator as ^? .)

6. Edit ora_storage file:

edit $BSE/lib/ora_storage file such that the index optimization code is 034

for each table. If you are running Oracle 7.3.2.1 or 7.3.2.3

then index optimization code should be set to 0214.

7. Login to Unix as bsp. The environment variable BSE, BSE_TMP, PATH should be set first.

If you are not using sql*net then ORACLE_HOME, ORACLE_SID

else TNS_ADMIN , TWO_TASK should be set.

Remove the parameter ORA_LEVEL1 from environment $BSE/lib/defaults/db_resource

8. Go to the directory where the dumps are in.

If you have one dump for each table then split the dump files into separate groups

by moving them into separate directories. (e.g. all the ti table dumps to a directory

ti and td dumps to directory td etc) .

Run bdbpost6.1 from each directory in parallel to the oracle database.

Hint: At this stage you may think about dropping the tables from oracle. That might take lesser time. If you are converting the whole database then it is better to recreate the whole oracle database .

(.e.g. The command should be like: bdbpost6.1 -t’^_’ -doracle7 -k -m -n -f -D. you can use -t option with proper field separator as in your bdbpre dump)

Check the log files in $BSE/log directory. If there is no error in this step then

go to step 7. Otherwise solve the error and proceed.

9. Login to Triton/ Baan . Go to session Maintain Database Definition (ttaad4110m000) create a database of type Oracle7 and in the parameter field type as follows:

If you are not using sql*net then ORACLE_HOME, ORACLE_SID

else TNS_ADMIN , TWO_TASK should be set and audit is off.

Create another database as above with audit is on.

There must not be any embedded space in the parameter field.

Auditing is needed only for companies other than 000.

10. Goto ttaad4111m000 to assign the tables to the databases you have created in step 7. Convert to runtime data dictionary. Logout.

11. Login to Baan, go to Database Management | MISC |Reorganize tables for this company and all tables with the following options:

Mention the appropriate company number.

From To

Company : 000 – 000

Package – zz

Table : – zzz999

Data and Indices: no

Reference Integrity: Yes

Check Validity of Reference: Yes

Nullify undefined reference: No

Repair Reference Counter: Yes

File for reference count before repair: No

File for reference count after repair: No

File for undefined references: No

12. For any other company, you follow the above steps. In step 8, use the following command:

The command should be like:

bdbpost6.1 -t’^_’ -doracle7 -k -m -n -f -p<pkgcomb> -D.

where pkgcomb is the package combination of the company 812.