I just use the 'Generate SQL Script' from EM to export stored procedure.
How do I export the Stored Procedure SQL Script in to a file so in an order
so that they can be created successfully ?
I got an error when execute the scripts:
Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'sp1'. The stored procedure will still be
created.
Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'sp2'. The stored procedure will still be
created.
...............
...............
How do I get around that ?We usually keep an "installation " table , when we save out stored
procedures they are ordered by the stated execution order. (customised
script)
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Alan" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:eXOzROPmGHA.4164@.TK2MSFTNGP03.phx.gbl...
> I just use the 'Generate SQL Script' from EM to export stored procedure.
> How do I export the Stored Procedure SQL Script in to a file so in an
order
> so that they can be created successfully ?
> I got an error when execute the scripts:
> Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'sp1'. The stored procedure will still be
> created.
> Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'sp2'. The stored procedure will still be
> created.
> ...............
> ...............
> How do I get around that ?
>|||Thanks.
I reordered some of the sp based on the depenancies.
However, I still got error in one of the sp in which a recursion occurrs:
CREATE PROCEDURE dbo.recur_sp
@.parent_id int
as
........
if exists(select 1 from category where parent_id=@.id)
exec recur_sp @.id
select @.row = @.row + 1
end
Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'recur_sp'. The stored procedure will still be
created.
"Jack Vamvas" <DEL_TO_REPLYtechsupport@.ciquery.com> wrote in message
news:ELCdnem5EM1sDgLZRVnyvQ@.bt.com...
> We usually keep an "installation " table , when we save out stored
> procedures they are ordered by the stated execution order. (customised
> script)
>
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Alan" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
> news:eXOzROPmGHA.4164@.TK2MSFTNGP03.phx.gbl...
>> I just use the 'Generate SQL Script' from EM to export stored procedure.
>> How do I export the Stored Procedure SQL Script in to a file so in an
> order
>> so that they can be created successfully ?
>> I got an error when execute the scripts:
>> Cannot add rows to sysdepends for the current stored procedure because it
>> depends on the missing object 'sp1'. The stored procedure will still be
>> created.
>> Cannot add rows to sysdepends for the current stored procedure because it
>> depends on the missing object 'sp2'. The stored procedure will still be
>> created.
>> ...............
>> ...............
>> How do I get around that ?
>>
>|||That "error" is normal for recursive procs. It's just a warning and can be
safely ignored.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"Alan" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:eSD7sVYmGHA.4816@.TK2MSFTNGP03.phx.gbl...
Thanks.
I reordered some of the sp based on the depenancies.
However, I still got error in one of the sp in which a recursion occurrs:
CREATE PROCEDURE dbo.recur_sp
@.parent_id int
as
........
if exists(select 1 from category where parent_id=@.id)
exec recur_sp @.id
select @.row = @.row + 1
end
Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'recur_sp'. The stored procedure will still be
created.
"Jack Vamvas" <DEL_TO_REPLYtechsupport@.ciquery.com> wrote in message
news:ELCdnem5EM1sDgLZRVnyvQ@.bt.com...
> We usually keep an "installation " table , when we save out stored
> procedures they are ordered by the stated execution order. (customised
> script)
>
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Alan" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
> news:eXOzROPmGHA.4164@.TK2MSFTNGP03.phx.gbl...
>> I just use the 'Generate SQL Script' from EM to export stored procedure.
>> How do I export the Stored Procedure SQL Script in to a file so in an
> order
>> so that they can be created successfully ?
>> I got an error when execute the scripts:
>> Cannot add rows to sysdepends for the current stored procedure because it
>> depends on the missing object 'sp1'. The stored procedure will still be
>> created.
>> Cannot add rows to sysdepends for the current stored procedure because it
>> depends on the missing object 'sp2'. The stored procedure will still be
>> created.
>> ...............
>> ...............
>> How do I get around that ?
>>
>