how to execute stored procedure using batch file

  • Hi ,

    Can anyone help me ???????????

    I want to execute stored procedure using dos batch file .An example wud be appreciated

     

    Satish

  • osql -U username -P password -S ServerName -q"exec procedure name"

    if you feel that passing user name and passsword is not providing the right security that you want u can use windows authntication method but make sure the user running has necessary permissions.

    osql -E -S ServerName -q"exec procedure name"

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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