By admin on Jan 30, 2008 in Oracle | 2 Comments
An interesting finding… create table test_table ( col_1 number ) compress; alter table test_table add (col_2 number); insert into test_table values(1,2); After this, try to drop one column alter table test_table drop column col_2; ORA-39726: unsupported add/drop column operation on compressed tables This is expected as the table is still compressed. alter table test_table nocompress; [...]
By admin on Jan 29, 2008 in Oracle | 2 Comments
Oracle AWR (Advanced Workload Repository) and ADDM (Automated Database Diagnostic Monitor) which are available since Oracle 10g are useful features for performance tuning and troubleshooting. For developer like me who uses Oracle but is not a Oracle dba both AWR and ADDM are useful when I need to troubleshoot for performance related issues related to [...]
By admin on Dec 25, 2007 in Oracle | 0 Comments
Run the following SQLs to create the table and index create table mytable ( col1 number(12) primary key, col2 varchar2(100), col3 varchar2(100), col4 varchar2(100) ); create or replace function myfunc( col2 in varchar2 ) return number deterministic as begin dbms_output.put_line(‘Testing function’); return 1; end; / create index myidx on mytable(myfunc(col2)); insert into mytable values(1,’test’,'test’,'test’); The [...]
By admin on Dec 13, 2007 in Oracle | 0 Comments
Here are some Oracle queries I collected from various websites Resources in High Demand select active_session_history.event, sum(active_session_history.wait_time + active_session_history.time_waited) ttl_wait_time from v$active_session_history active_session_history where active_session_history.sample_time between sysdate – 60/2880 and sysdate group by active_session_history.event order by 2 Locked Objects SELECT o.owner, o.object_name, o.object_type, o.last_ddl_time, o.status, l.session_id, l.oracle_username, l.locked_mode FROM dba_objects o, gv$locked_object l WHERE o.object_id [...]
By admin on Oct 16, 2007 in open source, Oracle | 3 Comments
I bet that everyone will know Toad if they use Oracle. Sometimes I think it is Oracle strategy not to have a user friendly tool so that we will need to pay for its support or hire a DBA Anyway, I found that most people working on Oracle, whether they are developers or DBAs, rely [...]
By admin on Oct 2, 2007 in Oracle, PL/SQL | 0 Comments
Download Source Sometimes back when I was involved in a project I faced the challenge to import data from different Oracle databases synchronously within my Java web application. Performance is the key issue. The import has to be completed in a short time frame according to the SLA. Of course I can dynamically create JDBC [...]