Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    12

    Unanswered: Dropping of Database.

    Hi all,

    What command should be used to Drop the Informix database from the unix # prompt?
    Help from anyone would be appreciated. Thanks.

    Bdhakhwa

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi,
    Call the below statement froms a script. Make sure you set all your Informix env. variables, in this case all the env. variables are in set_profile file (INFORMIXDIR, PATH, ONCONFIG, INFORMIXSQLHOSTS, INFORMIXSERVER)

    cd /export/home/informix
    . set_profile
    cd /export/home/informix/test
    dbaccess - - 2>error.log <<SQLSTMT
    drop database test;
    SQLSTMT

  3. #3
    Join Date
    Jun 2004
    Posts
    12
    Hi,

    Thanks for the help.

    When i run the script, it is neither dropping the database nor is exiting to # prompt. When i viewed the error.log using "cat error.log" i could see the lines such as "Confirm database drop YES/NO". It appears the script has been succesfully executed and waiting for user input, Yes Or No. Any ideas to select the "YES" option automaically?

    Thanks in advance.

    bdhakhwa

  4. #4
    Join Date
    Jun 2004
    Posts
    12
    Hi,

    Thanks for the help.

    When i run the script, it is neither dropping the database nor is exiting to # prompt. When i viewed the error.log using "cat error.log" i could see the lines such as "Confirm database drop YES/NO". It appears the script has been succesfully executed and waiting for user input, Yes Or No. Any ideas on how to select the "YES" option automaically?

    Thanks in advance.

    bdhakhwa

  5. #5
    Join Date
    Aug 2003
    Location
    India
    Posts
    262
    Hi,

    I am not sure why r u getting the prompt. I once again ran the same script it dropped the database. What u could do is create a new database and enter this database name in the script & run the script once again. Do let me know.

  6. #6
    Join Date
    Jun 2004
    Posts
    12
    Hi,

    The problem is same even with the new database. Could you please suggest any other options? Thanks

    bdhakhwa

Posting Permissions

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