SQL Server 2012 notes Sharing-8: Understanding include Databases

Source: Internet
Author: User

Contains four core features of the database

A database that is separate from other databases and that is independent of the instance of SQL Server that hosts the database.

Many of the metadata used to describe the database is maintained in that database.

All metadata is defined using the same collation.

The database can perform user authentication, thereby reducing the database dependency on the login name of the SQL Server instance.

Contains database-resolved issues

Once you have isolated SQL Server 2012 containing databases, you can easily migrate them from one instance of SQL Server to another, without having to migrate a set of SQL Server logins. This included database stores all the information that is required within the database. This process also makes it easier to set up your high availability cluster. Because users are connected directly to the database, they can easily connect to the second database if a failover occurs. Even if you do not migrate or cluster your databases, SQL Server 2012 contains databases that make user account management easier because you do not have to try to manage both SQL Server logins and database user accounts. you can authorize specific users to access specific databases without worrying about users accessing those non-authorized items.

The partially contained database resolves some of the major merge and migration issues surrounding the SQL Server database since the release of SQL Server version 4.2. The first problem that the partially contained database resolves is to move the database from one instance of SQL Server to another instance of SQL Server without identifying the SQL Server logins that the database uses. This also involves creating these logins on the target DB instance. The second problem resolved is that the collation conflict between the table in the contained database and the staging table is effectively excluded. SQL Server automatically creates temporary tables within the scope of the contained database when it is collated. The new section contains databases that allow multiple collations to exist on the same instance of SQL Server. You do not need to worry about collation issues when joining temporary tables. & #160; This allows the same SQL Server instance to host a database with different collations without modifying the CREATE TABLE statement to specify the collation or without specifying the COLLATE statement in the syntax of the JOIN statement.

log in to the contained database by using the included login name. the difference is that the database name must be specified in the connection string when connecting with the contained user. If you do not do this, SQL Server will assume that a traditional SQL Server login is trying to establish a connection. If the login you are using does not match the user name and password defined by the instance level, the login will fail.

Contains database creation and use method reference


SQL Server 2012: Sometimes it's better to include only a subset

Http://technet.microsoft.com/zh-cn/magazine/hh534404.aspx

Detailed SQL Server2012 include database (Contained)

Http://software.cnw.com.cn/software-database/htm2013/20130915_282999.shtml

SQL Server 2012 new features (ii) Security new feature: Include Database

http://jimshu.blog.51cto.com/3171847/872711

This article from "Zeng Hung Xin Technical column" blog, declined to reprint!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.