OdbcLoggingSection Class1
ODBC(Open Database Connectivity) 연결을 통해 데이터베이스에 IIS 이벤트를 로깅하기 위한 구성 설정을 지정합니다.
구문
class OdbcLoggingSection : ConfigurationSection
메서드
다음 표에서는 클래스에서 노출하는 메서드를 나열합니다 OdbcLoggingSection
.
속성 | Description |
---|---|
GetAllowDefinition | ( ConfigurationSection에서 상속됩니다.) |
GetAllowLocation | ConfigurationSection 에서 상속됩니다. |
RevertToParent | ConfigurationSection 에서 상속됩니다. |
SetAllowDefinition | ConfigurationSection 에서 상속됩니다. |
SetAllowLocation | ConfigurationSection 에서 상속됩니다. |
속성
다음 표에서는 클래스에서 노출하는 속성을 나열합니다 OdbcLoggingSection
.
속성 | Description |
---|---|
DataSource |
로그가 기록되는 데이터베이스의 시스템 DSN(데이터 원본 이름)을 지정하는 읽기/쓰기 string 값입니다. 기본값은 "InternetDb"입니다. |
Location |
(에서 ConfigurationSection 상속됨) 키 속성입니다. |
Password |
이벤트 로깅 중에 데이터베이스에 쓰는 데 사용되는 ODBC 데이터베이스 암호를 지정하는 읽기/쓰기 string 값입니다. |
Path |
(에서 ConfigurationSection 상속됨) 키 속성입니다. |
SectionInformation |
ConfigurationSection 에서 상속됩니다. |
TableName |
이벤트 로깅 중에 정보가 기록되는 ODBC 데이터베이스 테이블의 이름을 지정하는 읽기/쓰기 string 값입니다. 기본값은 "InternetLog"입니다. |
UserName |
이벤트 로깅 중에 데이터베이스에 쓰는 데 사용되는 ODBC 데이터베이스 사용자 이름을 지정하는 읽기/쓰기 string 값입니다. 기본값은 "InternetAdmin"입니다. |
를 서브클래싱합니다.
이 클래스에는 하위 클래스가 없습니다.
설명
ODBC 로깅을 사용하면 IIS 데이터를 로컬 Microsoft Access 데이터베이스 또는 로컬 또는 원격 Microsoft SQL Server 데이터베이스로 로깅할 수 있습니다.
예제
다음 코드 예제에서는 , , Tablename
Username
및 Password
속성에 DataSource
대 한 새 값을 지정 합니다. 도우미 함수는 변경 전후의 값을 표시합니다.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject( _
"winmgmts:root\WebAdministration")
' Get the ODBCLoggingSection.
Set oSection = oWebAdmin.Get("OdbcLoggingSection.Path=" & _
"'MACHINE/WEBROOT/APPHOST',Location=''")
' Display the class name of the section.
WScript.Echo "[ " & oSection.Path_.Class & " ]"
' Display the initial values.
Call DisplayValues("Initial Values", oSection)
' Specify new ODBCLoggingSection property values.
oSection.DataSource = "ODBCLoggingDB"
oSection.TableName = "ODBCLoggingTable"
oSection.Username = "ODBCLoggingAdmin"
oSection.Password = "ODBCLoggingPassword"
' Save the values to configuration.
oSection.Put_
' Refresh the oSection object variable with the new values.
oSection.Refresh_
' Show the changed values.
Call DisplayValues("New Values", oSection)
' ==== DisplayValues helper function. ====
Function DisplayValues(HeadingText, oSection)
' Display a heading.
WScript.Echo
WScript.Echo HeadingText
WScript.Echo String(Len(HeadingText), "-")
' Display section properties.
WScript.Echo "Path: " & oSection.Path
WScript.Echo "Location: " & oSection.Location
WScript.Echo "DataSource: " & oSection.DataSource
WScript.Echo "TableName: " & oSection.TableName
WScript.Echo "Username: " & oSection.Username
WScript.Echo "Password: " & oSection.Password
End Function
상속 계층 구조
OdbcLoggingSection
요구 사항
형식 | Description |
---|---|
클라이언트 | - Windows Vista의 IIS 7.0 - Windows 7의 IIS 7.5 - Windows 8의 IIS 8.0 - WINDOWS 10 IIS 10.0 |
서버 | - Windows Server 2008의 IIS 7.0 - Windows Server 2008 R2의 IIS 7.5 - Windows Server 2012의 IIS 8.0 - Windows Server 2012 R2의 IIS 8.5 - WINDOWS SERVER 2016 IIS 10.0 |
제품 | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF 파일 | WebAdministration.mof |
참고 항목
CentralBinaryLogFile 클래스
CentralW3CLogFile 클래스
ConfigurationSection 클래스
HttpLoggingSection 클래스
LogSection 클래스
SiteLogFile 클래스
IIS에서 ODBC 로깅을 구성하는 방법