Ant task for Sql scripts

Discussion in 'Java' started by Bhavin, Jun 28, 2006.

  1. Bhavin

    Bhavin Guest

    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
     
    Bhavin, Jun 28, 2006
    #1
    1. Advertising

  2. Bhavin

    Andy Dingley Guest

    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!
     
    Andy Dingley, Jun 28, 2006
    #2
    1. Advertising

  3. Bhavin

    Bhavin Guest

    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 <> 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!
     
    Bhavin, Jun 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor
    Replies:
    0
    Views:
    8,847
    Victor
    Sep 1, 2004
  2. Kenneth Ljunggren
    Replies:
    0
    Views:
    937
    Kenneth Ljunggren
    May 18, 2005
  3. krabhi
    Replies:
    1
    Views:
    9,317
    Marco Meschieri
    Aug 9, 2006
  4. teggy
    Replies:
    0
    Views:
    822
    teggy
    May 29, 2007
  5. naveenduttvyas
    Replies:
    0
    Views:
    950
    naveenduttvyas
    Nov 26, 2008
Loading...

Share This Page