This discussion is archived
2 Replies Latest reply: Nov 17, 2011 1:24 PM by vikki - moderator - oracle RSS

Is there a way to use the Maintenance Wizard with a .profile file...

Adam Newbie
Currently Being Moderated
Good afternoon all...

In my environment we have the same applmgr account for multiple databases. The .profile delivers a menu that allows the user to pick which database they wish to work with, and then a script runs which changes the environment specific variables for the desired database.

In many environments I have worked in the .profile is used to setup environmental variables for the applmgr account.

In looking at the instructions for setting up Maintenance Wizard it says to ensure ssh or rsh access to each of the applications servers using the applmgr account, and removing any .profile or .login scripts. This is not viable in my environment.

In asking on metalink I was told 1) just ignore the ssh setup stuff; and 2)the ssh setup is essential for maintenance wizard to work. Clearly conflicting advice.

How can I install/implement maintenance wizard without the loss of my current .profile configuration?

Please advise,
Adam
  • 1. Re: Is there a way to use the Maintenance Wizard with a .profile file...
    Adam Newbie
    Currently Being Moderated
    Oracle support's assessment was that that there is no way around the requirement to use ssh/remsh, I did a bit of further research into the issue. I developed a resolution for hpux as follows...

    I used ssh rather than remsh for my shell and created a conditional statement in my .profile to handle the issue...

    .
    .
    .
    # Set environment script if not secure shell -- 100311 MAC
    if [ -n "$SSH_CLIENT" ]
    then
    #Set up the shell environment
    set -u
    trap "echo 'logout'" 0
    umask 012
    else
    #Set up the shell environment
    set -u
    trap "echo 'logout'" 0
    umask 012

    # Set up Oracle environment
    . /usr/local/bin/envch
    fi

    The conditional uses -n for not null, or in other words it is True if the variable is defined but false if it is not.
    The variable $SSH_CLIENT is defined when logging in through ssh, but undefined when using another terminal method.

    If it is an ssh shell I still setup other environment variables, but I have to move the "set -u" line to a result of the conditional as placing it before the conditional will make the -n test condition invalid. (It will cause references to an undefined variable to return an error rather than null). If it is not an ssh shell I again setup the variables but also call the interactive component of the login as it's own script.

    I have tested this successfully and will now move on with the rest of the maintenance wizard installation.

    Thank you,
    Adam
  • 2. Re: Is there a way to use the Maintenance Wizard with a .profile file...
    vikki - moderator - oracle Explorer
    Currently Being Moderated
    Great solution!

    No one has been quite this creative before - but the key is not having any additional "text" return when the ssh/rsh connection is made. Your workaround does that nicely!

    -Vikki Pickard
    Product Manager for the Maintenance Wizard

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points