Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    17

    Unanswered: how to create db using java code?

    hi,
    I am trying to create new db in db2udb making using of java code, what should be the value of JDBC_URL(as it requires db name) to connect and to execute the sql statement "create database xxx"?
    I could see some thing similar in informix, there JDBC_URL used was "SysMaster".

    thanks in advnc
    -ravi.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: how to create db using java code?

    Don't know for sure ....

    May be an attach to the instance ...

    Cheers

    Sathyaram

    Originally posted by vishwapathi
    hi,
    I am trying to create new db in db2udb making using of java code, what should be the value of JDBC_URL(as it requires db name) to connect and to execute the sql statement "create database xxx"?
    I could see some thing similar in informix, there JDBC_URL used was "SysMaster".

    thanks in advnc
    -ravi.

  3. #3
    Join Date
    Feb 2003
    Posts
    17

    Re: how to create db using java code?

    what is meant by attaching to an instance(do you mean, it is similar saying just "db2" on command line) ? how can we do it thru code?

    Originally posted by sathyaram_s
    Don't know for sure ....

    May be an attach to the instance ...

    Cheers

    Sathyaram

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: how to create db using java code?

    On the command line, if I want to create a new database on a remote instance , I do

    db2 attach to <nodename>

    and then

    db2 create db <dbname>

    But, not sure, how you do it using Java ......

    Cheers

    Sathyaram


    Originally posted by vishwapathi
    what is meant by attaching to an instance(do you mean, it is similar saying just "db2" on command line) ? how can we do it thru code?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •