Download - Migrating to a Contained Database in SQL Server 2012

Transcript
Page 1: Migrating to a Contained Database in SQL Server 2012

Artemakis Artemiou SQL Server MVP

CDNUG Lead

INETA Country Leader (CY)

http://aartemiou.blogspot.com

Migrating to a Contained Database

December 20th, 2012

SQL Server 2012

Screencast Series

Page 2: Migrating to a Contained Database in SQL Server 2012

What are Contained Databases

• Isolated from other DBs and the SQL

Server Instance

• Majority of the metadata that describes the

database is maintained within the

database

• Users in contained DBs no longer

associated with SQL Server Logins

• Simplified security model

• Portability

Page 3: Migrating to a Contained Database in SQL Server 2012

Authentication

• Contained User

– Contained User with Password

– Windows Principals

• Enable Contained DB Authentication sp_configure 'contained database authentication', 1;

• Disable Contained DB Authentication sp_configure 'contained database authentication', 0;

Page 4: Migrating to a Contained Database in SQL Server 2012

Traditional DB Migration Scenario (I)

Application

SQL Server Instance 1

DB DB DB AW

DB

SQL

Login

Access Granted

Page 5: Migrating to a Contained Database in SQL Server 2012

Traditional DB Migration Scenario (II)

Application

SQL Server Instance 2

DB DB DB AW

DB

SQL

Login

Access Denied ** If the SQL Login is not migrated

Page 6: Migrating to a Contained Database in SQL Server 2012

Contained DB Migration Scenario (I)

Application

SQL Server Instance 1

DB DB DB AW

DB

Access Granted

Contained

Database

Page 7: Migrating to a Contained Database in SQL Server 2012

Contained DB Migration Scenario (II)

Application

SQL Server Instance 2

DB DB DB AW

DB

Access Granted

Contained

Database

Page 8: Migrating to a Contained Database in SQL Server 2012

Contained DB Migration Scenario (N)

Application

SQL Server Instance N

DB DB DB AW

DB

Access Granted

Contained

Database

Page 9: Migrating to a Contained Database in SQL Server 2012

Demo 1: Migrating a Traditional DB

Demo 2: Migrating a Contained DB

Demonstration

Page 10: Migrating to a Contained Database in SQL Server 2012

Summary

• Contained Databases Introduce a New Security

Model

• Isolated from other DBs and the SQL Server

Instance

• Users in contained DBs no longer associated with

SQL Server Logins

• Authentication

– Contained User with Password

– Windows Principals

• Portability = More Robust Data Applications

Page 11: Migrating to a Contained Database in SQL Server 2012

Resources

• Contained Databases on MSDN Library – http://msdn.microsoft.com/en-us/library/ff929071.aspx

• Microsoft SQL Server Official Website – http://www.microsoft.com/sqlserver/en/us/default.aspx

• SQL Server Blog

– http://blogs.technet.com/b/dataplatforminsider/

• The SQL Server and .NET Blog

– http://aartemiou.blogspot.com

• The SQL Server and .NET TV – http://www.youtube.com/sqlserverdotnetblog

• Follow me on Twitter! – http://twitter.com/artemakis