Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

sample login file for Oracle UNIX/Linux

Oracle Database Tips by Donald BurlesonApril 28, 2015

Upon logging onto a UNIX computer, a special login file is executed to establish the UNIX environment.  Typically, these login commands perform the following functions:

     sample bash .profile for Oracle

    sample ksh .profile for Oracle

- Basic UNIX environment commands
- Set the UNIX command line editor
- Set Oracle aliases
- Set a standard UNIX command prompt
- Changing the Oracle UNIX environment
- Basic UNIX environment commands

There are several settings that should be configured when logged onto UNIX.  These login commands define the user environment and are critical to success in UNIX.  Start with the basic environment command.

Set the Oracle shell environment

The first choice is which shell is needed as the default. The choices are c-Shell (csh), Bourne shell (sh), Korn shell (ksh), or the Bourne Again shell (bsh).  In the example below, the default shell is set to the Korn shell.

#***********************************************************
#  Set environment to Korn shell.
#***********************************************************

ENV=.kshrc; export ENV
Set the umask parameter
The umask parameter is used to set the default file protections for a user. As shown in the following example, set the umask to 022.
 
#***************************************************************
#  Set the umask to have 755 for executables and 644 for text
#***************************************************************
umask 022
Set the UNIX terminal type
The following command sets the terminal type for the session.

#***************************************************************
#  Set the terminal to vt100
#***************************************************************
DBABRV=ora; export DBABRV
ORACLE_TERM=vt100; export ORACLE_TERM
TERM=vt100; export TERM
The UNIX command line editor

 
The next command is the setting for the command line editor. This is the set –o command.  Observe how the command line editor makes the DBA's life in UNIX easier.
 
UNIX allows setting the type of command editor.  Once set, a variety of shortcuts can be used to quickly redisplay previous UNIX commands. These shortcut commands will greatly reduce the amount of typing at the UNIX prompt, and  a UNIX guru can always be recognized because of their use of these command shortcuts.  There are two common settings for the command line editor, emacs and vi.

set –o emacs - This command sets the emacs editor for editing online UNIX commands.

Command completion with emacs - the emacs setting allows completing of long file names by pressing the escape key twice ().  For example, to vi the file oracle_script_for_checking_permissions.ksh, enter vi oracle , and the command line will display:

           root> vi oracle_script_for_checking_permissions.ksh

Display previous commands - the emacs editor allow viewing of the prior command by pressing the p keys.

set –o vi - This command sets the vi editor for online UNIX commands.  Once a command is displayed at the UNIX prompt, use standard vi commands to edit the command.  In addition, the set –o vi command allows for easy searches of the UNIX command history.

Command completion with vi - the vi setting allows long file names to be completed by pressing the escape backslash ( \).  For example, to vi the file oracle_script_for_checking_permissions.ksh, enter vi oracle \, and the command line will display:

          root> vi oracle_script_for_checking_permissions.ksh

Display previous commands - the vi editor allows viewing of prior commands by pressing the k key.

Search the command history –search for a specific command in the command history and display it on the command line by pressing the escape key and the forward slash ( / ). For example, to redisplay a command that contains ksh, enter /, followed by ksh.  The matching command will then be displayed on the command line.

To automatically set this value, place the following code in the login file (.profile, .kshrc
Backspace and Keyboard editor setting - this setting allows the following shortcuts:

#    k  -  to display command history

#    \  -  for command completion

#    / searchstring  -  to find a command in the history file

stty erase ^?  #Maps Backspace character to backspace instead of ctl-h

set -o vi

export EDITOR=vi

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster