Passing Parameters for SP from command line

  • Hi,

    I want to pass parameters from command line for a stored procedure.

    say I have a database named mytest, user myuser password mypassword, procedure name myproc, parameters for the procedure is @myparam1 and @myparam2

    How to execute this from command line?

    Thanks in advance.

  • Hi there,

    you can use sqlcmd.exe utility from command line to call the sp and pass all the parameters needed.

    Cheers

    Alejandro Pelc

  • Hi,

    Great help.

    It's working fine.

    Thanks a ton.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply