Using Load option in Oracle with indexes

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Using Load option in Oracle with indexes

Post by roy »

Hi All,
I must be missing something here but here goes:
In my Dev Project I'm loading a table which is indexed using the load method, I have the Env var set to 'OPTIONS(DIRECT=FALSE,PARALLEL=TRUE).
My dev project run works with this log entry:
ORA_LAK_LAKOACH_INS: When checking operator: APT_ORACLE_LOAD_OPTIONS has been set by user. Therefore, Orchestrate assumes that the DIRECT and/or PARALLEL options have been set to FALSE, and that it is okay to load table 'LAK.LAK_LAKOACH', even though it is indexed, and an index option (rebuild or maintenance) has not been included. APT_ORACLE_LOAD_OPTIONS has been set by the user to 'OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)'.
after export/import to my TEST project which seems to have the same env vars defined
job aborts and I get this error:
ORA_LAK_LAKOACH_INS: Indexes on table 'LAK.LAK_LAKOACH' preclude direct parallel loading unless an index option is included. Add an index option or drop indexes and rerun step.
Any Ideas would be apreciated.
Thanks in advance for your time :),
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

hi roy,

in the Oracle Enterprise Stage, there is an option: index mode.

Set this to tell the loader what to do with the indexes.
Benouche
Participant
Posts: 15
Joined: Tue Apr 22, 2003 8:54 am
Location: France

Re: Using Load option in Oracle with indexes

Post by Benouche »

Roy,

did you check the value the APT_ORACLE_LOAD_OPTION at runtime ?

You can check this in the job log, it's the second/third entry of the job log (Environment variables settings : ...).
If it is set to DIRECT=TRUE, this will explain the behaviour of the job, and you'll have to modify the settings of your project to fix the problem.

Benouche
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »


Indexes on table 'LAK.LAK_LAKOACH' preclude direct parallel loading unless an index option is included
When you give Direct = FALSE conventional path mode should be used. It seems that it uses direct path instead of conventional path mode inspite of your environment variable settings. :? Due to direct mode it asks you to specify index mode or drop indexes.

--Balaji S.R
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

As can be seen in the environment variable's value in the parameters list of the job runs:
TEST:
$APT_ORACLE_LOAD_OPTIONS = OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)

DEV:
$APT_ORACLE_LOAD_OPTIONS = OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)

Further investigation led to the following.
Some how the env variable list in the job runs of the above APT variable seems to show only in my DEV project, even though it seems to be set in the TEST project as well :roll: (watching the project properties environment variables list)

Baring in mind that both projects are on the same server (hence use the same dsrpcd service and have the same dsenv loaded)
I'm investigating why this is so.

I'll keep updating as I'll have more info...
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

The plot thikkens :roll:
I found out that DSParams file in DEV project had the APT var defined and the TEST didn't have that defined.
But I was expecting that existance of the env variable in the params list of the jobs with explicit (not $ENV) setting should override it anyway or define it in case it's none existant.

Still investigating ....

Any thoughts anyone?
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

wen do you set it?
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Post by kwwilliams »

Roy,

I wasn't sure if I ever saw a response to gbusson's post. I believe he is right in that there is an index option in the Oracle stage itself, I believe it is one of the optional properties. Set the index properties to rebuild and you should clear out this error.
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

kwwilliams,

i was wrong with my first post.

the DIRECT=FALSE option causes oracle to avoid setting an index option.

I do not understand why the job does not have the same behaviour.
The 2 environment variables are set correctly at run time! Moreover, this APT variable is not a user defined variable!

:roll: :?: :?:
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

This is :twisted: .
My DEV proj has // where the OPTIONS section is and
"APT_ORACLE_LOAD_OPTIONS=OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)"
at the end in the EnvVarValues Section

My TEST Project has the APT_ORACLE_LOAD_OPTIONS=OPTIONS(DIRECT=FALSE,PARALLEL=TRUE) set in suposed location (mid of DSParams File) but nothing in the EnvVarValues.
When I put single/double qoutues on the mid entry still not seeing it in env vars.
So I adjusted the TEST to the DEV config and now it shows on env.

I'm Waiting on my developer to test it and I"ll post was it ok.

Well That's the job I guess (to boldly go where no one has gone before :wink:)
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

APT_ORACLE_LOAD_OPTIONS is set 2 times in your DSParams?
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

After seeing the original set doesn't work I added one in the EnvVarValues section after emptying the original entire's values
Now when I run an EE job I can see the said APT variable in the environment variables of the job in the job log.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

that seems correct.

Why don't you use the Administrator to see the values? It is much easier!
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Administrator shows:
OPTIONS(DIRECT=FALSE,PARALLEL=TRUE)
in both projects
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Benouche
Participant
Posts: 15
Joined: Tue Apr 22, 2003 8:54 am
Location: France

Post by Benouche »

Roy,

you did not answer to my first query :
What is the value of the env. var AT RUNTIME for both jobs ?

If the values are different, you'll have to find out why, depending on how you set env var / job parameters in your projects ...

Benouche
Post Reply