Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Ant task for database script

Thread view: 
Bhavin - 30 Jun 2006 12:28 GMT
Hello,

Has anybody worked on ant script for executing the database scripts. I
am working on build process and in which the sql command is working
fine for simple packages and stored procs. I am working on
interdependency of packages. My ant script fetches the database scripts
checked in visual source safe for oracle 9i. At the runtime i have to
check the interdependency. The dependency of package related stored
proc is described below.

There are two packages in oracle - A & B
Few Stored Procs in Package A  are dependent / calling Stored Procs in
Package B and vise a versa, in this case the precedence of Package
needs to be set.

This senario comes in when getting scripts from VSS. Ant runs all the
files one by one thus unpredictable that when Package A will be
executed and when Package B will be executed.

Any input / suggestion to this senario will be greatly appreciated.
Andy Dingley <dingbat@codesmiths.com> - 30 Jun 2006 14:35 GMT
> Has anybody worked on ant script for executing the database scripts.

I'm experimenting with it.  Mainly to manage remote upgrades of
customers, to apply a bunch of individual bug fixes to them.

Fixes are stored in Subversion, which I query with Python to make an
RDF/XML document. This is then transformed by XSLT into an Ant script.
Each script maps to an Ant target.

I get two benefits from Ant:
- It's a competent SQL client that uses JDBC to connect to the DB. Our
main app is in Java / JDBC, so we can already assuem this is available.
We've had a lot of past trouble with varying behaviours under different
interactive SQL client tools.

- Ant does dependency management. If I annotate a patch script in
Subversion (I store Dublin Core on them as SVN properties) then I can
extract this into my RDF/XML document, then pass the dependency through
to Ant. Ant does the rest.

Ant also lets me use a "dry run" property to list the script names out
in sequence, without actually running them
Wibble - 03 Jul 2006 16:37 GMT
> Hello,
>
[quoted text clipped - 16 lines]
>
> Any input / suggestion to this senario will be greatly appreciated.

It sounds like your package relationships are a bit of a mess.

It doesn't really matter which order you load them.  You can
have a target 'loadDatabase' depends on
'loadPackage1,loadPackage2,compilePackages'
where compile packages does something like

http://www.oracle-base.com/articles/misc/RecompilingInvalidSchemaObjects.php

The order in which you load your packages then becomes irrelevant.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.