Jump to Navigation

sql

267 - Show running SQLs

If you want to know the running SQLs at that moment, the commands are useful.

SQL> col USERNAME format a15
SQL> col MACHINEĀ  format a10
SQL> set lin 500
SQL> set pagesize 20000

SQL> select a.username, a.sid, a.serial#, a.machine, b.sql_text from v$session a, v$sqltext b where a.sql_address = b.address and a.sql_hash_value = b.hash_value and b.piece = 0 and a.username is not null and a.status = 'ACTIVE' order by a.username, a.sid, b.piece;

Oracle:

031 - Using SQL*Plus on Linux

To run SQL*Plus, or any Oracle-supplied command, you must have several environment variables set.
You can set these environment variables automatically at login by editing your login script, or
you can use an environment variable script built, When you installed Oracle Database XE, the installer
creates two scripts that define the environment variables for you.

Environment Variable Script(Bourne, Korn, Bash):
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

Oracle:
Linux:
Subscribe to RSS - sql


Main menu 2

by Dr. Radut