1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to locate Aliases

Discussion in 'Server Administration and Options' started by Kenneth, Sep 17, 2009.

  1. Kenneth

    Kenneth Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Hi,

    How can one view or locate existing aliases in my database?
    Please treat as urgent.
    Just a junior DBA.

    Regards,
    Kenneth.
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    what do you mean by alias? are you asking about synonyms?

    If you are asking for synonyms you can query the all_objects view for object_type = synonyms
     
  3. Kenneth

    Kenneth Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    A UNIX alias is a short command that is replaced with a larger command to save typing time.
    EXAMPLE:

    #*******************************
    # UNIX aliases for Oracle DBAs
    #*******************************
    alias alert='tail -100 $DBA/$ORACLE_SID/bdump/alert_$ORACLE_SID.log|more'
    alias errors='tail -100 $DBA/$ORACLE_SID/bdump/alert_$ORACLE_SID.log|more'
    alias arch='cd $DBA/$ORACLE_SID/arch'
    alias bdump='cd $DBA/$ORACLE_SID/bdump'
    alias cdump='cd $DBA/$ORACLE_SID/cdump'
    alias pfile='cd $DBA/$ORACLE_SID/pfile'
    alias rm='rm -i'
    alias sid='env|grep ORACLE_SID'
    alias admin='cd $DBA/admin'

    So which directory can I find it?
    Thanks.
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,346
    Likes Received:
    347
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    There is none, aliases are shell constructs for the life of your session. Simply type the command 'alias' (without the quotes) at the shell prompt and you'll see a list of all defined aliases in your session.
     
  5. Kenneth

    Kenneth Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    55
    Thanks so much. I have just tried that out and it came out with all the aliases in my session. I appreciate your responses.

    Regards,
    Kenneth.