Tuesday, May 29, 2007

using dbms_application_info

exec DBMS_APPLICATION_INFO.SET_MODULE( NULL,NULL );
exec DBMS_APPLICATION_INFO.SET_MODULE('my module', 'my action');
exec DBMS_APPLICATION_INFO.SET_ACTION('my action 2');
exec DBMS_APPLICATION_INFO.SET_CLIENT_INFO('my client info');

-- exec DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS(rindex, slno,
--      'Test Operation', obj, 0, sofar, totalwork, 'Contract', 'Contracts');

select sid,program,module,action,client_info from v$session where username='MH'; 

Tuesday, May 22, 2007

Oracle/PLSQL: Oracle System Tables

Oracle/PLSQL: Oracle System Tables: "an alphabetical listing of the Oracle system tables that are commonly used."

Desc - Describe an Oracle Table, View, Synonym, package or Function

Desc - Describe an Oracle Table, View, Synonym, package or Function: "An alternative to the DESC command is selecting directly from the data dictionary - DESC MY_TABLE is equivalent to SELECT column_name 'Name', nullable 'Null?', concat(concat(concat(data_type,'('),data_length),')') 'Type' FROM user_tab_columns WHERE table_name='TABLE_NAME_TO_DESCRIBE';"