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
destroydbdb1 relocatedbdbname -new database db1.
hope i made it clear enough,
i would welcome any advice
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.