Options

Getting an error when linking database to source control (git) folder

I'm getting an error when trying to link a database to source control folder that says "Sequence contains no elements" What?? What does this mean? What causes it? and how can I fix this?  Using SSMS version 17.8.1 and SQL Source Control Version 7.0.6.8775 and git repository.  Any information would be helpful.  I did not find any information when searching the support for this exact phrase...is there some place else where the errors are defined as to what they mean where I should be looking for answers?  Any help is appreciated...thanks
Tagged:

Answers

  • Options
    Unfortunately it's a generic error message which doesn't really tell what's going on. Can you try recloning the git repo or creating a brand new one? Does it happen with the brand new git repo?
    Kind regards

    Tianjiao Li | Redgate Software
    Have you visited our Help Center?
  • Options
    TerryOTerryO Posts: 4 New member
    Yes, i tired the repository clone route.  And the removing of all the junk files created under AppData and linking still getting same error. Next, I'll rename the existing local copy of the repo and create a new repo  linking the databases to an empty repository and see if it likes creating at the file itself and then rename the new local repo and then overlay the new repo with the old repo files.
  • Options
    TerryOTerryO Posts: 4 New member
    Ok Found and fixed the issue.
    1) Created new local repository with a different name  (fixit) and linked the database to that new fake local repo.
    2) Did a Redgate SQL Source Control "Commit" to pull down all the objects from the database and and populate the new local (fixit) git repo.
    3) Used WinMerge to compare the two top level folders (real local repo and new fixit local repo) on down through subdirectories. (option ignore end of line character differences)
    4) Visually compared file differences of filed tagged different.
    5) Found in one file that the "Create" statement was missing before the Function keyword in the real repo.
    6) Fixed source in Remote Repository of the real repo (pull request/review/complete/commit)
    7) Git pull to pull the change down from Remote to Local repository 
    8) Unlinked database from local fake repo (fixit)
    9) Linked database to the real local repo and no error occurred.

    Hope this helps someone else.

Sign In or Register to comment.