Subscribe to
Posts
Comments

Archive for August, 2009

I have not used the developer edition of SQL server on my laptop machine for a long while. When I try to turned on SQL server today I found it couldn’t start. When I check the event log there was an error message related to SQL server service like this.

“The file “C:\Program Files\Microsoft SQL […]

SQLCmd is a very handy tool used to execute SQL script automatically and output results to a file. Here is an example:
sqlcmd -S “ServerName” -U “UID” -P “PWD” -d “DBName” -i “c:\input.txt” -o “c:\output.txt” -s “,” -h -1

The parameter names in command line are case sensitive. So -D is different from -d. As shown […]