View Permissions

Have a database DB1 owned by say 'User1', and another database DB2 owned by say 'User2'.

The DB1 database has various views defined and currently only User1 needs to use these views. In the future, we need to allow User2 to be able run these DB1 database views as well.

What is the best way to implement this, please ?
raymurphyAsked:
Who is Participating?
 
JestersGrindCommented:
Assuming both databases are on the same server.

USE DB1
GO

CREATE USER User2 FOR LOGIN User2
GO

GRANT SELECT ON OBJECT:: View1 TO User2;
GRANT SELECT ON OBJECT:: View2 TO User2;
...

Greg

0
 
raymurphyAuthor Commented:
Hadn't realised it woudl be as straightforward as that - thanks a lot for this, much appreciated.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.