I installed on my arch machine mssql-server and mssql-tools via yaourt. I started the server from /opt/mssql/bin/sqlservr and tried to connect with my credentials, but with no luck. I found this article which says to connect with the command sqlcmd -S localhost -U SA -P 'YourPasswordHere', but it didn't work either. The error message says:
2017-07-06 21:57:28.25 Logon Error: 18456, Severity: 14, State:
7.
2017-07-06 21:57:28.25 Logon Login failed for user 'SA'. Reason:
An error occurred while evaluating the password. [CLIENT: 127.0.0.1]
I tried with blank password, with Password123 and with my user's password but the message was the same.
Has anyone managed to connect and if yes what was the default password?
Please let me know if you need any further information.
Thanks.
I found it. I had to run this command sudo /opt/mssql/bin/mssql-conf setup in order to set the password for the SA user. Now I can connect.
Related
I use snowflake and snowsight on windows OS. And, I did the below command but the error happened.
Do you have the answer about this error 250001 (n/a)?
C:\Docs>snowsql -a lvXXXXX.ap-northeast-1.aws -u username -o log_level=DEBUG
Password:
250001 (n/a): Could not connect to Snowflake backend after 0 attempt(s).Aborting
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
The error message appears to be an issue with "Failed to check OCSP response cache file."
You can try to connect using insecure mode to bypass the OCSP checks.
Use this:
snowsql -a lvXXXXX.ap-northeast-1.aws -u username -o insecure_mode=True
If the connection is successful, it means there may be a firewall/proxy that is blocking the connection to the OCSP server. Note: OCSP connects via port 80.
Im trying to setup postgres database for my django project, so i donwnloaded the installer together with the pgadmin. i set a default password when installing and i used it to login to the pgadmin and it worked, i now wanted to run so cli commmand, so i added postgres to path in my system enviroment variable in other to be able to run it on the cli and it works, i mean the system recognise the commands but im getting errors which i think its comming from the database itself. i have no idea about this error, this is my first time using it.
PS: it asked for my system user password and i entered it, then i got the error bellow.
C:\Users\Davinci>psql
Password for user Davinci:
psql: error: FATAL: password authentication failed for user "Davinci"
Try running psql -U postgres and then inserting the password you chose at pgadmin.
User postgres is the default, but it seems like Windows is trying to run psql -U Davinci when you type only psql, so you have to specify which user (-U for user / postgres for the username) when trying to connect.
This is my first time trying to setup mssql server under linux server.
This is my error
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed.
The login is from an untrusted domain and cannot be used with
Integrated authentication..
I could login using "sa" and password
Once I use sqlcmd -E -S linuxsqlserver or sqlcmd -S linuxsqlserver I received the error above.
I followed 2 guide in the link
https://www.mssqltips.com/sqlservertip/5075/configure-sql-server-on-linux-to-use-windows-authentication/
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-active-directory-authentication?view=sql-server-2017
My current system
Ubuntu 18.04
MSSQL
Window Server 2016
AD
What I have done:
join domain (the domain name is Test1)
Creating the Service Principal Name
setspn -a MSSQLSvc/linuxsqlserver.TEST1.COM:1433 sqllinux
Creating the Keytab File for the SQL Server Service
kinit sqllinux#TEST1.COM
kvno MSSQLSvc/linuxsqlserver.TEST1.COM:1433#TEST1.COM (returned 2)
sudo ktutil
addent -password -p MSSQLSvc/linuxsqlserver.Test1.COM:1433#Test1.COM -k 2 -e aes256-cts-hmac-sha1-96
addent -password -p MSSQLSvc/linuxsqlserver.Test1.COM:1433#Test1.COM -k 2 -e rc4-hmac
wkt /var/opt/mssql/secrets/mssql.keytab
quit
Setting up Active Directory Authentication for SQL Server
/opt/mssql/bin/mssql-conf set network.kerberoskeytabfile /var/opt/mssql/secrets/mssql.keytab
systemctl restart mssql-server
Thank you in advance.
I have installed MSSQL Server 2017 on Ubuntu 16.04.
Now, I must change password.
I know that I can change password using the following commands:
sudo systemctl stop mssql-server
sudo /opt/mssql/bin/mssql-conf set-sa-password
But! I need to change password via script.
Ok. To solve this problem, I had installed "expect" and had wrote script:
#!/bin/bash
/usr/bin/expect <<EOD
spawn sudo /opt/mssql/bin/mssql-conf set-sa-password
expect "password:"
send "Pa$$wo4d!\r"
expect "password:"
send "Pa$$wo4d!\r"
interact
EOD
Double password - password+confirmation.
I have run the script:
ubuntu:~# bash 1.sh
spawn sudo /opt/mssql/bin/mssql-conf set-sa-password
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
But it does not work. When I try to connect to mssql server, I got an error:
ubuntu:~# /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P Pa$$wo4d!
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'SA'..
OK, let's try a Windows authorization:
ubuntu:~# /opt/mssql-tools/bin/sqlcmd -S localhost -E -C
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : SSPI Provider: No
Kerberos credentials available.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Cannot generate SSPI context.
I can't connect to MSSQL Server until I change my password!
And!
I need to change password via script only.
Can somebody help me please?
More easiest way:
sudo MSSQL_SA_PASSWORD=${Password} /opt/mssql/bin/mssql-conf set-sa-password
Solve the problem via script:
#!/usr/bin/python
import pexpect
ssh_cmd = '/opt/mssql/bin/mssql-conf set-sa-password'
timeout=30
child = pexpect.spawn(ssh_cmd, timeout=timeout)
child.expect(['password:'])
child.sendline('Pa$$wo4d!')
child.expect(['password:'])
child.sendline('Pa$$wo4d!')
child.expect(pexpect.EOF)
child.close()
if 0 != child.exitstatus:
raise Exception(stdout)
I have a postgres database that I created through heroku. I am trying to access it through psql with the command:
cse-190-fortune matanvardi$ psql "dbname=dccemfsa6camml host=ec2-54-235-152-226.compute-1.amazonaws.com \
user=tfmfbqxqjznsbl password=********* port=5432 sslmode=require"
I get this error:
psql: could not connect to server: Operation timed out
Is the server running on host "ec2-54-235-152-226.compute-1.amazonaws.com" and accepting
TCP/IP connections on port 5432?
I've cloned the repository and I'm logged in, I simply cannot figure out what is wrong here. Any help would be greatly appreciated.
To access your Heroku database from the command line use the command:
heroku pg:psql
Edit:
I ran your command from my machine. If course I don't have your password but I got:
$ psql "dbname=dccemfsa6camml host=ec2-54-235-152-226.compute-1.amazonaws.com user=tfmfbqxqjznsbl port=5432 sslmode=require"
Password:
psql: FATAL: password authentication failed for user "tfmfbqxqjznsbl"
Which means I was able to connect, which is farther than you got. It must be a problem with your network setup.