473,386 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

[mssql][ant] Failed to execute: GO

Hi,

I am trying to execute a simple sql file thru ant task. The file is:

use [centivaTest]
GO

However I get the errror message:
[sql] Failed to execute: use [centivaTest] GO

So I changed the file to:

use [centivaTest] ;
GO

as ant treats ';' as a delimiter. However another erro message
appears:

[mssql][ant] Failed to execute: GO

Do you know how to execute my simple sql statements thru ant (or
generally what wrong am I doing)?

Best regards,
Maciek Zywno
Jul 23 '05 #1
1 3465
"maciek zywno" wrote:
I am trying to execute a simple sql file thru ant task. The file is:
<snip>
However I get the errror message:
[sql] Failed to execute: use [centivaTest] GO


Maciek,

GO isn't understood by SQL Server: it's used as a batch delimiter for isql,
osql, and QA. I'm not an ant expert, but a few choices I see are:

- Have ant execute your SQL file via osql.

- Removed unnecessary GO's and/or manually break your script into separate
scripts (since that's what GO does anyway).

Craig
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kristian | last post by:
Hi Guys, I have a script that has to insert an var containing a html string into my microsoft sql server, and it keeps throwing the same error at me. DBD::ODBC::db do failed: Line 89:...
5
by: TThai | last post by:
Hi, Appreciated anyone who can help us with our problem. Our backup job for ROUTT database has been failing for the last 4 days. It was working fine for almost a year now. The only thing...
4
by: Don | last post by:
I have MSSQL2k SP3a on WIN2k SP4. moved a Date/log files to this server about a week ago from a SQL7 server and attached it to this new Sql2k server. everything works fine for about 24hrs and...
2
by: DMAC | last post by:
The following failed in EM (or whatever it is called now management studio I think) and I scripted it out and ran it in a query window to get more info. This works fine in SQL 2000 but not in 2005....
1
by: New MSSQL DBA | last post by:
hi all, have anyone else met with the following problem. we've got a SQL2000SP3a on a 2 active-active node clusters of W2K3, this cluster in using AD. I've found that whenever I use Enterprise...
9
by: Trevor Best | last post by:
I have a maintenance plan on a client's site, there's only one database in the plan and it's set to backup db and log, this job fails consistently. The one step in the job contains this line: ...
14
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to...
4
by: sujiforsql | last post by:
i have a stored procedure like below CREATE PROCEDURE display_Products @CategoryID int AS BEGIN DECLARE @authors_cursor CURSOR SET @authors_cursor =CURSOR FAST_FORWARD FOR SELECT TOP 10...
1
by: tleper | last post by:
hi, there are two win2003 servers in the same workgroup. one has mssql 2000 server and other one has asp.net 2.0 web application connecting that mssql server. mssql server Authentication is SQL...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.