Topic
  • 2 replies
  • Latest Post - ‏2007-04-16T18:14:41Z by Stan
SystemAdmin
SystemAdmin
1525 Posts

Pinned topic i'm having problems to create a database with an sql script

‏2007-04-12T08:45:06Z |
I have the problem to create the database with an sql cript.
am acquanted to using Cloudscape_3.6 where i could create the
database by using command line:

setServerCloudscapeCP
startCS

setClientCloudscapeCP

createDatabase databaseName.sql

The database was being created automatically by ij.
Then i could access the database with java application by specifying
the classpath to clouscape.jar and RmiJdbc.jar and including these files
in the bin classpath of the jdk.

please help how i can go through this.

lameck
Updated on 2007-04-16T18:14:41Z at 2007-04-16T18:14:41Z by Stan
  • Jean_Anderson
    Jean_Anderson
    179 Posts

    Re: i'm having problems to create a database with an sql script

    ‏2007-04-12T16:24:33Z  
    Hi, Lameck,

    With Cloudscape 10 (i.e. Derby) the database gets created in the connection URL with the 'create=true' attribute. Here are a couple resources that might help you:

    http://db.apache.org/derby/papers/DerbyTut/ij_intro.html#ij_create
    http://db.apache.org/derby/docs/10.2/devguide/cdevdvlp51654.html
    http://db.apache.org/derby/docs/10.2/ref/rrefjdbc10889.html

    I hope this helps!

    regards,

    -jean
  • Stan
    Stan
    267 Posts

    Re: i'm having problems to create a database with an sql script

    ‏2007-04-16T18:14:41Z  
    I notice you were using CloudConnector which has been replaced by the Derby Network Server. Refer to the Server guide for more information. The scripts related to Network Server (CP-Classpath setting and Start/Stop Server) can be found in the folder:
    <Derby-Install>/frameworks/NetworkServer/bin

    I'm not sure what this command is:
    createDatabase databaseName.sql

    but you can use:
    ij.ksh databaseName.sql

    To execute a connection command and SQL commands stored in the file databaseName.sql