Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 could exist stored procedure with the same name?

Author  Topic 

ann06
Posting Yak Master

171 Posts

Posted - 2008-11-19 : 09:12:18
could it happen that two stored procedure with the same name exist in the same database but with different owners ?

first i had only one but the owner is not me i couldnt run and it gave "Could not find stored procedure "xxx"
then i created a script from the same procedure and ran in the analyzer then i could now run the procedure


but now i have two stored procedure with the same name !! under each other
very strange

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-19 : 09:14:55
yup. you can have two storedprocedures with same name but under different schema.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-19 : 09:39:40
You can have same procedure name under same owner (pre 2005) or schema, just annotated with ";1" ";2" and so on...



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

ann06
Posting Yak Master

171 Posts

Posted - 2008-11-20 : 00:53:29
ok how to execute this stored procedure if the owner is a domain user not a dbo ex. rpdho/waseem
i gave myself exec permission but still giving :Could not find stored procedure..
am using sql 2000
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-20 : 01:02:50
quote:
Originally posted by ann06

ok how to execute this stored procedure if the owner is a domain user not a dbo ex. rpdho/waseem
i gave myself exec permission but still giving :Could not find stored procedure..
am using sql 2000


exec [rpdho/waseem].Procedurenamehere
Go to Top of Page

ann06
Posting Yak Master

171 Posts

Posted - 2008-11-20 : 01:13:48
yup it worked thanks dude very much :D
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-20 : 01:17:17
You're welcome
Go to Top of Page
   

- Advertisement -