Month: March 2010

Show date time tables were created

To see when tables (or other objects) were created, first change your date format to display time: alter session set nls_date_format=’Dy DD-Mon-YYYY HH24:MI:SS’; Then in Oracle SQL Developer, right click on the table or object in question, select ‘open‘, and

Posted in Uncategorized

PL/SQL to count from all tables in a schema

Replace SYSTEM with the name of the schema you are interested in: set serverout on size 999999 declare cnt number ; begin for c1 in (select owner, table_name from all_tables where owner = ‘SYSTEM’) loop execute immediate ‘select count(1) from

Posted in Scripts

Fix for Oracle XE 1608: unable to create InstallDriver instance, return code -2147221164

I got this annoying error when attempting to install Oracle XE: 1608: unable to create InstallDriver instance, return code -2147221164 The fix for this on my PC was: Identify your TEMP folder – choose start -> run -> type “cmd”,

Posted in Installs

Automatic gather stats job

check it is on with: select state, last_start_date from dba_scheduler_jobs where job_name = ‘GATHER_STATS_JOB’ ; Switch it on and off with: exec dbms_scheduler.disable(‘GATHER_STATS_JOB’) exec dbms_scheduler.enable(‘GATHER_STATS_JOB’)

Posted in Performance tuning, Stats