Posts Tagged ‘ oracle ’

Use asmcmd to see what’s in the ASM database

December 14, 2007
By gary

There are probably other/better ways to see what datafiles are being managed by ASM, but this is one way. The command asmcmd lives in the $ORACLE_HOME/bin irectory. In this example I have created an ASM area for my database files, control files etc. By cd’ing to the DATA directory I can...
Read more »

Tags: ,
Posted in oracle | No Comments »

See what SQL is executing in Oracle ‘right now’.

December 14, 2007
By gary

select sesion.sid, sesion.username, optimizer_mode, hash_value, address, cpu_time, elapsed_time, sql_text from v$sqlarea...
Read more »

Tags: ,
Posted in Scripts, oracle | No Comments »

Useful Oracle scripts

December 12, 2007
By gary

space.sql Display tablespace size and current utilisation. SQL> @/u/little/mycode/sql/dba/space % % MaxPoss Max Tablespace Name KBytes Used Free Used Largest Kbytes Used ------------------- ------------- ------------ ------------ ------ ------------ ------------ ------ m SYSTEM 1,048,576 ...
Read more »

Tags: , ,
Posted in Scripts, oracle | No Comments »

Oracle for Sysadmins

November 27, 2007
By gary

Set the ‘EDITOR’ variable for the user ‘oracle’. Doing so will allow you to edit your sqlplus commands using a reasonable editor. After executing a piece of SQL in sqlplus, just type ‘edit’ or ‘ed’ and you’ll be transported to your editor. In vi just type :q to get back to the...
Read more »

Tags:
Posted in oracle, sysadmin, unix | No Comments »