設定SQL Server身份驗證模式:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681192e37y.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681205Jyxt.png"></a>
确定之後需要重新啟動SQL SERVER服務才能生效:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681221ujLl.png"></a>
建立Windows 登入帳戶:
首先建立Windows組
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681236pv7G.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506812458GzU.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681255KHRV.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506812681gzn.png"></a>
登入名:tests
Windows身份驗證模式
預設資料庫:test
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681284dpPk.png"></a>
用同樣的方法再建立一個登入帳戶,檢視:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681305bdwK.png"></a>
建立SQL Server 登入帳戶:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681339rmVv.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681355rgy0.png"></a>
驗證密碼政策:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681375SPrX.png"></a>
将登入帳号加入伺服器角色:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_125068139147xW.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681410cuf2.png"></a>
驗證its的權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681427ewtx.png"></a>
鍵入its組的tom使用者:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681439Uiw7.png"></a>
選擇需登入的伺服器:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506814522KqS.png"></a>
建立資料庫test1:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681469L3zt.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681481zIMj.png"></a>
使用administrator登入,并給HRAppAdmin帳戶配置設定權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681497QSJ1.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681515BtBr.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506815245jcJ.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681534jFmV.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681545MGS2.png"></a>
使用HRAppAdmin使用驗證其權限(這裡将使用其更改HRApp密碼):
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681563dElO.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681582T4CT.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681600OES3.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681616DU0t.png"></a>
建立資料庫使用者映射Windows帳号:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681632MVVO.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506816491787.png"></a>
用同樣的方法給Sales登入帳号也給予映射:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681666kGCC.png"></a>
使用資料庫使用者映射單獨的Windows使用者:
将使用者windows帳号frank(屬于tests組成員)和tom(屬于its組成員)進行相關映射:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681684ZhRl.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681701XoCL.png"></a>
建立資料庫使用者映射SQL Server登入帳号:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681718lvVD.png"></a>
添加使用者到資料庫角色:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681734l8m3.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681755uhKc.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681773JwXA.png"></a>
驗證HRAPP的權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681786MnPr.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681802ZYhS.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681821ltXF.png"></a>
從上面可以看出HRAPP帳号有通路該資料庫表的權限。
驗證Frank的權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681833SST6.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506818424Kgi.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681858ZucJ.png"></a>
從上面可以看出,Frank權限不足,不能通路表。
添加HREmployees使用者到資料庫角色:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506818774BGk.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506818928juK.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681903xR0c.png"></a>
再次使用frank帳号進行表的查詢:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681915ifnh.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681931Oo6D.png"></a>
OK!現在frank帳号可以進行Empl表的查詢了。
建立使用者定義資料角色:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681953CYSh.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_125068197172ep.png"></a>
授予使用者定義資料庫角色權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250681987VF33.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506820068l3E.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506820233FBN.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250682041ospl.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_12506820548RRh.png"></a>
驗證frank使用者的權限:
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250682064Okzn.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250682074Lkl7.png"></a>
<a href="http://tom110.blog.51cto.com/attachment/200908/19/892790_1250682093FgMR.png"></a>
由上圖可以看出Frank帳戶已經擁有修改表Empl的權限
本文轉自 tomsjack 51CTO部落格,原文連結:http://blog.51cto.com/tom110/193748