-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'SA' #94
Comments
Is it possible that you created the container with the -v volume mount with a different password and then created a new container with the same -v volume mount with the password above? The first time you create a container the master DB files will be created in the -v volume mount directory and the SA password will be stored in the master DB. If you create a new container and point to the same -v volume mount then the existing master DB's SA password will be in effect and the SA_PASSWORD that you pass in will be ignored. See this issue for a description of this problem. Suggestion: If you dont care about the DBs previously created, stop all containers, remove all containers, delete the contents of /data/mssql/log on your host and start over. |
I have the same issue. I stopped and removed all containers and deleted all data. The problem remains. In the log file I see: UPDATE: I found the issue, I am using Docker on Windows and I had to use double quotes (") instead of single quotes ('). After that, everything worked! |
Closing out. Reopen please if needed. |
I have the same issue when working with docker-compose. I have the compose file which defines the password using environment for sql server as below
However it always showing "Login failed for user 'sa'. Reason: An error occurred while evaluating the password. [CLIENT: 172.18.0.3]" error message. I don't use any mounted volume and the container/images are all removed and re-created every time. |
The literal "strongpassword" does not conform to Microsofts password policies. |
"strongpassword" is just placeholder. The actually password definitely complies with the policies. |
I get the same message in docker container on MacBook Pro sierra , I have used everything correctly. |
I'm getting the same error "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'SA'. On MacBook Pro High Sierra. |
If I run the container from the command line it is working perfectly but when I try to run from visual studio docker compose, it gets to run and getting the show in cmd. But giving the following error docker compose code is as follow version: '3.4' services:
db:
networks: I am using windows 10 pro.Docker version 18.09.0, build 4d60db4 |
Same issue here.. |
@EAbychkov are you facing same issue as i am. |
Finally, I got the solution, I was needed to add: And the overall command: |
Same issue here Content of my Dockerfile
Runnning docker compose with my Dockerfile without the RUN command works fine and creates the image and runs the container. Afterwards I'm able to execture However, when I add Anyone with a solutions for this? |
I have faced the same issue.
The execute-scripts.sh content
Notice that I had to do 2 steps to get it to work :
Now its working fine! |
Hi:
Hi Run
docker exec -it mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'Tt@12345' -Q 'ALTER LOGIN SA WITH PASSWORD="P@ss0wrd"
console show :
The text was updated successfully, but these errors were encountered: