Contained database in SQL server | How to create a contained database | Ms SQL

Veröffentlicht am: 01 Januar 2024
auf dem Kanal: Right to Learn @BK
3,144
82

Contained databases feature is available at instance level and it is not enabled by default.
If we want to create a new database as a contained database, we have to make containment type as Partial in the Options page.

Contained database feature provides two containment modes:
None – By default each database has its mode set as NONE. This means there is no contained database feature being used.
Partial – With partially contained databases, we can define boundaries between databases and the server, so the metadata will exist inside the databases. It makes SQL Server databases more portable and less dependent on underlying hosts.

Before allowing contained databases, one should understand the risks associated with contained databases. Click below link to check the Best Practices with Contained Databases.
https://learn.microsoft.com/en-us/sql...


--To check if database is contained
select containment,name from sys.databases where name='DEMO'

--To check which users are listed as contained users
SELECT name,type_desc,authentication_type_desc
FROM sys.database_principals WHERE authentication_type =2

Please watch complete video for a better understanding ‪@righttolearnbk‬


Auf dieser Seite können Sie das Online-Video Contained database in SQL server | How to create a contained database | Ms SQL mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Right to Learn @BK 01 Januar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,144 Mal angesehen und es wurde von 82 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!