Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Connect Script

Connect Script

From: Toepke, Kevin M <ktoepke_at_cms.cendant.com>
Date: Wed, 13 Sep 2000 11:04:29 -0400
Message-Id: <10618.116840@fatcity.com>


All:

As I mentioned in yesterday's NOUG meeting, I have developed a connect script that can be used (in conjunction with a login.sql) in SQL*Plus to set your SQLPROMPT to the correct database. All you have to do is place the "connect.sql" script (attached) in your $SQLPATH directory. Then instead of typing "connect user/pw_at_db" at the SQL prompt, type "@conect user/pw_at_db".

The contents of the sql buffer is saved in /tmp as XXX.sql. To automatically retrieve the XXX.sql file back into the sql buffer, uncomment the 2 "REM"ed lines at the end.

Kevin

--------BEGIN connect.sql--------

HOST touch /tmp/XXX.sql >/dev/null 2>/dev/null HOST chmod 600 /tmp/XXX.sql >/dev/null 2>/dev/null SAVE /tmp/kmt.sql REPLACE
CONNECT &1
@login.sql
REM get /tmp/XXX.sql
REM !rm -f /tmp/XXX.sql >/dev/null
UNDEFINE 1
--------END connect.sql--------
Received on Wed Sep 13 2000 - 10:04:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US