Google Answers Logo
View Question
 
Q: SQL Server Issue ( No Answer,   1 Comment )
Question  
Subject: SQL Server Issue
Category: Computers > Programming
Asked by: ftangrude-ga
List Price: $10.00
Posted: 10 Nov 2004 16:18 PST
Expires: 10 Dec 2004 16:18 PST
Question ID: 427334
I'm running a SQL Server bcp out. When I look at the trace it shows
that the output sproc is being run twice. Between each sproc call
there is 'select BCPCollationName(0x0904D00034,167),
BCPCollationName(0x0904D00034,175)

Does anyone know why the sproc runs twic, or what the BCPCollationName does?

the calling code looks like this:
SET @bcpCmd = 'bcp "exec FNA_VIN.dbo.VCIS_P_SELECT_VIN_FOR_EXPORT '''
+ @FolderName + ''', ''' + @FileName + '''" queryout ' +
@strDestExport + '\' + @FolderName + '\' + @FileName + '.dat' +  ' -c
-T -t'
EXEC	master..xp_cmdshell @bcpCmd

The trace looks like this:
SET FMTONLY ON exec FNA_VIN.dbo.VCIS_P_SELECT_VIN_FOR_EXPORT '1FD3',
'XW46A8' SET FMTONLY OFF
go
exec FNA_VIN.dbo.VCIS_P_SELECT_VIN_FOR_EXPORT '1FD3', 'XW46A8'
go
SELECT BCPCollationName(0x0904D00034, 175), BCPCollationName(0x0904D00034, 167)
go
exec FNA_VIN.dbo.VCIS_P_SELECT_VIN_FOR_EXPORT '1FD3', 'XW46A8'
go
exec sp_unprepare 1
go

Does anyone know what this might be?
Answer  
There is no answer at this time.

Comments  
Subject: Re: SQL Server Issue
From: mrd3nny-ga on 10 Nov 2004 18:05 PST
 
The SELECT BCPCollationName(0x0904D00034, 175),
BCPCollationName(0x0904D00034, 167) statement is figuring out which
Collation type to use.

I would assume that it is running the proc twice so that it can
deturmin the column types when creating the BCP output file.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy