How to pass parameters to a stored procedure inside sql agent job?

Posted by Coolbharat under ASP.NET on 3/27/2014 | Points: 10 | Views : 7539 | Status : [Member] | Replies : 0
I have got a Script that takes three parameters like-:
CREATE PROCEDURE [dbo].[sp_BackupDatabases]
@databaseName sysname = null,
@backupType CHAR(1),
@backupLocation nvarchar(200)
The rest of the code creates backup of the all databases present in the sql server.I use a .bat or batch file to execute the stored procedure in sql server express using windows task scheduler.
.bat file-:
sqlcmd -U sa -P enter -S .\PROCESSCUBE-PC\SQLEXPRESS –E -Q "EXEC sp_BackupDatabases @backupLocation='D:\dbbc-folder\', @backupType='F'"

But now we have upgraded to enterprise version of sql server.So now we want to use the Sql server agent job will i do it?Please help me out.

Thanks in advance


(No response found.)

Login to post response