Contained DB? Did it do something wrong?

Slides:



Advertisements
Similar presentations
Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)
Advertisements

SQL Server Disaster Recovery Chris Shaw Sr. SQL Server DBA, Xtivia Inc.
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
SQL Server AlwaysOn.
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
SQL Server 2012 Always On Premier Field Engineer Microsoft Corporation Lisa Gardner
How to Take Advantage of Contained Databases in SQL Server 2012 Steve Jones SQLServerCentral Red Gate Software.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Implementing Database Snapshot & Database Mirroring in SQL Server 2005 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft.
Architecting Availability Groups
SQL-Server 2012 Always On.
It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in It is a High Availability as well as Disaster recovery.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
MODIFY THIS SLIDE FOR ACTUAL PRESENTER, DELETE THIS BAR AFTER MODIFICATION.
© 2011 PLANET TECHNOLOGIES, INC. Upgrading Your SharePoint and SQL Environments Patrick Curran, MCT SEPTEMBER 22, 2012.
SQLCAT: SQL Server 2012 AlwaysOn Lessons Learned from Early Customer Deployments Sanjay Mishra Program Manager Microsoft Corporation DBI360.
Unified solution Easy to configure, manage, and monitor Reuse existing investments SAN/DAS environments Allow using HA hardware resources Fast seamless.
SQLCAT: SQL Server HA and DR Design Patterns, Architectures, and Best Practices Using Microsoft SQL Server 2012 AlwaysOn Sanjay Mishra Program Manager.
Speaker Name 00/00/2013. Solution Requirements.
Alwayson Availability Groups
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
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.
Narasimha Reddy Gopu Jisha J. Agenda Introduction to AlwaysOn * AlwaysOn Availability Groups (AG) & Listener * AlwaysOn Failover * AlwaysOn Active Secondaries.
SQL Server 2014 AlwaysOn Step-by-Step SQL Server 2014 AlwaysOn Step-by-Step A hands on look at implementing AlwaysOn in SQL Server 2014.
What HADR Option(s) Are Right For You?. Where’s The AlwaysOn?
SQL Server High Availability Introduction to SQL Server high availability solutions.
All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
William Durkin A Gourmet Menu of SQL Server High Availability Options.
AlwaysOn In SQL Server 2012 Fadi Abdulwahab – SharePoint Administrator - 4/2013
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
SQL Server Encryption Ben Miller Blog:
Redmond Protocols Plugfest 2016 Kevin Farlee Senior Program Manager SQL Server AlwaysOn in SQL Server 2016.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
ALWAYSON AVAILABILITY GROUPS Replicas, Listeners & Quorums, Oh My! Kevin Howell SQL Saturday #517 Philadelphia, June 2016.
Architecting Enterprise Workloads on AWS Mike Pfeiffer.
Introduction to Clustering
Partial Database Availability
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
ALWAYSON AVAILABILITY GROUPS
Disaster Recovery Where to Begin
AlwaysOn Mirroring, Clustering
Example of a page header
Always On Multi-Site Patterns
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Always On Availability Groups
Windows Azure Migrating SQL Server Workloads
Design and Implement Cloud Data Platform Solutions
Presented by: Warren Sifre
Required 9s and data protection: introduction to sql server 2012 alwayson, new high availability solution Santosh Balasubramanian Senior Program Manager.
AlwaysOn Availability Groups 101
Introduction to Clustering
Disaster Recovery Where to Begin
What’s new in SQL Server 2016 Availability Groups
SYED SAJID WASIM SQL SERVER ALWAYS ON Step by Step.
SQL Server on Linux: High Availability And Disaster Recovery
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Distributed Availability Groups
04 | Always On High Availability
Distributed Availability Groups
Distributed Availability Groups Praveen Kumar. What we will cover Availability group refresher The HA/DR solution Distributed availability groups – what.
Distributed Availability Groups
ZORAN BARAC DATA ARCHITECT at CIN7
SQL AlwaysOn Availability Groups
06 | SQL Server and the Cloud
Designing Database Solutions for SQL Server
Presentation transcript:

Contained DB? Did it do something wrong? Presented by Warren Sifre

About Professional Me… Senior Microsoft Consultant for Perpetual Technologies Inc. 14+ years in IT Industry 12+ years working with Databases Worked in the Document Imaging market space for over 10 years. Developed system integration solutions against many different database platforms. Architected the virtualization of over 80 physical databases servers onto a 10 physical server solution for a Hosted Managed Services organization. Passion in Solutions Architecture at both hardware and software levels. MCDBA, MCITP (2005/2008) Admin, MCTS 2008 (BI/Dev), MCSA (2003), MCSE (2003), CDIA, CEH (In Progress)

Agenda Review current database move process. Disclose new database move process enabled by contained databases. What is a contained database and why do were they introduced Benefits of contained databases Terms and Definitions Demo enabling an Instance to allow for contained databases. Demo configuring database for Containment. Demo moving and connecting to contained database. Things to keep in mind Useful T-SQL queries Use Cases for Contained Databases Questions

