BCP Error : Microsoft][SQL Native Client][SQL Server]Could not find stored procedure 'dbo.EXTGEN_InitSessionContextSp'.

  • Try this bcp command. I moved the name of the database to the -d switch:

    bcp "exec dbo.Rpt_JobTransactionsSp 'SRMQDIC','ROD','B','HNS','0','B',

    null,null,null,null,'000','9999','1/1/2013','3/17/2013',null,null,null,null,null

    ,null,null,null,'T',null,null,'1','0','1033'" Queryout "c:\temp\query.txt" -T -d PHIL_App

    -c -t^| -Sphlsqlsl01

  • got error

    output

    bcp: unknown option d

    usage: bcp {dbtable | query} {in | out | queryout | format} datafile

    [-m maxerrors] [-f formatfile] [-e errfile]

    [-F firstrow] [-L lastrow] [-b batchsize]

    [-n native type] [-c character type] [-w wide character type]

    [-N keep non-text native] [-V file format version] [-q quoted identifier]

    [-C code page specifier] [-t field terminator] [-r row terminator]

    [-i inputfile] [-o outfile] [-a packetsize]

    [-S server name] [-U username] [-P password]

    [-T trusted connection] [-v version] [-R regional enable]

    [-k keep null values] [-E keep identity values]

    [-h "load hints"] [-x generate xml format file]

    NULL

  • Sounds like you might be calling the SQL 2005 version of bcp. What version of SQL is your database on?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • SQL 2005. Our Database Server is 2005 . Is there a way to use -d option with 2005 server ?

  • skb 44459 (3/22/2013)


    SQL 2005. Our Database Server is 2005 . Is there a way to use -d option with 2005 server ?

    Unfortunately, no.

    Can you help us understand the setup a little more about this statement:

    But we have hundred's of procedure provided by our ERP vendor which we can not change technically.

    Is there a work arounnd for

    IF OBJECT_ID(N'extgen_ki_TestLoop1') IS NOT NULL

    Why are you trying to check for the existence of a stored procedure in a database other than the one you are in? And if that is needed, why are you opposed to fully-qualifying the existence-check?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply