Deleting all Synergy objects from a database

34 views
Skip to first unread message

ZQ

unread,
Oct 12, 2015, 4:48:38 PM10/12/15
to Synergy CM Tool
Hello,

We have stopped using synergy as our CM tool, but we still using Change and I'm trying to delete all the synergy related objects.  The process of looping through each release and then deleting all its projects is taking a long time.

We wanted to use DCM to have change only objects, but my team prior DCM experience has not been great and we feel that will take a long time too.

Has any one done a massive removal of synergy objects?  We are trying to upgrade to current versions and the amount of time it takes to load the DB is very long and want to remove these objects in order to reduce the database size.


Regards,


Ziad



MORGENTHALER, Peter

unread,
Oct 12, 2015, 6:51:54 PM10/12/15
to synergy...@googlegroups.com

We have used the DCM process effectively to do this? If you have a large DB then anything else will be painfully slow I would imagine.

Peter Morgenthaler
Software and Systems Engineering Tools Lead, BAE Systems Australia

Taranaki Road, Edinburgh Parks
T: +61 8 84807132| M: +61 411 676 312
E: peter.mor...@baesystems.com

BAE Systems Australia
Registered Office: Taranaki Road, Edinburgh Parks, EDINBURGH SA 5111
Registered in Australia No: 008 423 005

 

From: synergy...@googlegroups.com [mailto:synergy...@googlegroups.com] On Behalf Of ZQ
Sent: Tuesday, 13 October 2015 7:19 AM
To: Synergy CM Tool <synergy...@googlegroups.com>
Subject: Deleting all Synergy objects from a database

 

*** WARNING ***
EXTERNAL EMAIL -- This message originates from outside our organization.

 

--
You received this message because you are subscribed to the Google Groups "Synergy CM Tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to synergy-cm-to...@googlegroups.com.
To post to this group, send email to synergy...@googlegroups.com.
Visit this group at http://groups.google.com/group/synergy-cm-tool.
For more options, visit https://groups.google.com/d/optout.

This email has been sent on behalf of one of the following companies within the BAE Systems Australia group of companies:

    BAE Systems Australia Limited - Australian Company Number 008 423 005
    BAE Systems Australia Defence Pty Limited - Australian Company Number 006 870 846
    BAE Systems Australia Logistics Pty Limited - Australian Company Number 086 228 864

Our registered office is Evans Building, Taranaki Road, Edinburgh Parks, Edinburgh, South Australia, 5111. If the identity of the sending company is not clear from the content of this email please contact the sender.

This email and any attachments may contain confidential and legally privileged information.  If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.

Austin Hastings

unread,
Oct 13, 2015, 10:13:14 PM10/13/15
to synergy...@googlegroups.com
This is definitely the place for direct informix commands. Do you have the ability to create a second copy of your database for testing purposes? (IOW, can you restore from backup without hosing your server?)

If so, fire up dbaccess and find a set of suitable commands to purge the bad records.

Keep in mind that this is trickier than you might think at first. For example, attachments, CRs, releases, and tasks may well all fall into the category of things you need to keep. It's not just querying for problem objects. That's why you should have a development copy of your Synergy DB to work with.

With that said, though, the SQL version of this will probably finish in minutes or hours. Doing it from Synergy would be days or weeks.

If you're not willing to do it via SQL, I'd suggest writing a cron job that starts, queries for a small number of objects, and deletes them, then exits. You could run this every 5 minutes outside your backup window, and be fairly confident it would eventually work.

For example:

ccm set role ccm_admin
ccm query "cvtype='csrc' and is_hist_leaf()" -nf -ns -u -f "" >/dev/null

for pfx in '' 1 2 3 4 5 6 7 8 9; do
for sfx in 0 1 2 3 4 5 6 7 8 9; do
ccm delete @$pfx$sfx
done
done


That would find C source code files that did not have any successors, and delete the first 100. Of course, you would have binding problems since they're probably stored in projects. So you'd want to delete the projects themselves, first. But this is the kind of script that's easy to write, and if you keep an eye on it, you can update the query for the "next" file type (or whatever approach you use) when it goes off the rails.

(But I'd really recommend doing it in SQL.)

=Austin

--------------------------------------------
On Mon, 10/12/15, MORGENTHALER, Peter <peter.mor...@baesystems.com> wrote:

Subject: RE: Deleting all Synergy objects from a database
To: "synergy...@googlegroups.com" <synergy...@googlegroups.com>
Date: Monday, October 12, 2015, 6:51 PM

#yiv4033781529
#yiv4033781529 --

_filtered #yiv4033781529 {panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered #yiv4033781529 {font-family:Calibri;panose-1:2 15
5 2 2 2 4 3 2 4;}
_filtered #yiv4033781529 {font-family:Verdana;panose-1:2 11
6 4 3 5 4 4 2 4;}
#yiv4033781529
#yiv4033781529 p.yiv4033781529MsoNormal, #yiv4033781529
li.yiv4033781529MsoNormal, #yiv4033781529
div.yiv4033781529MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv4033781529 a:link, #yiv4033781529
span.yiv4033781529MsoHyperlink
{color:blue;text-decoration:underline;}
#yiv4033781529 a:visited, #yiv4033781529
span.yiv4033781529MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#yiv4033781529 p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv4033781529 span.yiv4033781529EmailStyle19
{color:#1F497D;}
#yiv4033781529 span.yiv4033781529EmailStyle20
{color:windowtext;}
#yiv4033781529 .yiv4033781529MsoChpDefault
{}
_filtered #yiv4033781529 {margin:72.0pt 72.0pt 72.0pt
72.0pt;}
#yiv4033781529 div.yiv4033781529WordSection1
{}
#yiv4033781529

David Honey

unread,
Oct 14, 2015, 5:45:57 AM10/14/15
to synergy...@googlegroups.com
I'd recommend folks tread very carefully about using SQL directly. Normal Synergy usage ensures referential integrity so that you don't end up with dangling references between tables. Save Offline and Delete goes further by allowing the user to use exclusion rules to ensure business logic integrity. Using SQL directly will have no safeguards and is highly likely to lead to a large number of inconsistencies.

David.
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

MORGENTHALER, Peter

unread,
Oct 14, 2015, 6:48:21 PM10/14/15
to synergy...@googlegroups.com

The safest option is to use DCM to pull out the CR’s into a new clean DB. This is pretty quick as the CR data is relatively small compared to the CM data. You can always inspect the DCM prior to import to ensure you have got your query correct and the counts are correct.

 

Peter Morgenthaler
Software and Systems Engineering Tools Lead, BAE Systems Australia

Taranaki Road, Edinburgh Parks
T: +61 8 84807132| M: +61 411 676 312
E: peter.mor...@baesystems.com

BAE Systems Australia
Registered Office: Taranaki Road, Edinburgh Parks, EDINBURGH SA 5111
Registered in Australia No: 008 423 005

 

From: synergy...@googlegroups.com [mailto:synergy...@googlegroups.com] On Behalf Of David Honey
Sent: Wednesday, 14 October 2015 8:11 PM
To: synergy...@googlegroups.com
Subject: RE: Deleting all Synergy objects from a database

 

*** WARNING ***

Reply all
Reply to author
Forward
0 new messages