Page 1 of 1

DB2 schema

Posted: Fri Sep 10, 2004 10:07 am
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

Posted: Fri Sep 10, 2004 10:20 am
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