新用户无法登录到SQL Azure [英] New user cannot login to SQL Azure

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

问题描述

我正在SQL Azure上创建一个新的读/写用户,如下所示:

I am creating a new read/write user on SQL Azure as follows:

-- Connected to master
create login [fred] with password = 'xxx';

-- Connected to my DB
create user [fred] from login fred;
EXEC sp_addrolemember 'db_datareader', 'fred';
EXEC sp_addrolemember 'db_datawriter', 'fred';

当我使用SSMS登录时,出现错误消息Cannot open database "master" requested by the login. The login failed.

When I login using SSMS I get an error saying Cannot open database "master" requested by the login. The login failed.

我做错了什么或想念什么?

What am I doing wrong or missing?

推荐答案

默认情况下,SSMS尝试连接到主服务器,但是您的新帐户无权访问主服务器;我假设只有用户数据库.

By default, SSMS tries to connect to master, but your new account does not have access to master; only the user database I presume.

在SSMS的登录屏幕上,还需要指定数据库名称.只需单击选项>> 图标,即可打开连接属性"选项卡.在其中,指定您要连接的数据库名称.

On the login screen of SSMS, you need to specify the database name as well; just click on the Options >> icon, which opens up the Connection Properties tab. In there, specify the database name you are trying to connect to.

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

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