Subscribe to Windows IT Pro
May 01, 1998 12:00 AM

Bugs in BOL's SQL Trace Table

Windows IT Pro
InstantDoc ID #3508
Rating: (0)

In Books Online (BOL), Example F of the xp_sqltrace entry contains a table similar to SQL Trace. Unfortunately, the example table contains two serious bugs you need to know about. The BOL SQL Trace Application column is defined as NOT NULL, which causes your bcp operation to fail if the client doesn't provide this information in its ODBC or DB-Lib connection string.

The second problem is with the Hostprocess column, which BOL defines as INT. Windows NT's hostprocess is a 32-bit number that can exceed the defined range for INT of ±2,147,483,648. Hostprocess usually falls within SQL's INT range, but it could exceed the maximum value, which would also cause bcp to fail. Discovering these bugs wasn't easy, so don't forget to fix the Application and Hostprocess datatypes if you copy the SQL Trace table directly from BOL. If you're working with large trace files, check out my article "Seven Tips for Speeding Large Data Loads with Bulk Copy Program," February 1997, for information about tuning bcp.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.