Friday, March 23, 2012

hi,Re: Unable to get SQLCMD utility to work properly.

I try to go to a command prompt to get this to run right with no luck. Is there something that I am not doing right? It gives me the help library, but thats about it. Also, I have dealt with Oracle in the past. And was wondering is there a way to access the SQLCMD utility on a workstation with a login of some kind?

--David

hi David,

SqlCMD accepts a list of parameters as described in http://msdn2.microsoft.com/en-us/library/ms165702.aspx and at http://msdn2.microsoft.com/en-us/library/ms170207.aspx you can find a tutorial about it's use...

usually you open a command prompt window and provide the appropriate connection parameters, like

c:\Document and settings\user>sqlcmd -E -S.\SQLExpress

this tries a trusted connection to the local SQLExpress named instance...

if you got it succesfully you get a prompt like
1>

qhere you can just type your Transact-SQL statements..

regards

No comments:

Post a Comment