In MSSQL 2005, I'd like to update sprocs on the production server with sql files I have on the developer machine. In SQLCMD, I'm trying to connect with the remote server but get the following error:
E:\Dev\Database\>sqlcmd -u myusername -p mypassword sql111.abc.com
Sqlcmd: 'myusername': Unexpected argument. Enter '-?' for help.
What should this syntax look like?
Once that gets going, what does the syntax for running a script look like? Is this correct?
-i c:\Dev\Database\sproc1_update.sql -o c:\Dev\Database\sproc1_update.Log.txt
Once I connect, can I than just run lines like the one above or do I need to put a connect statement with each line?
Is there a more secure way to connect than sending the user name and password through plain text? All I need is some way to run the developer scripts on production to synch the two.