Chapter 7 WORKING WITH VIEWS 433 Bob.BobView1 CREATE

Chapter 7 WORKING WITH VIEWS 433 Bob.BobView1 CREATE VIEW Bob.BobView1 AS SELECT Jane.JaneView1.id, name, address, description Ownership Change Ownership Change Jane.JaneView2 Bob.BobTable1 Ownership Change Jane.JaneView1 Ownership Change Jane.JaneTable1 dbo.DBOTable1 FROM Jane.JaneView1 INNER JOIN Jane.JaneView2 ON Jane.JaneView1.id = Jane.JaneView2.id GO REVOKE all ON dbo.DBOTable1 TO public REVOKE all ON Jane.JaneTable1 TO public REVOKE all ON Bob.BobTable1 TO public GRANT SELECT ON Bob.BobView1 to Mary The hierarchy of data access can be seen in Figure 7.17. With the current permissions, Mary cannot access the upper-level view (BobView1), even though Bob has granted her SELECT permissions to BobView1. Mary s error message from SELECT * FROM Bob.BobView1 would look like this: Server: Msg 229, Level 14, State 5, Line 1 SELECT permission denied on object DBOTable1 , database . pubs , owner dbo .

For high quality jboss hosting services please check jboss web hosting website.

Comments are closed.