How can I call a SP inside a SP without the owner name 
Author Message
 How can I call a SP inside a SP without the owner name

Hi,
   If I am calling a SP in a SP, unless I use the owner
name it doesn't work. I am really confused with this
because when I access the table names I never use any
owner name. This is good because I can directly take this
code and put it on other clients and create without any
changes to the code.

-- I logged-in as 'amaco' for Amaco client and all the
-- tables and Sps are created with owner name 'amaco'
Create Proc_Sp1
AS
....
....
....
Execute Proc_Sp2
...
...

Return

------

Now when I want to create for Texaco I will just loggin
as 'texaco' and create all the SPs without changing the
code, which makes life easier.

I cannot do it the above way because when calling SP in an
SP, I have to use amaco.proc_Sp2, otherwise it will not
work. Can you advise me with this problem (How can I avoid
the owner name).

Thank you in advance.
-Rayan.



Fri, 19 May 2006 17:16:48 GMT
 How can I call a SP inside a SP without the owner name

The way to avoid this is to make sure all objects are created as owned by
"dbo".

 - Wm

--
William Morris
Product Development, Seritas LLC


Quote:
> Hi,
>    If I am calling a SP in a SP, unless I use the owner
> name it doesn't work. I am really confused with this
> because when I access the table names I never use any
> owner name. This is good because I can directly take this
> code and put it on other clients and create without any
> changes to the code.

> -- I logged-in as 'amaco' for Amaco client and all the
> -- tables and Sps are created with owner name 'amaco'
> Create Proc_Sp1
> AS
> ....
> ....
> ....
> Execute Proc_Sp2
> ...
> ...

> Return

> ------

> Now when I want to create for Texaco I will just loggin
> as 'texaco' and create all the SPs without changing the
> code, which makes life easier.

> I cannot do it the above way because when calling SP in an
> SP, I have to use amaco.proc_Sp2, otherwise it will not
> work. Can you advise me with this problem (How can I avoid
> the owner name).

> Thank you in advance.
> -Rayan.



Fri, 19 May 2006 17:25:53 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Calling SP from inside another SP

2. calling SP inside SP

3. How Get Output Param from Inside SP, calling another SP

4. function calls inside SP exec call

5. Using a SP inside another SP

6. Use a sp to Make a view with a sp inside

7. sp inside sp

8. Check if parameter supplied to SP inside SP

9. can't find sp without specifying the owner

10. SP is taking the same time of a normal SELECT string without SP

11. Call DLL inside SP

12. calling a stored procedure inside another sp


 
Powered by phpBB® Forum Software