Hi,
I amtrying to cleanup my database and therefor I want to delete
all existing users + related data + history.
FOR EACH gsm_user WHERE gsm_user.user_login NE "admin":
DELETE gsm_user.
END.
But the delete trigger is preventing me from doing so?
Why?
Why does the delete trigger do not a cascade delete to it's related entities
?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -<http://www.cargomate.com/>
CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Martin,
The deletion of users is disallowed for various reason, but primarily so that auditing and similar information is not lost. The gsm-user record is flagged as deleted.
The delete trigger - gsmustrigd.p - disallows all deletes of user records.
Regads,
Peter
|-Original Message-
|Sent: Wednesday, November 20, 2002 10:24 AM
|To: 'dev@icf.possenet.org'
|Subject: Delete of users
|
|
|Hi,
|
|I amtrying to cleanup my database and therefor I want to
|delete all existing users + related data + history.
|
|FOR EACH gsm_user WHERE gsm_user.user_login NE "admin":
| DELETE gsm_user.
|END.
|
|But the delete trigger is preventing me from doing so?
|
|Why?
|
|Why does the delete trigger do not a cascade delete to it's
|related entities ?
|
|
|Best regards,
|Martin Bos - mailto:martin.bos@cargomate.com
|CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
|tel. +31(0)30-6048811 - fax +31(0)30-6090000
|-|CargoMate - Global Logistics
|Software Solutions
|Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Peter,
Thanx, but is there any code which does the correct
delete of a gsm_user (including related data).
(Normally we put(via Erwin) this code in the delete trigger,
and on a higher level we check whether we would
allow deletion yes or no. I thought that triggers
should be used for referential integrity and
use the logic procedure for higher level/functional
code)
Martin
-Original Message-
Sent: Wednesday, November 20, 2002 10:27 AM
To: dev@icf.possenet.org
Subject: RE: Delete of users
Hi Martin,
The deletion of users is disallowed for various reason, but
primarily so that auditing and similar information is not
lost. The gsm-user record is flagged as deleted.
The delete trigger - gsmustrigd.p - disallows all deletes of
user records.
Regads,
Peter
|-Original Message-
|Sent: Wednesday, November 20, 2002 10:24 AM
|To: 'dev@icf.possenet.org'
|Subject: Delete of users
|
|
|Hi,
|
|I amtrying to cleanup my database and therefor I want to
|delete all existing users + related data + history.
|
|FOR EACH gsm_user WHERE gsm_user.user_login NE "admin":
| DELETE gsm_user.
|END.
|
|But the delete trigger is preventing me from doing so?
|
|Why?
|
|Why does the delete trigger do not a cascade delete to it's
|related entities ?
|
|
|Best regards,
|Martin Bos - mailto:martin.bos@cargomate.com
|CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
|tel. +31(0)30-6048811 - fax +31(0)30-6090000
|-|CargoMate - Global Logistics
|Software Solutions
|Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Martin,
Dynamics does not allow the deletion of the gsm-user records, and it uses Erwin's RI (and the generated delete trigger) to enforce this. A 'deleted' user in Dynamics is merely one that has the 'disabled' flag set to yes.
If you need to delete these records, you would need to override the delete trigger, and manually ensure that you delete all related information. I don't think that there is any example code doing this in Dynamics, though.
Regards,
Peter
|-Original Message-
|Sent: Wednesday, November 20, 2002 10:34 AM
|To: 'dev@icf.possenet.org'
|Subject: RE: Delete of users
|
|
|Hi Peter,
|
|Thanx, but is there any code which does the correct
|delete of a gsm_user (including related data).
|
|(Normally we put(via Erwin) this code in the delete trigger,
|and on a higher level we check whether we would allow deletion
|yes or no. I thought that triggers should be used for
|referential integrity and use the logic procedure for higher
|level/functional
|code)
|
|Martin
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Peter is correct - we have no code to delete users and simply flag them
as disabled so they can no longer be used and can be filtered from
browsers.
As Peter points out - it is very dangerous to delete a user as a lot of
information is indirectly linked to users, sometimes using the obj field
and sometimes using the login name - and ERwin knows nothing about these
relationships. The user records may also be linked and used in external
applications built on Dynamics.
For these reasons and many more, it is much safer to keep the old user
records around and simply filter them out.
Regards
Anthony
Anthony D Swindells
Lead Architect, Progress Dynamics
Progress Software Corporation
aswindel@progress.com
-Original Message-
Sent: November 20, 2002 4:38 AM
To: dev@icf.possenet.org
Subject: RE: Delete of users
Hi Martin,
Dynamics does not allow the deletion of the gsm-user records, and it
uses Erwin's RI (and the generated delete trigger) to enforce this. A
'deleted' user in Dynamics is merely one that has the 'disabled' flag
set to yes.
If you need to delete these records, you would need to override the
delete trigger, and manually ensure that you delete all related
information. I don't think that there is any example code doing this in
Dynamics, though.
Regards,
Peter
|-Original Message-
|Sent: Wednesday, November 20, 2002 10:34 AM
|To: 'dev@icf.possenet.org'
|Subject: RE: Delete of users
|
|
|Hi Peter,
|
|Thanx, but is there any code which does the correct
|delete of a gsm_user (including related data).
|
|(Normally we put(via Erwin) this code in the delete trigger,
|and on a higher level we check whether we would allow deletion
|yes or no. I thought that triggers should be used for
|referential integrity and use the logic procedure for higher
|level/functional
|code)
|
|Martin
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Anthony,
I understand that a lot of information is linked to a user,
but I disagree to total disable the possibility of deleting
a user. I normal production environment I understand
the use of this since you probably want to keep the
audit logs etc..., but in a development environment I MUST
be able to delete users. And yes: in that case I want all
the user-related information to be deleted!.
I understand that I must write such procedure by myself,
but in that case I need an overview of the
relations with gsm_user (not only the relations via
an _obj field).
Can anybody give me this info?
Martin
-Original Message-
Sent: Wednesday, November 20, 2002 12:29 PM
To: dev@icf.possenet.org
Subject: RE: Delete of users
Peter is correct - we have no code to delete users and simply flag them
as disabled so they can no longer be used and can be filtered from
browsers.
As Peter points out - it is very dangerous to delete a user as a lot of
information is indirectly linked to users, sometimes using the obj field
and sometimes using the login name - and ERwin knows nothing about these
relationships. The user records may also be linked and used in external
applications built on Dynamics.
For these reasons and many more, it is much safer to keep the old user
records around and simply filter them out.
Regards
Anthony
Anthony D Swindells
Lead Architect, Progress Dynamics
Progress Software Corporation
aswindel@progress.com
-Original Message-
Sent: November 20, 2002 4:38 AM
To: dev@icf.possenet.org
Subject: RE: Delete of users
Hi Martin,
Dynamics does not allow the deletion of the gsm-user records, and it
uses Erwin's RI (and the generated delete trigger) to enforce this. A
'deleted' user in Dynamics is merely one that has the 'disabled' flag
set to yes.
If you need to delete these records, you would need to override the
delete trigger, and manually ensure that you delete all related
information. I don't think that there is any example code doing this in
Dynamics, though.
Regards,
Peter
|-Original Message-
|Sent: Wednesday, November 20, 2002 10:34 AM
|To: 'dev@icf.possenet.org'
|Subject: RE: Delete of users
|
|
|Hi Peter,
|
|Thanx, but is there any code which does the correct
|delete of a gsm_user (including related data).
|
|(Normally we put(via Erwin) this code in the delete trigger,
|and on a higher level we check whether we would allow deletion
|yes or no. I thought that triggers should be used for
|referential integrity and use the logic procedure for higher
|level/functional
|code)
|
|Martin
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Hi Martin
If you really want to by-pass the trigger code (not that I recommend it) for
this special occasion - you can do so by using SQL as the SQL db server does
not run any triggers. Eg use the following SQL in a simple java servlet via
JDBC (I guess ODBC shares this trigger-ignoring feature?):
delete from pub.gsm_user where pub.gsm_user.user_login != "admin"
Of course you'll first want to find out what cascade deleting you need to do
and manually do this too - just build it into your SQL statement.
Tim
-Original Message-
Sent: Wednesday, 20 November 2002 10:24 p.m.
To: 'dev@icf.possenet.org'
Subject: Delete of users
Hi,
I amtrying to cleanup my database and therefor I want to delete
all existing users + related data + history.
FOR EACH gsm_user WHERE gsm_user.user_login NE "admin":
DELETE gsm_user.
END.
But the delete trigger is preventing me from doing so?
Why?
Why does the delete trigger do not a cascade delete to it's related entities
?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
Tim,
This is not what I want. I don't want to do it in a tricky way.
My concern is that there are relations to a gsm_user record
which are not documented.
Therefore: I not able to write a delete-function for gsm_user
by myself and I am blocked.
I have not heard any reason why a gsm_user record
NEVER can't be deleted in a development environment.
Can anybody provide me with the relations to a gsm_user record?
(I have already the Erwin model, but I understood from Anthony:
As Peter points out - it is very dangerous to delete a user as a lot of
information is indirectly linked to users, sometimes using the obj field
and sometimes using the login name - and ERwin knows nothing about these
relationships.
)
Martin
-Original Message-
Sent: Wednesday, November 20, 2002 8:27 PM
To: 'dev@icf.possenet.org'
Subject: RE: Delete of users
Hi Martin
If you really want to by-pass the trigger code (not that I recommend it) for
this special occasion - you can do so by using SQL as the SQL db server does
not run any triggers. Eg use the following SQL in a simple java servlet via
JDBC (I guess ODBC shares this trigger-ignoring feature?):
delete from pub.gsm_user where pub.gsm_user.user_login != "admin"
Of course you'll first want to find out what cascade deleting you need to do
and manually do this too - just build it into your SQL statement.
Tim
-Original Message-
Sent: Wednesday, 20 November 2002 10:24 p.m.
To: 'dev@icf.possenet.org'
Subject: Delete of users
Hi,
I amtrying to cleanup my database and therefor I want to delete
all existing users + related data + history.
FOR EACH gsm_user WHERE gsm_user.user_login NE "admin":
DELETE gsm_user.
END.
But the delete trigger is preventing me from doing so?
Why?
Why does the delete trigger do not a cascade delete to it's related entities
?
Best regards,
Martin Bos - mailto:martin.bos@cargomate.com
CargoMate BV - Meerwal 21 B - 3432 ZV - Nieuwegein - NL
tel. +31(0)30-6048811 - fax +31(0)30-6090000 -CargoMate - Global Logistics Software Solutions
Bangkok - Dubai - Amsterdam - Miami - San Francisco - Los Angeles
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org
To unsubscribe, e-mail: dev-unsubscribe@icf.possenet.org
For additional commands, e-mail: dev-help@icf.possenet.org