다음을 통해 공유


SQLDacApplication [SPFSDK][VMROLE]

 

적용 대상: Windows Azure Pack

SQLDacApplication 개체는 Windows 기반 가상 머신이 프로비전될 때 SQL SERVER DAC(데이터 계층 애플리케이션)를 설치하는 설정을 제공합니다.

형식 계층 구조

ResourceExtension [SPFSDK][VMROLE]. ExtensionSettings [SPFSDK][VMROLE]. ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE]. SQLDacApplication

구문

{
    "DeploymentName": "string",

    "ScriptCommands": [
        <Script>
    ],

    "SQLScriptCommands": [
        {
            "DatabaseName": "string",
            "DeploymentOrder": integer,
            "EncryptConnection": boolean,
            "ExecutionTimeoutSeconds": integer,
            "LoginTimeoutSeconds": integer,
            "OutputFilePath": "string",
            "SQLAuthenticationType": "string",
            "CommandParameters": "string",
            "SQLScriptApplicationPayloadId": "string",
            "ScriptCredential": credential string,
            "ScriptType": "string",
        }
    ],

    "ApplicationPayloadId": "string",
    "BlockOnChanges": boolean,
    "DacInstance": "string",
    "IgnoreDataLoss": boolean,
    "RollbackOnFailure": boolean,
    "SQLAuthenticationType": "string",

    "SQLDeploymentCredential": credential string,

    "SQLInstance": "string",
    "SkipPolicyValidation": boolean,
    "UninstallMode": "string",
}

속성

이름

유형

필수

기본값

Description

DeploymentName

String

없음

배포의 이름입니다.

ScriptCommands

스크립트 배열 [SPFSDK][VMROLE]

아니요

null

프로비전 중에 실행할 스크립트입니다. Script.ScriptType 속성에 유효한 값은 다음과 같습니다.

  • 사전

  • PostInstall

  • PreService

  • PostService

  • PreUninstall

  • PostUninstall

SQLScriptCommands

SQLScriptCommand의 배열

아니요

null

SQL Server 데이터 계층 애플리케이션 설치와 함께 실행되는 transact SQL 스크립트 명령입니다.

ApplicationPayloadId

String

없음

ApplicationProfile.ApplicationPayload 항목의 식별자입니다. 이 페이로드는 Transact-SQL 스크립트 .sql 파일을 가리킵니다.

BlockOnChanges

부울

None

true이면 데이터베이스 드리프트가 있는 경우 SQL Server 데이터 계층 애플리케이션 업그레이드가 실패했음을 나타냅니다.

자세한 내용은 다음을 참조하세요https://go.microsoft.com/fwlink/?LinkID=307133.

DacInstance

String

없음

SQL Server 인스턴스의 SQL Server 데이터 계층 애플리케이션 이름입니다.

IgnoreDataLoss

부울

None

true이면 SQL Server 데이터 계층 애플리케이션 업그레이드에서 데이터 손실 오류를 무시해야 했음을 나타냅니다.

자세한 내용은 다음을 참조하세요https://go.microsoft.com/fwlink/?LinkID=307133.

RollbackOnFailure

부울

없음

true이면 업그레이드 오류가 있는 경우 데이터베이스를 롤백해야 했음을 나타냅니다.

자세한 내용은 다음을 참조하세요https://go.microsoft.com/fwlink/?LinkID=307133.

SQLAuthenticationType

String

없음

SQL Server 데이터 계층 애플리케이션을 배포하는 데 사용되는 인증 유형입니다. 유효한 값은 다음과 같습니다.

  • WindowsAuthentication

  • SQLAuthentication

SQLDeploymentCredential

String

없음

SQL Server 데이터 계층 애플리케이션을 설치하는 동안 도메인\username:password 형식으로 사용할 자격 증명입니다.

SQLInstance

String

MSSQLSERVER

SQL Server 데이터 계층 애플리케이션을 배포할 SQL Server 인스턴스의 이름입니다.

SkipPolicyValidation

부울

없음

true이면 SQL Server 데이터 계층 애플리케이션을 업그레이드할 때 SQL Server 정책 유효성 검사를 건너뛰어야 했음을 나타냅니다.

자세한 내용은 다음을 참조하세요https://go.microsoft.com/fwlink/?LinkID=307133.

UninstallMode

String

없음

데이터베이스와 관련된 SQL Server 데이터 계층 애플리케이션의 제거 동작입니다. 유효한 값은 다음과 같습니다.

  • MakeUnmanaged

  • DetachDatabase

  • DropDatabase

자세한 내용은 다음을 참조하세요https://go.microsoft.com/fwlink/?LinkID=307135.

SQLScriptCommand

