ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajat Gupta" <Rajat.Gu...@oracle.com>
Subject RE: how to create database
Date Mon, 31 Mar 2003 13:35:21 GMT
Hello Pritish,
The code for creating the database will be present in the sql file. In my
example, it will be in AutoInstall.sql. Using the exec talk as shown, you
pass the required parameters to the sql file. For more help on this, please
see the link I had mentioned. Please see the build and the sql file present
in the zip file there.
If you want more information on the sql commands for creating the database,
then please follow the link
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/create.h
tm#ADMIN002.

Please send me a mail at rajat.gupta@oracle.com, if you need more help on
this.

Thanks,
Rajat


-----Original Message-----
From: Pritesh saharey [mailto:pritesh@sqatester.com]
Sent: Monday, March 31, 2003 5:27 PM
To: Ant Users List
Subject: RE: how to create database


Thanks Rajat,
              for your support but iam faling to understand where you are
creating Database ,like in mysql you first of all create database by writing
this statment "create database ABC" and after that you start creating tables
in that database and then start populating tables by using insert statment.
pls throw some light on my confusion and also if i had missed something in
your code
thanx
pritesh

--- "Rajat Gupta" <Rajat.Gupta@oracle.com> wrote:
>Hi Pritesh,
>What I did in my sample located at
>http://otn.oracle.com/sample_code/tech/xml/survey/content.html was to use
>the 'exec' task as follows :
>
>  <target name="InstallDataBase">
>     <exec executable="sqlplus"  os="Windows NT, Windows 95"
>resultproperty="database.install" failonerror="true"
>failifexecutionfails="true">
>       <arg line="System/${db.system.pwd}@${db.tnsname}
>@${sample.home}\sql\AutoInstall.sql ${db.tnsname}"/>
>     </exec>
>
>     <exec executable="sqlplus"  os="SunOS, Linux, Solaris, HP-UX"
>resultproperty="database.install" failonerror="true"
>failifexecutionfails="true">
>       <arg line="System/${db.system.pwd}@${db.tnsname}
>@${sample.home}/sql/AutoInstall.sql ${db.tnsname}"/>
>     </exec>
>  </target>
>
>Hope this helps,
>Thanks,
>Rajat
>
>-----Original Message-----
>From: Pritesh saharey [mailto:pritesh@sqatester.com]
>Sent: Monday, March 31, 2003 11:32 AM
>To: Apache mailing list
>Subject: how to create database
>
>
>Hi all,
>     I would like to know how can i create a databse using sql task as like
>to create database as well its tables ,iam able to create tables for my
data
>base but was unable to create database
>as sql tage allows insert statments but not create statments,like this
><sql
>    driver="org.database.jdbcDriver"
>    url="jdbc:database-url"
>    userid="sa"
>    password="pass"
>    src="data.sql"
>    rdbms="oracle"
>    version="8.1."
>    >
>insert
>into table some_table
>values(1,2,3,4);
>
>truncate table some_other_table;
></sql>
>Now if i want to create database like "Create Database ABC" and then want
to
>run my .sql script of create tables how can i do that.
>pls can anybody help me out
>pritesh
>
>
>
>_____________________________________________________________
>Join SQAtester.com Community  --->
>http://www.sqatester.com/testersarea/joinus.htm
>
>_____________________________________________________________
>Select your own custom email address for FREE! Get you@yourchoice.com w/No
>Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

_____________________________________________________________
Join SQAtester.com Community  --->
http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No
Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
View raw message