headToWorkingbase didn't get set
Error message: "headToWorkingbase didn't get set"
I did unlink and link again to the GIT repository, Still getting error.
Please provide a resolution ASAP, as this is a production database
Best Answers
-
Deep Posts: 20 Bronze 1
Just removing the files from transient folder as suggested by Redgate earlier was not working.
The following process worked: Unlink Source code control; Remove the files (that were showing up as duplicate files in the logs) from the local repository and then commit the change to GitHub to remove the files from GitHub, and then link source code control.
I still do not understand why removing a table and creating view with same name caused Redgate SQL Source Control to go Topsy Turvy, while the operation was valid for the database. Suggesting to start a new repository was a bad idea, as we would lose all the change history. Please get to the root cause of the problem to resolve this for future.
After that resolution, hundreds of objects appeared as Change Type “Conflict”, I had to select each one to set “Keep Mine”. Why can’t I bulk select and set “Keep Mine”? The product seems very unstable, and needs some serious updates, especially the version to work with GitHub.
-
Deep Posts: 20 Bronze 1
Just removing the files from transient folder as suggested by Redgate earlier was not working.
The following process worked: Unlink Source code control; Remove the files (that were showing up as duplicate files in the logs) from the local repository and then commit the change to GitHub to remove the files from GitHub, and then link source code control.
I still do not understand why removing a table and creating view with same name caused Redgate SQL Source Control to go Topsy Turvy, while the operation was valid for the database. Suggesting to start a new repository was a bad idea, as we would lose all the change history. Please get to the root cause of the problem to resolve this for future.
After that resolution, hundreds of objects appeared as Change Type “Conflict”, I had to select each one to set “Keep Mine”. Why can’t I bulk select and set “Keep Mine”? The product seems very unstable, and needs some serious updates, especially the version to work with GitHub.
Answers
Hi there,
Thanks for reaching out over the Redgate forums and sorry to hear about issues with SQL Source Control.
The headToWorkingbase didn't get set error is often an error that triggers from a few different possible underlying errors.
Are you able to enable & access the log files and provide a copy of the log to Redgate.
SQL Source Control - Access log files
Otherwise, you can search in the log file for the headToWorkingbase string to see what is triggering the error, it will likely have some details like this
If there is a duplicate definition error then it would be recommended to conduct a comparison between tables in your target & local databases to locate potential differences in this column. We have seen common examples of this error being a duplicate CREATE statement referencing the object which is causing the error.
This link may also help with troubleshooting the error message to clear the issue and allow a clean commit to occur.
Duplicate definition troubleshooting in SQL Source Control
If this doesn't assist with solving your issue our next step is to request the log file & zipped copies of your Working Base and Transient Folders of the database where you are experiencing the issue so we can investigate further. If you don't wish to submit them over the forum we can provide a private file-sharing link.
Thank you for providing the files.
I note errors on 5 items in the logs provided;
member.DimMemberFlags.MemberFlagsKey
member.FactMemberShipCancel.GroupKey
member.FactMembershipActive.GroupKey
member.DimMemberCodes.MemberCodesKey
member.DimMemberFlags.MemberFlagsKey
Looking at each of these I can see a Table & View with the same name being created within your Transient folder which is what I suspect is throwing the error as views & tables can't share the same name.
If this is looking like the suspected issue then please test changing the name of the view/table to be unique and try a new commit.
This screenshot is a comparison of file member.FactMembershipActive.SQL in both your table & view folders
Let me know if this helps resolve this issue or we need to keep digging.
Here is what I found. Please let me know how I can resolve this, and why this is an issue.
All of the objects copied below were tables in the old legacy model. We did some re-modeling and created new objects using our standard naming convention. Now the tables have a postfix ‘Tbl’ with the same name and they each have a view without the ‘Tbl’. I think that is causing the duplicate file issue.
This change is valid in the database, so why does Redgate have an issue with this. The old tables are in ‘Tables’ folder and the new views with same name are in the ‘Views’ folder. Why is it comparing tables with views?
Old model tables:
member.DimMemberFlags
member.FactMemberShipCancel
member.FactMembershipActive
member.DimMemberCodes
New Model tables:
member.DimMemberFlagsTbl
member.FactMemberShipCancelTbl
member.FactMembershipActiveTbl
member.DimMemberCodesTbl
New Model views:
member.DimMemberFlags
member.FactMemberShipCancel
member.FactMembershipActive
member.DimMemberCodes
Thanks for your patience whilst we look into this.
The error logs do indicate that object names are being reused.
Inside your Transient/Tables folder there are files such as
member.DimMemberFlags.sql
&
member.DimMemberFlagsTbl.sql
Can you please verify that both of these files should exist.
With your recent info, it does seem possible that the old tables code are still there in the repo along with the new table code.
This is a potential cause of the duplicate definitions.
To test this can you please remove these files and see if the error message persists:
Transient/Tables folder
member.DimMemberFlags.sql
member.FactMembershipActive.sql
member.FactMembershipCancel.sql
member.DimMemberCodes.sql
A table can be dropped in a database, and a view can be created by the same name, as the table that was dropped. Why can't Redgate SSC handle this?
Files deleted from Transient/Tables folder
member.DimMemberFlags.sql
member.FactMembershipActive.sql
member.FactMembershipCancel.sql
member.FactMembershipBroker.sql
member.DimMemberCodes.sql
This has been escalated within our technical support team for further assistance into why this duplicate object error keeps persisting.
There is a ticket raised against this post which we will communicate against for the next steps including the process to schedule a working session to resolve this issue.
Just removing the files from transient folder as suggested by Redgate earlier was not working.
The following process worked: Unlink Source code control; Remove the files (that were showing up as duplicate files in the logs) from the local repository and then commit the change to GitHub to remove the files from GitHub, and then link source code control.
I still do not understand why removing a table and creating view with same name caused Redgate SQL Source Control to go Topsy Turvy, while the operation was valid for the database. Suggesting to start a new repository was a bad idea, as we would lose all the change history. Please get to the root cause of the problem to resolve this for future.
After that resolution, hundreds of objects appeared as Change Type “Conflict”, I had to select each one to set “Keep Mine”. Why can’t I bulk select and set “Keep Mine”? The product seems very unstable, and needs some serious updates, especially the version to work with GitHub.