In the data warehouse installation package, we used the osql.exe tool to update the relevant database script. Yesterday we suddenly found that the installation package reported an error, saying that the script is wrong, but we took the script to the database query analyzer for execution, everything is OK.
Where is the problem?
Execute the error script separately using osql to print the relevant information:
Copy codeThe Code is as follows:
Osql.exe-S. \ SQLDEV-U sa-P MyRoot-B-n-r 1-I ". \ UpdateTable. SQL"-o "c: \ hahah.txt"
@ Echo % errorlevel %
@ Pause
The following error message is displayed:
Osql Missing end comment mark "*/"
Fainted, saying that my annotator is missing, but there is no less.
Finally, we found that there was a GO statement problem in the comment statement, as shown below:
/* ...... GO */
After it is removed, everything is normal. It seems that this is also a small BUG of the osql tool.