Why should i add a dot and space to execute this oracle provided script?

When multiple oracle databases are installed in one machine, we need to set the environment variables like ORACLE_HOME, ORACLE_SID before logging into the respective database. For this, oracle provides as script called oraenv.
If we try to execute oraenv like
oraenv   #without a dot and space before the filenamethe file seem to get executed but none of the env variables actually get set.
To execute this script correctly we have to put a dot and a space before the filename like
. oraenvWhat is difference between these two way of executing scipts?
The orenv code
# $Header: oraenv.sh.pp 19-jul-2001.14:02:07 jboyce Exp $ oraenv.sh.pp Copyr (c) 1991 Oracle
# usage: . oraenv
# This routine is used to condition a user's environment for access to
# an ORACLE database. It will prompt for the value of the new SID unless
# the variable ORAENV_ASK is set to NO, in which case it will use the
# current value of ORACLE_SID.
# The character "*" denotes a null SID.
# NOTE:          Due to constraints of the shell in regard to environment
# -----          variables, the command MUST be prefaced with ".". If it
#          is not, then no permanent change in the user's environment
#          can take place.
case ${ORACLE_TRACE:-""} in
    T)  set -x ;;
esac
# Determine how to suppress newline with echo command.
N=
C=
if echo "\c" | grep c >/dev/null 2>&1; then
    N='-n'
else
    C='\c'
fi
# Set minimum environment variables
# ensure that OLDHOME is non-null
if [ ${ORACLE_HOME:-0} = 0 ]; then
    OLDHOME=$PATH
else
    OLDHOME=$ORACLE_HOME
fi
case ${ORAENV_ASK:-""} in                       #ORAENV_ASK suppresses prompt when set
    NO)     NEWSID="$ORACLE_SID" ;;
    *)     case "$ORACLE_SID" in
         "")     ORASID=$LOGNAME ;;
         *)     ORASID=$ORACLE_SID ;;
     esac
     echo $N "ORACLE_SID = [$ORASID] ? $C"
     read NEWSID
     case "$NEWSID" in
         "")          ORACLE_SID="$ORASID" ;;
         *)             ORACLE_SID="$NEWSID" ;;          
     esac ;;
esac
export ORACLE_SID
ORAHOME=`dbhome "$ORACLE_SID"`
case $? in
    0)     ORACLE_HOME=$ORAHOME ;;
    *)     echo $N "ORACLE_HOME = [$ORAHOME] ? $C"
     read NEWHOME
     case "$NEWHOME" in
         "")     ORACLE_HOME=$ORAHOME ;;
         *)     ORACLE_HOME=$NEWHOME ;;
     esac ;;
esac
export ORACLE_HOME
# Put new ORACLE_HOME in path and remove old one
case "$OLDHOME" in
    "")     OLDHOME=$PATH ;;     #This makes it so that null OLDHOME can't match
esac                    #anything in next case statement
case "$PATH" in
    *$OLDHOME/bin*)     PATH=`echo $PATH | \
                   sed "s;$OLDHOME/bin;$ORACLE_HOME/bin;g"` ;;
    *$ORACLE_HOME/bin*)     ;;
    *:)               PATH=${PATH}$ORACLE_HOME/bin: ;;
    "")               PATH=$ORACLE_HOME/bin ;;
    *)               PATH=$PATH:$ORACLE_HOME/bin ;;
esac
export PATH
# Install any "custom" code here
# Locate "osh" and exec it if found
ULIMIT=`LANG=C ulimit 2>/dev/null`
if [ $? = 0 -a "$ULIMIT" != "unlimited" ] ; then
  if [ "$ULIMIT" -lt 2113674 ] ; then
    if [ -f $ORACLE_HOME/bin/osh ] ; then
     exec $ORACLE_HOME/bin/osh
    else
     for D in `echo $PATH | tr : " "`
     do
         if [ -f $D/osh ] ; then
          exec $D/osh
         fi
     done
    fi
  fi
fi

The dot is used to "source" a file. It is commonly used to change your environment variables without forcing you to log out and back in again for the changes to take effect. Check out "source command for Solaris 10" or something similiar for more info.

