Month: April 2016

Oracle – what is filling up my diag directory and sub-directories

Oracle – what is filling up my diag directory and sub-directories sqlplus / as sysdba SQL> show parameter diag NAME                     TYPE     VALUE ———————————— ———– —————————— diagnostic_dest              string     /oracle/SILVER [oracle@silver ~]$ cd /oracle/SILVER/diag [oracle@silver diag]$ ls asm  clients  crs  diagtool  lsnrctl  netcman  ofm  rdbms  tnslsnr Ok, so …

Oracle – what is filling up my diag directory and sub-directories Read More »

What is Oracle 12c dbms_stats.gather_schema_stats doing by default?

What is 12c dbms_stats.gather_schema_stats doing by default?  It uses predefined dbms_stats preferences.  Here an example of how to show those preferences on 12c – some of the listed preferences below are new to 12c.  Then an example of how to show what a gather_schema_stats call will do for default calls. Here is a call to dbms_stats.gather_schema_stats …

What is Oracle 12c dbms_stats.gather_schema_stats doing by default? Read More »

An Oracle SQLPlus / SQLCL script that generates sql statements then executes them

Here is a easy example of a sql script that generates sql statements and then executes them. Hope it helps.  Mike SET PAGESIZE 0 SET TERMOUT OFF SET TRIMSPOOL ON SPOOL executeStatements.sql SELECT ‘SELECT count(*) from dba_tables where owner=”’||trim(username)||”’;’ from dba_users WHERE ROWNUM < 15; SELECT ‘SELECT count(*) from dba_indexes where owner=”’||trim(username)||”’;’ from dba_users WHERE …

An Oracle SQLPlus / SQLCL script that generates sql statements then executes them Read More »

Oracle SQLCL – Use SQLCL to simply export via SET SQLFORMAT CSV and import via load

Need a very simple way to export Oracle data to CSV format – and import from CSV format? Here is a fairly easy example of doing both sides (import and export) using Oracle’s early adopter “sqlcl” product.  And yes, there are many other ways to accomplish this.  Once your have this method down – the …

Oracle SQLCL – Use SQLCL to simply export via SET SQLFORMAT CSV and import via load Read More »