Sqlpackage.exe 在初始化时卡住。

huangapple go评论62阅读模式
英文:

Sqlpackage.exe stucks on initialization

问题

使用sqlpackage.exe进行Synapse部署,版本为162.0.52.1。

在初始化过程中,它卡在这一步:

Sqlpackage.exe 在初始化时卡住。
有人知道如何解决吗?

英文:

Am using sqlpackage.exe for synapse deployment, version 162.0.52.1.

During the initialization, it stucks at this step:

Sqlpackage.exe 在初始化时卡住。
Does anybody know, how to solve it?

答案1

得分: 0

我尝试将Dacpac文件发布到Azure SQL,并通过sql.exe包和SqlAzureDacpacDeployment运行Yaml管道成功:

我在我的代理中安装了microsoft.sqlpackage,然后检查了SQL包的版本,然后我运行了sql.exe命令来发布dacpac文件到Azure SQL。您可以将我的sql.exe命令替换为您自己的。我还运行了单独的SQLAzureDacpacDeployment任务。请参考以下内容:

我的代码库:Sqlpackage.exe 在初始化时卡住。

YAML脚本:

trigger:
- master

pool:
  vmImage: windows-latest

steps:
- script: echo Hello, world!
  displayName: '运行一行脚本'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'dotnet tool install -g microsoft.sqlpackage'

- script: SqlPackage /version
  workingDirectory: $(System.DefaultWorkingDirectory)
  displayName: '获取sqlpackage版本'

- script: sqlpackage.exe /action:Publish /SourceFile:"$(System.DefaultWorkingDirectory)/Database1.dacpac"  /TargetServerName:"xxxxnserver.database.windows.net,1433" /TargetDatabaseName:"username" /TargetUser:"CloudSAbe337ad4" /TargetPassword:"Password"
  workingDirectory: $(System.DefaultWorkingDirectory)
  displayName: '运行sqlpackage命令'
- task: SqlAzureDacpacDeployment@1
  inputs:
    azureSubscription: 'devopsappsilicon'
    AuthenticationType: 'server'
    ServerName: 'xxxxserver.database.windows.net'
    DatabaseName: 'silicondb'
    SqlUsername: 'username'
    SqlPassword: 'Password'
    deployType: 'DacpacTask'
    DeploymentAction: 'Publish'
    DacpacFile: '$(System.DefaultWorkingDirectory)/Database1.dacpac'
    IpDetectionMethod: 'IPAddressRange'
    StartIpAddress: '0.0.0.0'
    EndIpAddress: '255.255.255.255'

Sqlpackage.exe 在初始化时卡住。

Sqlpackage.exe 在初始化时卡住。

参考链接:

SqlPackage for Azure Synapse Analytics - SQL Server | Microsoft Learn

SqlPackage in development pipelines - SQL Server | Microsoft Learn

英文:

I tried publishing Dacpac File to Azure SQL and via sql.exe package and SqlAzureDacpacDeployment the Yaml pipeline ran successfully:-

I installed microsoft.sqlpackage in my agent and then checked the SQL package version, Then I ran sql.exe command to publish the dacpac file into Azure SQL. You can replace my sql.exe command below with yours. I also ran separate SQLAzureDacpacDeployment task. Refer below:-

My repository:-

Sqlpackage.exe 在初始化时卡住。

YAML Script:-

trigger:
- master

pool:
  vmImage: windows-latest

steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'dotnet tool install -g microsoft.sqlpackage'

- script: SqlPackage /version
  workingDirectory: $(System.DefaultWorkingDirectory)
  displayName: 'get sqlpackage version'

- script: sqlpackage.exe /action:Publish /SourceFile:"$(System.DefaultWorkingDirectory)/Database1.dacpac"  /TargetServerName:"xxxxnserver.database.windows.net,1433" /TargetDatabaseName:"username" /TargetUser:"CloudSAbe337ad4" /TargetPassword:"Password"
  workingDirectory: $(System.DefaultWorkingDirectory)
  displayName: 'get sqlpackage version'
- task: SqlAzureDacpacDeployment@1
  inputs:
    azureSubscription: 'devopsappsilicon'
    AuthenticationType: 'server'
    ServerName: 'xxxxserver.database.windows.net'
    DatabaseName: 'silicondb'
    SqlUsername: 'username'
    SqlPassword: 'Password'
    deployType: 'DacpacTask'
    DeploymentAction: 'Publish'
    DacpacFile: '$(System.DefaultWorkingDirectory)/Database1.dacpac'
    IpDetectionMethod: 'IPAddressRange'
    StartIpAddress: '0.0.0.0'
    EndIpAddress: '255.255.255.255'

Sqlpackage.exe 在初始化时卡住。

Sqlpackage.exe 在初始化时卡住。

References:-

SqlPackage for Azure Synapse Analytics - SQL Server | Microsoft Learn

SqlPackage in development pipelines - SQL Server | Microsoft Learn

答案2

得分: 0

There were to less RAM on agent for the schema comparison there.
SQLPackage.exe的模式比较步骤将RAM利用率从3GB增加到14GB:
在这种情况下,使用了Azure DevOps代理进行执行。默认情况下,托管代理只有7GB可用的RAM:
链接:https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#hardware

英文:

There were to less RAM on agent for the schema comparison there.

The schema comparison step of sqlpackage.exe increased the RAM utilization from 3GB to 14GB:
Sqlpackage.exe 在初始化时卡住。

In this case, there was a Azure DevOps Agent used for the execution. By default, there are only 7GB RAM available for hosted Agents:
Sqlpackage.exe 在初始化时卡住。

https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#hardware

huangapple
  • 本文由 发表于 2023年7月17日 22:16:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76705368.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定