Red Gate forums :: View topic - Error using command line
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager 6
SQL Packager 6 forum

Error using command line

Search in SQL Packager 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Garymazzone



Joined: 06 Oct 2009
Posts: 6

PostPosted: Wed Oct 28, 2009 7:24 pm    Post subject: Error using command line Reply with quote

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
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Fri Oct 30, 2009 4:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Tue Nov 03, 2009 6:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mist83



Joined: 12 Jan 2012
Posts: 1

PostPosted: Thu Jan 12, 2012 1:16 am    Post subject: Another potential cause of this issue Reply with quote

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 Twisted Evil
*/
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
View user's profile Send private message
fuyunb



Joined: 30 Jun 2012
Posts: 1

PostPosted: Sat Jun 30, 2012 4:58 am    Post subject: Reply with quote

http://peakshoe.net
_________________
fuyunb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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