‘svnadmin’ dump/load

In case you’re migrating repository data anywhere:

svnadmin dump old_svn_repos --deltas > svnrepos.dmp
svnadmin create new_svn_repos
svnadmin load new_svn_repos < svnrepos.dmp
Advertisements

ORA-01033: ORACLE initialization or shutdown in progress

Encountered this issue when I came into the office this morning.

The verbiage indicates that Oracle is starting up (or down), but waiting a bit doesn’t cause the error to go away. Time for Google-ing.

sqlplus sys/xxxxxxx as sysdba

Replace the ‘xxxxxxx’ part with the actual password, of course. If the ‘sqlplus’ command is not recognized, it’s probably a problem with your envvars, but that’s a whole can of worms altogether. But I digress. Let’s see whether the db can be mounted:

SQL> alter database mount;
ERROR at line 1:
ORA-01100: database already mounted

OK, that’s a start. How about open-ing?

SQL> alter database open;
ERROR at line 1:
ORA-01113: file 1 needs media recovery

OK let’s do recovery:

ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf'
SQL> recover datafile '/usr/lib/oracle/xe/oradata/XE/system.dbf'
Media recovery complete.
SQL> alter database open;
Database altered.
SQL> quit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

Hope this helps somebody.

RHEL 5 to CentOS 5

I used VirtualBox to install RHEL v5.4 today, as we’re going to use it to host our web application.

The install completed successfully, and then I realized that some kind of subscription plan is required to issue ‘yum’ commands.

So there I was, stuck with an outdated RHEL5 system (circa September 2009, the box tells me), and no RHN login in sight. Great.

Some Google-ing uncovered this article, which pretty much works, except I had to make a few edits here and there.

I thought to repost here instead, in case I ever have to convert RHEL to CentOS again.

It’s an excerpt of root’s commands:

# remove cached packages
yum clean all

# create /root/centos/
mkdir ~/centos
cd ~/centos

# import CentOS's GPG key
wget http://mirror.centos.org/centos/5.4/os/i386/RPM-GPG-KEY-CentOS-5
rpm --import RPM-GPG-KEY-CentOS-5

# web get base packages
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/centos-release-5-4.el5.centos.1.i386.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/centos-release-notes-5.4-4.i386.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-3.2.22-20.el5.centos.noarch.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
wget http://mirror.centos.org/centos/5.4/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm

# install using 'rpm'
rpm -Uvh centos*.rpm
rpm -Uvh yum*.rpm

# clear RHN stuff
rpm -e --nodeps redhat-release
rpm -e --nodeps yum-rhn-plugin

# upgrade to heart's content
yum upgrade

At this moment, the update is buzzing along quite well, thanks to NUS’s mirror.