Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.audits$

 

This is a view in the mssqlsystemresource database.
CREATE VIEW sys.audits$ AS
 SELECT
  au.id AS audit_id,
  au.name AS name,
  g.guid AS audit_guid,
  au.created AS create_date,
  au.modified AS modify_date,
  r.indepid AS principal_id,
  au.type AS type,
  n.name AS type_desc,
  convert(tinyint, au.intprop) AS on_failure,
  pv.name AS on_failure_desc,
  sysconv(bit, sysconv (int, au.status) & 0x1) AS is_state_enabled,
  sysconv(int, qd.value) AS queue_delay,
  au.status AS status
 FROM master.sys.sysclsobjs au
 LEFT JOIN master.sys.sysguidrefs g ON g.class = 5 AND g.id= au.id AND g.subid = 0 -- GRC_AUDITGUID
 LEFT JOIN sys.syssingleobjrefs r ON r.depid = au.id AND r.class = 69 AND r.depsubid = 0 -- SRC_AUDITOWNER
 LEFT JOIN master.sys.sysobjvalues qd ON qd.valclass = 38 AND qd.objid = au.id AND qd.subobjid = 0 AND qd.valnum = 1 -- SVC_AUDITPROPS/AUDIT_QUEUE_DELAY
 LEFT JOIN sys.syspalnames n ON n.class = 'AULT' AND n.value = au.type
 LEFT JOIN sys.syspalvalues pv ON pv.class = 'AUSD' AND pv.value = au.intprop
 WHERE au.class = 64 -- SOC_SECAUDIT
  AND has_access('SA', 0) = 1




Syntax
CREATE VIEW sys.audits$ AS
	SELECT
		au.id AS audit_id,
		au.name AS name,
		g.guid AS audit_guid,
		au.created AS create_date,
		au.modified AS modify_date,
		r.indepid AS principal_id,
		au.type AS type,
		n.name AS type_desc,
		convert(tinyint, au.intprop) AS on_failure,
		pv.name AS on_failure_desc,
		sysconv(bit, sysconv (int, au.status) & 0x1) AS is_state_enabled,
		sysconv(int, qd.value) AS queue_delay,
		au.status AS status
	FROM master.sys.sysclsobjs au
	LEFT JOIN master.sys.sysguidrefs g ON g.class = 5 AND g.id= au.id AND g.subid = 0  -- GRC_AUDITGUID
	LEFT JOIN sys.syssingleobjrefs r ON r.depid = au.id AND r.class = 69 AND r.depsubid = 0	-- SRC_AUDITOWNER
	LEFT JOIN master.sys.sysobjvalues qd ON qd.valclass = 38 AND qd.objid = au.id AND qd.subobjid = 0 AND qd.valnum = 1 -- SVC_AUDITPROPS/AUDIT_QUEUE_DELAY
	LEFT JOIN sys.syspalnames n ON n.class = 'AULT' AND n.value = au.type
	LEFT JOIN sys.syspalvalues pv ON pv.class = 'AUSD' AND pv.value = au.intprop
	WHERE au.class = 64 -- SOC_SECAUDIT
		AND has_access('SA', 0) = 1

 
Last revision 2008RTM
See also

  server_audits (View)
server_file_audits (View)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash