Monthly Archives: January 2009

Prevent auto-indenting when pasting code into Vim

When posting code into vim, it often auto-indents it in a staircase fashion off to the right – really annoying.

To prevent this, use :set paste, and :set nopaste to turn it off.

See also :help paste.

Shutdown/Startup Oracle

Some notes on shutting down and starting up Oracle, taken from an email.

Please be corrected in Note Section if you do need to do abort shutdown.
After abort shutdown, we do need to startup and shutdown database again.
Then second shutdown will bring database down cleanly.
After that you can backup database files.
Logon UNIX as “oracle”
================
TO STOP DATABASE
================
1. Invoke SQL*Plus
$ sqlplus ” / as sysdba”
SQL > shutdown immediate;
Shutdown messages
Database closed.
SQL > exit;
Note : If there are connections to DB, Oracle may take some time to rollback each connection‘s job and then close the session. Once all connections are disconnected, it will bring database down.
During shutting down, Oracle will write message to in log file.
Please tail the file to see progression messages.
tail -f /opt/oracle/db_1020/admin/psms01/bdump/alert_psms01.log
If database is not down at reasonable time, you can terminate command by Ctrl+C, then
SQL> exit;
$ sqlplus ” / as sysdba”
SQL > shutdown abort;
SQL > exit;
$ sqlplus ” / as sysdba”
SQL > shutdown immediate;
SQL > exit;
The above steps should be done as the last choice and only when
database is not down as normal.
2. Shutdown Database Listener
$ lsnrctl stop
3. Verify Oracle Processes
$ ps -ef |grep pmon
$ ps -ef |grep tnslsnr
No such process shown if step 1 & 2 are successfully done.
=================
TO START DATABASE
=================
1. Start Database Listener
$ lsnrctl start
2. Invoke SQL*Plus
$ sqlplus ” / as sysdba”
SQL > startup;
Starting up messages
Database open.
SQL > exit;
3. Verify Oracle Processes
$ ps -ef |grep pmon
$ ps -ef |grep tnslsnr
One process is expected for each ‘ps’ command.
4. Test Connnection
$ sqlplus ” / as sysdba”
SQL > select instance_name, host_name,
to_char(startup_time, ‘DD-MON-YY HH24:MI’), status
from v$instance;
Status must be OPEN.

JPilot – Change First Day of Week on Ubuntu

I still use JPilot for syncing with my Palm Treo – an old app but I like it, especially because of JPilot-Keyring.

But there’s no way of changing the first day of the week in JPilot, and consequently the first day of the week appears as Sunday rather than Monday – yikes, Christianity! The solution is to change the first day of the week in Gnome, and JPilot then picks it up.

Blueman – Bluetooth for Ubuntu

The Reverand Simon Rumble wrote a nice post on Mobile broadband over Bluetooth with Ubuntu 8.10 using Blueman. I’ve always wanted to get Bluetooth working on Ubuntu, but it was never at the top of my ‘todo’ list and I’ve always had other things to do (thank PHB). But Blueman makes it so easy – thanks Simon.

This article was also mentioned.

Speed up Firefox on Linux – Disable IPv6 Lookups

A post a stumbled upon – Speed up Firefox on Linux – Disable IPv6 Lookups. I don’t know if it works but I’m trying it now.

In a nutshell:

  • about:config
  • in the filter field, type “DNS” and hit enter
  • double-click on “network.dns.disableIPv6″, changing its value from False to True

See also my other post pdnsd on Ubuntu for faster dns

Next Page »