EXEC sp_procoption

  • Hi,

    Is it possible to run a proc at start up which get information about the server and inserts it to another database via linked server?

    Test i have done haven't worked

  • Have you tried setting the procedure to run using sp_procoption? That will enable a procedure to run when SQL Server starts up. You can also schedule jobs to run when SQL Agent starts (forgot about that one recently) and run the procedure through there.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Yeah, i had it set to run on start up with sp_procoption

    i have a feeling that it cannot use the linked servers whilst on start up i also tried setting a WAITFOR 1 minute but also no luck

  • Then try to the SQL Agent. That will only run after SQL Server has completed it's startup.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply