Error with Source Control - Unable to case object of type 'RedGate.SQLCompare...'
rsutherland_slc
Posts: 3 New member
We have one database that is throwing this error in our SQL Source Control environment:
Unable to cast object of type 'RedGate.SQLCompare.ASTParser.Syntax.Element' to type 'RedGate.SQLCompare.ASTParser.Syntax.SearchCondition'. I've searched for this error and the only similar references I see are from 2011 or older. This just started happening on one database in our environment and blocks using the Redgate tool for source control for that one DB.
Has anyone else encountered this and is there a fix?
Thanks!
Unable to cast object of type 'RedGate.SQLCompare.ASTParser.Syntax.Element' to type 'RedGate.SQLCompare.ASTParser.Syntax.SearchCondition'. I've searched for this error and the only similar references I see are from 2011 or older. This just started happening on one database in our environment and blocks using the Redgate tool for source control for that one DB.
Has anyone else encountered this and is there a fix?
Thanks!
Tagged:
Answers
Hi @rsutherland_slc
Thank you for reaching out on the Redgate forums, and sorry to hear about your SQL Source Control errors.
I have tackled this issue previously, in most cases it was some bad or unprocessable code introduced into the Source Control project that is throwing the exception.
First suggestion is to unlink and relink your database from source control and see if this clears the error.
If this does not, then to be able to replicate this issue, we need a DBCC CLONEDATABASE backup of the database (which is a schema only backup) and a zipped copy of the Working Base and Transient Folders of the database from SQL Source Control.
To find the location of these folders, please go to the Setup tab on SQL Source Control and click on Show on the Under the hood section.
The Working Base and Transient Folders contain the database scripts that SQL Source Control uses as part of its comparison process.
For more information on this subject, please read: http://documentation.red-gate.com/display/SOC7/How+SQL+Source+Control+works+behind+the+scenes
I have created a secure file link to upload your clone backup & folders from Source Control.
This link is valid for 14 days
https://files.red-gate.com/requests/5B1rAdH3TIeXrI6Ca42J5B
We did try unlinking and linking the db a couple of times, with no success.
Thanks again!
Can you provide another link for us to deliver the files to?
Thanks!
A new file link can be accessed here:
https://files.red-gate.com/requests/17VmjqHSTXf00BCRPK0tRC
-Steve
-Steve