Delete a category from command line
Moderators: chulett, rschirm, roy
Delete a category from command line
Hi,
Is it possible to delete a category and not the full project from the command line..may be from a Unix script.
Regards,
NV
Is it possible to delete a category and not the full project from the command line..may be from a Unix script.
Regards,
NV
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Didn't say that. But if you remove a category there is a containment relationship, and you will need to remove the contents of that category. That means not just DS_JOBOBJECTS but also all the run-time tables RT_* for the jobs in question!
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.
All those RT_* files will be generated only when the jobs/routine/transform.. created or compiled or made to run. But not for Category. Category is just a logical clasification of job and routines maintained in DS_JOBS.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, but if you delete a category you must also delete the objects contained in it.
If you do this in the client, a warning message pops up indicating that this will happen. If you do it from the command line you're on your own.
If you do this in the client, a warning message pops up indicating that this will happen. If you do it from the command line you're on your own.
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.
Absolutely. That is what I mentioned in my first post. If a category needs to be deleted the jobs residing in that category need to be deleted.
Moreover you cannot delete a category from command line, if it has a content in it (though it might show you it has been deleted)
Moreover you cannot delete a category from command line, if it has a content in it (though it might show you it has been deleted)
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
So one option is move the content of the category to other category first and then delete.
Code: Select all
UPDATE DS_JOBS SET CATEGORY = 'New_Category' WHERE CATEGORY = 'Old Category'
DELETE DS_JOBS WHERE NAME LIKE '\\\Old Category'
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Kumar, this is exactly what Ray was saying not to do. If you delete a job in Designer or Manager then DS_JOBOBJECTS also gets cleaned out and RT_CONFIGnnn, RT_LOGnnn, RT_BPnnn, RT_BPnnn.O, RT_STATUSnnn and a few other files get removed. If you do not do this properly then your repository gets orphaned files and records. Not good.
I would never do this and I think I know more about these tables than most of you. I think most or all of the top posters would never do this.
I would never do this and I think I know more about these tables than most of you. I think most or all of the top posters would never do this.
Mamu Kim
I totaly with your Kim. I too suggest not to deletet the job from DS_JOBS. OP is looking for deletion of category and not job. Category alone doesnt have any hash of its own.
Whatever it be, its not advisable to delete directly from repositry.
Whatever it be, its not advisable to delete directly from repositry.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
How do you know this? The OP didn't explicitly state that. My first thought was that they wanted to delete a category - and all jobs in it - from the command line and that's where my money is.kumar_s wrote:OP is looking for deletion of category and not job.
Regardless, please be careful about handing out advice that involves direct manipulation of the repository tables. Querying is one thing, but updates and deletes may just earn someone a trashed project and a trip to the woodshed.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi All,
Thanks for all the replies. Just to clarify,yes we would like to delete all the jobs as well when we would want to delete the category conatining it.
The reason for this is, when we move a category (all jobs) to Production, we would like to clean up that category in DEV so as to ensure the next time we want to modify it (for any reason) we pull the dsx from the Source Code contoller and Import it to ensure proper version.
Also this ensures we can still continue to work on other Category (jobs) in the same project that are still in development.
The idea is to move things one at a time to Prod. (Any other solution to this approach is most welcome)
Apologies for the long mesage..thought it is better to clarify in detail
NV
Thanks for all the replies. Just to clarify,yes we would like to delete all the jobs as well when we would want to delete the category conatining it.
The reason for this is, when we move a category (all jobs) to Production, we would like to clean up that category in DEV so as to ensure the next time we want to modify it (for any reason) we pull the dsx from the Source Code contoller and Import it to ensure proper version.
Also this ensures we can still continue to work on other Category (jobs) in the same project that are still in development.
The idea is to move things one at a time to Prod. (Any other solution to this approach is most welcome)
Apologies for the long mesage..thought it is better to clarify in detail
NV
If a category is moved, why should it be deleted. I was under the impression (false impression) that you want to delete only the empty category. Craig pointed out that cleanly.
If the jobs are moved to production via version control, it doesnt mean you need to delete the category in Dev, rather create a new project and work on it, if the number of job involved in an category is enormously high.
The best option to delete the category with the job is right click on the category either in designer or manager and click on delete. And say yes to the popup.
If the jobs are moved to production via version control, it doesnt mean you need to delete the category in Dev, rather create a new project and work on it, if the number of job involved in an category is enormously high.
The best option to delete the category with the job is right click on the category either in designer or manager and click on delete. And say yes to the popup.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'