Development notes, tips and tricks for Oracle's HTML DB

Monday, July 12, 2004

Create users programmatically

See: Htmldb forum


In a nutshell:
select :WORKSPACE_ID from dual;

...in the SQL Workshop's SQL Command Processor to determine your workspaces workspace_id (also known as a security_group_id internally). assuming that query came back with a value of 12345, you could then run a block like...


BEGIN
wwv_flow_api.set_security_group_id(p_security_group_id=>12345);

wwv_flow_fnd_user_api.create_fnd_user(
p_user_name => 'regular_user',
p_email_address => 'myemail@mydomain.com',
p_web_password => 'regular1') ;

wwv_flow_fnd_user_api.create_fnd_user(
p_user_name => 'developer_user',
p_email_address => 'myemail@mydo.com',
p_web_password => 'dev1',
p_developer_privs => 'ADMIN') ;

end;
/

1 Comments:

Blogger Stirl said...

I had to use select * from apex_workspaces to get the workspace id....howevever this I still got permission errors when I tried to create the user. :(

3:02 AM

 

Post a Comment

<< Home