이 섹션에서 사용하는 Virtual Machine ManagerWindows PowerShell 스크립트에 대한 자세한 내용은 다음을 참조하세요 https://go.microsoft.com/fwlink/?LinkID=218391.

이름

유형

필수

기본값

Description

DatabaseName

String

없음

이 스크립트 명령을 실행할 데이터베이스의 이름입니다.

DeploymentOrder

Int

없음

이 스크립트 명령을 실행할 순서입니다.

EncryptConnection

부울

거짓

true이면 SQL Server 인스턴스에 대한 연결의 암호화를 나타냅니다.

ExecutionTimeoutSeconds

Int

없음

스크립트 명령에 대한 제한 시간(초)입니다.

LoginTimeoutSeconds

없음

SQL Server 인스턴스에 대한 연결을 설정하는 제한 시간(초)입니다.

OutputFilePath

String

None

모든 출력을 캡처할 로그 파일 경로입니다.

SQLAuthenticationType

String

없음

SQL Server 데이터 계층 애플리케이션을 배포하는 데 사용되는 인증 유형입니다. 유효한 값은 다음과 같습니다.

  • WindowsAuthentication

  • SQLAuthentication

CommandParameters

String

null

SQL 명령에 사용할 명령 매개 변수의 이름-값 쌍입니다.

자세한 내용은 Sqlcmd 도구 설명서의 -v 스위치를 참조하세요 https://go.microsoft.com/fwlink/?LinkID=154481.

SQLScriptApplicationPayloadId

String

없음

ApplicationProfile.ApplicationPayload 항목의 식별자입니다. 이 페이로드는 Transact SQL 스크립트 .sql 파일을 가리킵니다.

ScriptCredential

String

없음

도메인\username:password 형식으로 스크립트를 실행하는 데 사용되는 자격 증명입니다.

ScriptType

String

없음

스크립트를 실행해야 하는 경우에 대한 사양입니다. 유효한 값은 다음과 같습니다.

  • 사전

  • PostInstall

  • PreService

  • PostService

  • PreUninstall

  • PostUninstall

설명

다음 코드 예제에서는 샘플 SQLDacApplication 개체를 제공합니다.

{
    "DeploymentName": "SQL App 1",

    "ScriptCommands": [
        {
            "AlwaysReboot": false,
            "ApplicationPayloadId": null,
            "ErrorPolicy": "FailOnMatch",
            "ExecutableAndParams": null,
            "ExitCodeRegex": "[1-9][0-9]*",
            "MaxOutputSize": 1048576,
            "RebootExitCodeRegex": "{1641}|{3010}|{3011}",
            "RestartOnRetry": false,
            "ScriptBlock": "rem some script that needs to run before sqldac package is installed",
            "ScriptCredential": {
                "Password": "mypassword4",
                "UserName": "dcmanagerlab\\esdcvsec4"
            },
            "ScriptType": "PreInstall",
            "StandardErrorPath": "c:\\err.txt",
            "StandardErrorRegex": ".+",
            "StandardInput": null,
            "StandardOutputPath": "c:\\out.txt",
            "StandardOutputRegex": null,
            "TimeoutInSeconds": 900,
            "WorkingDirectory": null
        }
    ],

    "SQLScriptCommands": [
        {
            "DatabaseName": "[Param.SharepointDB]",
            "DeploymentOrder": 1,
            "EncryptConnection": false,
            "ExecutionTimeoutSeconds": 500,
            "LoginTimeoutSeconds": 50,
            "OutputFilePath": "c:\\sharepointDB.sql.log",
            "SQLAuthenticationType": "WindowsAuthentication",
            "CommandParameters" : "VAR1=42 VAR2=\"Example String\"",
            "SQLScriptApplicationPayloadId": "db04416b-d0a8-44d5-b0ee-d5739378a98d",
            "ScriptCredential": "[Param.SQLScriptCommandCredential]",
            "ScriptType": "PostInstall"
        }
    ],

    "ApplicationPayloadId": "5b064b6a-d6d0-48f0-8979-9aafc676a9e5",
    "BlockOnChanges": false,
    "DacInstance": "[Param.SharepointDB]",
    "IgnoreDataLoss": false,
    "RollbackOnFailure": true,
    "SQLAuthenticationType": "WindowsAuthentication",

    "SQLDeploymentCredential": "[param.SQLDeploymentCredential]",

    "SQLInstance": "[Param.SQLInstance]",
    "SkipPolicyValidation": true,
    "UninstallMode": "DropDatabase"
}

참고 항목

ApplicationProfile.WindowsApplicationProfile [SPFSDK][VMROLE]
SQLProfile [SPFSDK][VMROLE]
WebDeployApplication [SPFSDK][VMROLE]
ScriptApplication [SPFSDK][VMROLE]
스크립트 [SPFSDK][VMROLE]