DECLARE @SQL VARCHAR(500)
SELECT @SQL = 'osql -S' + @@servername
+ ' -E -q "exec [DataBaseName].[dbo].StoreProcedureName"'
EXEC master..xp_cmdshell @SQL
SELECT @SQL = 'osql -S' + @@servername
+ ' -E -q "exec [DataBaseName].[dbo].StoreProcedureName"'
EXEC master..xp_cmdshell @SQL
0 Comments