Hi,
After investigating why my script keeps on failing when running through IA setup and not through SQL Server Management Studio I found that my scripts are brokern up at each GO statement. However, since some of my stored procedures contain GOTO statements, it seem to be broken up on these lines as well. Since the half extracted command (between the last GO statement and the GOTO statement) is not valid, it fails the installation. I very strongly assume that IA is breaking my script up in chunks
Has anybody encounter this and have a solution or work-around?
Thanks
MS SQL Server Script cannot handle GOTO statements
-
chris.mouton
- Posts: 3
- Joined: Fri Aug 17, 2007 7:55 am
- Contact:
Yes, its true. Scripts are parsed using GO statements and are executed in chunks to avoid overload.
I can't think of a workaround or solution except from running the script using the osql tool, like
osql -E -S (local)\\INSTANCE -i drive://my/path/here/script.sql
I can't think of a workaround or solution except from running the script using the osql tool, like
osql -E -S (local)\\INSTANCE -i drive://my/path/here/script.sql
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
NO, this is NOT a nice away. You add some serious overhead at the SQL Server's execution plan by adding a condition that does nothing. You only manage to confuse SQL Server executiong engine some more.takayari wrote:The problem is that a GOTO is the first word on the row, so in every stored procedures that uses a GOTO statement I insert an if statement with a true condition before every GOTO:
if (1=1) goto MyLabel
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation

