You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I´m trying to use the -b option in go-sqlcmd, and it always returns a rc:1 with NO stderr.
For recreating the scenario, I have this T-SQL sentence inside table_creation.sql: IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE NAME = 'ANSIBLE_DB_CICD' AND TYPE = 'U') BEGIN CREATE TABLE ANSIBLE_DB_CICD (ID INT IDENTITY(1,1), COMMENT VARCHAR (250)) END
In below image, you can see that I receive a rc: 1 if I´m using -b option, and I receive rc: 0 when I´m not using it, always with NO stderr:
I this CentOS VM where I have the go-sqlcmd installed, I also have the regular sqlcmd (the one that´s part of command-line tools). So, I did some testing with a "bad" script, testing both tools, and noticed that the behavior is different.
As you can see, when running the go-sqlcmd (/user/bin/sqlcmd) with -b option and a "bad" T-SQL, I receive rc:1 and nothing in the stderr. However, when doing the same with the regular sqlcmd (/opt/mssql-tools/bin/sqlcmd), I receive rc:1 but also some information about the error in the stderr:
The text was updated successfully, but these errors were encountered:
I´m trying to use the -b option in go-sqlcmd, and it always returns a rc:1 with NO stderr.
For recreating the scenario, I have this T-SQL sentence inside table_creation.sql:
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE NAME = 'ANSIBLE_DB_CICD' AND TYPE = 'U') BEGIN CREATE TABLE ANSIBLE_DB_CICD (ID INT IDENTITY(1,1), COMMENT VARCHAR (250)) END
In below image, you can see that I receive a rc: 1 if I´m using -b option, and I receive rc: 0 when I´m not using it, always with NO stderr:
I this CentOS VM where I have the go-sqlcmd installed, I also have the regular sqlcmd (the one that´s part of command-line tools). So, I did some testing with a "bad" script, testing both tools, and noticed that the behavior is different.
As you can see, when running the go-sqlcmd (/user/bin/sqlcmd) with -b option and a "bad" T-SQL, I receive rc:1 and nothing in the stderr. However, when doing the same with the regular sqlcmd (/opt/mssql-tools/bin/sqlcmd), I receive rc:1 but also some information about the error in the stderr:
The text was updated successfully, but these errors were encountered: