sp_displayaudit

Displays the status of audit options.

Syntax

sp_displayaudit ["procedure" | "object" | "login" | "database" | "global" | 
	"default_object" | "default_procedure" [, "name"]]

Parameters

Examples

Usage

The valid auditing options for each parameter are:
Object Type ParameterValid Auditing Options
procedure

exec_procedure, exec_trigger

object

delete, func_obj_access, insert, reference, select, update

login

all, cmdtext, table_access, view_access

database

alter, bcp, bind, create, dbaccess, drop, dump, encryption_key, func_dbaccess, grant, load, revoke, setuser, truncate, unbind

global

adhoc, dbcc, disk, errors, login, logout, navigator_role, oper_role, replication_role, rpc, keycustodian_role, sa_role, security, sso_role

default_object

delete, func_obj_access, insert, reference, select, update

default_procedure

exec_procedure, exec_trigger

See also:
  • See the System Administration Guide for information on setting up auditing.

  • bcp in the Utility Guide

Permissions

The permission checks for sp_displayaudit differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage auditing privilege.

Disabled

With granular permissions disabled, you must be a user with sso_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_audit