Sunday, February 19, 2012

accessing stored procedure

Hi there!
I 've defined a sp while I was logged as 'sa' into query
analyser...well, I defined this sp with a specific owner, I mean:
create proc myowner.myproc...Etc...
once defined, I can invoke this sp from query analyser, no pb..(exec
myowner.myproc...)
But, when I log into database ('sa' user) from VBscript and I try to
run my sp, it says, it can't find my sp...despite the fact I can run
it from query analyser without any troubles...
did I miss something'
thanks a lot
++
Vince
note: this sp uses bulk insert statement, so the user needs to be
either symin or bulkadmin, that's why I chose to log as 'sa', I
noticed that no need for 'myowner' to be in bulkinsert roleVince <vincent@.<remove>.> wrote in news:nkf551h5lc7dc0rllkdvrvtvslocfebkri@.
4ax.com:

> Hi there!
> I 've defined a sp while I was logged as 'sa' into query
> analyser...well, I defined this sp with a specific owner, I mean:
> create proc myowner.myproc...Etc...
> once defined, I can invoke this sp from query analyser, no pb..(exec
> myowner.myproc...)
>
> But, when I log into database ('sa' user) from VBscript and I try to
> run my sp, it says, it can't find my sp...despite the fact I can run
> it from query analyser without any troubles...
> did I miss something'
> thanks a lot
>
If the object is owned by a user account other than sa (sa would show
"dbo" as the owner), then you must preface it with the owner name
(myowner.myproc) when logged in as anyone other than the owner, including
sa.
Rumble
"Write something worth reading, or do something worth writing."
-- Benjamin Franklin|||On Tue, 05 Apr 2005 16:56:47 GMT, Rumbledor
<Rumbledor@.hotspamsuxmail.com> wrote:

>If the object is owned by a user account other than sa (sa would show
>"dbo" as the owner), then you must preface it with the owner name
>(myowner.myproc) when logged in as anyone other than the owner, including
>sa.
this is what I did in my VBscript, I logged in as 'sa' but I invoke my
sp naming it by its owner...
that's why I don't understand why it doesn't work...
I got It '
++
Vince|||Vince <vincent@.<remove>.> wrote in
news:7ih551t07mds2rt30dkl779dunangq4aj0@.
4ax.com:

> On Tue, 05 Apr 2005 16:56:47 GMT, Rumbledor
> <Rumbledor@.hotspamsuxmail.com> wrote:
>
> this is what I did in my VBscript, I logged in as 'sa' but I invoke my
> sp naming it by its owner...
> that's why I don't understand why it doesn't work...
> I got It '
It sounds like it should work, then. Perhaps if you posted the VBScript
code, the problem might be more apparent.
Rumble
"Write something worth reading, or do something worth writing."
-- Benjamin Franklin

No comments:

Post a Comment