Error Parsing file while committing stored procedure, and table...

GrouchoGroucho Posts: 2 New member
edited April 6, 2022 11:41AM in SQL Source Control
I've seen this error on the forums but the resolutions (which mostly involve patching and workarounds) don't apply to me.
I just installed the latest updated of RD SC; this problem started yesterday (before I installed the update) and continues today (post-update).
When trying to Commit to Source Control (it actually happens on Get Latest, as well) to I'm getting an error: 
"There was an error parsing the file "[transient path...]\" at line 14 column 25, near the text" (the line and column vary).
The code appears completely valid and the scripts and procs all run perfectly in SSMS.
I have not opened the code in any external editor (certainly not the code to create the table, which is being done with a "SELECT TOP 0..." from an existing table).
Very frustrating (and productivity-impairing).
Please help.

Answers

  • Hello Groucho,

     

    From your description this sounds like the inbuilt T-SQL parser is tripping over something. Given it will be particular to your scripts, I'll contact you directly on how we can identify the issue. 

    If the steps are useful I'll update the public post on how we approached it so it may help others in the future.

    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • rshannonlislvrshannonlislv Posts: 2 New member
    I'm experiencing this same issue for a stored procedure file in the Transients localappdata folder for Sql Source Control 7.
    I'm unable to "Get Latest" nor "Commit". 

    Thanks!
  • GrouchoGroucho Posts: 2 New member
    Here's what I did (posted this in the ProductSupport forum (https://productsupport.red-gate.com/hc/en-us/requests/270735), so it wasn't visible here):
    We were able to resolve the issue by deleting the objects in my local repository (I'm linked to a working folder). Once I deleted the objects-causing-errors from the working folder, the errors went away, and I was able to commit/save the changes.
    Obviously, I don't know if this will work for you, but worth a look. Good luck!
  • rshannonlislvrshannonlislv Posts: 2 New member
    @Groucho

    You're The They!
    I deleted the file that was causing the error in both the Transients and WorkingBases folder and it worked.
    For anyone else looking to resolve this issue (seems to be a fairly regular occurrence), these are the exact steps I took to resolve the issue:

    I inspected my Transients, WorkingBases and my local repo for the file causing the error. Oddly, WorkingBases didn't have any of the objects Transients and my local repo had.

    I deleted the file causing the error message in Transients and for my local repo, simply moved the file into a directory one step higher.

    I then closed all my SSMS windows, then started a fresh SSMS instance (there is caching involved with SQL Source Control).

    I then right-clicked the database with Source Control enabled and clicked "Commit to Source Control". I was then greeted with another error. The same error and same file, but in the WorkingBases folder. I checked the WorkingBases folder and found all my objects were in fact there this time. I deleted the file causing the error in WorkingBases and closed all of my SSMS windows, then started a fresh SSMS instance.

    I then right-clicked the same database, clicked "Commit to Source Control" waited with angst and excitement for the registration of the database and it then completed and offered me to commit my change to source control. Commits were without hiccup, as well as committing changes to repo in Azure DevOps.

    Thank you, kind They!
Sign In or Register to comment.