Results 1 to 5 of 5

Thread: Auditing

  1. #1
    Join Date
    Apr 2004
    Posts
    79

    Unanswered: Auditing

    Hi

    How can I audit all the events,except for select queries for a specific user ?
    I dont want to give ( sp_audit,'user_name',select,'obj_name', off ) for each single object.

    Thanks

    Wilson

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Use the keyword "ALL"
    F. Celaia
    DBA Sybase/DB2/Oracle/MS-SQL

  3. #3
    Join Date
    Apr 2004
    Posts
    79
    -----------------
    use mydb
    go
    sp_audit 'select','all','all','off'
    go

    But it says,
    Server Message: Number 18228, Severity 16
    'all' is not a valid object name.

  4. #4
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    else execute the output of

    Code:
    use MyDB
    go
    select "exec sp_audit 'select', 'all', "+name+", 'off'"
    from sysobjects 
    where type in ('V','U')
    go
    F. Celaia
    DBA Sybase/DB2/Oracle/MS-SQL

  5. #5
    Join Date
    Apr 2004
    Posts
    79
    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •