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 > Other > ingres commandline advice needed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-27-07, 04:45
Elona Elona is offline
Registered User
 
Join Date: Nov 2007
Posts: 3
ingres commandline advice needed

Hi all!
I am new to Ingres DBMS and its commandline.
I need to execute many times destroydb, followed by relocatedb (it is a routine job), so I think it's the case to put these two commands in a batch file. Does ingres offer anything like this? If yes, then, is there a way to give the -dbname of the relocatedb command as an argument to the batch file?
I mean, I would ruther execute

batfilename -dbname, than

destroydb db1
relocatedb dbname -new database db1.

hope i made it clear enough,
i would welcome any advice
Reply With Quote
  #2 (permalink)  
Old 11-28-07, 11:00
ingresenator ingresenator is offline
Registered User
 
Join Date: Nov 2007
Posts: 1
Both those commands are available at the command line, so writing a batch file is definitely possible. It sounds like you are running windows. I'll go ahead and write up a quick blog entry here with details, but you pretty much have what you need. The only additions should be:

1. Don't use the "-" in the command line parameters
2. Use the variable %1 to get the dbname inside your batchfile
3. check the ERRORLEVEL variable for nonzero results and respond accordingly.

You can find the details later today at http://blogs.ingres.com/tech
Reply With Quote
  #3 (permalink)  
Old 11-30-07, 02:29
Elona Elona is offline
Registered User
 
Join Date: Nov 2007
Posts: 3
Thank you

Thank you so much, I will try right now. Best regards
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