jsuanque
asked on
SQLCMD syntax encounters "unexpected argument.Enter'-?'
Hello Experts,
Got stucked on this issue. I just wanted to run a stored procedure through command line\prompt but unfortunately i'm getting this persistent error
Sqlcmd: 'MyProc"': Unexpected argument. Enter '-?' for help.
Here is my line...
sqlcmd -S Svr1\Inst1 -d MyDB -Q "EXEC MyProc"
MyProc exists on the specified Server\Instance db and could run it via SQL Analyzer but when i run it via command line i'm encountering the error.
Is there something wrong in my Syntax? Or is there special permission required to run my SP?
Any suggestion is appreciated.
Got stucked on this issue. I just wanted to run a stored procedure through command line\prompt but unfortunately i'm getting this persistent error
Sqlcmd: 'MyProc"': Unexpected argument. Enter '-?' for help.
Here is my line...
sqlcmd -S Svr1\Inst1 -d MyDB -Q "EXEC MyProc"
MyProc exists on the specified Server\Instance db and could run it via SQL Analyzer but when i run it via command line i'm encountering the error.
Is there something wrong in my Syntax? Or is there special permission required to run my SP?
Any suggestion is appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Problem was just due to the method of applying the command rather than issue with syntax as initially thought of.
ASKER