SQL_Server_2005_Overview
SQL_Server_2005_Overview
Rafal Lukawiecki
Strategic Consultant
Project Botticelli Ltd
[email protected]
This session is based on the results of my close co-operation with my great friend Kimberly Tripp, as well as
an article of Michelle Dumler on SQL Server new features. See summary for references.
2
Objectives
Overview of New
Features
4
Manageability
Management Studio
One place for all SQL Server tasks
Performance Monitoring and Tuning
Less “black magic” needed, good self-tuning, but
>70 new internal measures exposed for your use
SQL Management Objects (SMOs)
Programmatic administration of SQL through a new
set of .NET objects
6
Availability
Scalability
Snapshot Isolation
Transactionally consistent view up to last committed
record for analysis (e.g. OLTP) purposes
Replication Monitor
Toolkit for automating complex replication
Table and Index Partitioning
Horizontal partitioning, especially for terabyte
databases
64-bit Optimisation
8
T-SQL Updates:
Recursive
queries, error
handling, new
feature support
Business Intelligence
Development Studio
Based on Visual
Studio,
encompasses
tasks for
managing the
database engine,
reporting and
analysis services
10
Service Broker
SQL’s nod to Service Oriented Architectures (SOA), through
asynchronous message routing as an application framework
11
Security of SQL
Server 2005
12
Defense in Depth
Using a layered approach:
Increases an attacker’s risk of detection
Reduces an attacker’s probability of success
Authorization Model
dbo.Sales
dbo.Sales dbo.DeleteASales
dbo.DeleteASales
User-Schema Separation
Database can contain Database
multiple schemas
Each schema has an owning
principal – user or role User1 Approle1
Role1
Has
Each user has a default schema default
for name resolution Owns schema Owns
EXECUTE AS…
Solves problems
Allows permissions to be granted where never
possible (e.g. granting truncate table)
Wrap ANYTHING inside a stored procedure and set
the context to run as someone who has permissions
– even dynamic string execution – then give
execute permission
Creates potential for further SQL Injection
What if you’re code is not well tested and uses
dynamically executed strings
22
SQL Injection
Code Signing
Data Protection
Check Your OS
XP SP2 WS2003
Key Generation
Passwords
Make sure passwords used to protect or create keys are
very strong
In our opinion, it is better to create a very long and
complex password that you will have to write down and
store in a well-protected safe in your company
You can divide it into two halves and store in separate
envelopes in different safes
E.g.: *87(HyfdlkRM?_764#{(**%GRtj*(NS£”_+^$(
No dictionary words, more than 20 characters, many non-
printing characters
Challenge: usability!
Consider also:
Not keeping passwords as text in your code, but store and
retrieve them through DPAPI and a .NET component
Using good quality password generators
30
Key Protection
SQL Server 2005 insists that the key you create is
further encrypted for its protection
Yes, that’s double-encryption, but that is not double-security.
Actually, it reduces security a little in some cases
CREATE SYMMETRIC…ENCRYPT BY
PASSWORD
Your (v. good) password generates a key to 3DES encrypt the
key you are protecting
Note, 3DES is less secure than AES, so this
CERTIFICATE
Your key is encrypted using the public key of a certificate
This, in essence, is hybrid encryption
If private key is kept secure (and offline), this is a very good way
to protect a symmetric key
Or another SYMMETRIC or ASYMMETRIC key – less useful
but interesting
31
Encryption
Decryption
Service Key
Secured By DPAPI
34
Catalog Security
CONTROL
Ownership-like permissions
ALTER
Ability to alter properties – and/or hierarchy
On higher scopes, confers ability to add, drop and
alter sub scopes
ALTER ANY ‘X’
Example: ALTER ANY ASSEMBLY
TAKE OWNERSHIP
Ability to take ownership of object
41
Auditing
Summary
Read
http://www.microsoft.com/sql/2005/productinfo/overview.
mspx
for a good overview of all the new features in SQL
Server 2005
44
© 2005 Project Botticelli Ltd & Microsoft Corporation. All rights reserved. This presentation is for informational
purposes only. PROJECT BOTTICELLI AND MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN
THIS SUMMARY. You must verify all the information presented before relying on it. E&OE.