Trying to connect database with an encrypted connection, tried below sql queries:
sqlcmd -N -E -S tcp:SQLSERVER,1234 -U username -P password -d Database -Q "INSERT INTO table1 VALUES(1,2,2)
ERROR: Sqlcmd: The -E and the -U/-P options are mutually exclusive.
sqlcmd -N -S tcp:SQLSERVER,1234 -U username -P password -d Database -Q "INSERT INTO table1 VALUES(1,2,2)
ERROR Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : SSL Provider: The target principal name is incorrect. Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Client unable to establish connection
sqlcmd -S tcp:SQLSERVER,1234 -U username -P password -d Database -Q -E -N "INSERT INTO table1 VALUES(1,2,2)
Sqlcmd: '-Q': Missing argument. Enter '-?' for help.
Am I missing something here?