Comments
Sort by recent activity
In my experience DevOps is an enabler, not a hoop to jump through. If people are seeing it as hoops they have the wrong idea. The purpose of DevOps is to enable them to respond quickly. Part of DevOps is the freedom to branch, fix, merge, build, test and deploy, in a mostly automated fashion, in minutes. The hoop is simply that theyneed to learn to use modern technologies. And if you start a career in IT and you don't see staying up to date with modern technologies as pert of your job you were mis-sold.
Regarding the users adopting and getting trained up in Git: While Git is undoubtedly the obvious VCS in 2017, it is possible to adopt DevOps using a different VCS. These users, are they developers? If so they need to wake up to the fact that version control is non-negotiable in modern software development - regardless of the software language they use. / comments
In my experience DevOps is an enabler, not a hoop to jump through. If people are seeing it as hoops they have the wrong idea. The purpose of DevOps is to enable them to respond quickly. Part of Dev...
You are right. It sounds like those docs were aimed at TFS/SVN style source control systems which manage branching differently.
If using Git you can switch branch using Source Tree or raw git commands etc as you like. Then, on the database you'll want to go to the Get Latest tab, select any changes and click "Apply changes". (I'm assuming you linked using the "Git" option. If you linked using the "Working Folder" or custom hook file option the process is the same accept the button is called "Get Latest", not "Apply changes".)
Altternatively, you could provision a new database for the other branch. Some people prefer to do it this way because making wholesale changes to a database if the branches are very different can be ... fun. Especially if there are lots of table refactors/migration scripts involved.
I hope you are using the dedicated model. Doing this in the shared model sounds like a nightmare from a provisioning/team workflow perspective. / comments
You are right. It sounds like those docs were aimed at TFS/SVN style source control systems which manage branching differently.
If using Git you can switch branch using Source Tree or raw git comma...
It is easier to learn new things than I thought. And it’s important that I keep doing it. / comments
It is easier to learn new things than I thought. And it’s important that I keep doing it.
Migration scripts are not optimised for your use case. Migration scripts are designed for occasional use, for example when you need to override the default behaviour. (e.g. to handle a column split which SQL Compre can't work out by itself). If you have lots of migration scripts you will hit peformance issues.
If you want to script out *every* change for deployment you should look at ReadyRoll instead. This is designed to serve your specific use case and will perform much better for you. / comments
Migration scripts are not optimised for your use case. Migration scripts are designed for occasional use, for example when you need to override the default behaviour. (e.g. to handle a column split...
SQL Data Compare command line documentation: https://documentation.red-gate.com/display/SDC12/Using+the+command+line / comments
SQL Data Compare command line documentation:https://documentation.red-gate.com/display/SDC12/Using+the+command+line
The build will run on a Bamboo build agent (not the server).
That agent must have a Windows OS and have DLM Automation installed. / comments
The build will run on a Bamboo build agent (not the server).
That agent must have a Windows OS and have DLM Automation installed.
Sync-DlmDatabaseSchema uses SQL Compare under the hood. SQL Compare wraps the entire update into a single transaction. If there are errors at run time the transaction is rolled back. That is why your changes are not being deployed.
This is by design - it is to protect the user from ending up in a position where only half the changes have been deployed and they need to unpick the mess.
In order to solve your problem I propose two solutions. The first is quicker to implement, the second is more effort but safer: Option 1: Ignore transactions
Of course, you now lose the benefit of transaction, but this should be a quick and easy way to force the behaviour you want.
SQL Compare has various options that you can set, one of which is NoTransations (or nt). To run Sync-DlmDatabaseConnection with this option you could write a script that looks something like this:
$options = "NoTransactions"
Sync-DlmDatabaseSchema -Source $someScriptsFolder -Target $someDlmDatabaseConnection -SQLCompareOptions $options Option 2: Filter files
If you would like to only deploy specific objects but you would like to keep the security of transactions you should use filters to either filter the objects out of source control our your deployment. You can filter objects out of source control using the SQL Source Control GUI. To filter the objects out at deployment time you can use -FilterPath to reference a .scpf file. The command is documented here: https://documentation.red-gate.com/display/DLMA2/Sync-DlmDatabaseSchema
Creating a .scpf file is documented here: https://documentation.red-gate.com/display/SC12/Using+filters / comments
Sync-DlmDatabaseSchema uses SQL Compare under the hood. SQL Compare wraps the entire update into a single transaction. If there are errors at run time the transaction is rolled back. That is why yo...
Hi Anant,
Did user A and B commit their changes yet or are we talking about uncommitted changes?
The history is read from the source control system, in your case TFS. If user A and user B had not yet committed changes you just see the last TFS version vs latest db version and the most recent author's username in the commit tab. (This information is retrieved from the default trace).
If both users had committed to source control I would have expected both changes to show up in the history tab. If this is not happening probably you should speak to the dev team. (Mike U :-)
Of course, this does mean there is a possibility that one user might overwrite another persons code if the first developer had not yet committed to source control. If this concerns you take a look at the locking feature: https://documentation.red-gate.com/display/SOC5/Lock+an+object
However, a better fix would be to switch to using the dedicated model if possible. / comments
Hi Anant,
Did user A and B commit their changes yet or are we talking about uncommitted changes?
The history is read from the source control system, in your case TFS. If user A and user B had not y...
OK - sounds like either the product either isn't configured correctly or isn't working properly. I'll let you figure that out with the folks from Redgate.
However, I would pick up on your point about people changing the same objects at the same time. That's often exactly why people like to use the dedicated model. The dedicated model handles conflicts much more elegantly and avoids the risk that one developer will accidentally overwrite the other developer's code.
Imagine the database was C# source code. The dedicated model is a bit like everyone having their own checkout or locel repo - which is the conventional way of working. In contrast, the shared model is like sticking your source code on a file share and letting everyone edit it at the same time. / comments
OK - sounds like either the product either isn't configured correctly or isn't working properly. I'll let you figure that out with the folks from Redgate.
However, I would pick up on your point abo...
You can use SQL Compare Pro to compare your database to a set of folders and to update them. You can set scripts folder as either the source or target. https://documentation.red-gate.com/display/SC12/Working+with+scripts+folders
Are you using TFGit or TFVC? If you are using TFGit you can just use SQL Compare to update your local repo based on the DB version and commit/push. That should sort ouut your sync issues.
If using TFVC I cannot remember off the top of my head where the Git checkout gets mapped to and whether this will work. David or one of the dev team can probably help. / comments
You can use SQL Compare Pro to compare your database to a set of folders and to update them. You can set scripts folder as either the source or target.https://documentation.red-gate.com/display/SC1...