| Author |
Message |
Garymazzone
Joined: 06 Oct 2009 Posts: 6
|
Posted: Wed Oct 28, 2009 7:24 pm Post subject: Error using command line |
|
|
I'm trying to create an exe from the command line based on a script and and getting an error
SQL Packager Command Line V6.0.1.9
==============================================================================
Copyright c Red Gate Software Ltd 1999-2008
Serial Number:511-005-109595-E5C9
Creating package...
Unexpected error: unexpected char: 0xFFFF
unexpected char: 0xFFFF
antlr.TokenStreamRecognitionException
at RedGate.SQLCompare.Rewriter.Analysis.Analyser`1.WaitForBackgroundThread()
at f.a(PackagerEngine )
at g.a()
at g.a(a& )
at RedGate.SQLPackager.Engine.PackagerEngine.a(ProgressPercentageTracker , d
)
at RedGate.SQLPackager.Engine.PackagerEngine.Package()
at RedGate.SQLPackager.CommandLine.Runner.e()
at RedGate.SQLPackager.CommandLine.Runner.Run()
at RedGate.SQLPackager.CommandLine.Startup.a(String[] )
The command line is:
C:\Program Files\Red Gate\SQL Packager 6>sqlpackager /makeexefromscript /ss:C:\t
emp\ProcessJobsandDataabasesV21.sql /name:c:\temp\WarehouseChanges.exe /rundb:master
any idea what is wrong with this? |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Fri Oct 30, 2009 4:44 pm Post subject: |
|
|
Thanks for your post.
I don't see any problem with your command, so I suspect the problem will be related to the script you are packaging.
I take it the script parses alright, so there must be something else in the script that SQL Packager doesn't like.
Does the script contain any particulary large blocks of SQL, say over 250 lines?
If you would like me to take a look at the script, feel free to send it to me. I'll also send you an email with your support ticket refrence. _________________ Chris |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Tue Nov 03, 2009 6:26 pm Post subject: |
|
|
Sorry for the delay in this response.
It turns out that I made a bit of a mistake when I said there was nothing wrong with your command.
The /name switch doesn't support the full 'path' + 'filename', so you will also need to use the location switch. e.g.
C:\Program Files\Red Gate\SQL Packager 6>sqlpackager /makeexefromscript /ss:C:\temp\ProcessJobsandDataabasesV21.sql /name:WarehouseChanges.exe /location:c:\temp /rundb:master
I hope this helps. _________________ Chris |
|
| Back to top |
|
 |
mist83
Joined: 12 Jan 2012 Posts: 1
|
Posted: Thu Jan 12, 2012 1:16 am Post subject: Another potential cause of this issue |
|
|
I'm using 6.3.1.31 and thought I would share my experience and fix for the problem. This may be fixed already, but in case someone is running into the same issue here is my story:
I have a huge sql file that I'm trying to package that looks something like this...
-----
UPDATE Table1 SET A=1 WHERE B=2
GO
UPDATE Table2 SET C=1 WHERE D=2
GO
UPDATE Table3 SET E=1 WHERE F=2
GO
-----
However, the version I'm using (6.3.1.31) seems to partition the single script based on lines whose text == "GO", regardless of the context. Thus this file:
-----
UPDATE Table1 SET A=1 WHERE B=2
GO
/*
UPDATE Table2 SET C=1 WHERE D=2
GO
*/
UPDATE Table3 SET E=1 WHERE F=2
GO
-----
will error because it will try to partition the main file into 3 SQL script resources:
Script 1)
UPDATE Table1 SET A=1 WHERE B=2
Script 2)
UPDATE Table2 SET C=1 WHERE D=2
Script 3)
*/
UPDATE Table3 SET E=1 WHERE F=2
...The third script is what is causing the error, because the program doesn't recognize that the "GO" statement on line 5 should be ignored because it's inside a comment block.
My file should only have been partitioned into 2 scripts, not 3. |
|
| Back to top |
|
 |
fuyunb
Joined: 30 Jun 2012 Posts: 1
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group