April 21, 2023 at 12:00 am
Comments posted to this topic are about the item Experimenting with Go-SQLCMD
April 21, 2023 at 7:49 am
If it is written in GO then that language has a nice balance of ease of use, speed of compilation, speed of execution, and testability.
If anyone was wondering what to learn after Python then I would put GO at the top of the list.
Does that mean that GO-SqlCmd has an easy route to being open sourced?
April 21, 2023 at 2:11 pm
How about go-bcp?
Gerald Britton, Pluralsight courses
April 21, 2023 at 3:35 pm
Honestly, I found one of early benefits of go-sqlcmd was that it has QUOTED_IDENTIFIER
set to ON
by default (unlike sqlcmd
) and the -I
switch (to enable Quoted Identifiers in the "old" sqlcmd) has been removed; you have to put SET QUOTED_IDENTIFIER OFF;
in the batch. Plus that it's also usable on ARM is great; means I can use it on my RasPi running Azure SQL Edge. 🙂
I "upgraded(?)" to go-sqlcmd at home about a month ago, and I've honestly not regretted it. Though, I can imagine that if Microsoft want to replace sqlcmd with it, it's going to be a breaking change for a lot of people; the -P
switch has also been removed, for example (for good reason!!!). I'm a but confused that they named it sqlcmd
too and not g0-sqlcmd
or sqlcmd-go
in the command line, to avoid such problems.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 21, 2023 at 4:01 pm
If it is written in GO then that language has a nice balance of ease of use, speed of compilation, speed of execution, and testability.
If anyone was wondering what to learn after Python then I would put GO at the top of the list.
Does that mean that GO-SqlCmd has an easy route to being open sourced?
It is here: https://github.com/microsoft/go-sqlcmd
April 21, 2023 at 4:03 pm
Honestly, I found one of early benefits of go-sqlcmd was that it has
QUOTED_IDENTIFIER
set toON
by default (unlikesqlcmd
) and the-I
switch (to enable Quoted Identifiers in the "old" sqlcmd) has been removed; you have to putSET QUOTED_IDENTIFIER OFF;
in the batch. Plus that it's also usable on ARM is great; means I can use it on my RasPi running Azure SQL Edge. 🙂I "upgraded(?)" to go-sqlcmd at home about a month ago, and I've honestly not regretted it. Though, I can imagine that if Microsoft want to replace sqlcmd with it, it's going to be a breaking change for a lot of people; the
-P
switch has also been removed, for example (for good reason!!!). I'm a but confused that they named itsqlcmd
too and notg0-sqlcmd
orsqlcmd-go
in the command line, to avoid such problems.
Interesting. I hope they replace the original with this, but with full backward compatibility. I hate that -P is removed, though not sure security is changed if you need a SET command.
April 21, 2023 at 4:07 pm
Interesting. I hope they replace the original with this, but with full backward compatibility. I hate that -P is removed, though not sure security is changed if you need a SET command.
The security point is only in regards to -P
being removed; the removal of -I
is a security matter. The removal of -P
just means you can't pass the password in the command. Instead, you are prompted for the password. So sqlcmd -U thom
would then present a password prompt that hides the key entry. Like when you use sudo
in bash, for example:
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 21, 2023 at 4:16 pm
But you can pass the password as an environment variable, or you should. I can't get that working, nor do I see a pwd prompt as you see.
To me, the biggest issue is there seems to be a split in how this works. It goes to old or new mode, and then some parameters do or don't work.
April 22, 2023 at 6:46 pm
The verical resutls feature is a nice one to have. Though I have seen this in powershell with the invoke sql command(let). Powershell seemingly decides for you to present in vertical or horizontal based on the output width.
----------------------------------------------------
April 24, 2023 at 3:57 pm
One thing I like about sqlcmd is that it's always around and easy to use. I hope this becomes the default sqlcmd, but without some of the breaking changes.
In general, I find PowerShell better, but more cumbersome, especially for quick things. Maybe I just need to add a function of some sort to my profile that works like SQLCMD.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply