?? 10950.htm
字號(hào):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MS SQL基礎(chǔ)教程:用戶和安全性管理--SQL Server的登錄認(rèn)證 - 編程入門網(wǎng)</title>
<meta name="keywords" content="MS SQL基礎(chǔ)教程:用戶和安全性管理--SQL Server的登錄認(rèn)證">
<meta name="description" content="MS SQL基礎(chǔ)教程:用戶和安全性管理--SQL Server的登錄認(rèn)證">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/images/style.css" rel="stylesheet" type="text/css" />
<script src="/js1/head.js"></script>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#efefef" oncopy=nocopy()>
<TABLE width="760" cellPadding="0" cellSpacing="0" bgcolor="#eff7fe" align="center">
<TR>
<TD><a href="/index.htm"><img src="/images/logo1.gif" width="150" height="60" border="0"></a></TD>
<TD width="470" align="right"><script src="/js1/top.js"></script></TD>
<TD width="125" align="center"><script src="/js1/topsy.js"></script></TD>
</TR>
</TABLE>
<table width="760" border="0" cellpadding="1" cellspacing="0" class="bklan" align="center">
<tr>
<td align="center" bgcolor="#eff7fe" height="24"> | <a href='/Programming/index.htm'>編程語言</a> | <a href='/webkf/index.htm'>web開發(fā)</a> | <a href='/data/index.htm'>數(shù)據(jù)庫</a> | <a href='/Network/index.htm'>網(wǎng)絡(luò)技術(shù)</a> | <a href='/OS/index.htm'>操作系統(tǒng)</a> | <a href='/Servers/index.htm'>服務(wù)器</a> | <a href='/web/index.htm'>網(wǎng)頁設(shè)計(jì)</a> | <a href='/Design/index.htm'>圖形設(shè)計(jì)</a> | <a href='/Office/index.htm'>辦公軟件</a> | <a href='/soft/index.htm'>常用軟件</a> | <a href='/shadu/index.htm'>殺毒頻道</a> | <a href='/PC/index.htm'>學(xué)電腦</a> |</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" bgcolor="#ffffff" border="0">
<tr>
<td align="center"><script src="/js1/content1.js"></script></td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="25" background="/templets/img/31bg3.gif" align="left" class="guidet"> → 當(dāng)前位置:<a href='http://www.bianceng.cn/'>首頁</a>→<a href='/data/index.htm'>數(shù)據(jù)庫</a>→<a href='/data/SQLServer/index.htm'>SQL Server</a>→<a href='/data/SQLServer/jc/index.htm'>SQL Server教程</a>→正文</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top" class="guidet" width="595"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="ct">
<tr>
<td align="center" valign="middle" class="til"><h3> MS SQL基礎(chǔ)教程:用戶和安全性管理--SQL Server的登錄認(rèn)證 </h3>
發(fā)布時(shí)間:2008-07-11 來源:本站收集整理 作者:不詳<br />
<script src="/js1/468.js"></script>
</td>
</tr>
<tr>
<td style="font-size:14px" align="left" class="til"><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><script src="/js1/300.js"></script></td>
</tr>
</table><p> 對(duì)任何企業(yè)組織來說,數(shù)據(jù)的安全性最為重要。安全性主要是指允許那些具有相應(yīng)的數(shù)據(jù)訪問權(quán)限的用戶能夠登錄到SQL Server 并訪問數(shù)據(jù)以及對(duì)數(shù)據(jù)庫對(duì)象實(shí)施各種權(quán)限范圍內(nèi)的操作,但是要拒絕所有的非授權(quán)用戶的非法操作。因此,安全性管理與用戶管理是密不可分的。SQL Server 2000 提供了內(nèi)置的安全性和數(shù)據(jù)保護(hù),并且這種管理有效而又容易。</p>
<p> 本章主要討論如何創(chuàng)建和管理用戶賬號(hào),以及如何實(shí)現(xiàn)和管理安全性,同時(shí)包括很多技巧和注意事項(xiàng),這些技巧和注意事項(xiàng)將使您的工作更輕松,高效。</p>
<p> SQL Server 2000 的安全性管理是建立在認(rèn)證(authentication)和訪問許可(permission)兩者機(jī)制上的認(rèn)證是指來確定登錄SQL Server 的用戶的登錄賬號(hào)和密碼是否正確,以此來驗(yàn)證其是否具有連接SQL Server 的權(quán)限。但是,通過認(rèn)證階段并不代表能夠訪問SQL Server 中的數(shù)據(jù),用戶只有在獲取訪問數(shù)據(jù)庫的權(quán)限之后,才能夠?qū)Ψ?wù)器上的數(shù)據(jù)庫進(jìn)行權(quán)限許可下的各種操作(主要是針對(duì)數(shù)據(jù)庫對(duì)象,如表、視圖、存儲(chǔ)過程等),這種用戶訪問數(shù)據(jù)庫權(quán)限的設(shè)置是通過用戶賬號(hào)來實(shí)現(xiàn)的。同時(shí)在SQL Server 中,角色作為用戶組的代替物大大地簡(jiǎn)化了安全性管理。</p>
<p> 所以在SQL Server 的安全模型中包括以下幾部分:</p>
<p> SQL Server 登錄</p>
<p> 數(shù)據(jù)庫用戶</p>
<p> 權(quán)限</p>
<p> 角色</p>
<p> 14.1.1 SQL Server 登錄認(rèn)證簡(jiǎn)介</p>
<p> MS SQL Server 能在兩種安全模式下運(yùn)行:</p>
<p> WINDOWS 認(rèn)證模式</p>
<p> 混合模式</p>
<p> (1) WINDOWS 認(rèn)證模式</p>
<p> SQL Server 數(shù)據(jù)庫系統(tǒng)通常運(yùn)行在NT 服務(wù)器平臺(tái)或基于NT 構(gòu)架的WINDOWS 2000 上,而NT 作為網(wǎng)絡(luò)操作系統(tǒng),本身就具備管理登錄,驗(yàn)證用戶合法性的能力,所以WIN- DOWS 認(rèn)證模式正是利用這一用戶安全性和賬號(hào)管理的機(jī)制,允許SQL Server 也可以使用NT 的用戶名和口令。在該模式下,用戶只要通過WINDOWS 的認(rèn)證就可連接到SQL Server, 而SQL Server 本身也沒有必要管理一套登錄數(shù)據(jù)。</p>
<p> WINDOWS 認(rèn)證模式比起SQL Server 認(rèn)證模式來有許多優(yōu)點(diǎn),原因在于WNDOWS 認(rèn)證模式集成了NT 或WINDOWS 2000 的安全系統(tǒng),并且NT 安全管理具有眾多特征,如安全合法性,口令加密,對(duì)密碼最小長(zhǎng)度進(jìn)行限制等。所以當(dāng)用戶試圖登錄到SQL Server 時(shí),它從NT 或WNDOWS 2000 的網(wǎng)絡(luò)安全屬性中獲取登錄用戶的賬號(hào)與密碼,并使用NT 或WINDWOS 2000 驗(yàn)證賬號(hào)和密碼的機(jī)制來檢驗(yàn)登錄的合法性,從而提高了SQL Server 的安全性。</p>
<p> 在WINDOWS NT 中使用了用戶組,所以當(dāng)使用WINDOWS 認(rèn)證時(shí),我們總是把用戶歸入一定的NT 用戶組,以便當(dāng)在SQL Server 中對(duì)NT 用戶組進(jìn)行數(shù)據(jù)庫訪問權(quán)限設(shè)置時(shí),能夠把這種權(quán)限設(shè)置傳遞給單一用戶,而且當(dāng)新增加一個(gè)登錄用戶時(shí),也總把它歸入某一NT 用戶組,這種方法可以使用戶更為方便地加入到系統(tǒng)中,并消除了逐一為每一個(gè)用戶進(jìn)行數(shù)據(jù)庫訪問權(quán)限設(shè)置而帶來的不必要的工作量。</p>
<p> <strong>注意:</strong>如果用戶在登際SQL Server時(shí)未給出用戶登陸名,則SQL Server將自身使用NT認(rèn)證模式,而且如果SQL Server被設(shè)置為NT認(rèn)證模式,則用戶在登錄時(shí)若輸入一個(gè)具體的登錄名時(shí)、SQL Server將忽略該登錄名。</p>
<p> 如果SQL Server是運(yùn)行在WINDOWS95/98上的桌面版,則NT認(rèn)證模式無效。</p>
<p> (2)混合認(rèn)證模式</p>
<p> 在混合認(rèn)證模式下,WINDOWS 認(rèn)證和SQL Server 認(rèn)證這兩種認(rèn)證模式都是可用的。NT 的用戶既可以使用NT 認(rèn)證,也可以使用SQL Server 認(rèn)證。前面已經(jīng)介紹了WINDOWS 認(rèn)證的含義,下面向讀者介紹SQL Server 認(rèn)證模式。</p>
<p> (3) SQL Server 認(rèn)證</p>
<p> 在該認(rèn)證模式下,用戶在連接SQL Server 時(shí)必須提供登錄名和登錄密碼,這些登錄信息存儲(chǔ)在系統(tǒng)表syslogins 中,與NT 的登錄賬號(hào)無關(guān)。SQL Server 自己執(zhí)行認(rèn)證處理,如果輸入的登錄信息與系統(tǒng)表syslogins 中的某條記錄相匹配,則表明登錄成功。</p>
<p> 14.1.2 SQL Server 認(rèn)證模式的設(shè)置</p>
<p> 在對(duì)登錄進(jìn)行增加刪除等操作前,必須首先設(shè)置SQL Server 的認(rèn)證模式。通過SQL Server Enterprise Manager 來進(jìn)行認(rèn)證模式的設(shè)置主要執(zhí)行以下步驟:</p>
<p> (1) 啟動(dòng)SQL Server EnterpriseManager 選擇,要進(jìn)行認(rèn)證模式設(shè)置的服務(wù)器。</p>
<p> (2) 右擊該服務(wù)器,在彈出菜單中選擇Properties, SQL Server 將彈出SQL Server Properties 對(duì)話框。</p>
<p> (3) 在SQL Server Properties對(duì)話框中選擇Security 選項(xiàng)。如圖14-1 所示。</p>
<p> (4) 在Security 選項(xiàng)欄的 Authentication 處選擇要設(shè)置的認(rèn)證模式,同時(shí)可以在 Audit level 處選擇任意一個(gè)單選按鈕,來決定跟蹤記錄用戶登錄時(shí)的哪種信息,例如登錄成功或失敗的信息。</p>
<p> (5)在Starup service account 設(shè)置當(dāng)啟動(dòng)SQL Server Enterprise Manager 時(shí)默認(rèn)的登錄者中哪一位用戶。</p>
<p> <img alt="" src="/upimg/080501/1844280.gif" /></p>
<p> <a href="/data/SQLServer/jc/200712/6352.htm">查看全套"MS SQL基礎(chǔ)教程"</a></p><center><br /><script src="/js1/4682.js"></script></center>
<p>上一篇:<a href='/data/SQLServer/jc/200807/10945.htm'>MS SQL基礎(chǔ)教程:SQL Server安全性管理的途徑</a> 下一篇:<a href='/data/SQLServer/jc/200807/10971.htm'>MS SQL基礎(chǔ)教程:系統(tǒng)存儲(chǔ)過程</a> </p></td>
</tr>
<tr>
<td align="left" style="font-size:14px;" height="25"><IMG src="/images/t0.gif" width="12" height="12" align=absMiddle><strong>相關(guān)文章</strong><br /><table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10945.htm">MS SQL基礎(chǔ)教程:SQL Server安全性管理的途</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10944.htm">MS SQL基礎(chǔ)教程:備份和恢復(fù)概述</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10943.htm">MS SQL基礎(chǔ)教程:創(chuàng)建備份設(shè)備</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10942.htm">MS SQL基礎(chǔ)教程:SQL數(shù)據(jù)庫備份</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10941.htm">MS SQL基礎(chǔ)教程:備份向?qū)?lt;/a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10940.htm">MS SQL基礎(chǔ)教程:SQL數(shù)據(jù)庫的恢復(fù)</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10939.htm">MS SQL基礎(chǔ)教程:備份和恢復(fù)系統(tǒng)數(shù)據(jù)庫</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10971.htm">MS SQL基礎(chǔ)教程:系統(tǒng)存儲(chǔ)過程</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10972.htm">MS SQL基礎(chǔ)教程:管理存儲(chǔ)過程</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10973.htm">MS SQL基礎(chǔ)教程:創(chuàng)建存儲(chǔ)過程</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200807/10974.htm">MS SQL基礎(chǔ)教程:存儲(chǔ)過程概述</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200805/9928.htm">教你如何來進(jìn)行編寫通用的數(shù)據(jù)訪問</a><br/>
</td>
</tr>
<tr>
<td width='50%'>
·<a href="/data/SQLServer/jc/200805/9927.htm">教你如何使用SQL Server來過濾數(shù)據(jù)</a><br/>
</td>
<td width='50%'>
·<a href="/data/SQLServer/jc/200805/9926.htm">SQL Server數(shù)據(jù)庫的數(shù)據(jù)匯總完全解析</a><br/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="165" valign="top" class="guideb"><script src="/js1/1601.js"></script><table width="100%" border="0" cellpadding="0" cellspacing="0" valign="top">
<tr>
<td height="25" align="center" background="/templets/img/31bg3.gif"><strong>閱讀排行</strong></td>
</tr>
<tr>
<td>·<a href="/data/SQLServer/jc/200712/6352.htm">MS SQL Server入門教程</a><br/>
·<a href="/data/SQLServer/jc/200807/10974.htm">MS SQL基礎(chǔ)教程:存儲(chǔ)過程</a><br/>
·<a href="/data/SQLServer/jc/200705/1189.htm">sql語言教程</a><br/>
·<a href="/data/SQLServer/jc/200807/10973.htm">MS SQL基礎(chǔ)教程:創(chuàng)建存儲(chǔ)</a><br/>
·<a href="/data/SQLServer/jc/200705/1182.htm">sql字符串函數(shù)</a><br/>
·<a href="/data/SQLServer/jc/200712/6301.htm">MS SQL基礎(chǔ)教程:SQL Serve</a><br/>
·<a href="/data/SQLServer/jc/200712/6302.htm">MS SQL基礎(chǔ)教程:SQL Serve</a><br/>
·<a href="/data/SQLServer/jc/200712/6314.htm">MS SQL基礎(chǔ)教程:數(shù)據(jù)類型</a><br/>
·<a href="/data/SQLServer/jc/200705/1188.htm">Sql語言基礎(chǔ)</a><br/>
·<a href="/data/SQLServer/jc/200712/6311.htm">MS SQL基礎(chǔ)教程:Transact-</a><br/>
·<a href="/data/SQLServer/jc/200712/6312.htm">MS SQL基礎(chǔ)教程:SQL變量</a><br/>
·<a href="/data/SQLServer/jc/200705/1184.htm">sql基本語句</a><br/>
·<a href="/data/SQLServer/jc/200807/10972.htm">MS SQL基礎(chǔ)教程:管理存儲(chǔ)</a><br/>
·<a href="/data/SQLServer/jc/200712/6306.htm">MS SQL基礎(chǔ)教程:數(shù)據(jù)庫基</a><br/>
·<a href="/data/SQLServer/jc/200705/1178.htm">sql數(shù)據(jù)表</a><br/>
</td>
</tr>
<tr>
<td><script src="/js1/1602.js"></script></td>
</tr>
<tr>
<td height="25" align="center" background="/templets/img/31bg3.gif"><strong>最新文章</strong></td>
</tr>
<tr>
<td><script src="/plus/js/0.js" language="javascript"></script></td>
</tr>
</table></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="760" align="center" bgcolor="#ffffff" border="0">
<tr>
<td align="center"><script src="/js1/content2.js"></script></td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<tr height="26">
<td bgcolor="#e1f0fd" width="48"></td>
<td bgcolor="#6ab3f4" width="35"></td>
<td bgcolor="#0a518f" colspan="2" width="4"></td>
<td bgcolor="#c0c0c0" width="530" align="center"><a title="將本站設(shè)為你的首頁" onclick="this.style.behavior='url(#default#homepage)';this.sethomepage('http://www.bianceng.cn');return false;" href="http://www.bianceng.cn/">設(shè)為首頁</a> | <a class="navmenu"
title="將本站加入到你的收藏夾"
href="javascript:window.external.AddFavorite(location.href,document.title)">加入收藏</a> | <a href="/about/about.htm">關(guān)于本站</a> | <a href="/plus/flink.php">友情鏈接</a> | <a href="/about/banquan.htm">版權(quán)聲明</a> | <a href="/plus/sitemap.html">網(wǎng)站地圖</a> | <a href="/plus/rssmap.html">RSS訂閱</a></td>
<td bgcolor="#0a518f" colspan="2" width="4"></td>
<td bgcolor="#6ab3f4" width="32"></td>
<td bgcolor="#e1f0fd" width="47"></td>
</tr>
<tr height="26">
<td colspan="9" bgcolor="#FFFFFF" align="center">編程入門網(wǎng) 版權(quán)所有,bianceng.cn,All Rights Reserved. <script src="/js/tongji.js"></script> 閱讀次數(shù):<script src="/plus/count.php?aid=10950&mid=0" language="javascript"></script></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -