通信人家园

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索

军衔等级:

  新兵

注册:2012-7-3
跳转到指定楼层
1#
发表于 2012-9-7 16:06:08 |只看该作者 |倒序浏览
    Sybase IQ具有一般的数据库审计功能,它提供的审计功能可以获得DDL(create table、index等)语句的信息,但是对于DML语句(insert、update、delete、select语句是不行的)。它提供的审计类型如下:
     
'all'   enables all types of auditing.
     
'connect'  enables auditing of both successful and failed connection attempts.
     'connectFailed'  enables auditing of failed connection attempts.
   
'DDL'  enables auditing of DDL statements.
     
'options'  enables auditing of public options.
   
'permission'  enables auditing of permission checks, user checks, and SETUSER
                          statements.
   
'permissionDenied' enables auditing of failed permission and user checks.
   
'triggers'  enables auditing after a trigger event.

下面是审计功能的设置和使用方法:
    --1. 打开审计
    SET OPTION PUBLIC.auditing = 'On';
    CALL sa_enable_auditing_type('all');

    --
查看审计信息(下面两种方法可以只用一个)
   dbtran -g -c "UID=DBAWD=sql" -n demo.sql --直接访问iq server

   dbtran -g demo.log demo.sql --访问
catalog transaction log file

   --关闭审计

   SET OPTION PUBLIC.auditing = 'Off';
   CALL sa_disable_auditing_type( 'all' );

举报本楼

您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系我们 |网站地图  

GMT+8, 2024-5-7 21:41 , Processed in 0.113097 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部