Why has the sql statement been extucted two times in shell script?

I tried to test rac load balance using the following shell script on suse 10 + oracle 10g rac.
oracle@SZDB:~> more load_balance.sh
#!/bin/bash
for i in {1..20}
do
echo $i
sqlplus -S system/oracle@ORA10G <<EOF
select instance_name from v\$instance;
EOF
sleep 1
done
exit 0After execute shell script, I got the follow result.
oracle@SZDB:~> ./load_balance.sh
1
INSTANCE_NAME
ora10g2
INSTANCE_NAME
ora10g2
2
INSTANCE_NAME
ora10g1
INSTANCE_NAME
ora10g1
3
INSTANCE_NAME
ora10g1
INSTANCE_NAME
ora10g1Seem the sql statement has been executed two times in each loop. If you feel free please help to have a look. Thanks in advance.
Robinson

You can end a SQL command in one of three ways:
* with a semicolon (;)
* with a slash (/) on a line by itself
* with a blank line
A semicolon (;) tells SQL*Plus that you want to run the current command that was entered. SQL*Plus processes the command and also stores the command in the SQL buffer.
A blank line in a SQL statement or script tells SQL*Plus that you have finished entering the command, but do not want to run it yet, but it's stored the command on SQL Buffer.
A slash (/) on a line by itself tells SQL*Plus that you wish to run the command stored on SQL buffer.

Similar Messages

  • Why has the "Job" movie been loading for the past 3 days?  I have a 10Mb Uverse Internet connection.

    Why has the "Job" movie been loading for the past 3 days?  I have a 10Mb Uverse Internet connection.movie

    It should not take more than 4 hr.   Is there any indication it is making process?  i.e.  When you click on it to play do you get a message like "Will be avialable in 2hr 34 min"?  Is that time changing?  I would cancel the download.  Restart ATV and then retry.  If it goes more than 4hr then there is an issue. 
    As another option you can always download the movie to your computer and use the iTuens menus to play it from your computer under the Computers icon.

  • Ipad3, using iPhoto, running the latest IOS6, I'm a photographer, please tell me why has the delete (X) been removed in iPhoto?

    Ipad3, using iPhoto, running the latest IOS6, I'm a photographer, please tell me why has the delete (X) been removed in iPhoto?

    Ralph, again thanks for the input, but I respectfully disagree.  I have been using iPhoto with the iPad3 since it was launched.  I have taken and imported at a minimum 6-7k pictures and have used the same methodology of editing and deleting photos (inside of iPhoto app), using the delete (X) on the task bar.  I'm an IT project manager as well as an certified software consultant, in other words, I have a better than average knowledge and understanding of apps and the functionality.  My only point is that something that was quite functional and very user friendly has now become far more difficult. It was only 9 bucks and a pretty good little piece of software, I'll just find something else that is less time consuming and will check back for iPhoto update and from time to time.  Again, thank you for your feedback. 

  • Why has the airplay function been removed from 5th generation ipod touch?

    Why has the airplay function been removed from 5th generation ipod touch?

    It has not.
    See:
    Apple TV: How to use AirPlay Mirroring
    Using AirPlay
    Troubleshooting AirPlay and AirPlay Mirroring

  • Why has the Facetime application been removed from the iphone in dubai.

    Why has the Facetime application been removed from the iphone  in dubai??

    You will have to contact the government to find out why they ordered it removed.  An iPhone purchased there can never have it added back in, even in a country where FaceTime is legal.

  • Why has the iphone 5 been discontinued??

    Why has the iphone 5 been discontinued? how much can i expect if i sell my current iphone 5?

    Belinda Rodricks wrote:
    Yea i regret buying it now. Worse move made by Apple to discontinue it
    If you believe it was a bad move by Apple to discontinue it, that would seem to indicate you think it's a good phone. So why do you regret buying it? Does it do less today than it did before you found out it was discontinued? Whether or not Apple still sell it actually has no affect on its performance. Hard to believe, I know!

  • Why has the same album been paid for twice??

    Hi
    Can someone point me in the right direction re iTunes store and an album purchase I've now seemingly paid for twice?
    It seems my daughter has downloaded the same album twice on two separate devices (iPhone 5c and iMac), both logged into the same iTunes account, and I've paid for it twice!! Nothing against Ed Sheeran but come on Apple....the same Apple ID on both devices and I've paid for the album twice now??
    Thanks to the community in advance of your help.
    Graeme

    If it's the same version of the album that you've been charged for (e.g. the album doesn't have 'standard' and 'deluxe' versions which she's bought) then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    Or you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If she wants to redownload purchases then what she can redownload for free will show in the Purchased tabs in the iTunes, App Store and iBooks apps on her phone, and the Purchased link under Quick Links on the right-hand side of the iTunes store homepage on her Mac's iTunes

  • HT4623 Why has the network setting been removed on IOS 6?

    When looking in settings, the neywork tab has disappeared?  And I am unable to connect to 3G.

    Your image shows "Firefox will Remember History".
    It has a dropdown arrow which usually shows -
    "Firefox will Never Remember History" and, what you need,
    "Firefox will Use Custom Settings". This opens a range of options.
    Is this pair of dropdown arrows not working?

  • Why has the refresh instruction been removed from the top menu?

    When listening to radio online, the Navigation Toolbar is often removed, so if the radio player loses its feed, there is no way to refresh the browser without visiting the site again and starting from scratch. I really hope that a Refresh command can be inserted back into the top menu at the earliest opportunity.

    Not exactly sure what you mean, but try these:
    where is the refresh button?
    https://support.mozilla.org/en-US/questions/784815
    "Reload" has disappeared from "View" dropdown in navbar. How can I get it back?
    https://support.mozilla.org/en-US/questions/975824
    If you have a keyboard, you might also want to just use the F5 or Ctl+F5 key combo to refresh the page.

  • Why has the cache feature been disabled, thus disallowing highlighting of search words in articles we seek?

    No more details are necessary than what the question holds? Why make this harder than it needs to be?

    Adobe does listen to users, but it listens to 10 users more frequently than 1 user. It listens to 1000 users more frequently than 10. Get everyone you know that works for lawyers to post the request in the Adobe wish form (where Adobe tabulates user requests).
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Then maybe it will appear in Acrobat 11. If it is not in Acrobat 10 by now it is probably too late in the upgrade cycle for it to get in.

  • Why has the imessage app deleted off my Macbook air?

    Why has the Imessage app been deleted off my Macbook air?
    someone help me
    thanks

    iMessage was a beta product. If you upgraded to Mt Lion the program is now called Messages.

  • Why has the YouTube app that comes with the iPad been removed?

    Why has the app of YouTube been removed? I used to use it everyday :(

    It's now not part of iOS 6. However, you can download the YouTube app at http://itunes.apple.com/app/youtube/id544007664.
     Cheers, Tom

  • Why has the game "the incredible machine" been removed?

    Why has the game "the incredible machine" been removed from the app store?

    Try posting in the iTunes Store commminity here.
    This is the Using Mac App Store forum for OS X.

  • I am using the iPad 3 64 and am an avid photographer . I have been using iPhoto as my editor when I download my pic to my iPad . I have upgraded to IOS 6.  Please tell me why has the delete option has been removed iPhoto?

    I am using the iPad 3 64 and am an avid photographer . I have been using iPhoto as my editor when I download my pic to my iPad . I have upgraded to IOS 6.  Please tell me why has the delete option has been removed iPhoto?

    That was the first thing I check, my X no longer exist, the app still works fine and does everything it did in the past, the the x (delete) option is no longer there.  I have deleted and redownloaded the app and did a complete reset, X still not there as an option.  Is anyone else experiencing this problem? 

  • Why has the you tube app been removed from my iPad

    Why has the new update removed YouTube App and blocked you from playing any you tube videos on iPad 2

    YouTube is  not now part of iOS 6. However, you can download the YouTube app at http://itunes.apple.com/app/youtube/id544007664.
    See this similar post https://discussions.apple.com/thread/4335468?tstart=30
     Cheers, Tom

Maybe you are looking for