Migrating to a Contained Database in SQL Server 2012
-
Upload
artemakis-artemiou -
Category
Technology
-
view
1.502 -
download
4
description
Transcript of Migrating to a Contained Database in SQL Server 2012
![Page 1: Migrating to a Contained Database in SQL Server 2012](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/2.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/4.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/5.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/8.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/9.jpg)
Demo 1: Migrating a Traditional DB
Demo 2: Migrating a Contained DB
Demonstration
![Page 10: Migrating to a Contained Database in SQL Server 2012](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/10.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022080210/555e049cd8b42ae4628b57fc/html5/thumbnails/11.jpg)
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