April 22, 2010 at 3:48 pm
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
April 22, 2010 at 5:50 pm
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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software
April 22, 2010 at 9:10 pm
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
April 23, 2010 at 5:41 am
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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply