If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Dropping of Database.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-11-04, 01:31
bdhakhwa bdhakhwa is offline
Registered User
 
Join Date: Jun 2004
Posts: 12
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
Reply With Quote
  #2 (permalink)  
Old 12-12-04, 23:00
lloydnwo lloydnwo is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 12-13-04, 00:12
bdhakhwa bdhakhwa is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 12-13-04, 00:14
bdhakhwa bdhakhwa is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 12-13-04, 03:38
lloydnwo lloydnwo is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 12-13-04, 05:48
bdhakhwa bdhakhwa is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On