Auditing in SQL Server 2008 DBA-364-M

Slides:



Advertisements
Similar presentations
Module 12: Auditing SQL Server Environments
Advertisements

Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Module 20 Troubleshooting Common SQL Server 2008 R2 Administrative Issues.
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
Chapter 9 Auditing Database Activities
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Configuring Windows Vista Security Chapter 3. IE7 Pop-up Blocker Pop-up Blocker prevents annoying and sometimes unsafe pop-ups from web sites Can block.
Automating SQL Buildouts With Hyper-V and SQL Server 2008 R2 Robert L Davis, Sr. DBA, Microsoft Corp.
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
Hands-On Microsoft Windows Server 2003 Administration Chapter 3 Administering Active Directory.
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
Auditing in Microsoft SQL Server 2012 Il-Sung Lee Program Manager Microsoft Corporation DBI407.
Backup and Recovery Part 1.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Il-Sung Lee Senior Program Manager Microsoft Corporation DAT304.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
Adapted from Afyouni, Database Security and Auditing DB Auditing Examples (Ch. 9) Dr. Mario Guimaraes.
Implementing Database Snapshot & Database Mirroring in SQL Server 2005 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
September 18, 2002 Introduction to Windows 2000 Server Components Ryan Larson David Greer.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
SharePoint enhancements through SQL Server RSS integration with SharePoint What’s New Elimination of IIS
October 11-14, Seattle, WA Top 10 Ways To Break Your Deployments Or: How to Avoid Your Sorry Fate Dev Nambi Senior Software Engineer Microsoft.
Module 10: Implementing Administrative Templates and Audit Policy.
Chapter 4- Part3. 2 Implementing User Profiles A local user profile is automatically created at the local computer when you log on with an account for.
Using Workflow With Dataforms Tim Borntreger, Director of Client Services.
SQL SERVER AUDITING. Jean Joseph DBA/Consultant Contact Info: Blog:
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Load Testing with SQL Server Tools Neil Hambly SQL Server Practice Lead Northdoor PLC.
ORACLE's Approach ORALCE uses a proprietary mechanism for security. They user OLS.... ORACLE Labeling Security. They do data confidentiality They do adjudication.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
ConfigMgr Discovering and Organizing Resources Mariusz Zarzycki, Phd, MCT, MCTS, MCITP, MCSE, MCSA.....
Defense In Depth: Minimizing the Risk of SQL Injection
SQL Database Management
Stress Free Deployments with Octopus Deploy
Shared Services with Spotfire
UVOS and VOMS differences
Chapter 5 : Designing Windows Server-Level Security Processes
Policy Based Management: Introduction & implementation
Policy Based Management: Introduction & implementation
Maximum Availability Architecture Enterprise Technology Centre.
unexplained AG failover
Visual Studio 2010 Database Projects
Lesson #8 MCTS Cert Guide Microsoft Windows 7, Configuring Chapter 8 Configuring Applications and Internet Explorer.
Limiting SQL Server Exposure
Getting To Know Your Indexes
Planning a Group Policy Management and Implementation Strategy
Oracle9i Database Administrator: Implementation and Administration
What’s new in SQL Server 2016 Availability Groups
What’s changed in the Shibboleth 1.2 Origin
On transactions, and Atomic Operations
Auditing in Microsoft SQL Server 2012
Limiting SQL Server Exposure
On transactions, and Atomic Operations
Bethesda Cybersecurity Club
BACHELOR’S THESIS DEFENSE
BACHELOR’S THESIS DEFENSE
BACHELOR’S THESIS DEFENSE
Andrew Fryer Microsoft UK
Chapter 11 Managing Databases with SQL Server 2000
Governing Your Enterprise with Policy-Based Management
7/28/ :33 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
Il-Sung Lee, Jack Richins Microsoft Corp
Presentation transcript:

Auditing in SQL Server 2008 DBA-364-M Il-Sung Lee Senior Program Manager, Microsoft

Agenda What’s changed since SQL Server 2005? Why should I use SQL Server Audit? What is the performance impact? Can I protect the Audit log from the DBA? What happens if Audit fails to write? What do I do if the server fails to start because of SQL Server Audit? Anything else I should know?

What’s changed since SQL Server 2005?

We now have a dedicated, security auditing feature.

Auditing Database Activity SQL Server Connections Auditing Database Activity SQL Server 2005 SQL Trace DDL/DML Triggers Third-party tools to read transaction logs No management tools support SQL Server 2008 SQL Server Audit Audit replaces trace - but doesn't replace all use cases for DDL/DML Triggers as DDL Triggers can be more selective in both what they log and how they log it Updates will be available at http://www.devconnections.com/updates/Orlando_08/SQL

SQL Server Audit Audit now a 1st class object Native DDL for configuration and management Security support Create an Audit object to automatically log actions to: File Windows Application Log Windows Security Log Ability to define granular Audit actions of Users or Roles on DB objects Multiple, independent audits may run concurrently

