sql-cli
sql-cli copied to clipboard
[Question] How can I investigate server properties?
Thanks for your package, which I found at the tutorial https://www.freecodecamp.org/news/cjn-how-to-connect-your-microsoft-sql-server-docker-container-with-azure-data-studio/.
How can I execute the following statement found at https://docs.microsoft.com/fr-fr/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash ?
SELECT @@SERVERNAME,
SERVERPROPERTY('ComputerNamePhysicalNetBIOS'),
SERVERPROPERTY('MachineName'),
SERVERPROPERTY('ServerName')
I tried putting this at one line
SELECT @@SERVERNAME, SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
but I got
Error: Incorrect syntax near the keyword 'SELECT'.
If select statements against tables are working then it's possible the underlying library being used does not support reading server variables.