Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Connect Script
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
![]() |
![]() |