SET_SQL_CONTAINED_DB_MODE¶
Applies to: SQLFlex
Turns on (True) or off (False) contained db mode. Connecting to a contained db is a bit different in that you’re connecting to the database rather than to the server. When using this mode (which should be specified BEFORE login) you are not able to use/switch to another database because your connection is isolated to this database. This mode is used for Always On Failover Clustering as well. When connecting to a failover cluster, a contained db must be used. Also, when logging in, the server name should be the failover cluster name rather than the individual server instance name.
Syntax
SET_SQL_CONTAINED_DB_MODE to {True|False}
Parameter |
Description |
---|---|
mode |
Turn on (True) or off (False) contained db mode. It is off by default. |
Example
SET_SQL_CONTAINED_DB_MODE to True