-
Notifications
You must be signed in to change notification settings - Fork 22
Problems with three-part (3-part) names from Azure SQL DB, self-referencing its own DB #611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am able to BUILD it if I replace the database name with [$(DatabaseName)]. Not able to test a deploy right now, hopefully tomorrow. But say I BUILD and PUBLISH it to dev, make my changes. When I EXTRACT again back into my git folder, I'd have to change all the database names back to [$(DatabaseName)] before doing a build & checkin. It doesn't seem like there's a good way to handle it overall. |
@mbourgon - is there a particular reason why you want to have 3-part naming in the database? While the syntax works in an isolated database for Azure SQL Database, if you were to do a point-in-time restore of the database to a database with a new name you would have to go through an edit the database objects before they would work. (in the meantime they would result in errors) |
Oh, hey, @dzsquared! (I've watched a LOT of your videos the past couple of weeks, while I work on this). LOL, you're internet-famous! Honestly, it's a migration thing. We had to move into Azure in a hurry, and not everything was best practices before (although we have taken the opportunity to migrate some databases from SQL Server to Azure SQL DB). So we're busy cleaning up (hence the CI/CD work), but in that database alone I was getting over 1000 warnings/errors. And while I would love to fix it all right now, practically I can't. Our goal was "get it checked in so that we're doing pipelines properly, and then we'll have some time to work on more tech-debt". You're right, it's not great. I got it working for my POC by changing using VerifyExtraction=False and then using regex to clean every file from "mydbname". to "[$(DatabaseName)]." , but that means I'm going to need to come up with some sort of post-script to do that each time we run "sqlpackage extract". Hope this helps. |
.NET SDK:
Version: 9.0.203
Commit: dc7acfa194
Workload version: 9.0.200-manifests.9df47798
MSBuild version: 17.13.20+a4ef1e90f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.203\
Steps to Reproduce:
Did this occur in prior versions? If not - which version(s) did it work in?
No idea - I'm just now trying to set up CI/CD.
(DacFx/SqlPackage/SSMS/Azure Data Studio)
Unsure which, I think DacFx because I'm having the same problem trying to BUILD it in ADS, BUILD it in VS Code (SDK-style database projects), Visual Studio Preview (BUILD from an "SDK-style database project (preview)" with the code) and EXTRACTing with SQLPackage.
The text was updated successfully, but these errors were encountered: