“A contained database is a database that is isolated from other databases and from the instance of SQL Server that hosts the database. SQL Server 2014 helps user to isolate their database from the instance in 4 ways.
- Much of the metadata that describes a database is maintained in the database. (In addition to, or instead of, maintaining metadata in the master database.)
- All metadata are defined using the same collation.
- User authentication can be performed by the database, reducing the databases dependency on the logins of the instance of SQL Server.
- The SQL Server environment (DMV’s, XEvents, etc.) reports and can act upon containment information.”
EXEC sys.sp_configure N’contained database authentication’, N’1′
RECONFIGURE WITH OVERRIDE
ALTER DATABASE [MyDemoDB] SET CONTAINMENT = PARTIAL WITH NO_WAIT