DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2002
    We have just moved the database to a larger SUN box. We have many shell scripts that had the line:
    date +%c%m%d
    to display and then grep date and time from it. It should look like:
    Thu Apr 25 15:20:55 20020425
    But on the new machine, it will be like:
    /export/home/oracle>date +%c%m%d
    Thu 25 Apr 2002 03:18:15 PM EDT0425
    The strange part is that if I do su to switch to root, and do the same thing, it will display:
    # id
    uid=0(root) gid=1(other)
    # date +%c%m%d
    Thu 25 Apr 2002 04:10:51 PM EDT0425BUT, if I do su - to root, I will get:
    :/export/home/oracle>su -
    Sun Microsystems Inc. SunOS 5.8 Generic February 2000
    # id
    uid=0(root) gid=1(other)
    # date +%c%m%d
    Thu Apr 25 16:09:56 20020425
    which is the correct form we need.
    Could anyone suggest how I can get the display for oracle user the way we want?

  2. #2
    Join Date
    Jan 2002
    su -

    is switch user with that user's .profile

    just su is

    switch user with current user's profie.

    u may want to check the Oracle user's .profie and set it accordinly ( may be the shell reference is the problem here ).


  3. #3
    Join Date
    Apr 2002
    Thanks for the reply. I know the difference between su and su -. We are using the same .profile as on the old machine. Could you elaborate a little more on shell reference? Thanks!

  4. #4
    Join Date
    Apr 2001
    Type 'ps' to check the shell you are using.

    Can also have a look in /etc/passwd for the shell you are using DO NOT modify this file.

    change shells by typing ksh, sh, csh - for kourne, bourne, cshell based on what root uses and then retype command.

    check roots. profile in /.profile
    may have a variable set which oracle does not have set.

    Once you have eliminated all of the impossible,
    whatever remains however improbable,
    must be true.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width