SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Contained Databases


Contained Databases

Author
Message
Rob Schripsema
Rob Schripsema
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3221 Visits: 11042
L' Eomot Inversé (7/25/2012)

I could remember 3 of the four answers, but on the mirroring one I was racking my brains to no avail, and finally gave up and consulted BoL. The information seemed quite hard to find (for example, if I'd taken the first apparently relevant page I found in BoL, ALTER DATABASE Database Mirroring, at face value I would have got it horribly wrong. I ended up reading quite a bit. SO for me the question was a good learning experience.

I must be overlooking something ... I don't see any mention/discussion of mirroring in any of the referenced articles, or anywhere else for that matter. Where in BOL did you find the 'right' answer to this? (I got the mirroring one wrong, too!)

Rob Schripsema
Propack, Inc.
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)

Group: General Forum Members
Points: 96395 Visits: 38981
I guessed wrong on Replication.

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26174 Visits: 12500
Rob Schripsema (7/26/2012)
L' Eomot Inversé (7/25/2012)

I could remember 3 of the four answers, but on the mirroring one I was racking my brains to no avail, and finally gave up and consulted BoL. The information seemed quite hard to find (for example, if I'd taken the first apparently relevant page I found in BoL, ALTER DATABASE Database Mirroring, at face value I would have got it horribly wrong. I ended up reading quite a bit. SO for me the question was a good learning experience.

I must be overlooking something ... I don't see any mention/discussion of mirroring in any of the referenced articles, or anywhere else for that matter. Where in BOL did you find the 'right' answer to this? (I got the mirroring one wrong, too!)

The first thing to note is that in SQL 2012 "mirroring" has been subsumed under a much improved feature called "Always On High Availability Groups". Then look at the BoL page [url=http://msdn.microsoft.com/en-us/library/hh510230.aspx]Always On Availability Groups (SQL Server)[/sql] and find the section headed Interoperability and Coexistence with Other Database Engine Features and you'll find "Contained Databases" listed.

Tom

D.Oc
D.Oc
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1239 Visits: 6480
Rob Schripsema (7/26/2012)
L' Eomot Inversé (7/25/2012)

I could remember 3 of the four answers, but on the mirroring one I was racking my brains to no avail, and finally gave up and consulted BoL. The information seemed quite hard to find (for example, if I'd taken the first apparently relevant page I found in BoL, ALTER DATABASE Database Mirroring, at face value I would have got it horribly wrong. I ended up reading quite a bit. SO for me the question was a good learning experience.

I must be overlooking something ... I don't see any mention/discussion of mirroring in any of the referenced articles, or anywhere else for that matter. Where in BOL did you find the 'right' answer to this? (I got the mirroring one wrong, too!)

I guessed it based on this

"Benefit of Contained Database Users with AlwaysOn

Creating contained users enables the user to connect directly to the contained database. This is a very significant feature in high availability and disaster recovery scenarios such as in an AlwaysOn solution. If the users are contained users, in case of failover, people would be able to connect to the secondary without creating logins on the instance hosting the secondary. This provides an immediate benefit. For more information, see Overview of AlwaysOn Availability Groups (SQL Server) and Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups (SQL Server)."

in Contained Database article http://msdn.microsoft.com/en-us/library/ff929071.aspx

-------------------------------------------------------------
"It takes 15 minutes to learn the game and a lifetime to master"
"Share your knowledge. It's a way to achieve immortality."

Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63528 Visits: 13298
Nice question, thanks.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
WayneS
WayneS
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21940 Visits: 10653
Rob Schripsema (7/26/2012)
I must be overlooking something ... I don't see any mention/discussion of mirroring in any of the referenced articles, or anywhere else for that matter. Where in BOL did you find the 'right' answer to this? (I got the mirroring one wrong, too!)


I know when I wrote this question that it was mentioned in one of those references that I listed... but I can't find it in either.

However, in Prepare a Mirror Database for Mirroring, in the Limitations and Restrictions section, it mentions that the only databases you cannot mirror are master, model, msdb, tempdb and databases that are in an Always On Availability Group. Implying that all other databases can be mirrored.

I also notice a small error in my explanation. For the first reference, it should be "Contained Databases" and not "Create Table". (The link correctly goes to Contained Databases.)

Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings

C-Note
C-Note
SSC-Enthusiastic
SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)

Group: General Forum Members
Points: 100 Visits: 142
Dan Graveen (7/26/2012)
"How is it available, but it cannot be altered?"


This was exactly the question I was stumped on and exactly the logic I followed in assuming that contained dbs wouldn't support mirroring.

Very challenging, thanks!



Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26174 Visits: 12500
C-Note (7/27/2012)
Dan Graveen (7/26/2012)
"How is it available, but it cannot be altered?"


This was exactly the question I was stumped on and exactly the logic I followed in assuming that contained dbs wouldn't support mirroring.

Very challenging, thanks!


What makes you think it can't be altered?

The fact that a particular deprecated feature can't be use to alter this new feature? Or something else?

Tom

C-Note
C-Note
SSC-Enthusiastic
SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)SSC-Enthusiastic (100 reputation)

Group: General Forum Members
Points: 100 Visits: 142
L' Eomot Inversé (7/27/2012)
C-Note (7/27/2012)
Dan Graveen (7/26/2012)
"How is it available, but it cannot be altered?"


This was exactly the question I was stumped on and exactly the logic I followed in assuming that contained dbs wouldn't support mirroring.

Very challenging, thanks!


What makes you think it can't be altered?

The fact that a particular deprecated feature can't be use to alter this new feature? Or something else?


The following quote from this MDSN article:

"ALTER DATABASE database mirroring options are not available for a contained database."



Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26174 Visits: 12500
C-Note (7/27/2012)
L' Eomot Inversé (7/27/2012)
C-Note (7/27/2012)
Dan Graveen (7/26/2012)
"How is it available, but it cannot be altered?"


This was exactly the question I was stumped on and exactly the logic I followed in assuming that contained dbs wouldn't support mirroring.

Very challenging, thanks!


What makes you think it can't be altered?

The fact that a particular deprecated feature can't be use to alter this new feature? Or something else?


The following quote from this MDSN article:

"ALTER DATABASE database mirroring options are not available for a contained database."


That's a long-winded way to say "Yes, the fact that a deprecated feature can't be used to change a new feature", isn't it?

Right at the front of that specific article, before anything else, you have this very clear statement that ALTER DATABAE MIRRORING is deprecated:
BoL
Note

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use Always On Availability Groups instead.


It even tells you where to look for the new way of doing things.

Tom

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search