I am attempting to implement a form on APEX that allows the user (in this case dba’s) to select a database and then change their username and password.
I was able to set up the input fields correctly but I am totally lost on how to tie it in with the actual database. I am assuming I will have to use a database link to access different databases.
Is this possible?
I devised a solution that does not require stored procedures or elevated access for a single user. Its a bit hacked together but it works!
The user inputs their credentials and desired new password through a regular APEX form.
The form data gets processed in an HTML region with an iframe in it using substitution strings. i.e:
<iframe height='300' width='100%' scrolling="no" src="http://***SERVER***/cgi-bin/chguserpwd.cgi dbname=&DATABASE_NAME.&username=&USERNAME.&oldpwd=&CURR_PASSWORD.&newpwd=&NEW_PASSWORD."></iframe>The cgi script does the work and returns the result through the iframe
Execute the SQL from the cgi-script
./chguserpwd