|
|
发表于 2007/7/25 18:00:42
|
显示全部楼层
可以写一段小程序。用API: FND_USER_PKG.
可以参考下列代码:
--create a new user with system admin access
DECLARE
v_session_id INTEGER := USERENV( 'sessionid' );
v_user_name VARCHAR2( 30 ) := UPPER( '&Enter_User_Name' );
BEGIN
--Note, can be executed only when you have apps password.
-- Call the procedure to Creaet FND User
fnd_user_pkg.createuser
( x_user_name => v_user_name,
x_owner => '',
x_unencrypted_password => '123456',
x_session_number => v_session_id,
x_start_date => SYSDATE - 10,
x_end_date => SYSDATE + 100,
x_last_logon_date => SYSDATE - 10,
x_description => 'test',
x_password_date => SYSDATE - 10,
x_password_accesses_left => 10000,
x_password_lifespan_accesses => 10000,
x_password_lifespan_days => 10000
--,x_employee_id => 649
/*Change this id by running below SQL*/
/*
SELECT person_id
,full_name
FROM per_all_people_f
WHERE upper(full_name) LIKE '%' || upper('full_name') || '%'
GROUP BY person_id
,full_name
*/
, x_email_address => '',
x_fax => '',
x_customer_id => '',
x_supplier_id => '' );
fnd_user_pkg.addresp( username => v_user_name,
resp_app => 'SYSADMIN',
resp_key => 'SYSTEM_ADMINISTRATOR',
security_group => 'STANDARD',
/*
SELECT fa.application_short_name resp_app,fa.basepath,fa.*
FROM apps.fnd_application fa
WHERE application_short_name = 'SYSADMIN';
SELECT r.responsibility_key resp_key, r.responsibility_id,
r.request_group_id
FROM apps.fnd_responsibility r
WHERE r.responsibility_key = 'SYSTEM_ADMINISTRATOR';
SELECT fsg.security_group_id secid, fsg.*
FROM fnd_security_groups fsg;
*/
description => 'Auto Assignment',
start_date => SYSDATE - 10,
end_date => SYSDATE + 1000 );
commit;
END; |
评分
-
查看全部评分
|