Enable Auditing
SQL Server provides auditing as a way to trace and record activity that has
happened on each instance of SQL Server (for example, successful and failed
logins). SQL Server also provides an interface, SQL Query Analyzer, for managing
audit records.
Auditing can only be enabled or modified by members of the 'sysadmin' fixed security
role and every modification of an audit is an auditable event.
There are two types of audit:
General trace auditing, which provides some level of auditing but does not
require the same number of policies as C2 auditing.
C2 auditing, which requires that you follow very specific security policies.
Both kinds of auditing can be done using SQL Query Analyzer, which provides a
graphical user interface to monitor an instance of SQL Server.
In "Automating SQL Server General Trace Auditing," a sample procedure is provided
for you to use to enable general trace auditing for the SQL Server instance; you can
run this procedure from SQL Query Analyzer.
With Windows authentication mode, the user account that runs SQL Query Analyzer
must be granted permission to connect to an instance of SQL Server. For C2
auditing, sysadmin privilege is required.
You can run SQL Query Analyzer directly from inside SQL Server Enterprise
Manager.
During their installation process, many applications, including SQL Server, register
with the event-log subsystem. Note that SQL Server's ability to audit login activity
(including failed login attempts) to the Windows Application Log is not enabled
by default.
To configure this auditing, launch Enterprise Manager or Management Studio,
select a database server, right-click Properties, go to the Security tab, and set your
desired level of auditing.
If you intend to enable C2 auditing, you should not audit to the Application log, since
SQL Server will write audit information about user login activity to two places
simultaneously and unnecessarily degrade system performance. After you change
audit settings, the database must be restarted.
Even after enabling auditing to the Application log, details about user activity such as
which tables users access, which queries users run, and which stored procedures
users invoke are not provided.
Although SQL Server can audit user actions, your DBA must activate this feature.
DBAs have unrestricted access to databases on the database server and are
responsible for database management. In many environments, the systems
administrator or network administrator is also the DBA.
评论