Validate 方法

Validates the package with the specified connection and determines whether the specified server is valid.

命名空间:  Microsoft.SqlServer.Management.Dac
程序集:  Microsoft.SqlServer.Management.Dac(在 Microsoft.SqlServer.Management.Dac.dll 中)

语法

声明
Public Shared Function Validate ( _
    server As Server, _
    databaseName As String _
) As ExtractValidationException
用法
Dim server As Server
Dim databaseName As String
Dim returnValue As ExtractValidationException

returnValue = DatabaseExtractValidator.Validate(server, _
    databaseName)
public static ExtractValidationException Validate(
    Server server,
    string databaseName
)
public:
static ExtractValidationException^ Validate(
    Server^ server, 
    String^ databaseName
)
static member Validate : 
        server:Server * 
        databaseName:string -> ExtractValidationException 
public static function Validate(
    server : Server, 
    databaseName : String
) : ExtractValidationException

参数

返回值

类型:Microsoft.SqlServer.Management.Dac. . :: . .ExtractValidationException
A ExtractValidationException that specifies which problems were detected. Returns nullNothingnullptrunitnull 引用(在 Visual Basic 中为 Nothing) if no problems were detected.

注释

The Validate method checks to ensure that:

  • The server is not in Design Mode.

  • The database exists, and that information can be extracted from it.

  • The user has sufficient privileges to extract information from the database.