Truncate a project
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
Truncate a project
Hi there,
I'm looking for a script that truncates a project - delete all non-default components: jobs, routines, table definitions etc.
I can always delete and create the project but I want to do it automatically so it has to be done from the command line.
Any one know howto do it ?
Amos
I'm looking for a script that truncates a project - delete all non-default components: jobs, routines, table definitions etc.
I can always delete and create the project but I want to do it automatically so it has to be done from the command line.
Any one know howto do it ?
Amos
Hi Amos,
While I'm not familiar with the inside stuf and perhaps you'll have problems getting that info (I hope I'm wrong)
There is always the last course of action, which is to write a code, for example with tcl/tk or any language that you prefer and can do such things, that will emulate the interactive use of the DS Administrator.
So for truncating a project you need to perform a delete and create operation with the same project name which will be this program's parameter.
IHTH,
While I'm not familiar with the inside stuf and perhaps you'll have problems getting that info (I hope I'm wrong)
There is always the last course of action, which is to write a code, for example with tcl/tk or any language that you prefer and can do such things, that will emulate the interactive use of the DS Administrator.
So for truncating a project you need to perform a delete and create operation with the same project name which will be this program's parameter.
IHTH,
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
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I don't know how to do it from the UNIX command line.
Even if you could do it from the DataStage command prompt (>), there are way too many separate components to drop or remove (as appropriate) ever to be conveniently loaded into a single command.
To create such a command (set of commands run from a script) would require more knowledge about the structure of the Repository than has been published by Ascential, and therefore is venturing into dangerous waters!
I'd strongly recommend staying with delete project, create project. Two mouse clicks!
Even if you could do it from the DataStage command prompt (>), there are way too many separate components to drop or remove (as appropriate) ever to be conveniently loaded into a single command.
To create such a command (set of commands run from a script) would require more knowledge about the structure of the Repository than has been published by Ascential, and therefore is venturing into dangerous waters!
I'd strongly recommend staying with delete project, create project. Two mouse clicks!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you delete the entire contents of the directory you're also taking out the software - what you called the "default conmponents".
Further, there are administrative entries in the Admin (UV) account and in the SQL Catalog, as well as secondary indexes already mentioned, that would need to be repaired.
Again, don't attempt it!
Further, there are administrative entries in the Admin (UV) account and in the SQL Catalog, as well as secondary indexes already mentioned, that would need to be repaired.
Again, don't attempt it!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
this might be a shot in the dark. I'm not sure (and I think we are all wondering) why you have this need in the first place to truncate a project, but depending on what you need to do I'm curious if something like this would work for you: Could you possibly create many projects in advance (manually) with some sort of sequence number appended to the project them. Then if you have a program that is reloading the projects you can keep a store of the next project and then load to this project.
It depends on what you are doing, but you could create projects in advance and delete the old ones as needed, and thus you could still have some sort of automated program that could always find a clean project to begin with
It depends on what you are doing, but you could create projects in advance and delete the old ones as needed, and thus you could still have some sort of automated program that could always find a clean project to begin with
Byron Paul
WARNING: DO NOT OPERATE DATASTAGE WITHOUT ADULT SUPERVISION.
"Strange things are afoot in the reject links" - from Bill & Ted's DataStage Adventure
WARNING: DO NOT OPERATE DATASTAGE WITHOUT ADULT SUPERVISION.
"Strange things are afoot in the reject links" - from Bill & Ted's DataStage Adventure
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, Amos...you really need to let us curious minds know what technical/business requirement is driving your need to truncate a project!
Let's see how creative we can be too. As far as this comment:
I think this would get you close, but surely there are a few things that would be overlooked with that method. I'm too tired to try to think of other things this might miss at the moment, perhaps Ray can come up with a something good that will prevent an attempts of truncating a project.
Let's see how creative we can be too. As far as this comment:
I was thinking of a way to create a loop that goes over DS_JOBS and for each jobno delets the RT_LOGxx, RT_BPxx etc....
Then does clear.file ds_jobs and ds_jobobjects
After this goes to the DS_routines and DS_METADATA
I think this would get you close, but surely there are a few things that would be overlooked with that method. I'm too tired to try to think of other things this might miss at the moment, perhaps Ray can come up with a something good that will prevent an attempts of truncating a project.
Byron Paul
WARNING: DO NOT OPERATE DATASTAGE WITHOUT ADULT SUPERVISION.
"Strange things are afoot in the reject links" - from Bill & Ted's DataStage Adventure
WARNING: DO NOT OPERATE DATASTAGE WITHOUT ADULT SUPERVISION.
"Strange things are afoot in the reject links" - from Bill & Ted's DataStage Adventure
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Just the sheer possibility that you might miss something.
What's in all those other Repository tables? The design-time information as well as the run-time information? What records ought you not to be removing? What about hashed files in non-project directories? System table entries for any UV tables created (which therefore should be dropped properly)? DSNs for ODBC (in the DSEngine directory as well as in uvodbc.config)? Modifications to DSParams - undo or keep? The list goes on - would you get them all?
Can we get a "stop sign" emoticon?
What's in all those other Repository tables? The design-time information as well as the run-time information? What records ought you not to be removing? What about hashed files in non-project directories? System table entries for any UV tables created (which therefore should be dropped properly)? DSNs for ODBC (in the DSEngine directory as well as in uvodbc.config)? Modifications to DSParams - undo or keep? The list goes on - would you get them all?
Can we get a "stop sign" emoticon?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.