web analytics

Find the files not in use in Unix

find . -name "*" -exec /usr/sbin/fuser {} 2>&1 \; | grep ”: *$”

Start sqlplus in Windows .BAT script

Here is the example of emulating “HERE-documents” in Windows shell.

@ECHO OFF FIND "/*%none% some_label" <%0 |sqlplus USER/PASS@SERVER GOTO end : ———– embedded SQL————————- /* some_label */ select count(*) from dba_free_space; /* some_label */ select tablespace_name from dba_tablespaces; : ———– end of embedded SQL————————- :end

It’s also possible to use procedures in .bat files. %none% […]

Show hidden parameters in Oracle

Check the hidden underscore parameters…

col "Parameter" FOR a50 col "Session Value" FOR a15 col "Instance Value" FOR a15 SELECT a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value" FROM x$ksppi a, x$ksppcv b, x$ksppsv c WHERE a.indx = b.indx AND a.indx = c.indx AND SUBSTR(ksppinm,1,1)=’_’ AND LOWER(a.ksppinm) LIKE LOWER(’%&amp;param%’) ORDER BY a.ksppinm;

Setting the parameter: