Re: Fw: OT - Getting fired for database oops

From: Ravi Gaur <ravigaur1_at_gmail.com>
Date: Thu, 21 May 2009 10:01:11 -0500
Message-ID: <289232290905210801m2d6fe531rfa81a7e9cb72da85_at_mail.gmail.com>



Tried this? Works for me.
set sqlprompt "_CONNECT_IDENTIFIER _USER > "
  • Ravi Gaur

On Thu, May 21, 2009 at 8:57 AM, Thomas Day <tomdaytwo_at_gmail.com> wrote:

> My Oracle client is 10.2.0.1.0. My glogin.sql contains
>
>
> col user_name new_value user_name
>
> col db_name new_value db_name
>
> select upper(user) user_name,
>
> substr(ltrim(rtrim(upper(global_name))),1,6) db_name
>
> from global_name;
>
> SET SQLprompt "&db_name..&user_name> "
> It doesn't reset the sqlprompt when I go to a new database. What technique
> do you use?
>
> On Wed, May 20, 2009 at 2:02 PM, <Joel.Patterson_at_crowley.com> wrote:
>
>>
>>
>> I do the same thing, though mine is called oraenvset. There are case
>> statements and more for each db version. Like LD_LIBRARY_PATH is no longer
>> needed in 10. etc.
>>
>>
>>
>> Sets the prompt to the host. Glogin sets the prompt for any database.
>> Oracle 10 client will set the prompt in an oracle 9 database even after one
>> is logged in elsewhere before connecting to it.
>>
>>
>>
>> Joel Patterson
>> Database Administrator
>> 904 727-2546
>> ------------------------------
>>
>> *From:* oracle-l-bounce_at_freelists.org [mailto:
>> oracle-l-bounce_at_freelists.org] *On Behalf Of *Jared Still
>> *Sent:* Monday, May 18, 2009 12:39 PM
>> *To:* gmei_at_prospectiv.com
>> *Cc:* oracle-l_at_freelists.org
>> *Subject:* Re: Fw: OT - Getting fired for database oops
>>
>>
>>
>>
>>
>> On Mon, May 18, 2009 at 8:56 AM, Guang Mei <gmei_at_prospectiv.com> wrote:
>>
>>
>> 1. Try not to open too many telnet/ssh or sqlplus sessions at the same
>> time. I usually keep one or two. If I need to log into another db, I get out
>> the current session(s) and log into the new db. If one needs to have prod
>> and dev sessions both open, then try to set different background colors so
>> one won't be confused.
>>
>>
>> Using different colors is helpful. Personally I usually do that on
>> Windows.
>>
>> On linux/unix I have a modified version of oraenv called 'koraenv'.
>> (works in bash to BTW)
>>
>> Among other things, when the user is 'oracle', koraenv calls an xtitle
>> function from .bashrc. This sets the title of my putty windows to
>> ORACLE_SID - username pwd
>>
>> I used this last Friday to work on patching 7 databases in 2 hours.
>>
>> A separate putty ssh session was opened for each database, the
>> environment set and the xtitle set accordingly.
>>
>> Using a detailed checklist for each database, I could keep track of
>> which step I was on for each database, and knew which window
>> each was in.
>>
>> It's a fair bit of work beforehand to get everything setup, but it's
>> the only way I could get all these done in 2 hours.
>>
>> Lot of excellent suggestions in your post Guang, thanks.
>>
>>
>> Jared Still
>> Certifiable Oracle DBA and Part Time Perl Evangelist
>>
>>
>>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 21 2009 - 10:01:11 CDT

Original text of this message