Wednesday, March 7, 2012

Could not find stored procedure

User creates a sp and the same is visible in the
enterprise manager. The user has rights to execute also.
However the isql gives the above mentioned error even for
sa!!!
No clue please help.Hi Sandip,
Make sure that you are in the right database when trying to execute the
stored procedure. Unless you specify a database with isql, it will use the
default database for that user, which is usually master.
Jacco Schalkwijk
SQL Server MVP
"Sandip" <bsandipk@.hotmail.com> wrote in message
news:072701c40022$9dd31140$3501280a@.phx.gbl...
> User creates a sp and the same is visible in the
> enterprise manager. The user has rights to execute also.
> However the isql gives the above mentioned error even for
> sa!!!
> No clue please help.|||Hi!
The user that creates the procedure is owner of te procedure, if it was not
created with a specific owner (i.e. CREATE PROCEDURE owner.name). The sa
loin is mapped to a specific db user dbo, so SQL Server searches dbo.name
procedure. Eithercreate all n+bjects wit dbo as owner, or use two-part name
when using it.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Sandip" <bsandipk@.hotmail.com> wrote in message
news:072701c40022$9dd31140$3501280a@.phx.gbl...
> User creates a sp and the same is visible in the
> enterprise manager. The user has rights to execute also.
> However the isql gives the above mentioned error even for
> sa!!!
> No clue please help.|||Hi ,
To add on to Dejan Sarka post , Simply execute the below query in Query
analyzer
select user_name(uid) as Creator,name from sysobjects where name =
'procedure_name'
Replace the procedure_name with actual name.
Incase the the creator name is not DBO then use sp_changeobjectowner (refer
books online) to change the object owner.
Thanks
Hari
MCDBA
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:ugW0lfCAEHA.2660@.TK2MSFTNGP10.phx.gbl...
> Hi!
> The user that creates the procedure is owner of te procedure, if it was
not
> created with a specific owner (i.e. CREATE PROCEDURE owner.name). The sa
> loin is mapped to a specific db user dbo, so SQL Server searches dbo.name
> procedure. Eithercreate all n+bjects wit dbo as owner, or use two-part
name
> when using it.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "Sandip" <bsandipk@.hotmail.com> wrote in message
> news:072701c40022$9dd31140$3501280a@.phx.gbl...
>

No comments:

Post a Comment