Elke Schmidtke wrote :
>Hi,
>we have a JAVA-application for the access to our SAPDB. We now need a mechanism so
>that users can change
>their passwords with help of the application. The first idea was to use a table in
>the database and to
>execute the alter password statement from this table after update of this table. We
>have some additonal
>information in this table for the control of the password change.
>But SQL studio reports Native Error: -5015 to the alter statment in the trigger.
>Can't we do it ?
>Can we only use
> statement.execute ("... ") ;
>to achieve the change of the password ?
>Elke
>create table T_PASSWORD (
>NUTZER_NR INTEGER not null,
>USER_PASSWORD CHAR(20),
>LAST_CHANGE_DATE DATE,
>CHANGE_REQ BOOLEAN,
>primary key (NUTZER_NR)
>)
>CREATE TRIGGER TR_UPDATE_PASSWORD FOR DBA.T_PASSWORD
>AFTER UPDATE EXECUTE (
>if new.user_password <> old.user_password then
> begin
> alter password old.user_password to new.user_password;
> update dba.t_password set user_password='***'
> where nutzer_nr=:nuzter_nr ignore trigger;
> end;
>)
Please have a look into the documentation
(http://www.sapdb.org/htmhelp/e0/ed9036dfe4b903e10000009b38f889/frameset.htm)
where all permissible trigger sql statements are listed.
The alter password statement is not with it.
Please note that a user can change his own password via
ALTER PASSWORD <old password> to <new password>, so you maybe
can solve your problem without any password table and trigger.
Best Regards,
Thomas
--
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general