587 results found
-
SQL Source Control Static Views (or Table Subsets using WHERE clause)
I would like the ability to source control a subset of a table (perhaps using a view).
I have inherited a database where lookup data is intermixed with user defined data. We reference the lookup data in the table using a code (VARCHAR) that is unique when another field is NULL, so it is possible to ensure that records are created/updated/deleted without concern for the primary key involved.
For more information, you can refer to this forum post:
http://www.red-gate.com/messageboard/viewtopic.php?p=50087636 votesHi everyone. I have merged some User Voice items on this topic of “filtered” static data, as there was significant overlap. I want to share our current guidance on handling scenarios where you need to version a subset of the columns and/or rows in the table.
With SQL Source control, the best option at this point is to use a post-deployment script for this purpose.
SQL Source Control introduced pre- and post- scripts in v6.3.
A post-deployment script gives you a good amount of flexibility over exactly which rows or columns of data you want to include in your project. Example post-deployment scripts for static data are here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data
If you make heavy use of Static Data, we have stronger support for this in SQL Change Automation.
SQL Change Automation:
- Supports column filtered static data tables in the SCA plugin in SSMS
- Supports multiple post-deployment scripts, in case there is…
-
Make SQL Data Easier to Merge (Static Data)
Currently, SQL Data files contain a bunch of insert statements, but the order of the insert statements can be inconsistent. For example, new records might get inserted on the top or the bottom. Also, multiple SET IDENTITYINSERT statements sometimes get created. This makes it difficuly to merge data changes between multiple branches in TFS Source Control. If the Insert statements had a consistent order and only included one SET IDENTITYINSERT diffs and merges would be easier.
530 votesThanks for this suggestion and for the many comments and upvotes. I realize that this is a pain point.
I have a few shorter-term workarounds to summarize as well as some information on the longer roadmap in this update. I know these shorter-term workarounds aren’t perfect (I summarize the pros and cons), but I’m posting them as they may help a few folks.
Workaround 1) When data changes to static data need to be made, use a “relink the table” pattern
One can “cleanly rescript” a static data table in SQL Source Control by:- Unlinking the static data table
- Committing
- Relinking the static data table
- Committing
Pro: This works with the GUI and requires no special knowledge or comfort with TSQL. This may help folks with just a few static data tables.
Con: This requires extra steps and results in extra commits in the history, which I realize can… -
Agent jobs
Would be great if SQL Server Agent jobs could be incorporated into SVN
480 votesThank you everyone for your comments and votes on this over the years. While I don’t have a 100% full resolution for this suggestion, I can sum up our current recommendations here. Continued feedback is very welcome.
Our current recommendation is to use the post-deployment script feature of SQL Source Control (released in V6.3) to manage SQL Server Agent jobs.
An example script for this is here: https://documentation.red-gate.com/soc/common-tasks/working-with-pre-post-deployment-scripts/create-sql-server-agent-job
As some commenters in this thread have alluded to, it is possible (and sometimes very common) for SQL Agent jobs to have steps that touch multiple databases on a single SQL Server Instance. For this reason, some customers prefer to create a separate database for instance-level management and objects (sometimes named DBA or similar) and choose to manage things like linked servers and SQL Agent jobs with the post-script associated with that database.
This separate-database architecture also makes sense if the jobs…
-
Command line tool (or API) for SQL Source Control Integration
We have an automated system for building our developer environments. It would be nice to have a command line tool that we can use as part of the machine build script to pull down the latest version of the database, build the initial database and link that database back to the TFS source. Our platform consists of quite a large number of databases so linking to them all manually via the UI is a bit tedious.
476 votesThank you everyone for the suggestions and votes for this over the years.
I’d like to surface up a workaround for the “linking” problem which is mentioned in the comments. For the use case of easing pains around environment setup with a large number of databases, we have had customers find success using code based off Alessandro Alpi’s blog post: https://alessandroalpi.blog/2016/06/28/automatically-link-databases-to-red-gate-sql-source-control/
I do understand that this is a broader issue and hear that many of you also want command line or API support for the product in general.
If there are specific scenarios or workflows that would be useful to automate for you, this feedback is also very useful, and if you have details on the type of VCS you use and the workflow (such as a branching model) that it would fit in to, that would be very helpful for us to hear as well.
-
Support Azure Active Directory Authentication
This has over 50 votes but its in SQL Prompt. This is a HUGE pain for us as we need to use AD to adhere to security policy.
https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/15008409-add-support-for-azure-active-directory-authenticat285 votesThanks to everyone for submitting feedback on this in the form of both voting and comments.
Currently, SQL Source Control does not have strong support for Azure SQL Database: as folks have noted in this item, AAD support, particularly with multi-factor authentication, is desired. Currently SQL Source Control does not work at all with Azure SQL Database with MFA enabled.
An additional issue worth mentioning is that pains with SQL Source Control performance may be worse than interacting with Azure SQL Database due to latency.
We would like to improve the user experience and support for Azure SQL Database, and doing so almost certainly involves addressing both of these issues. This is an area we are beginning to investigate more fully.
-
Support different static data per customer
I have a single schema for all customers but different reference data for different customers. It would be nice if I could manage this all within SQL Source Control. This should also be understood by SQL Compare and my continuous integration system when it comes time to deploy this to my different environments and customers' sites.
254 votesHi all. Thank you for your votes and feedback on this issue over the years. Here is our current guidance for this suggestion:
Post-deployment scripts give you flexibility for static data
With SQL Source Control, you can now use a post-deployment script to “dynamically” deploy static data based on a factor such as @@SERVERNAME or other query-able conditions.
SQL Source Control introduced pre- and post- scripts in v6.3.
An example post-deployment script which shows how to control deployment of static data by environment is here: https://documentation.red-gate.com/soc7/common-tasks/working-with-pre-post-deployment-scripts/static-data
If you make heavy use of Static Data, we have stronger support for this in SQL Change Automation.
SQL Change Automation:
- Supports column filtered static data tables in the SCA plugin in SSMS
Supports multiple post-deployment scripts, in case there is a preference to manage static data tables in dedicated post-deployment scripts - Allows approaches like bulk loading larger static data tables by supporting SQLCMD…
- Supports column filtered static data tables in the SCA plugin in SSMS
-
Work with multiple databases at a time
Why not offer a "SQL Source Control" entry in the right-click menu for the instance itself, so that I can look through/update/commit changes to/from several databases at once? Why do I have to specify a separate link for each database I'm interested in? Starting at the instance level would allow me to not only find all changes, it would also permit tracking objects within the instance but outside any database, such as "Security/Logins", "Security/Server Roles", "SQL Server Agent/Jobs", "Server Objects/Endpoints", and "Server Objects/Linked Servers".
215 votes -
Work with a Visual Studio Database Project
Can this work if I already have a VS Database project setup? Meaning can this work and interact with a VS Database project so that I can continue working on the actual db in SSMS, but the files get saved to the VS Db Project?
215 votes -
Change branches from SSMS.
If you use multiple branches for a database and you need to switch branches there is no way to change branches in SSMS. While opening some UI for git or using the command line is not difficult it would be nice to just switch to some branch, pull and apply changes, as needed/wanted all inside of SSMS
207 votes -
Undo data changes
I can undo any DDL operation but I don't have the option to undo a data change in a source controlled table. I think data changes should also be in the list of changes I can undo.
200 votesKendra respondedWhile SQL Source Control does not currently provide a simple way to right click and ‘Undo’ static data changes on the ‘Commit’ screen as suggested, there is a workaround which may help some users.
If you wish to revert the static data in the table to a previous version which you have committed, you can do this by viewing the history of commits for the object in SQL Source Control, and then launching SQL Data Compare to update the database.
Please note that this workaround requires a license for Data Compare. More detail on how to do this are here: https://documentation.red-gate.com/soc/common-tasks/update-to-a-revision-from-source-control
-
Get specific version from source control (SVN: Update to revision)
Instead of Get Latest, I want to be able to get a specific version out of source control and reapply it to the database. This would allow me to rollback changes that were accidentally committed. I should be able to specify what version/revision that I want to go back to.
This is the same as getting a previous version from source control so that I can debug an issue a user found in a previous release.
189 votesWhile SQL Source Control provides a way to view object history, it does require additional tooling to update your database to a specific version from history.
We currently have documentation on how this works here: https://documentation.red-gate.com/soc/common-tasks/update-to-a-revision-from-source-control
-
Database Diagrams
Support to check-in database diagrams
156 votes -
Add support for Azure Data Studio (formerly SQL Operations Studio)
Azure Data Studio (formerly SQL Operations Studio) is the open source successor to SSMS kind of like VS Code is the open source successor to Visual Studio.
Please create an extension for SQL Source Control to work with Azure Data Studio.
https://github.com/Microsoft/sqlopsstudio
https://docs.microsoft.com/en-us/sql/sql-operations-studio/download
137 votes -
Add ability to associate check ins with Work Items in TFS
Visual Studio already allows this which keeps track of which Source Control items go with which Change Control items. This would also be greatly beneficial if we could associate the database changes as well.
135 votesHi – this request was closed when the ‘TFS work items’ feature was released. http://documentation.red-gate.com/display/SOC3/Committing+changes
However, we’re still hearing about this enough that I’d agree with commenter Ben: it should be reopened.
We will continue to gauge interest here on UserVoice. Please do tell us more in the comments about what you expect to be able to do with Work Items in SQL Source Control.
-
Improved object merge support - Provide ability to merge a conflicted object, instead of just Keep Mine or Take Theirs
I have seen no way on how to actually do a merge with SVN and mark as merged etc
We really need a more inutuitive way to merge the changes to SVN and vice versa. At the moment I am getting conflicts that I can't put into SVN because there is no way to say it has been merged, or even how to merge the changes.131 votes -
Custom Formatting
Allow for custom formatting used by SQL Prompt to also be used when committing code with SQL Source Control.
125 votes -
Foreign keys recreated with NOCHECK during data sync
We have the same issue as noted here: http://www.red-gate.com/messageboard/viewtopic.php?t=13662&highlight=foriegn+foreign+key
The FK is recreated with NOCHECK during data sync which triggers a schema change.
104 votes -
snowflake
Add snowflake support
99 votesKendra respondedAs David mentioned in the comments, we currently recommend Flyway to help version changes for Snowflake.
Flyway doesn’t help with authoring or scripting changes, but it does provide a framework and guidelines to consistently version your changes in a deployable fashion that’s suitable for automation.
https://flywaydb.org/documentation/database/snowflake
Thank you for the suggestion and comments, as well those who have voted.
-
Migration Script Rollbacks
The only obstacle I have with switching to SQL Source Control 3 as a complete solution to source controlling and deploying is its inability to rollback custom code in a Migration Script. I would like when creating a Migration Script the ability to create a Reverse Migration Script so that if I use SQL compare to roll a code push back to a previous version in source control, it will grab the reverse script the same way as it grabs the migration script currently when pushing.
For example, if my migration script has an update statement in it to modify…
94 votesAs we noted in https://redgate.uservoice.com/forums/39019-sql-source-control/suggestions/2299881-migrations-support-for-git-mercurial, we have stopped work on Migrations v2 beta.
Unfortunately, there are currently no plans to include migration script rollbacks alongside the forward migration scripts, but we are still watching this request with interest.
-
git commit and push together
Add the option to push to a remote at the same time as a commit (maybe a checkbox next to the commit button - similar to sourcetree).
This would be easier than having to navigate back to the "commit changes" screen and push using the error prompt.
92 votes
- Don't see your idea?