Change Database Password

General discussion forum about all databases other than SqlBase.

Change Database Password

Post by brawnr » 07 Dec 2010, 12:15


We are using TD2005.1 to connect to an Oracle 10g database via SQL router. We have a requirement to alter our login screen so that the user can change their database password. Apologies if the answer is really obvious (I haven't used TD for over 4 years) but I cannot see how we can change the user's database password via the standard functions. I was half expecting the SQLConnect function to take an old/new password parameter, or for there to be a specific function e.g. SQLChangePassword, but this doesn't appear to be the case.

I'd be grateful if anyone could point me in the right direction.



Re: Change Database Password

Post by jmcnamara » 07 Dec 2010, 19:35

Code: Select all

 SqlPrepareAndExecute( hSql, 'alter user :SqlUser identified by :NewPassword replace :SqlPassword' )


Re: Change Database Password

Post by brawnr » 08 Dec 2010, 11:58

Thanks for the reply. I was begining to think that was the way to do it.

The DBAs are going to be turning on password expiry as part of this change. So what do you do when the user's password has expired? If the connect to the database fails due to expiry, I have no way of issuing an 'alter user' statement as I have no database connection.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests