Archive: Cannot install SQL Database


Cannot install SQL Database
I use sqlcmd as below
ExecWait 'sqlcmd -S instancename -U user -P password -i "$INSTDIR\Component\script1.sql" -o "C:\log111.txt"'

Basically this command run successfully but in the situation below it cannot run or run unsuccesfully.

1. I install prerequisite (Dotnet 4.0) and restart computer. I put the shortcut in Startup folder
2. After restarting, the installation continues and install SQL instacce correctly. Then i call that command with the correct instance name and password but it cannot create database and i could not see log file as well.

If i re-run that command after the installation finish then it work fine. I doubt at the time i call that command SQL service does not start completely but i tried to use MessageBox and wait then it still cannot run. The strange thing is if i see message box then i run that command by executing another .exe file (this .exe file just run that command) then it can create database successfully

Any help would be appreciated.

--Lionel


You should specify the full path to sqlcmd...