您的位置:首页 >> 数据库 >> Oracle >> 正文
Oracle RSS
 

oracle DBA about logs

http://www.rdxx.com 05年11月10日 00:00 Blog.ChinaUnix.net 我要投稿

关键词: Oracle , DBA

1. 修改用户 sys/system/scott/sys_man(oem使用)的密码;

    2. 进入dba studio看看系统有多少个用户,有没有可疑用户

    3. 不用随便给普通用户赋予DBA角色,普通用户赋予CONNECT或
       RESOURCE角色或者根据需要赋予相关的权限。

    4. 8i以上使用LogMiner工具,关于此工具的使用查阅精华区或faqs

    5. 经常查看Alert<SID>.log文件,该文件路径: $ORACLE_HOME\admin\sid\bdump.

用LogMiner包看一下,可以看到他是用的那个用户修改的那些表修改了什么。
Example of Using LogMiner
Assume that the data dictionary extract was taken to a flat file named
'/usr/oracle/dbs/dict.txt'
The DBA first specifies five redo logs to be analyzed
execute dbms_logmnr.add_logfile (filename => '/usr/oracle/dbs/arch123.dbf',
options => dbms_logmnr.NEW);
-- identifying this file starts a new list of files to analyze
execute dbms_logmnr.add_logfile (filename => '/usr/oracle/dbs/arch124.dbf',
options => dbms_logmnr.ADDFILE);
execute dbms_logmnr.add_logfile (filename => '/usr/oracle/dbs/arch125.dbf',
options => dbms_logmnr.ADDFILE);
execute dbms_logmnr.add_logfile (filename => '/usr/oracle/dbs/arch126.dbf',
options => dbms_logmnr.ADDFILE);
execute dbms_logmnr.add_logfile (filename => '/usr/oracle/dbs/arch127.dbf',
options => dbms_logmnr.ADDFILE);
The DBA then specifies the location of the dictionary with,
execute dbms_logmnr.start_logmnr( dictfilename => '/usr/oracle/dbs/dict.txt' );
The DBA is now ready to issue a select against the v$logmnr_contents view
select operation, sql_redo, sql_undo
from v$logmnr_contents
where seg_owner = 'SCOTT' and seg_name = 'ORDERS' and
operation = 'DELETE' and username = 'RON';

listner.log 里面会有你想要的证据

查listener.log只能查到从哪里登录,查不到输入什么sql语句。
保密有一点很关键但又很容易被忽略的,很多人都是直接输入
sqlplus username/password@connstring   (一般服务器都安装在unix系统)
登录的,如此一来,别人只要用ps -ef|grep sqlplus就可以看到你的用户名和密码了。
应该用
sqlplus  然后再输入用户名和密码。
也可以先定义一个变量
$STRI=username/password;export $STRI
sqlplus $STRI@connstring
这样别人就看不到你的密码了。

注意查看system的视图v$sql,也许会有收获。

当然用审计功能 :
方法一:
用以下的方式可以监控登入登出的用户:
创建如下的两张表:
create table login_log   -- 登入登出信息表
(
    session_id int not null, -- sessionid
    login_on_time  date,  -- 登入时间 
    login_off_time  date,  -- 登出时间 
    user_in_db varchar2(30), -- 登入的db user
    machine    varchar2(20),    -- 机器名
    ip_address varchar2(20), -- ip地址
    run_program varchar2(20)    -- 以何程序登入
);

create table allow_user   -- 网域用户表
(
    ip_address varchar2(20),  -- ip地址
    login_user_name nvarchar2(20)   -- 操作者姓名

9 7 3 1 2 4 8 :


 
 
标签: Oracle , DBA 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站