USE [master]
GO
CREATE LOGIN [alexteste] WITH PASSWORD=N'aqz1973aqz', DEFAULT_DATABASE=[HermesQualidade1], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
GRANT SELECT ON Schema.ApuracaoImpostos TO [alexteste]
GO
GRANT SELECT ON Schema.ApuracaoImpostosUF TO [alexteste]
GO
and got this message:
Msg 15151, Level 16, State 1, Line 5
Cannot find the object 'ApuracaoImpostos', because it does not exist or you do not have permission.
Pawan Kumar
ApuracaoImpostos - Is this View / Table ? This is not created .
sa is an administrator user. You don't need to give him extra permissions as he has administrative rights, meaning that he can access everything in SQL Server.
hidrau
ASKER
Ok,
I have four database named:
House
StoreHouse
StoreShop
Store
I want to create a user that can login only in house database
and can see only two views
this is my hard task today.
I created a user in my MASTER
I gave to the new user only the house database permition to open it
But it can see all the tables and views :(
My loggin is sa
I did this way:
USE [master]
GO
CREATE LOGIN [alexteste] WITH PASSWORD=N'aqz1973aqz', DEFAULT_DATABASE=[HermesQu
GO
GRANT SELECT ON Schema.ApuracaoImpostos TO [alexteste]
GO
GRANT SELECT ON Schema.ApuracaoImpostosUF TO [alexteste]
GO
and got this message:
Msg 15151, Level 16, State 1, Line 5
Cannot find the object 'ApuracaoImpostos', because it does not exist or you do not have permission.