PDA

View Full Version : How to trap SQL script error in silent installation



heko_76
02-28-2008, 06:28 AM
Hi All,

I have a test.cmd file which is being executed by LaunchAppand Wait as follows
LaunchAppAndWait(SUPPORTDIR^"test.cmd","",LAAW_OPTION_HIDDEN);
The test.cmd file executes a sql script test.sql
sqlcmd.exe -i test.sql -S (local)\sqlexpress

I am able to install SQL express 2005 edition with silent option but am not sure whether my script executes and creates a database.The only way to check is to open SQL management studio and verify.
Is there any way to trap error or put in log files.

I am using installscript project and Installshield Professional 2008

hidenori
02-28-2008, 02:18 PM
You should be able to generate a log file for SQL script executions using the /o switch of sqlcmd.exe. Is that what you are looking for?