Comments
1 comment
-
A couple things, first, rather than try to decode your PoSh, can you explain what and where you're trying to do something? We can't see your environment, so I have no idea where dev, test, production are or what the machines are.
Second, there is no issue with a database developed in any way. The first time you start using SCA to deploy, it will square things up.
Third, are you using SCA in VS as the client or SQL Source Control in SSMS for development? SCA biuld/release is the same, but it helps to guide you to know.
Next, the purpose of build is to validate your SQL. the purpose of seeing a target is to ensure we build a valid package. If you can't see production, you will have issues here, especially with drift. Drift isn't an issue overall, but you want to account for it, and so any issues need to be fed back to development (recommended) to clear the drift issues. If you use the SkipDriftCheck (?) flag, then you risk the package not deploying, which defeats the purpose of using a DevOps style flow for development.
If you can't connect to production, what I'd recommend is that you get a SQL Compare snapshot of prod and pull that back, load that to a staging database and use that as the target. You don't need data (really), just schema. Of course, data changes in your release aren't tested, but this is a lightweight way of getting schema deploys out. You can schedule this, make it part of the pipeline, or something else, but you need a good view of production schema to do the release packaging.
If that doesn't make sense, you have other questions, or I've misrepresented what you're doing, please let me know.
Add comment
Please sign in to leave a comment.
We're working on getting approval to poke a hole strictly from our build server to our production system to generate accurate reports and update scripts, but that could be a lengthy process. In the meantime, I'm trying to essentially take the built nuget package and rebuild it to reflect a different target database, simulating the handover of our package from Development to Production.
Working with the powershell commandlets, I've come up with the following approach:
But looking at the output in DoubleCheck, I'm getting a Changes and Drift report that tells me
So that leaves me with a few questions (besides the obvious one "Why am I doing this to myself?"):