DB2 schema

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

DB2 schema

Post by yiminghu »

Hi,

I have a problem regarding to DB2 table name.
Initially, when we deleveloped datastage jobs, we did not put schema name in front of table name, and the user we used to access this table is the owner of this table, so we did not experience any problems. Now our new hired DBA suggested us that we use another user, since the original user has too powerful permission.

Does that mean we have to change each invidual job to include this schema name, is there any way to simplify the solution? When use programming language, we could use 'set schema ..' to set default schema, but how does datastage handle this?

Thanks,

Yiming
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

The easiest solution would be to create an alias for your new user that points to the table owned by your old user.

Something like:
CREATE ALIAS NEWUSER.TABLENAME FOR OLDUSER.TABLENAME;

A better solution (sounds like it may be too late for you now) would be to create a job parameter (e.g. TableOwner) and reference your DB2 tables as #TableOwner#.TABLENAME

Mike
Post Reply