Database.DatabaseOptions プロパティ

データベースの構成オプションを含む DatabaseOptions オブジェクトを取得します。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)> _
Public ReadOnly Property DatabaseOptions As DatabaseOptions 
    Get
'使用
Dim instance As Database 
Dim value As DatabaseOptions 

value = instance.DatabaseOptions
[SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)]
public DatabaseOptions DatabaseOptions { get; }
[SfcObjectAttribute(SfcObjectRelationship::ChildObject, SfcObjectCardinality::One)]
public:
property DatabaseOptions^ DatabaseOptions {
    DatabaseOptions^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.One)>]
member DatabaseOptions : DatabaseOptions
function get DatabaseOptions () : DatabaseOptions

プロパティ値

型: Microsoft.SqlServer.Management.Smo.DatabaseOptions
データベース構成オプションを含む DatabaseOptions オブジェクトの値。

説明

DatabaseOptions プロパティは、DatabaseOptions オブジェクトを参照しています。 DatabaseOptions オブジェクトには、ANSI、統計情報、ミラーリング設定など、データベース オプションを制御するブール型プロパティのセットが格納されています。

使用例

VB

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks2012 database.
Dim db As Database
db = srv.Databases("AdventureWorks2012")

'Force parameterization on the database by setting database options.
db.DatabaseOptions.IsParameterizationForced = True

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")

$db.DatabaseOptions.IsParameterizationForced = $TRUE

関連項目

参照

Database クラス

Microsoft.SqlServer.Management.Smo 名前空間

その他の技術情報

データベース オブジェクトでの作業

データベース オプションの設定

データベースの作成、変更、および削除

CREATE DATABASE (Transact-SQL)