- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Oracle8 question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 06:45 AM
01-30-2004 06:45 AM
Oracle8 question
Is there a table in the database when you can see when the users loggen into the database last?
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:02 AM
01-30-2004 07:02 AM
Re: Oracle8 question
Can you check these tables:
V$STATNAME
V$SESSTAT
and
V$SESSION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 07:35 AM
01-30-2004 07:35 AM
Re: Oracle8 question
I'm looking for a table that shows when they connected to the database last.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 08:05 AM
01-30-2004 08:05 AM
Re: Oracle8 question
I suspect you need to enable a level of AUDIT to retain that info in the DB.
try SQL> DESCRIBE USER_AUDIT_SESSION
That looks like the table you would want filled in, but is has no rows on my box.
I found that table doign a few probes like:
select TABLE_NAME, COLUMN_NAME from ALL_TAB_COLS where COLUMN_NAME = 'USERNAME'
and
select TABLE_NAME, COLUMN_NAME from ALL_TAB_COLS where COLUMN_NAME like '%LAST%'
having started with:
select TABLE_NAME from DICT where TABLE_NAME like '%LOGIN%';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 08:53 AM
01-30-2004 08:53 AM
Re: Oracle8 question
I am trying to clean out inactive users.
Our ERP system on UNIX lets me get the login from the OS. Many of the users access the Database thru the report writer and never login thru the OS. I can get the connection information from the Listener log. That is not easy. I was think that all the neat thing that you can do with Oracle and SQL that the must be a table out there with the last login information.
Guess I can keep looking.
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2004 11:11 PM
02-01-2004 11:11 PM
Re: Oracle8 question
to easy fix your problem I suggest you to create a trigger to be onvoked at logon to store in a table the info you need.
This is a short example about this:
create table t_users_logon
(ul_user_name varchar2(30),
ul_logon_date date
)
storage (initial 5M
next 1M
pctincrease 0
maxextents 250
)
tablespace users;
create or replace trigger t_logontrigger
after logon on database
declare
l_count number;
begin
select count(*)
into l_count
from t_users_logon
where ul_user_name=user;
if l_count > 0 then
update t_users_logon
set ul_logon_date=sysdate
where ul_user_name=user;
else
insert into t_users_logon values (user,sysdate);
end if;
commit;
end;
in this way you wil; be able to see the last logon of the user.
Feel free to add all the fields you need in the table. Look for trigger at logon to see all the field available.
I hope this help you.
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 01:23 AM
02-03-2004 01:23 AM
Re: Oracle8 question
That might be the way to go. I haven done any triggers before this would be a good first one.
Marty