1

I have enabled Driver Tracing using these directions. I am running SQL Server 2014, which uses the 2012 native driver.

I run the start batch file then the following LogParser command:

"c:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT SUBSTR(Field1, 0, 2) AS CountryCode, SUBSTR(TO_STRING(Field2), 0, 5) AS Zip INTO ZipCodes FROM 'c:\Users\jdearing\Downloads\us.txt'" -i:TSV -headerrow:OFF -o:SQL -server . -database LogParserTest -cleartable -transactionRowCount:0 -ignoreMinWarns:OFF

This inserts zero rows. instead producing this error for every row:

An error occurred while uploading data to SQL table
  SQL State:     22001
  Native Error:  0
  Error Message: [Microsoft][ODBC SQL Server Driver]String data, right
  truncation

Upon stopping the trace the etl is 1024k, but has no rows according to this logparser query:

"c:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT * FROM 'SnacTrace_000001.etl'" -i:ETW

I noticed a disparity in the GUIDS in the providers.txt batch file and the output of logman query providers | findstr SQL

echo {BA798F36-2325-EC5B-ECF8-76958A2AF9B5} 0xFFFFFFFF 128 SQLNCLI > providers.txt 
echo {A9377239-477A-DD22-6E21-75912A95FD08} 0xFFFFFFFF 128 SQLNCLI10 >> providers.txt 
echo {2DA81B52-908E-7DB6-EF81-76856BB47C4F} 0xFFFFFFFF 128 SQLNCLI11 >> providers.txt 

Versus

SQLNCLI.1                                {BA798F36-2325-EC5B-ECF8-76958A2AF9B5}
SQLSERVER.09                             {AB6D5EEB-0132-74AB-C5F5-B23E1644DADA}
SQLSERVER.10                             {48D59D84-105B-00FA-6B49-03462F696737}
SQLSERVER.11                             {B2A28C42-A7C2-1563-97CC-3BE49FDA19F9}

So I updated the batch file to:

echo {BA798F36-2325-EC5B-ECF8-76958A2AF9B5} 0xFFFFFFFF 128 SQLNCLI > providers.txt 
echo {48D59D84-105B-00FA-6B49-03462F696737} 0xFFFFFFFF 128 SQLNCLI10 >> providers.txt 
echo {B2A28C42-A7C2-1563-97CC-3BE49FDA19F9} 0xFFFFFFFF 128 SQLNCLI11 >> providers.txt 

Still no luck. What else can I try? Is logparser not using the native client?

2 Answers 2

1

Try specifying the -driver option explicitly, providing the name of the native client.

3
  • Advice from the author himself. I'm traveling, but will try that when I'm in front of the computer again. Commented Jul 3, 2015 at 12:41
  • That changes Error Message: [Microsoft][ODBC SQL Server Driver]String data, right truncation to [Microsoft][SQL Server Native Client 11.0], but nothing shows up in the traces. Commented Jul 10, 2015 at 19:49
  • Well, the error message clearly shows that now LogParser is using the SQL Server Native Client 11.0 driver. As for why the driver's tracing does not show anything, I can't help. Commented Jul 13, 2015 at 20:07
1

I've gotten data to show up in the ETL. The two things I did were as follows:

  • I had to modify the batch file to also set the 32 bit BitInterface Loader: HKLM\software\Wow6432Node\Microsoft\BidInterface\Loader
  • I modified the providers.txt as follows: {BA798F36-2325-EC5B-ECF8-76958A2AF9B5} 0xFFFFFFFF 128 SQLNCLI {A9377239-477A-DD22-6E21-75912A95FD08} 0xFFFFFFFF 128 SQLNCLI10.1 {2DA81B52-908E-7DB6-EF81-76856BB47C4F} 0xFFFFFFFF 128 SQLNCLI11.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.