martes, 17 de abril de 2012

Enabling contained Databases in SQL Server 2012

First of all you've to allow to your instance to use Contained Databases.

There are two ways, with GUI, or T-SQL:

In Advanced options for Server properties



Executing this statements

EXEC sys.sp_configure N'contained database authentication', N'1' GO RECONFIGURE WITH OVERRIDE GO


Then can use contained databases.

For specifying a contained DB you can go to Option menu for the Database Properties.



Or execute the T-SQL

USE [master] GO ALTER DATABASE [XYZ] SET CONTAINMENT = PARTIAL WITH NO_WAIT GO


If you want to create a new Contained Database:

CREATE DATABASE XYZ CONTAINMENT = PARTIAL

No hay comentarios:

Publicar un comentario