Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Ant task for Sql scripts

Reply
Thread Tools

Ant task for Sql scripts

 
 
Bhavin
Guest
Posts: n/a
 
      06-28-2006
Hello,

I am working on ant script which dumps the stored procs and packages
into oracle 9i database. I defined one task in ant script which dumps
all the scripts from Source safe to oracle database. This works fine
but when i check into the database i get the packages and stored procs
with errors. The script dumps all the scripts in a linear way, the
indentation of the code of PL Sql is lost. I am looking for the
solution through which i can dump all the scripts with its original
structure.

do i need to put additional task in database itself so that my scripts
gets executed in a proper way with its original structure or i need to
put settings in my Ant script ?

Pls suggest me

 
Reply With Quote
 
 
 
 
Andy Dingley
Guest
Posts: n/a
 
      06-28-2006
Bhavin wrote:

> I am working on ant script which dumps the stored procs and packages
> into oracle 9i database. I defined one task in ant script which dumps
> all the scripts from Source safe to oracle database. This works fine
> but when i check into the database i get the packages and stored procs
> with errors. The script dumps all the scripts in a linear way, the
> indentation of the code of PL Sql is lost.


Sounds like Unix / Windows linefeed character issues. I doubt if it's
Ant's fault, probably SourceSafe is the culprit. Check what you're
actually getting, before you load it into the DB client.


PS - Ditch SourceSafe and go to Subversion. You won't regret it!

 
Reply With Quote
 
 
 
 
Bhavin
Guest
Posts: n/a
 
      06-28-2006
Cool, i get the db scripts from vss as
<filename>.spc,<filename>.prc,<filename>.bdy

and i dump these files into database through ant script. I created one
..sql file in my local machine and dumped the file to database through
ant script and it works. i am wondering why its not working with other
files.

-bhavin

Andy Dingley <(E-Mail Removed)> wrote:

> Bhavin wrote:
>
> > I am working on ant script which dumps the stored procs and packages
> > into oracle 9i database. I defined one task in ant script which dumps
> > all the scripts from Source safe to oracle database. This works fine
> > but when i check into the database i get the packages and stored procs
> > with errors. The script dumps all the scripts in a linear way, the
> > indentation of the code of PL Sql is lost.

>
> Sounds like Unix / Windows linefeed character issues. I doubt if it's
> Ant's fault, probably SourceSafe is the culprit. Check what you're
> actually getting, before you load it into the DB client.
>
>
> PS - Ditch SourceSafe and go to Subversion. You won't regret it!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting error while executing .sql file from sql task of ant naveenduttvyas Java 0 11-26-2008 09:23 AM
Accessing ant task name when running a task teggy Java 0 05-29-2007 02:20 PM
Maven using ANT plugin for SCP task : Embedded error: Could not create task or type of type: scp. krabhi Java 1 08-09-2006 04:19 PM
Ant task to iterate over output from SQL SELECT statement Kenneth Ljunggren Java 0 05-18-2005 09:01 AM
Re: Problem in ant replace task and replaceregexp task to update xml Victor Java 0 09-01-2004 03:58 AM



Advertisments