For the record, here are example Oracle database/tablespace create
statements. IMHO the goal of removing native scripts and using SQL is
possible, but I'd bet against a completely generic solution.
--Russ
/* create database */
CREATE DATABASE "newdb" ARCHIVELOG
MAXLOGFILES 16 /* not sure what defaults are here */
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 100
LOGFILE /* need at least two of these */
GROUP 1 ('/usr/oradata/newdb/redo01.log' ) SIZE 500K,
GROUP 2 ('/u01/oradata/newdb/redo02.log' ) SIZE 500K,
GROUP 3 ('/u02/oradata/newdb/redo03.log' ) SIZE 500K;
/* create tablespace */
CREATE TABLESPACE DB_DATA DATAFILE
'/u01/oradata/newdb/my_data.dbf' SIZE 40M default storage
(initial 16K next 16K pctincrease 50 minextents 1 maxextents 505);
> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 28, 2001 9:20 PM
> To: [EMAIL PROTECTED]
> Subject: Using SQL to create Databases
>
>
> Hi,
>
> Been talking with Jeff and John and it appears that most databases (if not
> all, not sure) will allow the creation of databases via SQL. When
> I made the
> TorqueCreateDatabase task I wasn't sure that all databases could
> do this so
> I went the sure root of generating native scripts.
>
> It would be nice if we could get rid of the script generation and just use
> standard SQL to create the databases. Here's the information collected so
> far. Looks like the 'CREATE DATABASE' might be standard. I
> haven't looked it
> up.
>
> Sybase:
> USE MASTER
> DROP DATABASE
> CREATE DATABASE name
>
> MSSQL:
> Probably the same as Sybase?
>
> MySQL
> DROP DATABASE
> CREATE DATABASE [IF NOT EXISTS] name
>
> Postgres:
> DROP DATABASE
> CREATE DATABASE name
>
> Hypersonic:
> Database creations happens automatically.
>
> Oracle:
> Don't know myself.
>
> I am also curious how the JDBC drivers behave with respect to connecting
> to the system database for reach RDB. I will try some tests
> tomorrow but I'm
> not sure how the Ant <sql> will work with this scenerio. Is there
> a standard
> system database name for each RDB. If we can collect all the relevant info
> than we can get rid of native scripts that are currently used for creating
> the databases. That would be very nice :-)
>
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]