Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Enhancement SQL*Plus (prev.: Re: Fixing a little problem in the login.sql script found in Tom Kyte's book)
Sybrand Bakker (gooiditweg_at_sybrandb.demon.nl) wrote:
: On Wed, 15 Jan 2003 12:39:15 +0100, "Peter van Rijn"
: <p.vanrijnREMOVE_at_THISzhew.nl> wrote:
: >Wouldn't it be nice if SQL*plus itself would offer the functionality of
: >customizing the SQL-prompt? Let's say with dynamically changed
: >USER/DBNAME/SID. A bit like the $PWD in PS1 on Unix.
: >
: >Christopher Jones listening in perhaps? Could this be done 'some day'?
: >
: >Peter
: >
: Why duplicating the set prompt command?
: Can someone explain that to me?
Wasn't this just discussed elsewhere?
set prompt can be used to show your USER/DBNAME/SID, but if you change the database to which you are connected and forget to run the set prompt command then the prompt will be misleading.
me_at_development> connect me_at_production
me_at_development> ... whoops, didn't update the prompt...
me_at_development> delete from important_table;
This could be most irritating if you ran a @PROCEDURE (for example to calculate table sizes) and forgot that it does a connect to the production database.
Personally, I have a small sql file (I call it "WHO.SQL") which I tend to run before doing anything important. It shows the user, plus some global thingy which I forget the details of but that has the connect string or such like...
SQL> @WHO
USER DATABASE ---- --------- ME PRODUCTION -- so lets not drop that table heh!Received on Wed Jan 15 2003 - 18:01:38 CST
![]() |
![]() |