DBOption Object

Questa caratteristica verrà rimossa a partire da una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

The DBOption object represents the settings for Microsoft SQL Server database options for a specific SQL Server database.

Modello di oggetti SQL-DMO in cui è visualizzato l'oggetto corrente

Methods

Osservazioni

SQL Server database options control access to and behaviors for a specific SQL Server database. You can use the DBOption object to set the values for SQL Server database options.

To set a SQL Server database option

  1. Get the DBOption object from a Database object of a connected SQLServer object.

  2. Set properties to reflect the change you want in behavior. For example, set the value of the ReadOnly property to TRUE to enable read-only access to the database.

Changes to DBOption properties are reflected in the SQL Server database as they are made.

[!NOTA]

The DBOption object is compatible with instances of SQL Server version 7.0 and later. However, the DBOption2 object extends the functionality of the DBOption object for use with features that were introduced in SQL Server 2000.

Vedere anche

Riferimento