How can we help you today? How can we help you today?

Error Checking in Scripts

Will v6 have any capability of detecting errors in scripts? For example, say I have a script that contains a Select statement and the table being selected from doesn't exist. Will v6 detect this and give a warning or error before a comparison is done?

Thanks - Randy
randyminder
0

Comments

3 comments

  • Andras B
    Will v6 have any capability of detecting errors in scripts? For example, say I have a script that contains a Select statement and the table being selected from doesn't exist. Will v6 detect this and give a warning or error before a comparison is done?

    Thanks - Randy

    Hi Randy,

    there will be a certain amount of error detection, for example if a clr assembly is referenced that does not exists, we will give an error. However, we do assume that the scripts are correct creations scripts that can be executed successfully on SQL Server. In the above situation we will not give you an error. Indeed, not even SQL Server will give you an error, only when you try to execute the stored procedure. Consistency and syntax checking is not the purpose of this product, but we will consider taking it this way in the future.

    Kind regards,
    Andras
    Andras B
    0
  • randyminder
    Andras,

    It appears that with v6, Red-Gate is moving towards a fuller database schema management suite of products (ala Microsoft's DBPro product). In order to do that schema validation is a requirement. It would be fantastic if v6 could issue warnings or errors as appropriate when scripts are the source or the target of a comparison.

    Randy

    Andras wrote:
    Will v6 have any capability of detecting errors in scripts? For example, say I have a script that contains a Select statement and the table being selected from doesn't exist. Will v6 detect this and give a warning or error before a comparison is done?

    Thanks - Randy

    Hi Randy,

    there will be a certain amount of error detection, for example if a clr assembly is referenced that does not exists, we will give an error. However, we do assume that the scripts are correct creations scripts that can be executed successfully on SQL Server. In the above situation we will not give you an error. Indeed, not even SQL Server will give you an error, only when you try to execute the stored procedure. Consistency and syntax checking is not the purpose of this product, but we will consider taking it this way in the future.

    Kind regards,
    Andras
    randyminder
    0
  • David Atkinson
    I agree - some form of syntax and schema validation on the offline scripts would be nice and something we'll definitely consider in future.

    If you are using Management Studio or Query Analyzer, you can always use the Parse Query button, if you set your database connection to point to your live deployment database. This should succeed in most cases as long as your live database isn't too out-of-step with the scripts.

    David Atkinson
    Red Gate Software
    David Atkinson
    0

Add comment

Please sign in to leave a comment.