May 8, 2008 at 4:42 pm
I am trying to run following command but getting error like
Procedure or function 'Procedure Name' expects parameter '@status', which was not supplied.
declare
@SQLCmd Varchar(1000)
set @SQLCmd='Exec xp_cmdshell '+char(39)+'Sqlcmd -S scdc330db -d IDX_OPS -Q "exec SCP_AppStatus_Notify " -v @status="Start" -v @app="Analysis Data Distribution" -v @task="Test"'+char(39)
Exec(@SQLCmd)
Any help will be appreciated
May 21, 2008 at 7:51 pm
Did you ever figure this one out?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 22, 2008 at 3:27 am
To me, it looks like you do not have anything that consumes the variables @status, etc.
I have not tested this to ensure the syntax is correct, but you need something like
set @SQLCmd='Exec xp_cmdshell '+char(39)+'Sqlcmd -S scdc330db -d IDX_OPS -Q "exec SCP_AppStatus_Notify @status=$(status),@app=$(app),@task=$(task) " -v status="Start" -v app="Analysis Data Distribution" -v task="Test"'+char(39)
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply