July 10, 2009 at 7:39 am
I created a simple stored procedure and when i try to call it though BCP i keep getting:
Error = [Microsoft][SQL Native Client][SQL Server]Could not find stored procedure 'database.dbo.TestProc'.
This is crazy.. the proc is there I just created it and verfied spellings etc. Why can't BCP find it???
July 10, 2009 at 7:48 am
what does your bcp statement look like?
complete command must be on one line.
N 56°04'39.16"
E 12°55'05.25"
July 10, 2009 at 7:55 am
bcp "exec db1.dbo.[usp_testproc] 'test'" queryout "Y:\files\test.csv" -c -t, -T
all on 1 line...
July 10, 2009 at 8:02 am
Where is the -S option? You have to tell BCP which server to use.
There may actually be more than one instance on same server.
N 56°04'39.16"
E 12°55'05.25"
July 10, 2009 at 8:05 am
3 Stupid questions.. Sorry I have to ask (bad experiences when I didn't)..
1. Is the sproc actually owned by dbo, did you specify that when compiled..
2. Is the sproc actually in that database, are you sure you compiled it in the right db..
3. Does the user have rights to that DB and sproc, I know it didn't come back with a permissions error, but...
CEWII
July 10, 2009 at 8:09 am
Elliott W (7/10/2009)
3 Stupid questions.. Sorry I have to ask (bad experiences when I didn't)..1. Is the sproc actually owned by dbo, did you specify that when compiled..
2. Is the sproc actually in that database, are you sure you compiled it in the right db..
3. Does the user have rights to that DB and sproc, I know it didn't come back with a permissions error, but...
CEWII
1) Yes
2) Yes
3) AFAIK.
🙁
July 10, 2009 at 8:19 am
Any reason you ignored my question about the -S option?
Where you set the database server and/or instance to use.
N 56°04'39.16"
E 12°55'05.25"
July 10, 2009 at 8:19 am
The server switch did it.
This guy has 3 instances of SQL Server 2k5 on him.
July 10, 2009 at 8:21 am
Apparently it didn't exist on the default instance..
CEWII
July 10, 2009 at 8:24 am
You're welcome.
N 56°04'39.16"
E 12°55'05.25"
July 10, 2009 at 9:00 am
Thank you, Peso.
I did not ignore your suggestion as you can see.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply