Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Many Event ID 2000 entries seen on SQL Server OS when you call the write method to SQLfilestream from an XP client


Symptoms

Each time you call OpenSQLFileStream from an XP client, you notice a series of Event ID 2000 entries on the SQL Server.

The following is in the details section of the event 2000 error:

Binary data:

In Words

0000: 00040000 00580001 00000000 C00007D0

0008: 00000000 C000000D 00000000 00000000

0010: 00000000 00000000 02000320

↑ Back to the top


Cause

It is a default behavior. Whenever we call OpenSQLFileStream to write a 'blob' to the SQL Server, it internally calls the CreateFile method (Windows API).

When opening or creating a file with the CreateFile function, the FILE_FLAG_NO_BUFFERING flag can be specified to disable system caching of data being read from or written to the file.

This flag eliminates all read-ahead file buffering and disk caching so that all reads are guaranteed to come from the file and not from any system buffer or disk cache.

↑ Back to the top


Resolution

To work around this issue, please use SQL_FILESTREAM_OPEN_FLAG_NO_BUFFERING flag with OpenSQLFileStream function.

↑ Back to the top


Keywords: vkball, kb

↑ Back to the top

Article Info
Article ID : 2544054
Revision : 1
Created on : 1/8/2017
Published on : 4/27/2011
Exists online : False
Views : 108