Home Forums SQL Server 7,2000 T-SQL Execute a Stored procedure from different databases RE: Execute a Stored procedure from different databases

  • Roy's link is the solution that you could use for the above. Just to include the solution here too:

    On 2000 when you create the stored procedure in the master database, you can create it like:

    use master

    GO

    EXEC master.dbo.sp_MS_upd_sysobj_category 1

    GO

    create proc sp_alma1

    as

    select * from dbo.temptable1

    GO

    EXEC master.dbo.sp_MS_upd_sysobj_category 2

    GO

    use tempdb

    On 2005 you can just change an existing stored procedure (in my example sp_alma1) to a system proc with:

    use master

    GO

    EXEC sys.sp_MS_marksystemobject sp_alma1

    GO

    use tempdb

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software