Current Move Database Process… Detach or Backup existing database Attach or Restore database to new instance Create SQL/Windows authenticated accounts Exec SP_Change_Users_Login (‘Auto_Fix’, <AccountNames>) for each user account. Migrate any dependent SQL Agent Jobs.

Contained DB Move Process… Detach or Backup existing database Attach or Restore database to new instance Migrate SQL Agent Jobs

What is Contained Database? A new feature available in SQL 2012. Contained databases are isolated from other databases and from the instance of SQL Server that hosts the databases. Separates the database application from the management of SQL Server.

Benefits of Contained Databases Simplifies the process of moving a database from one instance to another. Sorts taking place in the TempDB will now use the collation of a contained database instead of the instance default collation. Eliminates bad sorts because of collation mismatch. Simplifies the configuration of AlwaysOn Availability Groups, Log Shipping and Database Mirroring by eliminating the needs to syncronize instance logins. No data is left behind when a database is moved from instance to another. (i.e. Logins)

Terms and Definitions… Database Boundary (aka Application Boundary) – The boundary between a database and the instance of SQL Server and other databases. Contained – An element that exists entirely within the database boundary. Uncontained – An element that crosses the database boundary. Non-Contained Database – A database that has containment set to NONE within SQL Server 2012 (default value). All databases in versions earlier than SQL Server 2012 are non-contained. Partially Contained Database – A partially contained database is a contained database that can allow some features to cross the database boundary, but most features stay within the database boundary. Fully Contained Database – No features cross the database boundary.

Enable Instance to allow for Contained DB. DEMO

Demo Recap… Must Enabled instance to recognize Contained Databases exist. Can be enabled via T-SQL Scripts or GUI EXEC SP_CONFIGURE 'contained database authentication',1 Only Supported in SQL 2012.

Configure Database for Containment. DEMO

Demo Recap… Can create a SQL or Windows Authenticated logins Must select partial in the containment type drop down list.

Move and Connect to Contained DB… DEMO

Keep in mind… There may be situations where objects are not contained within the database boundaries… Stored Procedure access a database within the same instance. Process executing a stored procedure within the master database. Normal authentication prerequisites still exist; Instance must be configured for Mixed Mode authentication to be able to login to a contained database as a SQL authenticated login. Cannot use Replication, Change Data capture or Change Tracking

Useful Queries… This query shows what objects are not contained within a particular contained database: SELECT class_desc , OBJECT_NAME(major_id) ‘Object Name’ ,statement_type ,feature_name FROM sys.dm_db_uncontained_entities WHERE statement_type IS NOT NULL This query shows all accounts configured to be contained in a contained database: SELECT name,type_desc,authentication_type_desc FROM sys.database_principals WHERE authentication_type =2

Use Cases for Contained DB… Log Shipping Mirrored Databases AlwaysOn Availability Groups (New SQL 2012)

AlwaysON Availability Groups, huh? Latest SQL Server High Availability offering Uses subset of Database Mirroring and Failover Clustering features to allow multiple readable secondary replicas and groupings of databases for failover, backup and reporting. Only available on SQL Server 2012 Enterprise edition

Availability Group Listener How AlwaysOn Availability Groups work.. Application(1) Application(2) Application(3) Availability Group Listener SQL Node 1 SQL Node 2 SQL Node 3 SQL Node 4

AlwaysOn AG Prerequisites... Windows Server 2008 or greater Windows Failover Cluster Services SQL Server 2012 Enterprise Edition SQL Server Default Collation must be the same on all nodes An available IP Address (Static recommended for Production) Database must be read/write enabled. Database must be in FULL recovery model. Database cannot be configured in a Mirror. Database cannot exist in any existing Availability Groups.

Benefits of Availability Groups Have more than 1 failover option (4 secondary replicas) Off-Load Backups onto the secondary replicas Off-Load integrity checks onto the secondary replicas Off-Load Read Only connections to secondary replicas Support for Multiple Database Failover in one action Automatic Page Recovery if page corruption detected True Geo-Cluster support (Multi Subnet)

Connection String Information… Read/Write use connection string ("server=AO_Sample; database=AlwaysOn_SampleDB; user id=DB_User; password=DB_PW;) __________________________________________________ Read Only use connection string User id=DB_User;password=DB_PW; ApplicationIntent=ReadOnly")

Limitations and Suggestions… Differential Backups are not supported Suggest Drive letters across Cluster Nodes are the same. Additional Prerequisites for Failover Cluster Instances (FCI) Cannot have replicas outside of its current cluster. Failovers are not caused by database issues such as a database becoming suspect due to a loss of a data file, deletion of a database, or corruption of a transaction log Can include a replication publisher, but not the distributor Supports Contained Databases, FileStream and FileTables. Deleting the Availability Group will remove all WSFC configurations performed by SQL and none of the database replicas. Database Restorations are similar to Mirroring.

THANK YOU!!!! Warren Sifre Email: warren.sifre@pti.net Twitter: @WAS_SQL Company Website: www.pti.net