SQL Server has encountered a database I/O error: Msg 823
<Details>
<Content>Msg 823 was logged in the Windows Application Event Log. This error can indicate a database consistency problem. SQL Server generates an 823 error when an I/O operation on the database or transaction log fails. In some cases, the failure might be due to other database consistency problems. The operating system error that caused the I/O to fail is provided in the message.
Consider running a full database consistency check (DBCC CHECKDB) to determine the extent of all consistency errors. See the Information collected below for the database file context for which this error was detected. Because Msg 823 could be related to an I/O problem, you should review the Windows System Event Log for indication of I/O problems and carefully inspect all I/O hardware and system software components.</Content>
<CollectedInformation>
<Info>
<Name>Database file reported for this error</Name>
<Value>{0}</Value>
</Info>
<Info>
<Name>Operating system error</Name>
<Value>{1}</Value>
</Info>
</CollectedInformation>
</Details>
Dim databaseFile
databaseFile = oArgs(3)
Call oBag.AddValue("DatabaseFile", databaseFile)
'now run query to determine database files
Dim connString
connString = "Provider=SQLOLEDB;Data Source=" + sqlInstance + "; Initial Catalog=master;Integrated Security=SSPI"
Dim oConnection
Set oConnection = CreateObject("ADODB.Connection")
oConnection.Open connString
Dim query
' Note: In VBScript, you use ? to pass parameters.
query = "select physical_name from sys.master_files where database_id = ? and physical_name like ? "
Dim oCommand
Set oCommand = CreateObject("ADODB.Command")
oCommand.CommandText = query
oCommand.CommandType = 1 'adCmdText