Audit Specifications Audit File system Server Audit Specification Security Event Log Application Event Log 0..1 DB audit specification per database per Audit object 0..1 Server audit specification per Audit object Server Audit Specification Database Audit Components Database Audit Components Database Audit Components Database Audit Specification Server Audit Action Server Audit Action Server Audit Action Server and database audit specifications for Pre-defined action groups Individual action filters Server action groups Server config changes, login/logoff, role membership change, etc. Database action groups Schema object access, database role membership change, database object access, database config change Server Audit Action Database Audit Action Server Audit Action Database Audit Action Database Audit Action Database Audit Action Database Audit Action CREATE SERVER AUDIT SPECIFICATION SvrAC TO SERVER AUDIT PCI_Audit     ADD (FAILED_LOGIN_GROUP); CREATE DATABASE AUDIT SPECIFICATION AuditAC TO SERVER AUDIT PCI_Audit     ADD (SELECT ON Customers BY public)

Why should I use SQL Server Audit?

For performance, security, flexibility, and other good reasons!

Reasons to Use SQL Server Audit SQL Server Connections Reasons to Use SQL Server Audit Faster than SQL Trace Leverages high performance eventing infrastructure Granular auditing Runs within engine More secure More choices for audit target Automatically records changes to Audit state Persists state between restarts Parity with SQL Server 2005 Audit Generation Configuration and management in SSMS Integration with Policy-Based Management Updates will be available at http://www.devconnections.com/updates/Orlando_08/SQL

DEMO Enabling SQL Server Audit

What is the performance impact?

Depends…

Audit Performance Depends upon: The workload What’s being audited Comparison of SQL Server Audit against SQL Trace for 5 different typical customer workloads…

SQL Server Audit vs SQL Trace Things to keep in mind: In order to be able to compare against SQL Trace, we enabled all Trace events and all server audit specifications. Since SQL Trace does not have the capability to audit at the specific database scope, a comparison was not possible. Hence, we could not do a real comparison for granular auditing to demonstrate that SQL Server Audit can be even more performant.

Can I protect the Audit log from the DBA?

Yes.

Protecting Audit Data Windows Security Log “Tamper-proof” log DBA cannot clear log (assuming not an Administrator) System Center Operations Manager Audit Collection Service Copy Audit logs to secure location Directory or share inaccessible by service account or DBA Audit logs files are shared-read and cannot be tampered with while active Possible momentary exposure if using multiple logs Combination of the two Audit “tamper” activity to Security Log, e.g., DBA modifying Audit All other Audit events are sent to file

What happens if Audit fails to write?

Depends again…

Audit Write Failure (shutdown) Shut down server on audit log failure Shutting down the server may seem drastic but for high-security environments, such as those for Common Criteria Compliance, this is a necessity. The login that sets this option must have the SERVER SHUTDOWN server permission

Audit Write Failure (non-shutdown) Audit Events Buffered Audit buffer size varies but is around 4MB (equivalent to at least 170 events, depending upon statement text) Server Blocks Activity Generating Audit Event Does not effect other Audits Blocks until buffer space freed or audit disabled Audit Session Turned Off Buffered data is discarded and error written to errorlog Continue trying to write future events to Audit log If failure during creation of handle to file/Window log session, manual restart of Audit session required Buffer filled System error

What do I do if the server fails to start because of SQL Server Audit?

Start the server in single-user mode

Starting the Server Option 1 Option 2 Option 3 Correct source of error E.g., file system full Option 2 Single-user mode, “-m” Audit is active but shutdown-on-failure behavior deactivated Audit Admin can fix Audit configuration Option 3 Minimal configuration mode, “-f” Audit disabled but Audit DDL can still be issued. Actually, the first thing you should do is correct the source of the problem is possible and the try to restart the server The “-f” is the last choice because it will start with all Audits disabled. Note with -m and -f a second restart is needed to get back to normal operating behavior.

DEMO Using SQL Server Audit with Policy-Based Management

Anything else I should know?

Just a few things.

Other Things You Should Know Enterprise only Parameterized queries Audit Xevent Sessions may not be manipulated by Xevent DDL. Audit logs are not encrypted Audit events are fired with permission checks Writing to files are much faster than to event log As of RTM CU#5, Auto-parameterized queries will be recorded in their original form in the Audit log

Other Things You Should Know Both Audit and Audit Specifications have STATE parameters. Can only change state outside user transaction. All other audit changes can be done in a transaction, but with Audit or Audit Specification OFF. These limitations were introduced due to performance reasons.

DEMO Creating an Audit Collector

Securely and Easily Track DB Activity Consider SQL Server Audit for all security auditing requirements Carefully devise a strategy for what needs to be audited and where to send the audit information based on security and performance needs Monitor administrator activity and prevent tampering of the logs.

Questions?

Complete the Evaluation Form & Win! You could win a Dell Mini Netbook – every day – just for handing in your completed form! Each session form is another chance to win! Pick up your Evaluation Form: Within each presentation room At the PASS Booth near registration area Drop off your completed Form: Near the exit of each presentation room Sponsored by Dell

for attending this session and the 2009 PASS Summit in Seattle Thank you for attending this session and the 2009 PASS Summit in Seattle