Link to home
Start Free TrialLog in
Avatar of tristonyip
tristonyip

asked on

sql schema issue

hi
 i try to create a view  in schema, the view will have some masking to block some information on a table

example
CREATE VIEW myschma.vw_address AS
      SELECT ***, *** FROM dbo.address

GRANT SELECT ON SCHEMA::myschma TO tempUser

i got an error when i sign in as tempUser and run the vw_address.

error
The SELECT permission was denied on the object 'address', database 'dbname', schema 'dbo'.

i don't want tempUser has select on dbo.address. only the view with masking.
if i put the view in dbo without schema, it will work, but i want this view in schema, any idea, thank you so much.
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial