Forum

Oracle Kullanıcı G&...
 
Bildirimler
Hepsini Temizle

Oracle Kullanıcı Güvenliği

1 Yazılar
1 Üyeler
0 Likes
442 Görüntüleme
(@ugurdasdemir)
Gönderiler: 1824
Noble Member
Konu başlatıcı
 

Kullanıcı yönetimi -tüm sistemlerde olduğu gibi- Oracle veritabanı yönetim sistemlerinde de güvenliğin önemli bir bacağını oluşturur. Bu script ile uzun zamandır aktif olmayan -veritabanına giriş yapmamış- kullanıcıları kullanıcıları görebilirsiniz. -


-- Description : This script can be used to find users who have not logged onto the database for a specified number of days. This script analyses the audit trail and as such needs audit to be enabled with "audit session".

WHENEVER sqlerror exist ROLLBACK
SET feed ON
SET head ON
SET arraysize 1
SET SPACE 1
SET verify ON
SET pages 25
SET lines 80
SET termout ON
clear screen

spool aud_last_logon.lis

undefine number_of_days

col username FOR a10
col os_username FOR a10
col TIMESTAMP FOR a9
col logoff_time FOR a9
col returncode FOR 9999
col terminal FOR a10
col userhost FOR a10


SELECT  a.username,
        os_username,
        a.TIMESTAMP,
        a.logoff_time,
        a.returncode,
        terminal,
        userhost
FROM dba_audit_session a
WHERE (a.username,a.TIMESTAMP) IN
        (SELECT b.username,MAX(b.TIMESTAMP)
                FROM dba_audit_session b
                GROUP BY b.username)
AND a.timestamp<(sysdate-&&number_of_days)
/

spool off 

 
Gönderildi : 13/01/2009 15:23

Paylaş: