文章編號: 245243 - 上次校閱: 2008年7月7日 - 版次: 6.1 如何設定 ODBC 記錄在 IIS 中
我們強烈建議所有使用者都升級到 Microsoft 網際網路資訊服務 (IIS) 7.0 版 Microsoft Windows Server 2008 上執行。 IIS 7.0 大幅提升網頁基礎結構的安全性。如需有關 IIS 與安全性相關的主題請造訪下列的 Microsoft Web 網站: http://www.microsoft.com/technet/security/prodtech/IIS.mspx
(http://www.microsoft.com/technet/security/prodtech/IIS.mspx)
如需有關 IIS 7.0 的詳細資訊,請造訪下列 Microsoft 網站]:http://www.iis.net/default.aspx?tabid=1
(http://www.iis.net/default.aspx?tabid=1)
在此頁中結論在 [網際網路資訊伺服器 (IIS) 4.0、 在網際網路資訊服務 (IIS) 5.0 及在網際網路資訊服務 (IIS) 6.0,您可以設定開放式資料庫連接 (ODBC) 登入功能,以允許對本機的 Microsoft Access 資料庫或本機或遠端 Microsoft SQL Server 資料庫的記錄。 建立資料表在 Microsoft Access 或 SQL Server 資料庫中建立資料表。若要執行此動作可能是依照 Run a SQL Script to Automate Creating the Table] 區段中,或以手動方式建立資料表,利用 Table - Field Format 區段中的欄位] 按鈕。預設的資料表名稱都是 InternetLog 在網際網路服務管理員 (ISM) Microsoft 管理主控台 (MMC) 中的 [ODBC 記錄內容] 頁面上。注意: 這些步驟適用於全球資訊網 (WWW) 或檔案傳輸通訊協定 (FTP) Web 伺服器上的記錄。 執行 SQL 指令碼來自動化建立資料表如果您使用的執行 SQL Server 的電腦,您可以建立 IIS ODBC 記錄表格與名為 Logtemp.sql 隨附於 IIS 的 Transact-SQL 指令碼。要這麼做,請您執行下列步驟:
資料表-欄位格式FieldName: ClientHostData Source/Type: Varchar(255) Explanations: Client IP address. FieldName: Username Data Source/Type: Varchar(255) Explanations: User name for the client. If the page is not password-protected, this is always the anonymous user name. FieldName: LogTime Data Source/Type: Datetime Explanations: Date and time that the log entry was created. FieldName: Service Data Source/Type: Varchar(255) Explanations: Name of the service. This can be WWW, FTP, or some other name. FieldName: Machine Data Source/Type: Varchar(255) Explanations: Server name. FieldName: ServerIP Data Source/Type: Varchar(255) Explanations: Server IP address. FieldName: ProcessingTime Data Source/Type: Int Explanations: Time spent on request processing (in milliseconds). FieldName: BytesRecvd Data Source/Type: Int Explanations: Number of bytes received. FieldName: BytesSent Data Source/Type: Int Explanations: Number of bytes sent. FieldName: ServiceStatus Data Source/Type: Int Explanations: Service status, such as 200. FieldName: Win32Status Data Source/Type: Long Integer Explanations: Windows NT status code. 0 typically indicates success. FieldName: Operation Data Source/Type: Varchar(255) Explanations: Type of the operation or command. For example, this may be USER for FTP or GET for WWW. FieldName: Target Data Source/Type: Varchar(255) Explanations: Target of the operation. For example, this may be Default.htm. FieldName: Parameters Data Source/Type: Varchar(255) Explanations: Any parameters for the operation. This can be either name/value pairs for invoking CGI or an ISAPI extension. It is a user name for the FTP command USER. 建立系統資料來源名稱注意: 此範例會使用 SQL Server 7.0。
設定 IIS 以進行 ODBC 記錄
ODBC 記錄的建議
疑難排解如果 InternetLog 資料表不正確地,設定或正確的使用者未授與正確的權限到 InternetLog 表格,可能會收到事件 ID 5、 事件 ID 6 (與 IISLOG 的來源),或兩者的 「 事件檢視器 」 系統記錄檔中。注意: 對於其他的資料庫系統您必須設定系統資料來源名稱連結資料庫和包含記錄的格式適當的欄位的資料表,並遵循 Configuring IIS for ODBC Logging 若要設定記錄中的步驟。 ?考如更多有關 ODBC 記錄問題的資訊,按一下下面的文件編號,檢視 「 Microsoft 知識庫 」 中 「 文件: 149398?
(http://support.microsoft.com/kb/149398/
)
IIS 記錄到 SQL Server 失敗,並顯示空白的使用者名稱和密碼 192293?
(http://support.microsoft.com/kb/192293/
)
IIS 停止 ODBC 與 SQL Server 通訊失敗後的記錄 256839?
(http://support.microsoft.com/kb/256839/
)
長 URL 要求或參數並未記錄當您使用 ODBC 記錄 如更多有關匯入 SQL 的 IIS 記錄檔的資訊,按一下下面的文件編號,檢視 「 Microsoft 知識庫 」 中 「 文件: 296085?
(http://support.microsoft.com/kb/296085/
)
如何使用 SQL Server 分析網站記錄 296093?
(http://support.microsoft.com/kb/296093/
)
SQL 大量插入 PrepWebLog 公用程式會準備 IIS 記錄檔 這篇文章中的資訊適用於:
機器翻譯重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。 按一下這裡查看此文章的英文版本:245243?
(http://support.microsoft.com/kb/245243/en-us/
)
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。 | 其他資源 其他支援網站社群立即取得協助文章翻譯
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email


回此頁最上方
