Oracle: ORA-00257 archiver error. Connect internal only, until freed

Work around for this issue is to increase the amount of space allocated to db_recovery_file_dest; e.g.,

$ sqlplus sys as sysdba
SQL> show parameter db_recovery_file;
db_recovery_file_dest string /opt/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 20G

Compare this with the output of ‘du -sh’; e.g.,

$ du -sh /opt/oracle/flash_recovery_area
21G /opt/oracle/flash_recovery_area

21 vs 20, so set it to something a bit bigger; e.g.,

SQL> alter system set db_recovery_file_dest_size = 30G;

Extracted from this link on Remedian.com.


			

#linux, #oracle

CentOS: httpd invalid command

Was configuring a CentOS 6 server recently, and I decided to comment out all httpd (i.e. Apache) LoadModule directives. Upon restart, there were several invalid commands, so I took the time to note ’em down as it wasn’t obvious (to me, at least) which commands were provided by which modules.

I liken this to a cheat sheet to http://httpd.apache.org/docs/2.2/ then:


Invalid command 'AddHandler': mod_mime
Invalid command 'Alias': mod_alias
Invalid command 'BrowserMatch': mod_setenvif
Invalid command 'DirectoryIndex': mod_dir
Invalid command 'IndexOptions': mod_autoindex
Invalid command 'LanguagePriority': mod_negotiation
Invalid command 'LogFormat': mod_log_config
Invalid command 'Order': mod_authz_host
Invalid command 'TransferLog': mod_log_config

#apache, #linux, #red-hat

Windows, Linux (and Samba)

I needed to copy a 140MiB file from a Windows 2000 server. The only problem was that it didn’t support FTP (or SFTP) and I couldn’t download FileZilla Server since there was no network connection. I asked my colleague for a quick fix to this, and I can’t recall what he said, but suddenly I remember that I’d RHEL 3 (and Samba) and I could use Windows to map a Samba share. Problem solved.

Sometimes it is thinking about a problem from a different perspective client/server instead of server/client. Heh

#linux, #samba, #windows

Howto: Check what services are accepting network connections

Use ‘netstat -tnlp’.

$ netstat -tnlp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:1521            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:54904           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      2366/dropbox
tcp6       0      0 :::139                  :::*                    LISTEN      -
tcp6       0      0 :::80                   :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 ::1:631                 :::*                    LISTEN      -
tcp6       0      0 :::445                  :::*                    LISTEN      -

#linux

Using ‘grep’ with Subversion

I use ‘grep’ alot, but it false positives when searching in a Subversion working copy. So I’m using the ‘-r’ flag to recursive search for the phrase ‘quick brown fox’:

$ grep -r 'quick brown fox' *
app/controllers/users_controller.php: quick brown fox
app/controllers/.svn/text-base/users_controller.php.svn-base: quick brown fox

This is only a minor annoyance if there are just two entries, but often that’s not the case. The solution is to add the ‘–exclude-dir=.svn’ flag. But the extra characters causes unnecessary fatigue on my fingers, so I’ve added an alias to my .bashrc file:

alias grep='grep --exclude-dir=.svn'

For maximum mileage, combine this with ‘-ir’:

alias grep='grep -ir --exclude-dir=.svn'

#linux, #subversion

Changing hostname

Should you update /etc/hostname — I did — be sure to update the default tnsnames.ora and listener.ora.

Mine were found in /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin.

Otherwise you’ll get an ORA-12541 message.

#linux, #oracle

Disk usage sorted by file size

The following shell command runs the ‘du’ command to a max folder depth of 1, and then pipes the output to ‘sort’, and the finally writes it ‘du_log’.

$ du -h --max-depth=1 | sort -n -r > du_log

#linux

Tar with exclusion

Sometimes I want to duplicate a Subversion-ed directory, without the .svn folders in each subdirectory. The reason for this is when I want to add/commit this newly duplicated folder, I get an error message because the .svn directory indicates that the files are already in the repository — when it is NOT.

We can do this easily by using tar and the exclude flag:

$ tar -cvf foo.tar ./* --exclude=.svn

#linux

Muting the system buzzer

When in the command shell, it is too easy to press Tab to autocomplete too many times. I love the text auto complete feature — it saves my fingers — but I overuse it. This results in the annoying “beep” from the system buzzer. Mute it with the command:

$ /usr/bin/setterm -blength 0

You could also append it to the end of your .bashrc — assuming you’re using bash of course — so it runs every time you login.

If, like most Linux users you use Gnome Terminal or KDE Konsole, try exploring around, there are options to mute the system buzzer (or bell), and save the option to mute it as default.

#linux

Demystifying rc*.d — startup scripts for everybody

First you gotta have some kind of shell script that you want to run on startup; say /etc/init.d/httpd.

Apache2 should run on boot, so we make a symbolic link to it in one (or more) run levels; e.g. /etc/rc5.d/.

# whoami
root
# cd /etc/rc5.d/
# ln -s ../init.d/httpd S85httpd
# ls -la | grep httpd
lrwxrwxrwx  1 root root   15 Mar 12 10:11 S85httpd -> ../init.d/httpd

Now the /etc/init.d/httpd script will run the next time the system boots to run level 5.

#linux