Windows Azure Platform Developer Center >
Azure Forums
>
SQL Azure — Getting Started
>
Incorrect syntax near 'S'
Incorrect syntax near 'S'
- I try to run the following command and I get the error in the title.
sqlcmd
-S tcp:XXXX.ctp.database.windows.net -U AAA@jXXXX -P YYYYYY -D ZZZZZZZZZ
Any help will be appreciated.
mysorian
All Replies
- The syntax seems to be incorrect. See this post for details http://msdn.microsoft.com/en-us/library/ee336280.aspxThe syntax should be: sqlcmd -U <ProvideLogin@Server> -P <ProvidePassword> -S <ProvideServerName> -d <ProvideDatabaseName>
Beyond Relational - Thanks
But, this is no good either. Now the error is at -U
mysorian - <ProvideLogin@Server>
However I have been able to connect using:
1. A UDL File
2. IIS7 Database Server
Some of these on my blog:
http://hodentek.blogspot.com
mysorian - Does running the SQLCMD in the command line makes a difference? I am running in the Query Window after choosing SQLCMD Mode.
mysorian - I am not sure if it makes a difference. I alway try the command line tool as a first option for troubleshooting. I would suggest you do that and see if you are able to connect.
Beyond Relational - Quite possibly SSMS has a bug!
mysorian - did you try this :
-S tcp:XXXX.ctp.database.windows.net -U AAA@jXXXX -P "YYYYYY" -d ZZZZZZZZZ - As I mentioned earlier SQLCMD works fine in the DOS window but in SSMS it returns the error in the original post.
mysorian I am not 100% clear what is working and what is failing.
The first post talks about an error in sqlcmd, but the very last post says the error happens in SSMS.
Could you please clarify where are you seeing the error?
Evan- You can run SQLCMD command line or in SSMSIt fails in SSMS while it does not when run from command line.
mysorian