Similar Messages

  • Why should we add the components of JAppet to Container object ?

    why should we add the components of JAppet to Container object ? Because we are able to run the program by adding the components to the JApplet directly without using any container objects. Both with using and without using container to add components are giving the same outputs. So why we need to add them to container ? Thanks for all replying

    we are able to run the program by adding the components to the JApplet directly without using any container objectsSort of true. JApplet does have an add() method. And you can use that method rather than using getContentPane() and adding things to the Container it returns. But this method does not add things to the applet "directly without using any container objects".
    The [API documentation|http://java.sun.com/javase/6/docs/api/javax/swing/JApplet.html] explains: "JApplet contains a JRootPane as its only child. The contentPane should be the parent of any children of the JApplet. As a convenience add and its variants, remove and setLayout have been overridden to forward to the contentPane as necessary. This means you can write:
    {code}
    applet.add(child);
    {code}
    And the child will be added to the contentPane. The contentPane will always be non-null. Attempting to set it to null will cause the JApplet to throw an exception"

  • Regex: letters dot and space only

    Hello expert,
    have an input field which should accept only letters, '.' and space (see image below). here is my code so far.
    FIND FIRST OCCURRENCE OF REGEX '[^a-zA-Z]*' IN makt-maktx.
       IF sy-subrc = 0.
         MESSAGE e012.
       ENDIF.
    makt-maktx is the field on screen.
    Help please

    Dengyong Zhang
    space is also space.
    hassim khan
    Replace your FIND statement with this.
    FIND REGEX '[^a-zA-Z \.]' IN makt-maktx.
    In regex, dot matches any character, and to match actual dot, you need to escape it using backslash.

  • Why does Apple require my SIN and bank information - surely this is a huge secutrity risk as well as a massive invasion of privacy

    Why does Apple require my SIN and bank information?
    - surely this is a huge secutrity risk as well as a massive invasion of privacy

    Hi,
    Please refer to the help document:
    Apps panel doesn't show installed Creative Cloud apps
    Regards,
    Sheena

  • Once I install lates Adobe flash player why should I close internet explorer and why I to reapeat ?

    My problem with Adobe Flash player installation is two fold : 1- I have to close internet expl;orer every time  after it was installed  already ?
    2- Why I have to repeat the installation when another window opens and you requitre another installation ? Why _ Why ?

    Do you see the animation and version displayed when you visit this page?
    Flash Player Version
    Do you see something similar to this screenshot when visiting this page?
    http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_multiple.html

  • Why do my PRO-100 black and white prints have a color tint?

    I am printing on the PIXMA Pro-100 printer and sometimes, for no apparent reason (?), my black and white prints will have a color tint (usually a "redish brown"), and then when printing again... same print, same settings... the same print will be fine, neutral with no tint at all.
    Any ideas why?
    Also (maybe related?) I don't understand why the Photo-Cyan and Magenta ink cartridges are being depleted when I am NOT printing color, but only Black and White.  Am I missing something?  When setting up for printing I always make sure the "Black and White Print" feature is selected in the settings dialog "Quick Setup".  Doesn't this insure that only the black and grey inks are used as long as I am not "toning"?  In other words... if ONLY the black and grey inks are used, isn't the print supposed to be a neutral black and white print? Again... am I missing something?
    FYI:
    I am printing on Canon Pro Luster and Plus Semi-Gloss papers.
    Under "Options - Color Management" I have selected:
    (color handling) Photoshop Elements Manages Colors
    (image space) Adobe RGB (1998)
    (printer profile) Canon PRO-100 <LU> 1/2 Photo Paper Pro Luster
    (rendering intent) Perceptual
    Solved!
    Go to Solution.

    It looks like you have the settings pretty close.  But the fact is all printers use all their cartridges to print B&W.
     Whoa, why?
    Yes it is true and the reason is this.  B&W consists of 256 shades of gray. From totaly black which is 0 to white which is 256.
    If you have just one, two or three cartridges to make 256 different blacks and grays all the way to white, it simply isn't possibile.
    The ony thing a printer can do is, amount of ink and how long.  So it makes up for this by using all it's cartridges.  However, in Canon it seems like the Pro-100 tints show up more than it should.  There are dedicated B&W printers but they are designed differently to accomplish true B&W.
    The tint will be different on different papers.  You can experiment to find the paper that does best for you.  Try a more gloss type paper and see if you like the B&W.  You can try Red River papers, too.  They will assist you in picking a good B&W paper.
    You can also experiment with filters in PSE.  Adding a little blue may help.  Just give it a try.
    But the bottom line is you are no doing anything wrong.  It is just the charchter of the beast.
    EOS 1Ds Mk III, EOS 1D Mk IV, EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 85mm f1.2 L II USM, EF 70-200mm f2.8 L IS II,
    Sigma 120-300mm f2.8 EX APO, Photoshop CS6, ACR 9, Lightroom 6

  • Why should I use Speedgrade?

    What is Adobe Speedgrade, Why should I switch to it, and how does it affect video quality?
    (Coming from a guy who has experience in Aftereffects, Photoshop, Illustrator, and has been using Photoshop overlays on all of his Aftereffects videos.)

    This is the Captivate forum, not a forum for video. Speedgrade allows global color changes, maybe you'd better post this in the Premiere Pro forum?

  • Why should my clients who use contribute 3 suffer because I upgrade from cs3 to cs4?

    I developed a template that can be used by a number of chapters of a charitable organization. The chapters who subscribe to my template all purchased contribute cs3 and it works well for them.  I may have made the mistake of buying the CS4 upgrade, as any new keys that I send using Dreamweaver cs4 to new users can not be used by users with contribute cs3. Most of these chapter already using contribute 3, do not have the funds to upgrade to contribute 4.
    The code of my template has not changed, only the tool that I use to administer it has, why should they have to upgrade because I have?
    This also makes it so that older users of my template will not be able to beneifit from the new version of the template. Do I have to reinstall CS3 and keep using CS3 to administer their network or do I have to force them to purchase the upgrade because I chose to upgrade to Dreamweaver CS4? There had to be a way I can send a contribute 3 user a new key because the user has changed names without forcing them to upgrade. Otherwise I have to develop my template so that changes can be made by users using other wisiwig programs.

    Thanks for that.
    Yes I had the notion I may have been duped into buying a counterfeit CS3. I got it from Amazon and though Adobe seem to think that the serial number is OK they could not trace it on their system. However, if ths is a fake copy, what can Adobe do to help? How did they help you? I can't see them giving me a free CS3 in exchange - so I'm stuck!
    Kind regards
    I had exactly the same problem and I am sorry to say that you may have a counterfeit version of CS3. Contact Adobe they helped me to sort out the problem.
    >

  • When trying to upload a cd onto itunes it chooses to chop the original cd into 4 separate albums and mix up the track order. Any ideas why and how to overcome this problem?  ( the cd is guy gerber and called fabric 64)

    When uploading a cd onto itunes on my imac it has choosen to copy the original cd into 4 seperate cds and mix up the track order, particularly annoying as this is a mixed cd (Guy Gerber, fabric 64) .  Any ideas why when everthing else copies perfectly and how to rectify this problem?

    See Grouping tracks into albums.
    tt2

  • Why does Calendar take up so much space and why can't I add events or sync?

    Since I updated to ios7, my calendar hasn't worked at all. It used to sync with my Google calendar. Now I can't see any events in my calendar. The + sign to add an event is always greyed out so I can't add events. And something I've just noticed is that Calendar takes up 473 MB of space on my phone, making it one of the biggest users of space. (This might be related. If I search for an event in my calendar, it shows a long long long list of events that all say "New Event" that are scheduled to last all day. I can't delete these. It says they are assigned to "Untitled Calendar."
    I've tried all sorts of combinations of turning on and off syncing calendars with Google and with iCloud. I can't detect any change. (My Mavericks calendar works just fine and syncs with Google.)

    Hello chinchillababiz,
    After reviewing your post, I have located an article that can help with iOS storage. It contains helpful advice and information that may assist you in managing your data:
    See how much storage you've used on your iPhone, iPad, and iPod touch
    If your device is near its capacity or you get an alert that your storage is full, you can remove some of your less used content to make room for more.
    View storage usage on your iOS device
    Tap Settings > General > Usage > Manage Storage to see the amount of space each app and its content takes on your device.
    Tap an app for more detailed information about its usage.
    Depending on the app, you might be able to delete some of the app's content, or delete the app and all of its content.
    View storage usage for your iOS device in iTunes
    When you connect your device and select it in iTunes, you'll see your usage by content type:
    Audio: Songs, audio podcasts, audiobooks, voice memos, and ringtones
    Video: Movies, music videos, and TV shows
    Photos: Camera Roll contents, Photo Stream, and Photo Library
    Apps: Installed apps
    Books: iBooks books and PDF files
    Documents & Data: App content such as contacts, calendars, messages, emails, and their attachments, Safari Offline Reading List, and files that you've created in your apps
    Other: Settings, Siri voices, and other system data
    Hover your mouse over the content type for more information about usage.
    iTunes displays how much space the selected songs, videos, audiobooks, and apps use in the status bar on the bottom of the screen. You can also see this information by selecting an item and then choosing File > Get Info. The size is available in the Summary tab.
    You can transfer or sync content to your computer from your device. If you want to remove certain types of content from your device, learn how to manually manage content using iTunes.
    Learn more
    Learn more about storage capacity on OS X and iOS.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • Why are my apps taking up more space than what the appstore says they will? Like were talking a full GB more than what it should.

    Why are my apps taking up more space than what the appstore says they will? Like were talking a half a GB more than what it should.
    For example the app Modern Combat 4 says it should only be 1.58 GB on the appstore but when i go into settings>general>usage it says it takes up 2.0 GB.
    Ive tried deleting the apps and then reinstalling them but they still take up so much more space.
    This happens for multiple apps of mine. Some I have never even opened before.
    I have an ipod touch (4th Gen)(32GB).
    I link to a mac computer.
    I have IOS version 6.1.3
    I noticed this a long time ago but didnt need the space, Now i need the space!!
    Please help!!

    Because you see the file size of the compuressed file. The file gets expanded when installed and that takes up more space. Also, data is kept in the app.

  • Cpufrequtils: Why should I care, and acpi-cpufreq vs. p4_clockmod

    I'm a cpufrequtils newbie. In the years I've been running Arch on my laptop, I've never set it up.
    I wonder, why should I care about cpufrequtils? What should I know about the technology as a laptop user? Does the fact that I rarely unplug make a difference?
    I also wonder what module I should be using for frequency scaling. The cpufrequtils article recommends acpi-cpufreq, but the article for my specific laptop recommends p4_clockmod (for some unspecified reason).
    Any insight would be greatly appreciated. Thanks in advance!

    Just modprobe both acpi-cpufreq and p4-clockmod, only one of them should be able to load.
    the article wrote:
    For older Intel CPUs, the command above may return with:
    FATAL: Error inserting acpi_cpufreq ([...]/acpi-cpufreq.ko): No such device
    In this case, replace the kernel module acpi-cpufreq with speedstep-centrino, p4-clockmod or speedstep-ich.
    CPU frequency scaling saves power and keeps your processor cooler. It's worth using on a desktop or a server, not just a laptop.
    If you use the ondemand governor, and add:
    (sleep 5 && echo 11 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold)
    to /etc/rc.local, you'll have basically zero performance loss. Usually it scales up the CPU at 95%, with this it will do it at 11% (you can't go lower atm).
    You can load the  "cpufreq_stats" module and see what it's doing with cpufreq-info. You should notice your laptop fan spin down quite a bit once you set it up.
    If you have a watt meter, you can take out the battery and see the power use drop from something like 17w to 12w.
    Last edited by thestinger (2010-11-26 05:18:31)

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • Why should you explicitly open and close shared variable connections?

    I'm looking into switching over from the old Datasocket API to the new Shared Variable API for programmatic access to shared variables, and I noticed that LV doesn't seem to have any problems executing Shared Variable Reads & Writes without first opening the connection explicitly. That is, I can just drop in a shared varaible Read VI, wire a constant to the refnum input, and it will work. I'm wondering, then, what benefits are offered by explicitly opening the conenction ahead of time...?
    I guess I could see some cases where you want to open all necessary connections in an initialization state of a top-level state machine, particularly if you want to use the "Open & Verify Connection"---so you could jump straight to an error case if any connections fail. But other than that, why else might one want to explicitly open the connections.
    And, along those lines, are there any problems with implicitly opening the connections? One reason why I am hesitant to open them explicitly is because for one of our applications, we need to be able to dynamically switch from one variable to another at runtime. It would be nice to just switch the variable refnum (wired to the input of the Read function), without having to manually close out the old connection and open a new one. A quick prototype of this seems to work. But am I shooting myself in the foot by doing so?
    Thanks in advance.

    I'd expect there's a very small number of people at NI that would know the answer to the detail you're asking for.  But, let's try to extrapolate from this rather old post to see if we can understand what they're forming their impression on.
    The shared variable has to have some sort of reference going on in the background.  It looks like they're calling this a connection.  It's how LabVIEW knows where to find this variable on the network.  We can also see this reference certainly exists if we're opening/closing the reference in the explicit method.  You see the connection as just a string referencing the variable by URL.  This "reference" has to be stored somewhere.  No matter how we're looking at this, we're aware there's a reference of some sort stored. 
    Now, we'd want to look at what would cause this reference to go away.  If you open/close explicitly, it's easy to see it goes away at the close.  If it's implicit, when would it make sense to close it out?  The VI can't be expected to guess where it's done being referenced and close it out.  This puts us into a situation where the soonest it could close is when the VI ends.  From my experience, references tend to be wiped when you close out LabVIEW.  It's this kind of idea that makes the FGV possible.  I wouldn't be surprised by Morgan's claim here.
    If we look at scalability, you're talking about two different topics.  You're talking about adding an extra open, close, read, etc rather than just a few wires.  That certainly would look a mess.  In terms of the dynamic swap that was being discussed, we wouldn't be adding all of those.  The concern would be if enough connections were opened it'd start to behave similar to a memory leak.  This could be something that works with a smaller number of variables.  If you continue to scale, it becomes problematic.  This is why they suggest it's not scalable. 
    To your questions:
    Does LV allocate some kind of session in memory using that string as a lookup?
    It would HAVE to allocate some memory to hold that string.  Otherwise, it'd be pointless to even have the reference. 
    Does it reuse that session if other parts of the application reference the same variable, or does it create a unique session for each referencing call to "Read Variable.vi"?
    I would expect this to be "it depends."  With the implicit method, I would expect it to open a new reference in each point it isn't wired.  This is similar to int x,y = 5;  x and y share the same value but are their own unique memory location.  If you wire the reference to the other points, it should use the same reference.  This would make more sense to me than the program seeking out any other potential usage of the variable in the application to see if there's already a reference open.  I could be wrong, though.
    And what resources does this "connection" actually represent?
    At best, this is just the string.  At worst, it's the string and the TCP socket.  I'd lean towards the first.  Opening and closing sockets should be relatively easy in most applications.  But, it also wouldn't surprise me if it holds the socket.
    I'm sure others have a better understanding than I do.  But, that's what I'd expect for anything you've asked.

  • I do not have many messages but my iphone 5s says messages take up 4.6GB of space.  When comparing with friends who have many more message, less than 1 GB is being used on their phones.  Why are mine taking up so much space and how do I correct that?

    I do not have that many messages on my new iPhone 5s (maybe about 15 conversations and only one or two going back a little ways) yet when I go to Settings, Usage it shows that my messages are taking up 4.6GB of space.  When comparing with others (some who have hundeds of messages) they are using under 1GB for their messages.  Why are mine taking up so much space??

    I found a post with this solution that worked for me - .Do a backup, then download ibackupbot. It lets you look into the contents of that backup. Look in system files>mediadomain>library>sms>attachments. I found a ton of huge files related to long deleted texts. ibackupbot let me delete all that old crap. I then restored the phone with that now modifec backup and Bingo! freed up 9 GB. No problems.
    But note, if you are not technically inclined you probaly don't want to be digging around and deleting back up files. You delete the wrong thing and you could jack up your phone badly. Be careful.

Maybe you are looking for

  • Attaching multiple windows friendly attachments in Mail

    I am able to attach a single file to a piece of outgoing mail in Mail, and have that file appear as an attachment that I can open up in Outlook.  However, if I select multiple files to attach to a piece of mail and the "windows friendly attachment" o

  • Repository Service - Checking a custom property!

    Hi All I am trying to create repository that will check a custom property 'RepGroup' and then act on it if the the property contains a certan value. However I am not sure how to do this - does anyone have an example I could see? Many Thanks Phil

  • Can I use photoshop when I have not internet conneciton

    No internet where I'm going. Can I still use photoshop?

  • Mac Book pro almost complete the starting up

    Hello, when I turn the computer on, it seems to start up normally, grey screen, blue screen, Mac OS System starting up, the desktop can be seen and THERE is the problem. Any icons (files, folders, disks) on the desktop can be seen and the menu bar on

  • Finding non-DRM'ed content?

    The news said that the iTunes store is now selling non-DRM'ed content. I've never been to the iTunes store before, but I went there just now and I didn't see any way to search for non-DRM'ed content. How do I do that? Thanks in advance. 8G nano   Win