Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad?

Whilst you can use the old “select 1 from dual” trick, the downside with this is that it issues an extra query each and every time you borrow a connection from the pool. For high volumes, this is wasteful. JBoss provides a special connection validator which should be used for Oracle: <valid-connection-checker-class-name> org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker </valid-connection-checker-class-name> This … Read more

Multiple REPLACE function in Oracle

Even if this thread is old is the first on Google, so I’ll post an Oracle equivalent to the function implemented here, using regular expressions. Is fairly faster than nested replace(), and much cleaner. To replace strings ‘a’,’b’,’c’ with ‘d’ in a string column from a given table select regexp_replace(string_col,’a|b|c’,’d’) from given_table It is nothing … Read more

Oracle query execution time

One can issue the SQL*Plus command SET TIMING ON to get wall-clock times, but one can’t take, for example, fetch time out of that trivially. The AUTOTRACE setting, when used as SET AUTOTRACE TRACEONLY will suppress output, but still perform all of the work to satisfy the query and send the results back to SQL*Plus, … Read more

Oracle client installation error – path too long

This limitation is based on older Windows restrictions, where length of environmental variables was important. This limitation is still there in the Oracle installation. Work around this: Step 1: Copy the value of your ‘path’ variable to a text-editor (Ex.: notepad) and save this value as backup. Step 2: Reduce the size of this path … Read more

oracle blob text search

This is quite possible and easy to do. Simply use dbms_lob.instr in conjunction with utl_raw.cast_to_raw So in your case, if t1 is a BLOB the select would look like: select * from table1 where dbms_lob.instr (t1, — the blob utl_raw.cast_to_raw (‘foo’), — the search string cast to raw 1, — where to start. i.e. offset … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)