Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2009
    Posts
    5

    Unanswered: Detect DB2 instance from Java program

    Hello DB2 users,

    I have one query regarding DB2 and Java APIs. I am writing Java program to create DB2 database objects from configuration file. I am reading the database instance name. Now I need to check if it is present on the target machine, then do not create the instance. Else I have to create the instance using Java command. I know this is different type of command than JDBC commands like read/write/update tables.
    Will you please let me know which java API can be used to execute command to detect DB2 database instance, and how to execute them?

    Thanks for the help in advance.

    rahulkul

  2. #2
    Join Date
    Sep 2009
    Posts
    5

    Associated doubt

    With this one more associated problem is how to detect the space availability for the new database instance. How to detect if there is any problem with the space available at the target machine?

    Please adivse.

    Thanks,
    rahulkul

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Creating an instance is an OS command, so you cannot use JDBC at all. The command also has to be run on the server that the instance will be run on. It is a simple enough process. Why do you need to make a java app to do it?

    Andy

  4. #4
    Join Date
    Sep 2009
    Posts
    5

    Java application for creating DB as well as many tables at one go!!

    We need Java application to handle manual inputs. Also this will be useful to create all the database tables on the created database instance remotely.

    Please advise.

    Thanks,
    rahulkul

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    There is only 1 way I know to create an instance:

    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

    As far as creating tables and such remotely, IBM supplies tools to do that (Control Center or Optim Database Admin tools)

    Andy

Posting Permissions

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