开发者

Can't Connect To SQL Server with the Newly Create Login Name

CREATE LOGIN RepAcc
    WITH PASSWORD = '123456';
USE master;
CREATE USER TestReport FOR LOGIN RepAcc
    WITH DEFAULT_SCHEMA = master;
GO

When i click connect object explorer and choose SQL Server Authentication then Type RepAcc as username and password 123456, i get error says can not connect, login is invalid or so. What should i do?

I tried to create the user via wizard also, yet i get same error when trying to login. I need quick help.开发者_Go百科


You need to add database role memberships to the login.

Under your server, unfold 'Security', unfold 'Logins', right click on the login, select 'Properties'

Go to the 'User Mapping' tab, and select the DB you want. In the lower part of the screen, select the memberships (or rights) you want to assign to the login.

Edit: Or, since you already have a login connected to a DB User (TestReport), unfold Security > Users under the DB. Right click your user, and grant it rights in the lower part of the screen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