Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Why can't I do the grant?

$
0
0
Hi,
I've already created such login in the schema.

USE my_schema;

CREATE LOGIN login2
    WITH PASSWORD = 'Abc1234';
go

but why do I get the problem when granting the privileges to the login?

use [my_schema]
go

GRANT select ON [dbo].[tab2] TO login2;
GRANT update ON [dbo].[tab2] TO login2;
GRANT insert ON [dbo].[tab2] TO login2;
GRANT delete ON [dbo].[tab2] TO login2;

Msg 15151, Level 16, State 1, Line 2
Cannot find the user 'login2', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 3
Cannot find the user 'login2', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 4
Cannot find the user 'login2', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 5
Cannot find the user 'login2', because it does not exist or you do not have permission.

Many Thanks & Best Regards, Hua Min


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>