Changing schema name of the tables in entire DS project

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
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Changing schema name of the tables in entire DS project

Post by saikrishna »

Hi

While doing migration of project from one database schema of the tables (i.e. SCHEMA=A)to another database schema(i.e. SCHEMA=B), the corresponding jobs that uses these schemas should be changed accordingly.

We found that the way is about to do export and do replace all from old schma to new schema (A. to B., assuming no A.'s found other places).

But we would like to know whether the schemas that are imported from the database to DataStage...will aslo affect automatically by this change or not?

Also, please let us know if there is any other best approach than this.


Thanks
Sai
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Best approach would have been to have parameterized anything that could change - including schema. And no, I don't believe you can 'fix' imported table definitions that way but have never tried, never having had the need.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dsdevper
Premium Member
Premium Member
Posts: 86
Joined: Tue Aug 19, 2008 9:31 am

Post by dsdevper »

As Chullet Said,Set schema name as Project level parameter ($Schema name) and repalce this in every job in every sql statement.
Assign the schema name as the default value and set This value to PROJDEF in job parameters..

Then you can export and import this code where ever you want, and just add Project level parameter with the same parameter you have used in th eprevious project..
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Post by saikrishna »

Thanks chullet and dsdevper

The better solution is parameters, I agree.

But will it give correct results, if we do export , replace all, then import back...?

Later on ... we will parameterize every thing...

Thanks for suggetions
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Axiom: There's never time to do it right, but always time to do it again.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

you can make your job run in different env with schema name changed in dsx but your imported table definition will not have the change of new schema name.
Post Reply