Azure SQL-用户登录失败 [英] Azure SQL - Login failed for user

查看:144
本文介绍了Azure SQL-用户登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用免费的Azure订阅,已经设置了SQL Server(v12),并在其上创建了数据库.

I am using a free azure subscription, have set up an SQL server (v12) and created a database onto it.

但是,我似乎无法使用在SQL Server凭据期间出现提示时设置的服务器管理员凭据登录.

However i cant seem to log in using the server admin credentials that i set when prompted during the SQL server credentials.

Management Studio返回:

Management Studio returns:

Cannot connect to <server name>...Login failed for user 'mickey'

SQLCMD -S <servername>.database.windows.net -U mickey@servername -P pass -q "select 1"

返回

Sqlcmd:错误:SQL Server的Microsoft ODBC驱动程序11:用户'

Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login failed for user '

有什么我想念的吗?在这里呆了几个小时

Is there something i am missing? Been at this for hours

推荐答案

密码可能包含sqlcmd无法处理的一些特殊字符(例如美元,单引号或双引号,括号).我尝试使用Azure界面并将密码括在单引号中(密码中带有美元符号),但这没有用.因此,我们仅删除了特殊字符,现在就可以了.请参阅:Powershell Invoke-Sqlcmd登录失败和

It could be the password contains a few special characters that sqlcmd does not handle (such as dollar, single or double quote, parentheses). I tried using the Azure interface and surrounding the password with single-quotes (we had a dollar-sign in the password), but that did not work. So, we simply removed the special character and now it is OK. see: Powershell Invoke-Sqlcmd Login Failed and https://mohitgoyal.co/2017/08/09/vsts-azure-sql-database-deployment-task-keeps-failing-with-error-login-failed-for-user/

这篇关于Azure SQL-用户登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