sqlplus

Customizing your SQL* Plus environment with your preferences is easy enough on startup.

Customizing your SQLPlus environment with your preferences is easy enough on startup. There are two files: First, sqlplus searches for the file $ORACLE_HOME/sqlplus/admin/glogin.sql, if found, the script executes any commands it contains. This “global” login script applies to all users who execute SQL* Plus from that Oracle home, no matter which directory they start sqlplus …

Customizing your SQL* Plus environment with your preferences is easy enough on startup. Read More »

Easy but valuable enhancements to sqlplus adding a prompt and defining your editor on UNIX

add this to $ORACLE_HOME/sqlplus/admin/glogin.sql — setup a prompt with user name and connect set sqlprompt “_user’@’_connect_identifier > ” — set the default editor to vi define _editor=vi — from that point forward – all users will get the user that they are connected as and the SID / Connect Identifier embedded in their sqlprompt making …

Easy but valuable enhancements to sqlplus adding a prompt and defining your editor on UNIX 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 »