Upgrade an Oracle 10g database to Oracle 11g

March 23rd, 2009 1 Comment   Posted in DBA Thoughts, Site News

Most of my databases are Oracle 10G instances. I have one instance that is Oracle 11G, but that was a fresh install. I have a test 10G database with some old production data in it. I am going to up upgrade it to 11G and I will post my experience. After the upgrade I will be setting up a test RMAN configuration. The plan is to work on backup and recovery. A co-worker and I will practice breaking a test database in various ways and trying to recover the database. It should be fun, stay tuned.


Tags: , , ,

Clean up phone numbers

December 9th, 2008 1 Comment   Posted in DBA Thoughts, Oracle Tip

I needed to clean up a list of phone numbers today. The phone numbers where in a varchar2 column in the database and were listed like this: (916) 555 -1212.

I knew I could used some instr and substr functions to cut the data out, but I wanted to use some of the regex functions found in Oracle 10G and above. This handy little piece of code simply removed all non numeric digits from a string.

select REGEXP_REPLACE(CALLNUMBER,'[^[:digit:]]', NULL)
from temp_cima where rownum < 11;