Thinking Out Loud

October 7, 2016

Set those Environment Variables

Filed under: oracle — mdinh @ 2:31 pm

I fail to understand why people do not set environment variables or even update /etc/oratab with AGENT_HOME as an example.

It just makes thing so much easier.

Allow me to demonstrate. I have just awaken Frankenstein and don’t remember how he was configured.

As you can see, that last time I have used the system was back in Dec 2015 supposed.

I recall configuring XAG for the environment and not sure it was installed.

Having set environment variables makes it so much easier.

Make it easier on yourself and others, set those environment variables.

[grid@rac01:+ASM1:/u01/app/grid/xag]
$ env|grep HOME
CRS_HOME=/u01/app/11.2.0.4/grid
HOME=/home/grid
XAG_HOME=/u01/app/grid/xag
ORACLE_HOME=/u01/app/11.2.0.4/grid

++++++++++++++++++++++++++++++

[gguser@rac01:/home/gguser]
$ env |grep HOME
GG_HOME=/acfsmount/ggs112/
HOME=/home/gguser
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
[gguser@rac01:/home/gguser]
$ ps -ef|grep gg

++++++++++++++++++++++++++++++

[grid@rac01:+ASM1:/home/grid]
$ date
Fri Oct  7 07:18:23 PDT 2016
[grid@rac01:+ASM1:/home/grid]
$ last shutdown

wtmp begins Sat Nov 29 22:14:25 2014
[grid@rac01:+ASM1:/home/grid]
$ last -x reboot
reboot   system boot  2.6.39-400.17.1. Fri Oct  7 06:49 - 07:18  (00:29)
reboot   system boot  2.6.39-400.17.1. Fri Dec 18 06:11 - 15:34  (09:23)
reboot   system boot  2.6.39-400.17.1. Tue Jan 13 19:39 - 19:45  (00:05)
reboot   system boot  2.6.39-400.17.1. Thu Dec 18 20:15 - 20:15  (00:00)
reboot   system boot  2.6.39-400.17.1. Thu Dec 18 19:22 - 20:15  (00:52)
reboot   system boot  2.6.39-400.17.1. Wed Dec 17 05:20 - 05:36  (00:16)
reboot   system boot  2.6.39-400.17.1. Tue Dec 16 19:18 - 19:18  (00:00)
reboot   system boot  2.6.39-400.17.1. Tue Dec 16 19:11 - 19:18  (00:06)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:57 - 20:18  (07:20)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:36 - 12:36  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:12 - 12:36  (00:24)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:11 - 12:11  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:03 - 12:11  (00:07)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 12:00 - 12:00  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 11:58 - 11:58  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 10:03 - 11:58  (01:55)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 09:38 - 09:55  (00:16)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 07:23 - 07:23  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 07:11 - 07:22  (00:11)
reboot   system boot  2.6.39-400.17.1. Sun Dec 14 07:10 - 07:10  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec 13 05:55 - 07:10 (1+01:15)
reboot   system boot  2.6.39-400.17.1. Sun Dec  7 21:38 - 21:38  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Dec  7 21:21 - 21:38  (00:17)
reboot   system boot  2.6.39-400.17.1. Sun Dec  7 21:09 - 21:16  (00:07)
reboot   system boot  2.6.39-400.17.1. Sun Dec  7 07:45 - 21:08  (13:22)
reboot   system boot  2.6.39-400.17.1. Sun Dec  7 05:16 - 05:16  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 22:12 - 05:16  (07:04)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 20:56 - 20:56  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 20:49 - 20:56  (00:07)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 20:48 - 20:48  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 20:09 - 20:48  (00:39)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 15:34 - 20:08  (04:34)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 15:04 - 15:29  (00:25)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 15:01 - 15:01  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 14:02 - 15:01  (00:59)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 13:59 - 13:59  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 13:53 - 13:59  (00:06)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 12:39 - 12:39  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Dec  6 08:46 - 12:39  (03:52)
reboot   system boot  2.6.39-400.17.1. Thu Dec  4 21:43 - 21:43  (00:00)
reboot   system boot  2.6.39-400.17.1. Thu Dec  4 17:35 - 21:43  (04:08)
reboot   system boot  2.6.39-400.17.1. Thu Dec  4 13:43 - 17:34  (03:51)
reboot   system boot  2.6.39-400.17.1. Wed Dec  3 20:07 - 21:53  (01:45)
reboot   system boot  2.6.39-400.17.1. Wed Dec  3 20:06 - 20:06  (00:00)
reboot   system boot  2.6.39-400.17.1. Wed Dec  3 19:07 - 20:06  (00:58)
reboot   system boot  2.6.39-400.17.1. Wed Dec  3 17:19 - 18:53  (01:34)
reboot   system boot  2.6.39-400.17.1. Mon Dec  1 20:56 - 21:27  (00:30)
reboot   system boot  2.6.39-400.17.1. Mon Dec  1 18:25 - 20:52  (02:27)
reboot   system boot  2.6.39-400.17.1. Sun Nov 30 12:14 - 20:28  (08:14)
reboot   system boot  2.6.39-400.17.1. Sun Nov 30 10:40 - 10:40  (00:00)
reboot   system boot  2.6.39-400.17.1. Sun Nov 30 08:41 - 10:40  (01:59)
reboot   system boot  2.6.39-400.17.1. Sun Nov 30 08:01 - 08:38  (00:36)
reboot   system boot  2.6.39-400.17.1. Sun Nov 30 07:02 - 07:42  (00:39)
reboot   system boot  2.6.39-400.17.1. Sat Nov 29 22:51 - 23:34  (00:43)
reboot   system boot  2.6.39-400.17.1. Sat Nov 29 22:17 - 22:17  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Nov 29 22:17 - 22:17  (00:00)
reboot   system boot  2.6.39-400.17.1. Sat Nov 29 22:14 - 22:16  (00:02)

wtmp begins Sat Nov 29 22:14:25 2014
[grid@rac01:+ASM1:/home/grid]
$
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: