Skip to content

SQLCMD should exit on certain errors #76

Closed
@sommarskog

Description

@sommarskog

Consider:

RAISERROR('This is the end', 1, 127)

When you run this in the old SQLCMD, the scripts exits, because state is 127. go-sqlcmd does not. (This an old holdover from ISQL, and should still work I think. No, this does not work in SSMS.)

On a similar note:

RAISERROR('Get me out of here!', 20, 1) WITH LOG

This closes the connection to SQL Server, and old SQLCMD exits at this point. go-sqlcmd does not, but nor does it reconnect, so you only get more error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions