Re: bcp error when queryout is stored procedure
- From: "Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 Apr 2005 14:50:47 +0200
BCP tries to get how the result set will look like in order to generate the file format correctly.
It uses SET FMTONLY ON for this. You can try adding SET FMTONLY OFF in the beginning of he "query
(proc)" you will execute so that the temp table will actually be created, but be aware that the proc
then will be executed twice!
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"vygandas" <vygandas@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:424A4746-2C0C-4D00-B529-82FE4856E371@xxxxxxxxxxxxxxxx
>I posted previous code just as an example, what I think is incorrect BCP
> behavior. Applications (including bcp) should not be aware how stored
> procedure produces result set.
>
> Real stored procedure is very large and it populates temporary table through
> its all execution. I will consider use of global or "permanent" tables to
> work around this, but it will not be trivial, because the stored procedure
> will be executed in multiple processes at same time.
>
> Does anybody know how I can submit bug fix (improvement) request to Microsoft?
>
> Thank you for your responses!
>
> Vygandas
> MCDBA, MCSD
>
.
- References:
- bcp error when queryout is stored procedure
- From: vygandas
- RE: bcp error when queryout is stored procedure
- From: vygandas
- bcp error when queryout is stored procedure
- Prev by Date: Re: Problem with database maintenece plan job...
- Next by Date: Re: Problem with database maintenece plan job...
- Previous by thread: RE: bcp error when queryout is stored procedure
- Next by thread: SQL Server Maintenance Plan and Map Network Drive Problem (pls reply me soon)
- Index(es):
Relevant Pages
|