You are not logged in.
Pages: 1
Hello,
I have two questions related to the user rights and Oracle in mORMot:
1. Is it possible to set role while creating connection to the Oracle using mORMot?
2. Is it possible to give an information about request of password change while logging in to the Oracle database? I'm asking because since Oracle 11 are used the default policy even for SYSTEM account and requires to change password after some time period. Using other Delphi components to connecting to the Oracle I'm usually checking password grace period. If exception: ORA-28001 or ORA-28002 is raised then application knows that it should automatically change its password. Is it something similar in mORMot?
best regards
Adam Siwon
Offline
It is up to the application/server code to handle those Oracle-specific behaviors.
But there was some missing events in our SynDB units.
I've added the new speConnected / speDisconnected events for TSQLDBConnectionProperties/TSQLDBConnection.OnProcess event handlers.
So you may be able to set the roles at connection.
See http://synopse.info/fossil/info/046e9e17fe
I've also added the new TSQLDBConnectionProperties.OnStatementInfo event, to be used e.g. to track ORA-28001 or ORA-28002 warnings about account expire.
See http://synopse.info/fossil/info/1f921ffa18
Feedback is welcome, since we did not test those new events intensively yet.
Offline
Thank you very much. I will try to use this.
best regards
Adam Siwon
Offline
Thank you very much. I will try to use this.
<pl mode on>Adam, Arnaud szybciej to robi, niż Ty jesteś w stanie odczytać <pl mode off>
Arnaud Bouchez, YOU ARE fu....gFANTASTIC-robo-architect-blogger-TOP-coder!!! AMAZING! GREAT WORK!!!!
I'm jealous ;-)
Offline
Hello,
I have checked changes you made. I'm sorry for the delay. OnProcess event works as expected. I can set correct roles for user.
Second change does not works. When I'm trying to login into the Oracle server using account which has status expired then regular exception ORA-28001 with message: the password has expired@' extended_errorcode = 1 is raised and logging process is interrupted. OnStatementInfo event is never fired. When I'm trying to login to the Oracle using this same account in other tools then they wants to get new password for account.
Is it possible to add to the OnStatementInfo event additional parameter with error code? Testing code value will be easier to get information about event calling reason than parse message text.
Last edited by ASiwon (2015-07-23 20:49:50)
best regards
Adam Siwon
Offline
Hello,
I have checked code and I found where the problem exists. ORA-28001 exception has status OCI_ERROR not OCI_SUCCESS_WITH_INFO. Thats why exception is raised and OnStatementInfo event is never fired. So I think ORA-28001 error should be supported separately. I wrote some changes to the SynDBOracle unit which could to handle password changing when it is expired. Modified version of file is available at: http://gidex.com.pl/download/SynDBOracle.pas. You could use those changes if they are valuable for you.
Those changes was made only for Oracle so I made changes only in SynDbOracle unit. I think some changes could be moved to the base classes to better integration with mORMot library.
best regards
Adam Siwon
Offline
As been integrated as http://synopse.info/fossil/info/f6ec234e8a
Thanks Adam for the patch!
Offline
Pages: 1