{"id":519,"date":"2012-11-14T14:25:29","date_gmt":"2012-11-14T11:25:29","guid":{"rendered":"http:\/\/www.fatihacar.com\/blog\/?p=519"},"modified":"2012-11-14T14:27:13","modified_gmt":"2012-11-14T11:27:13","slug":"oracle-and-grid-user-bash_profile-example-on-linux","status":"publish","type":"post","link":"https:\/\/www.fatihacar.com\/blog\/oracle-and-grid-user-bash_profile-example-on-linux\/","title":{"rendered":"Oracle and Grid User bash_profile Example on Linux"},"content":{"rendered":"<p><strong>bash_profile for Oracle user<\/strong><\/p>\n<blockquote><p>\n# .bash_profile<\/p>\n<p># Get the aliases and functions<br \/>\nif [ -f ~\/.bashrc ]; then<br \/>\n        . ~\/.bashrc<br \/>\nfi<\/p>\n<p># User specific environment and startup programs<br \/>\nif [ $USER = &#8220;oracle&#8221; ]; then<br \/>\n  if [ $SHELL = &#8220;\/bin\/ksh&#8221; ]; then<br \/>\n    ulimit -p 16384<br \/>\n    ulimit -n 65536<br \/>\n  else<br \/>\n    ulimit -u 16384 -n 65536<br \/>\n  fi<br \/>\nfi<\/p>\n<p># Oracle Settings<br \/>\nTMP=\/tmp; export TMP<br \/>\nTMPDIR=$TMP; export TMPDIR<\/p>\n<p>ORACLE_HOSTNAME=testdb.domainname; export ORACLE_HOSTNAME<br \/>\nORACLE_UNQNAME=testdb; export ORACLE_UNQNAME<br \/>\nORACLE_BASE=\/u01\/oracle\/11.2.0; export ORACLE_BASE<br \/>\nORACLE_SID=testdb; export ORACLE_SID<br \/>\nORACLE_HOME=\/u01\/oracle\/11.2.0\/db_home; export ORACLE_HOME<br \/>\nORACLE_TERM=xterm; export ORACLE_TERM<\/p>\n<p>LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib; export LD_LIBRARY_PATH<br \/>\nCLASSPATH=$ORACLE_HOME\/JRE:$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib; export CLASSPATH<\/p>\n<p>BASE_PATH=\/usr\/sbin:$PATH:$HOME\/bin; export BASE_PATH<br \/>\nPATH=$ORACLE_HOME\/bin:$BASE_PATH; export PATH<\/p>\n<p>alias sql=&#8217;sqlplus \/ as sysdba&#8217;<br \/>\nalias home=&#8217;cd $ORACLE_HOME&#8217;<br \/>\nalias db=&#8217;export ORACLE_SID=testdb&#8217;<br \/>\nalias alert_db=&#8217;tail -55f \/u01\/oracle\/11.2.0\/diag\/rdbms\/testdb\/testdb\/trace\/alert_testdb.log&#8217;\n<\/p><\/blockquote>\n<p><strong>bash_profile for Grid user<\/strong><\/p>\n<blockquote><p>\n# .bash_profile<\/p>\n<p># Get the aliases and functions<br \/>\nif [ -f ~\/.bashrc ]; then<br \/>\n        . ~\/.bashrc<br \/>\nfi<\/p>\n<p># User specific environment and startup programs<br \/>\nif [ $USER = &#8220;grid&#8221;  ]; then<br \/>\n  if [ $SHELL = &#8220;\/bin\/ksh&#8221; ]; then<br \/>\n    ulimit -p 16384<br \/>\n    ulimit -n 65536<br \/>\n  else<br \/>\n    ulimit -u 16384 -n 65536<br \/>\n  fi<br \/>\nfi<\/p>\n<p># Grid Settings<br \/>\nTMP=\/tmp; export TMP<br \/>\nTMPDIR=$TMP; export TMPDIR<\/p>\n<p>ORACLE_HOSTNAME=testdb.domainname; export ORACLE_HOSTNAME<br \/>\nORACLE_UNQNAME=testdb; export ORACLE_UNQNAME<br \/>\nORACLE_BASE=\/u01\/grid\/11.2.0; export ORACLE_BASE<br \/>\nGRID_HOME=\/u01\/grid\/11.2.0\/grid_home; export GRID_HOME<br \/>\nORACLE_HOME=$GRID_HOME; export ORACLE_HOME<br \/>\nORACLE_SID=+ASM; export ORACLE_SID<br \/>\nORACLE_TERM=xterm; export ORACLE_TERM<\/p>\n<p>LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib; export LD_LIBRARY_PATH<br \/>\nCLASSPATH=$ORACLE_HOME\/JRE:$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib; export CLASSPATH<\/p>\n<p>BASE_PATH=\/usr\/sbin:$PATH:$HOME\/bin; export BASE_PATH<br \/>\nPATH=$ORACLE_HOME\/bin:$BASE_PATH; export PATH<\/p>\n<p>alias sql=&#8217;sqlplus \/ as sysasm&#8217;<br \/>\nalias home=&#8217;cd $ORACLE_HOME&#8217;<br \/>\nalias asm=&#8217;export ORACLE_SID=+ASM&#8217;<br \/>\nalias alert_asm=&#8217;tail -55f \/u01\/grid\/11.2.0\/diag\/asm\/+asm\/+ASM\/trace\/alert_+ASM.log&#8217;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>bash_profile for Oracle user # .bash_profile # Get the aliases and functions if [ -f ~\/.bashrc ]; then . ~\/.bashrc fi # User specific environment and startup programs if [ $USER = &#8220;oracle&#8221; ]; then if [ $SHELL = &#8220;\/bin\/ksh&#8221; ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi&#8230;<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,18],"tags":[90,32,22],"class_list":["post-519","post","type-post","status-publish","format-standard","hentry","category-administration","category-linux-unix","tag-oracle","tag-oracle-administration","tag-system-administration"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-8n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":4,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"predecessor-version":[{"id":523,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/519\/revisions\/523"}],"wp:attachment":[{"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}