I have a scheduled T-SQL event that should run a stored procedure. Here is the code:
DECLARE @return_value int
EXEC @return_value = [dbo].[ImportFromOFMLink]
SELECT 'Return Value' = @return_value
Should I take the GOs out?
When I run it it comes back with the following error...
NEW COMPONENT OUTPUT
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.3042
Report was generated on "SVR020".
Maintenance Plan: SyncOFMLink_to_OFMTest
Status: Warning: One or more tasks failed..
Execute T-SQL Statement Task (SVR020)
Execute TSQL on Local server connection
Execution time out: 0
Task start: 2011-09-22T16:44:18.
Task end: 2011-09-22T16:44:18.
Failed-1073548784) Executing the query "
" failed with the following error: "Could not find stored procedure 'dbo.ImportFromOFMLink'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I noticed that the is an object inspector when using MS-SQL Server Management Studio but I can not figure out how to get this to connect to the right database. I thought that by using the
Would specify the database to find the stored proc under but it failed.
I guess I could just copy the SQL into the T-SQL instead of running it as a stored proc but I like it to be in a stored proc so that I can make modifications without having to remember to go to the scheduled T-SQL event and updating it too.