sqlcmd on Azure SQL Data Warehouse - SqlState 24000, Invalid cursor state after INSERT statement -
i working on script reload table using sqlcmd on linux connecting azure sql data warehouse database.
after insert statement completes, next statement fails (but not end sqlcmd execution) "warning"
insert schema.table_temp ( ...list of columns ) select ...list of columns schema.table ;
go (comment--> in script, not echoed in log.)
(0 rows affected) if exists (select table_name information_schema.tables t table_type = 'base table' , table_schema = 'schema' , table_name = 'table_nox' ) drop table schema.table_nox ;
go (comment--> in script, not echoed in log.)
sqlstate 24000, invalid cursor state
the script continues run each subsequent batch getting same sqlstate 24000, invalid cursor state "warning"
if comment out insert statement, script runs without warning expected. speculate insert statement not closing cursor , subsequent commands warning should considered eror , end execution. (i have -b flag on in sqlcmd invocation.)
is solution break script multiple parts?
this seems issue odbc driver used sqlcmd under hood. can confirm if see issue azure sql db? see odbc.ini , odbcinst.ini files. can share out?
in meanwhile, recommend couple of cool node.js command line tools more suited linux , mac environments:
sql-cli
cheetah
thanks,
meet
Comments
Post a Comment