Showing posts with label DBA tasks. Show all posts
Showing posts with label DBA tasks. Show all posts

Monday, May 26, 2014

Unlock APEX admin user (when apxchpwd.sql doesn't work)

First we need to find the Apex admin accounts user_id. We do that with the following statement.
You might have two. Mine was the second one
select user_id from APEX_040200.WWV_FLOW_FND_USER where user_name = 'ADMIN' order by last_update_date desc;

Set a new password for the Apex Admin with the user_id we selected.
update APEX_040200.WWV_FLOW_FND_USER
set web_password = 'password'
where user_name = 'ADMIN'
and user_id = 56502607595642;
commit;

Then we unlock the Admin account with this statement.
alter session set current_schema = APEX_040200;
begin
wwv_flow_security.g_security_group_id := 10;
wwv_flow_fnd_user_api.UNLOCK_ACCOUNT('ADMIN');
commit;
end;

Saturday, October 15, 2011

List current active users, sessions and programs in Oracle 11g

List current users, sessions and programs
(not background processes)
SELECT username, sid, serial#, program
FROM v$session
WHERE username is NOT NULL
ORDER BY logon_time;
Remove there WHERE clause if you want to include all background processes like pmon.
Web Analytics