Freigeben über


ModelExtractOptions Class

Definition

Defines options that affect the behavior of loading a model from a database.

public sealed class ModelExtractOptions
type ModelExtractOptions = class
Public NotInheritable Class ModelExtractOptions
Inheritance
ModelExtractOptions

Constructors

ModelExtractOptions()

Construct a new instance of the ModelExtractOptions class.

Properties

ExtractApplicationScopedObjectsOnly

Get or set boolean that specifies the scope of objects extracted from the source.

ExtractReferencedServerScopedElements

Get or set boolean that specifies whether server-scoped elements referenced by the source should be extracted.

ExtractUsageProperties

Usage properties include Table.RowCount, Table.IndexSize, Table.DataSize, Table.UsedPages and Table.DataPages. When true, these properties are extracted from the database and are accessible in the model.

HashObjectNamesInLogs

When true, object names will be replaced with a hash value in all log messages.

IgnoreExtendedProperties

Get or set boolean that specifies whether extended properties should be ignored.

IgnorePermissions

Get or set boolean that specifies whether permissions should be ignored.

IgnoreUserLoginMappings

Get or set boolean that specifies whether mappings between users and logins should be extracted from the source.

LoadAsScriptBackedModel

Should the model be loaded so that objects are backed up by scripted representations? In this case objects in the UserDefined scope will have a source name and source position information.

When loading from a Dacpac or any other non-scripted source the model will not have source information. This means that when running static code analysis using the CodeAnalysisService some rules may not work correctly, and that existing objects in the model could not be replaced using the AddOrUpdateObjects(String, String, TSqlObjectOptions) method since there is no script with their original definition. For scenarios that use the CodeAnalysisService setting this to true is strongly recommended. Similarly if you wish to update existing objects in the model setting this to true may be useful.

Note that there is a potentially significant performance cost involved in creating a scripted model. All top level objects in the UserDefined scope will be scripted out as strings and then replaced with their scripted representations, after which the model will then have to fully resolve all relationships. This will cause a one-time performance hit at the time the model is loaded.

Storage

Get the type of backing storage for the schema model used during extraction.

VerifyExtraction

Get or set boolean that specifies whether the extracted package should be verified.

Applies to