On one of our Debian hosts, we use bash scripts and cron jobs to automate certain tasks. One of these bash scripts downloads files from an FTP server and archives them. After upgrading the host machine to Debian 6.0.4, one of the bash scripts suddenly showed warnings:
/srv/foo/bar.sh: line 146: warning: here-document at line 140 delimited by end-of-file (wanted `EOF')
On a few test databases, test managers often need to preserve certain states in the database. This is why we use daily datapump scripts to create exports for archival.
It is important to note that such scripts are never a replacement for a proper RMAN backup, but an easy way to preserve multiple states of a database and reuse data where applicable.
This batch file uses the expdp tool provided by Oracle and the 7-zip archiver to compress the exports for archival. The export tool itself creates a full export of the whole database (
full=y). Also, the
flashback_time parameter is specified to get a consistent export.
Well, I was quite busy before the holidays, but here is another post I just keep for my reference.
For each database, I believe it is important to automate database shutdown and database startup. This way, in case of an emergency, a systems administrator can start and stop database services without the need for a database administator. Oracle provides an excellent article on this topic, but the Oracle documentation is quite generic. So I hereby provide a step-by-step guide for Red Hat Linux.
For a startup script, I needed to start JBoss and start another component as soon as the complete JBoss server was started. When you execute the “run.sh” script that comes with JBoss, it immediately exits and starts JBoss in the background (which is quite nice I think). Unfortunately, when I started the other component using this method, the additional program was unhappy, since JBoss was not ready yet. So I had to come up with a trick to delay the start of the additional program.
Coming from Linux distributions where BASH is usually already set up and configured, I had to find my way around in a UNIX environment first. So here I present the files necessary for a proper installation of BASH under Solaris 10 (yes, I know Solaris 11 Express is out :)).