Page 1 of 1

Problem running SQL files on SQL Server

Posted: Mon Jan 28, 2008 7:16 am
by TonyS
Hi
I'm evaluating the latest version (7.5 sp2) and I can't get sql script files to run. When I load the script file it works just fine.
I've included the following line as script:
#FILESCRIPT#$SQLFILE$

When I set SQLFILE to $SUPPORTDIR$test.sql the file
ends up in folder:
C:\\Documents and Settings\\Administrator.VENUS.000\\Local Settings\\Temp\\1\\mia1
but the SQLFILE variable is converted to short file name so I'm not sure it's the same directory.
I've tried setting SQLFILE to another location, c:\\test.sql
The SQLFILE variable has a correct value when I display it in a message but nothing happens. The return variable is not set to ERROR either.
The file test.sql is in ANSI format.

When I load the script instead the variable returns SUCCESS.

I'm trying to run the scripts on Windows 2003 Server with SQL Server 2000.

I'm running out of ideas to try. Please help.

Regards,
Tony

Posted: Tue Feb 05, 2008 6:21 pm
by Roostar2004
I am having the same issues currently and am working with installaware to try and fix them. In your script do you have thing like DROP Table then Create Table, DROP Column then CREATE Column? If you do then your script will not run. If you drop somthing that does not exist (Which is what most people do just to be safe) then you will create an error and install-aware will stop exicuting the script. Take out all of these and your script should run fine. Also make sure that you get rid of any unnessasery spaces in your code.

These are just ideas.

Also make sure that in computer name that you use local instead of localhost for computer name I know that the help file says localhost but it is local.

I hope this has helped.