What is the logic behind the oracle database connections....

Hi,
We have crontab alerts are enabled for the oracle database client connection.
For Production databases the alerts are coming continuously until it gets connected.
For QA databases it will throw the message that the oracle client connection fails and again it will prompt whenever it gets connected.
Please let me know the logic behind these scnerions.
Pavan..
Edited by: dm_ptldba on Feb 14, 2012 6:45 AM

Hi,
Thanks for the update, Sorry the question was not clear. let me put it in a clear way.
Following is our crontab which alerts us if any database/listener goes down. But it alerts us only once for one successful/unsuccessful connection. For Eg: If the crontab not able to connect to the database for once then it throws an alert only once and waits for a successful connection.
I would like to change the logic in this crontab in such a way that, it should keep on alerting us for all the unsuccessful connections and once or twice for successful connection.
. /home/oracle/.bash_profile
. /opt/oracle/cron/cron_email
sidfile=/home/oracle/scripts/db-list.txt
dboutfile=/home/oracle/scripts/dboutfile.tmp
echo $ORACLE_HOME
TNS_DIR=$ORACLE_HOME/network/admin
ORA_BIN=$ORACLE_HOME/bin
cat $sidfile | while read SIDNAME
do
$ORA_BIN/sqlplus -s system/******@$SIDNAME 2> /dev/null >> $dboutfile <<EOF
@/home/oracle/scripts/db_up.sql
EOF
if [ $? -eq 0 ]
then
STATUS=1
if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]
then
/bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is up & connected..." [email protected] </dev/null
rm -rf /home/oracle/scripts/${SIDNAME}-down.txt
fi
else
if [ -f /home/oracle/scripts/${SIDNAME}-down.txt ]; then
echo "";
else
touch /home/oracle/scripts/${SIDNAME}-down.txt
echo ${SIDNAME} "not Connected ..."
/bin/mail -s "Alert :Oracle database instance \"${SIDNAME}\" is down......" [email protected] </dev/null
fi
fi
done
Thank you.
PTLDBA

Similar Messages

  • What is the logic behind the start routine

    Dear One's,
    Kindly take a moment and explain the logic behind this start routine written in update rules of ODS.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CST_T07_O006.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries.
    DATA: ITAB_/BIC/AT07_O00600 TYPE SORTED TABLE OF /BIC/AT07_O00600
          WITH HEADER LINE
          WITH UNIQUE DEFAULT KEY INITIAL SIZE 0,
          DATA_PACKAGE_NEW TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
          WITH HEADER LINE
          WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    sort the datapackage based on lead number and lead program definition
    SORT DATA_PACKAGE BY /BIC/TLDNR /BIC/TLDPRGFTE.
    from the resources ODS read all lead values based on the values those
    SELECT * FROM /BIC/AT07_O00600 INTO TABLE
             ITAB_/BIC/AT07_O00600
             FOR ALL ENTRIES IN DATA_PACKAGE
             WHERE /BIC/TLDNR = DATA_PACKAGE-/BIC/TLDNR.
    FIELD-SYMBOLS: <LS_DATA_PACKAGE> TYPE DATA_PACKAGE_STRUCTURE.
    FIELD-SYMBOLS: <LS_/BIC/AT07_O00600> TYPE /BIC/AT07_O00600.
    loop at internal table of ODS to check if there are lead program defin
    from the source which mean the values of lead program definition in OD
    values of lead program definition in datapackage.
       LOOP AT ITAB_/BIC/AT07_O00600 ASSIGNING <LS_/bic/at07_o00600>.
         READ TABLE DATA_PACKAGE
          TRANSPORTING NO FIELDS
          WITH KEY
          /BIC/TLDNR = <LS_/bic/at07_o00600>-/BIC/TLDNR
          /BIC/TLDPRGFTE = <LS_/bic/at07_o00600>-/BIC/TLDPRGFTE
          BINARY SEARCH.
          IF SY-SUBRC <> 0.
    new lines with zero values are inserted because there are no correspon
    DATA_PACKAGE_NEW-/BIC/TLDNR = <LS_/BIC/AT07_O00600>-/BIC/TLDNR.
    DATA_PACKAGE_NEW-/BIC/TLDPRGFTE = <LS_/BIC/AT07_O00600>-/BIC/TLDPRGFTE.
      DATA_PACKAGE_NEW-/BIC/TLDFTE = 0.
      APPEND DATA_PACKAGE_NEW.
         ENDIF.
      ENDLOOP.
    append the new records which are created for the leads in the datapack
      APPEND LINES OF DATA_PACKAGE_NEW TO DATA_PACKAGE.
    reset the sorting of the datapackage back to its original state
      SORT DATA_PACKAGE.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Thanks in advance

    hi,
    it's retrieve data from table /BIC/AT07_O00600
    and add to data package, so your records will be more than from source
    hope this helps.

  • What is the logic behind the list of default colors in the color tab of the score options in the project settings interface?

    I desperately want to know why each note is assigned it's particular color in the score tab of the projects settings interface...
    Was this done at random or is there some logic behind it all?  Einstein and Newton have completely different ideas about note/color association...their theorys can be easily found on the internet.  I've messed around with applying their ideas to the user pallette just for fun.  Now, I really want to know if the makers of Logic chose the colors they did for the factory defaults for a particular reason.  Please help if you can!

    hi,
    it's retrieve data from table /BIC/AT07_O00600
    and add to data package, so your records will be more than from source
    hope this helps.

  • What's the logic behind the prefixes in User Tips?

    I'm browsing through the User Tips, and maybe my memory is fuzzy, but I don't recall all those prefixes in the subject lines.
    e.g. kmosx, kmos, k.mac, kad, kaw, etc.
    Is there a logic behind it somewhere that would be useful for searching? e.g. put one in the search box and get all the User Tips on such-and-such topic?
    If so, can someone please sticky-post a glossary in the User Tips forum?
    Thanks.

    Hi, Marlinespike - These are Knowledge Base keywords. A glossary of these keywords is here:
    http://docs.info.apple.com/article.html?artnum=75178
    Tuttle
    1457/8165

  • What are the advantage of using Oracle Database when compare to SQL SERVER

    Hi all
    Please tell anyone about
    what are the advantage of using Oracle Database when compare to SQL SERVER
    Thanks in advance
    Balamurugan S

    user12842738 wrote:
    Hi,
    There are various differences between the two.
    1. SQL Server is only Windows, but Oracle runs on almost all Platforms.
    2. You can have multiple databases in SQL Server, but Oracle provides you only one database per instance.Given that the very term 'database' has s different meaning in the two products, this "difference" is absolutely meaningless.
    3. SQL Server provides T-SQL for writing programs, whereas Oracle provides PL/SQLWhich means what? Both products have a procedural programming language. They named them differently, and the languages are not interchangeable. Means nothing in comparing the features/strengths/weaknesses/suitability to purpose.
    4. Backup types in both are the same. (Except Oracle provides an additional backup called Logical Backup.)You make that sound like "Logical Backup" is something more than it is. It is nothing more than an export of the data and metadata. Many experts don't even consider it a backup. I'm sure SQL Server provides the same functionality though they probably call it by some other name.
    5. Both provide High Availability.Well, I guess they both have a suite of features they refer to as "High Availability". But what does that really mean? The devil is in the details. Remember, the two products don't even agree on what constitutes a "database".
    6. Both come in various distributions.???
    >
    If you are going for an Implementation, you can try SQL Server Express Edition and Oracle XE which are free to use.
    Then you can choose whichever is comfortable for your needs.
    Thanks.

  • What are the differences between the following terms in Oracle database?

    What are the differences between the following terms in Oracle database?
    Services
    Applications
    Modules
    Actions
    Thanks

    junez wrote:
    What are the differences between the following terms in Oracle database?
    Services
    Applications
    Modules
    Actions
    ThanksIt seems that you are posting alot of such questions, here is one thread of the same nature.
    What are the differences between the following Oracle database views?
    Please search in the oracle docs to find the information and if you have read it already, please post your doubts about it. It would help you in a better way to understand things and also would make you corrected where you would be wrong.
    HTH
    Aman....

  • What is the logic behind suggest due date in a planned order?

    I have observed that suggest due date of a planned order is not based on demand. What is the logic behind derivation of suggest due date?
    Some times pegging date is based on Sales Order request date but not all the times, how to interpret the pegging date of a planned order?
    Please confirm that suggest ship date is based on the suggest due date and In-transit time and lead time.

    HI,
    Planning engine calculates the Sugg Due Date based on some mathematical calculations and some Plan setups.
    It also depends on what option you have chosed in the plan, for Material availability i.e. at the start of the Job or at the start of operation.
    For buy item-it will minus the pre, post and processing lead time from the Material requirement date for making the job based on above setup.
    For make items, it will also consider Manufacturing lead time(based on the routing) and will show the Sugg due date
    Please mark this post as correct or helpful, if it clears your concern.
    Thanks,
    Avinash

  • Could you please help me understand the logic behind certain things in OSX?

    Ok, so I try to be an open-minded guy, and I bear no particular allegiance to either OS. I own a Sony TZ and a Mac mini, and my wife has a MacBook Pro. I use both Oses.
    There are certain things I have trouble understanding in th Mac OS, so what I'd really like to understand the logic behind certain design decisions in the OS, and why these might be better ways of accomplishing things. I know how to get around all of the things I mention, so I'm not looking for instructions; rather I'm looking for well-thought out explanations for why these features are the way they are.
    *1. Programs don't quit when you close the window.*
    - This totally puzzles me. Why design it so that program windows are independent are from the running program itself? There must be a reason, cold someone explain how this is more efficient? To me, it's simpler to click an X on the window you are working on to completely shut down a program, rather than to either mouse through menus to select quit, or be obligated to using Command Q keyboard shortcut.
    *2. Menu bars are on the desktop.*
    - Related to the first point, why make the main thing framing your desktop be something which is always changing depending on the program? Why have file menus outside the main window of the program. Having the menu bar on the desktop then necessitates an additional area, the dock, which has to be used as a launch bar and to tell you what programs are currently running. That obligates you to having 3 different areas of screen: 1 for program menus, 1 for running programs, and the program window itself. This seems very inefficient to me. Not to mention all the messy-looking floating palettes all over the place, again because everything is separated and not nicely contained in a single program window.
    - Really, having a changing menu bar that frames the desktop isn't even consistent wth the whole desktop metaphor, which is that you place things on a desktop, like programs, files, etc. Are you changing the whole desk everytime you load a new program, yet the wallpaper stays the same? Doesn't seem to be logically consistent to me.
    *3. No delete key.*
    - This one really gets me. Why make such a commonly used key be a function key (Fn + Backspace)? Why make the user press a secondary key for a major function?
    *4. No Cut command.*
    - I read something about how Cut doesn't actually make sense when moving files around, but I obviously didn't fully understand it. Why make the user command drag, when you can just do Ctrl X??.
    *5. Launching Apps from the Finder.*
    - This seems weird to me, that you find and launch applications from the same thing you use to view files. Program icons in the finder are placeholders for the entire program, not files, yet they are found in the file viewer. Again, to me this seems logically mixed. I really dislike scrolling through Finder to look for apps. I know there is Spotlight and the dock (used as a quicklauncher), but these are really just workarounds for a setup which seems inherently illogical. To me at least, a menu of applications make more sense, ie, the start menu.
    Anyway, those are all I can think of now, although there are other things aout OSX that don't make sense to me.
    Thanks in advance! If I can understand Apple's reasoning and it is convincingly better, that will go a long way towards making me more comfortable with this OS.

    1. Programs don't quit when you close the window.
    That's really more a matter of what you're used to. It comes down to a programming decision as to what Apple and Microsoft considered to make sense. MS thinks that if there are no open windows, you're done using the app. Apple thinks you aren't necessarily done yet, as others have mentioned. I certainly wouldn't want Photoshop to quit every time I closed the last open image I was working on. Would be nice though if Safari would quit when I close the last open browser window. It's quick to relaunch if you really weren't done with it, so wouldn't be much of a bother to have it shut down with the last window.
    2. Menu bars are on the desktop.
    Makes way more sense the Microsoft's approach of repeating the same file menu on every open document in a program. How many places do you need to see File, Options and other common menu headings?
    2. Menu bars are on the desktop.
    Related to number two. The forward app is the only one you can directly work in, so why not have the menu bar change to reflect the choices for that application? When you go back to the previous app you were in, the menu bar changes back. So what loss of functionality is there? It comes back to not having menu bars on every single open window. There's no need or purpose for it.
    3. No delete key.
    Backspace does the same thing.
    4. No Cut command.
    Command+X, not Ctrl+X. This is Mac, not Windows. There's also very little need to ever do this from the keyboard. If you're moving files that are on the same drive/partition, then just drag and drop from the target folder window to the source. It's automatically a move. If going from one physical drive or partition to another, it's automatically a copy. Press and hold the Command key during the drag to make it a move.
    Besides, you don't really think Windows cuts the entire folder or file contents into RAM, do you? If your computer has 4 GB of RAM, and you cut 12 GB of data, it of course can't possibly fit in the clipboard. All Windows does when you do a cut is visually remove the files and folders from the screen. If the items are going to a location on the same drive/partition, it does the same thing as if you did a drag and drop move. The file table is simply updated to reflect the new file or folder locations. If it's to a different drive/partition, it then performs a copy then delete action, same as OS X.
    5. Launching Apps from the Finder.
    A program is just as much a file as any other file. It takes up space on the drive. The OS of course knows what to do with it when you double click an app. Same as it knows what to do when you double click a document related to an app. Windows is no different. An .exe file is also just as much a file as a .doc file. The .exe extension tells Windows to try and treat it as a program to load into RAM. It's not just a simple placeholder. The program has to be made up of something.

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • Do i have to pay exam center fee to an authorized oracle exam center(new horizon) in Bangladesh rather than the exam fee of Oracle Database 11g: SQL Fundamentals I ?

    Do i have to pay exam center fee to an authorized oracle exam center(new horizon) in Bangladesh rather than the exam fee of Oracle Database 11g: SQL Fundamentals I ?

    I agree with Matthew that I cannot be sure exactly what you are asking.
    Generally i regard it as less risk to yourself to schedule and pay Pearson Vue directly.
    However if you contact the exam center and get them to schedule for you my understanding is you pay them. Unfortunately there is risk of the exam center overcharging you (99%++ of most most worldwide wont).
    The only reasons for doing this I can think of is (there may be more) :-
    - is if you do not have credit/debit cards that Pearson Vue would accept.
    - The center will accept turn up and schedule and your transport to the exam center might be unreliable and you are worried you might miss the appointment and you are hoping to pay on arrival (some will not accept this).

  • How to create a Macro in excel to store the excel data to Oracle Database

    Hi All
    Does anyone has created a macro in excel which on being run stores the excel data to Oracle database. In my project I need to create one such macro for updating oracle database with excel data and another for inserting excel records.
    I tried doing this using a macro in MS access but Client wants its to be done using Excel Macro only.
    Any help would be highly appreciated.
    Thanks in advance..
    Shikha

    Please read Chapter 19.7 Creating Selection Lists (http://download.oracle.com/docs/html/B25947_01/web_complex007.htm#CEGFJFED) of the Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0)
    Cheers,
    Mick.

  • How to find out the date when an oracle database is upgraded

    Hi,
    I would like to know the date when an oracle database is upgraded (for example 10.2.0.4 to 11.2.0.3).
    Can you help me to find out these details.
    Thanks,
    Sarayu

    user13312943 wrote:
    Hi Ed and SB,
    Thanks for your replies. How about this option?
    Let us assume I am interested in checking when my database is upgraded to any 11g version.
    Will this query help?
    select min(first_usage_date)  from  dba_feature_usage_statistics where  version like '11%';
    I understand this may not be a generic solution , but with this idea I may be able to build up a query to get the result.
    Thanks,
    Sarayu
    How is it that you or nobody knows when the DB was upgraded?
    I would have expected a formal testing & upgrade plan.
    Does the organization practice safe software & utilize any source code repository?
    Does everyone suffer from amnesia?
    How could a MAJOR database upgrade slip by everyone who should care about such a detail?

  • When I create a PDF with Adobe Reader XI, it wont take the links behind the images. Sometimes he does, mostly not.. Whats the solution? The links in text do work!

    When I create a PDF with Adobe Reader XI, it wont take the links behind the images. Sometimes he does, mostly not.. Whats the solution? The links in text do work!

    Hello,
    How can I give a answer back in the discussion on Adobe.com?
    I don’t see any link?
    1.      We have a subscription.
    2.      Im converting a newsletter from the web to PDF.
    3.      Sometimes I put a weblink behind the image in the newsletter. Most of the time PDF wont take the links behind the image.
    Only the tekstlinks are OK.
    [private data removed]

  • NetBean, I can't establish the oracle database connection with version 9i.

    In NetBean, I can't establish the oracle database connection with version 9i.
    I have create the datasource and it is fine.
    when i try to access the tables i get a message
    "Unable to refresh children, connection is broken, unsupported feature"
    in netbeans.
    Does netbeans support oracle 9i version.
    Thanks,
    VKK

    In NetBean, I can't establish the oracle database connection with version 9i.
    I have create the datasource and it is fine.
    when i try to access the tables i get a message
    "Unable to refresh children, connection is broken, unsupported feature"
    in netbeans.
    Does netbeans support oracle 9i version.
    Thanks,
    VKK

  • In CRM 2007 what is the code behind the Navigation bar?.

    In CRM 2007 what is the code behind the Navigation bar?.
    Jason

    It might be in component CRMCMP_NAVBAR. However, so far I have been unable to get a break point to activate. Ideally on choosing an option from the navigation bar, like Service ticket, I would like the debug session to start before call the Service Ticket component.
    This is all in the aim of trying to determine why the initial startup of the Service Ticket is so slow.
    Jas.

Maybe you are looking for