Posts

Sidetracked...

Somehow over the course of the last two months, I've gotten away from Oracle RDBMS, and I'm dusting off the cobwebs collected in my brain since 2007. While I'm not back at the help desk, I'm back supporting another database solution provided by a monolithic software company; if you guessed Microsoft SQL Server, you win a Gold Star. So how did this come about? Oracle and Microsoft make strange bedfellows and it's only through the magic of Golden Gate that we are able to make these two platforms effectively share data. As it happens, Golden Gate does a really good job at replicating data across several platforms. The configurations and setup are relatively transportable from source database to target database. I guess this is an exercise in resume building.

iOS 7 Wireless Connectivity Issues and Solution?

DHCP Client is broken. Use a static network configurations and things may work better.

Database links without TNSNAMES.ora

So, you step a test database on another server, and you don't want to wait for PUPPET 1 to push out an update to your managed TNSNAMES.ora file with the database connection information. So how to you create a database link? The short answer can be summed up like so: " Don't overthink the problem. " Normally we create database links like so: SQL> create database link devdb connect to scott identified by tiger using 'DEVDB';   where DEVDB is an entry in your TNSNAMES.ora file. In the absence of such entries, a close approximation of the TNSNAMES.ora entry so we have this instead: SQL> create database link devdb connect to scott identified by tiger using '(DESCRIPTION = (ADDRESS= (PROTOCOL=TCP)(HOST=devhost.domain.com)(PORT=1521))(CONNECT_DATA=(SID=DEVDB)))'; 1 because you manage TNSNAMES files with a configuration tool, like Puppet, right? RIGHT!

Oracle log monitoring from a shell script

I found this rather old article when looking up some shell scripting syntax. Occasionally there is gold to be found: search_log.sh.  A variety of logs are generated by Oracle products, and you might be interested in monitoring them. The database alert log contains messages that are critical to database operations. Log files are also generated when products are installed or deinstalled and when patches are applied. The following script iterates over a file passed to it as an argument. If any lines are found that contain ORA-, an e-mail message is sent to a designated recipient. cat $1 | grep ORA- > alert.err if [ ‘cat alert.err|wc -l‘ -gt 0 ] then mail -s "$0 $1 Errors" administrator@yourcompany.com < alert.err fi The specific test being performed is a count of the number of words that exist in the file alert.err, which is written when you redirect to alert.err. If the word count (  wc ) is greater than (  -gt ) zero, the contents of the if bl...

cx_Oracle on a Mac

So I wanted to play with some Python on my Mac, but need a little tutoral on how to do it. This helped me...a LOT http://www.cs.utexas.edu/~mitra/csSpring2012/cs327/cx_mac.html I should mirror it so it doesn't disappear.

IS_NUMERIC

Microsoft SQL Server has a nifty function called IS_NUMERIC which will return a Boolean if the parameter passed is a numeric value. It's long been lamented that Oracle has no similar function..but it's all just a lie. While technically true that Oracle does not have an IS_NUMERIC function, it does have support for regular expressions. Oracle released regular expressions in 10g, which seems like eons ago. The following regular expression can be added to an SQL script in Oracle to test for a numeric value: REGEXP_LIKE (col1,'^[[:digit:]]+$'); where col1 is the column you wish to test. select * from tab1 where REGEXP_LIKE (col1,'^[[:digit:]]+$'); will return all the rows in table TAB1 where COL1 matches the test from the regular expression.

How I became a DBA: Part One

I saw  +Steve Karam  write an article similar to this, and I thought I'd try my hand at something like this as well. The Early Years My parents bought a used Texas Instruments 99-4a , when I was in the 2nd or 3rd grade. We had a couple games, including a version of Kings Quest which had to be loaded via a cartrage AND a cassette tape in order to play. I recall the TI having some sort of BASIC interface to load games, or interact somehow via a command line. Shortly after that, We got an Apple ][+, complete with AppleWorks, OKIData Printer and a handful of other games. As I entered my middle school years with this computer, I had to write several papers. If I learned anything from this system, it was this: Save First, Then Print. I lost many a paper on this system, but somehow still have fond memories playing Zaxxon and Oregon Trail on the green screen. My First PC As I approached high school, my family purchased an IBM PS/2, with a 486 processor, 25 mHz and 4 MB RAM. Wh...