Scripting ignores procedure

Stephen BrownStephen Brown Posts: 10
edited January 31, 2008 12:05AM in SQL Compare Previous Versions
I'm performing a compare with SQL Compare 6.2.0.271 between a script folder and a database and it is ignoring a stored procedure. On further look, the sp it is ignoring has a bad line in it ("SELECT * FROM ..." had been changed to "SELECT FROM ..."). However, there were no prompts or errors from SQL Compare and it just ignored the sp. Since the sp was in the database previously, it removed the sp and showed no differences between the script folder and the db, even though there was a stored procedure that was now missing.

Is there a way to disable this? I want everything in the script folder to be compared against, as this is my source folder and it is essential to know if a script file is being skipped or is bad.
I would either need a prompt or for the file to be included and give an update-time error when it tries to update SQL Server.

Comments

  • Stephen, thank you for your forum post.

    I have been able to recreate the problem you are experiencing and will raise a Bug Report for this issue. This report will then be brought to the attention of our developers.

    Once I recieve a reply I will update you. I have created a support call and the reference is F0009734

    Many Thanks

    Matt

    Matthew Flatt
    Technical Support Engineer
    Red-Gate Software Ltd
    support@red-gate.com
    Matthew Flatt
    Redgate Foundry
  • We are looking into the best way to alert users to objects in script files that our parser cannot deal with (which is what is causing your problem).

    Currently, SQL Compare just ignores such areas of a script file, because there are many legitimate reasons to have non-parsable sections in the script file (e.g. database creation code, data handling, transactions, error handling) and we felt it was best to just read in what we could, to allow customers as much flexibility as possible in what could be contained in a readable script database file.

    If you have any suggestions as to how you'd like to be alerted to a problem with an object, bearing in mind that the alert might also show for legitimately unreadable parts of a script file, please tell us so that we can incorporate your feedback.
    Software Developer
    Redgate Software
  • a pop up or alert window that steals focus is probably too intrusive, given that there are serveral valid situations where this will happen as you point out Michelle

    But perhaps a pop up bar like the Interactive Help bar, or some other type of non focus stealing alert/notification could occur if any scripts had problems being read by the parser, and the user could click it to review the problems that occured

    It would also be good to include a severity level, eg from WARNING if some parts of the file couldnt be parsed, but some valid table/procedure creation code was found and loaded, versus ERROR if the entire file was ignored as nothing could be made sense of. If possible output from the parser could be shown too, indicating the problem... in the OPs example something like "Invalid SELECT list on line xyz" would immediately pinpoint the problem. A way to view or jump to the section in the script file would be helpful too :)

    That way after running a compare, the user would see the error bar notification and be able to click it for more details if they want, then make the decision if the compare was good or not. In the above case, the ERROR and completely ignored file would be identified, corrected and then recompare the project. In a case where it was some database creation code, the user decides that doesnt bother them and continues with their work.
Sign In or Register to comment.