I am an administrator of Azure DevOps Server 2019 Update 1.1 in an organization. I will migrate our collection from the on-premises server to Azure DevOps Services. Currently, I am on the step of using SqlPackage.exe to generate a DACPAC file. https://learn.microsoft.com/en-us/azure/devops/migrate/migration-import?view=azure-devops
According to this reference, the command example to generate DACPAC is as below.
SqlPackage.exe /sourceconnectionstring:"Data Source=localhost;Initial Catalog=Foo;Integrated Security=True" /targetFile:C:\DACPAC\Foo.dacpac /action:extract /p:ExtractAllTableData=true /p:IgnoreUserLoginMappings=true /p:IgnorePermissions=true /p:Storage=Memory
However, I cannot understand what is Initial Catalog.
The reference said Initial Catalog - Name of the collection database.
But I could not find the name of the collection database in Azure DevOps Server management console.
I referred another article on dev.to
https://dev.to/timothymcgrath/the-great-azure-devops-migration-part-6-import-2obc
By this article, Initial Catalog=[COLLECTION_NAME]
,
and the collection name in my Azure DevOps Server is "DefaultCollection" (default name).
Then, I tried the following command then failed.
C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130> ./SqlPackage.exe /sourceconnectionstring:”Data Source=localhost;Initial Catalog=DefaultCollection;Integrated Security=True” /targetFile:C:\DefaultCollection.dacpac /action:extract /p:ExtractAllTableData=true /p:IgnoreUserLoginMappings=true /p:IgnorePermissions=true /p:Storage=Memory
Connecting to database 'DefaultCollection' on server 'localhost'.
Extracting schema
Extracting schema from database
*** Error extracting database:Could not connect to database server.
(provider: Named Pipes Provider, error: 40
Is this error caused by wrong Initial Catalog?
How do I find the correct Initial Catalog - Name of the collection database?
Environment and pre-conditions
- Windows 10 Pro
- SqlPackage.exe installed from SSDT for Visual Studio 2017
- The machine where commands are executed and where Azure DevOps Server running is the same
- so,
DataSource=localhost
should be correct, I think
- so,
- Detached my collection by Azure DevOps Server management console
- SQL Server Express for my Azure DevOps server is running