adrci incidents

11.2.0.2

ADRCI definitions

ADRCI: Shell ADR

An incident is described as

An incident is a single occurrence of a problem. When a problem occurs more than once, a case is created for each instance. Incidents are followed in ADR. Each incident is identified by a digital incident ID, which is unique within the ADR. When an incident occurs, the database creates an entry in the log of alerts, send an incident alert in Oracle Enterprise Manager, gathers diagnostic data of the incident as dump files (incident landfills), tags incidents landfills with the incident ID and stores of the landfills of the incident in an ADR subdirectory created for this incident.

Diagnosis and resolution of a critical error usually begins with an incident alert. You can get a list of all incidents in the ADR with ADRCI command. Each incident is mapped to one problem only.

Incidents are controlled flood so that one problem does not generate too many incidents and discharges of the incident. See Oracle database administrator Guide for more information on the fight against the flooding incident.

My question is what is an incident and that is a problem.  I have errors in my alert log ORA, some consider an ORA 600, but I have no other.

Some examples of others (regardless of the subject of their specific problems, it is adrci reports only)

ORA-01013

ORA-12012

ORA-03135

ORA-03136

ORA-03113

ORA-02063

(maybe others, above are great for examples of it not displayed)

If I run

adrci exec = "' show the problem Pei \\\"LASTINC_TIME > systimestamp-7\\\ "" orderby - lastinc_time ""

I get no problem (even though my alert log has any ORA errors above in the last 7 days), but if I run it for the last 20 days, I see 600 and 7445 ora s which took place 18 days ago.

Update on that: it is possible to errors ORA Tote with a clause of "message".

adrci exec = "home dΘfinir ${adrci_home}; «' display alert Pei \\\"message_text 'ORA-%' and originating_timestamp > systimestamp-1\\\»»

credit coskan @: http://coskan.wordpress.com/2010/12/06/alert-log-monitoring-script-via-adrci/

But isn't the same thing or as graceful as a 'incident/problem show', so I got the answer to that if anyone else is looking, ADRCI sees the following errors and incidents or problems (answer support, I can't find it in a doc anywhere but Im repeating it here as Im, judging this characteristic information) nothing else appears except if coskans method above is used.

ORA-4020:-Deadlock detected while trying to lock an object library
ORA-8103:-object no longer exists
ORA-1410 :-ROWID not valid
ORA-1578:-ORacle data block corruption
ORA-29740:-Member expelled by another Member of the cluster database
ORA-255:-database not mounted
ORA-376:-file can not be read right now
ORA-4030:-out-of-memory process
ORA-4031:-off SGA memory
ORA-335:-the change numbers are out of order
ORA-356:-incompatible lengths the wording
ORA-353:-there is a corruption of journal almost a block and change of time

Tags: Database

Similar Questions

  • (How can I remove reports of incidents pending under linux?

    It is:

    Firefox has used the memory of my pc: 110000 5 GB files in ~ home > mozilla > firefox > crashreports > pending.
    I don't remember an accident never reported on the screen.

    1 / how to remove these files?

    2 / How to stop these useless reports generated?

    Looks like Q679996 and A214546 was the answer but as someone helpfully deleted it!

    Ubuntu 10.04 LTS Firefox 17.0.1

    You can delete this folder to get rid of the files.

    There should be a Reports/crashreporter.ini Crash that has the parameter to submit incident reports.

    This setting under [Crash Reporter] should remove reports of incidents.

    SubmitReport=0

    The value of the integer pref browser.sessionstore.max_resumed_crashes to 0 on the subject: config page in order to get the about: sessionrestore page immediately with the first reboot after a failure has occurred or the Task Manager was used for the closing of Firefox.

  • MAF 2.2.0 - Refresh container does not return to original position if incidental layout is used

    Hello

    As the title suggests the container update don't go back to original position if incidental layout is used.

    I have included a small sample project with the minimum required components to reproduce the bug.

    Find the project here:

    https://www.dropbox.com/s/hy5jdce4w5qc2b6/refreshTest.zip?DL=0

    Is there any workaround for this problem, or is this something that will be fixed in a next version of MAF?

    Kind regards

    Ognjen

    Hey,.

    This is fixed in the latest version of MAF - 2.2.2.

    Kind regards

    Ognjen

  • Incidents multiple displays to the customer portal

    Hi all.

    Is it possible to have several incidents screens in the customer portal?

    that is, in the main tool of the service manager you can link types to the screens so that you can have different fields visible depending on the type of call that you connect.

    In our case, the ideal solution would be to link a model to appeal to a specific screen in the customer portal that this selection is made before the registration of incidents of Portal screen loading.

    It requires a html customization or is there some settings that we lost that allows for GUI configuraiton of this?

    Thank you

    concerning

    Mika

    It is always = a way of...)

    Believe me, if you dare (and have some knowledge) to do customizations, you can do almost everything you need in this system. However, please keep in mind that using features by default when it is possible is always the best option. Therefore, think twice if out of box (which is default) features really do not match your goals.

    G

  • adrci works not by trying to purge the listener newspapers

    Version of the grid: 11.2.0.3

    Platform: Oracle Linux 6.3

    I wanted to purge a log listener of analysis (listener_scan2.log), which is 2.7 GB in size and many .xml files in the directory of the trace listener.

    So, I thought to use adrci for this.

    As always, it did not work

    How you guys do purge listeners node and SCAN logs?

    Here's what I tried.

    [oracle@mspfh234 ~] $ pwd

    / home/oracle

    [oracle@mspfh234 ~] $ ls - alrdth /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    -rw - r - 1 oracle oinstall 2.7G 13 Dec 11:33 /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ export ORACLE_SID = + ASM1

    [oracle@mspfh234 ~] $ export ORACLE_HOME=/app/11.2.0/grid

    [oracle@mspfh234 ~] $ export PATH = $PATH: $ORACLE_HOME/bin

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ adrci

    ADRCI: Version 11.2.0.3.0 - Production on Fri dec 13 11:34:04 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Basis of the ADR = "/ app/oracle '.

    adrci >

    adrci >

    adrci > show houses

    Houses of ADR:

    diag, tnslsnr, mspfh234, earphone

    diag, tnslsnr, mspfh234, prod

    diag/rdbms/bstgprd/BSTGPRD1

    ASM diag/asm / + / + ASM1

    diag/clients/user_oracle/host_1287719203_80

    adrci >

    adrci >

    adrci > set home diag, tnslsnr, mspfh234, earphone

    adrci >

    adrci >

    adrci >

    adrci > exec = "value homepath diag/tnslsnr/mspfh234/listener_scan1;" purge - age type 10080 - ALERT ".

    DIA-48415: Syntax error in string [1] to [column]

    adrci > purge - age 30 - type ALERT

    adrci >

    adrci > purge - age 30 - type TRACK

    adrci >

    adrci > home

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ ls - alrdth /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    -rw - r - 1 oracle oinstall 2.7 G 13 Dec 11:36 /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ adrci

    ADRCI: Version 11.2.0.3.0 - Production on Fri dec 13 11:36:14 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Basis of the ADR = "/ app/oracle '.

    adrci >

    adrci > show houses

    Houses of ADR:

    diag, tnslsnr, mspfh234, earphone

    diag, tnslsnr, mspfh234, prod

    diag/rdbms/bstgprd/BSTGPRD1

    ASM diag/asm / + / + ASM1

    diag/clients/user_oracle/host_1287719203_80

    adrci >

    adrci > set /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2 House

    DIA-48447: The path of entry [/ app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2] contains no which houses the ADR

    adrci > set home diag, tnslsnr, mspfh234, listener_scan2

    DIA-48447: The path of entry [diag, tnslsnr, mspfh234, listener_scan2] does not contain what houses the ADR

    adrci > set homepath diag, tnslsnr, mspfh234, listener_scan2

    DIA-48447: The path of entry [diag, tnslsnr, mspfh234, listener_scan2] does not contain what houses the ADR

    adrci > output

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ adrci

    ADRCI: Version 11.2.0.3.0 - Production on Fri dec 13 11:38:31 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Basis of the ADR = "/ app/oracle '.

    adrci >

    adrci > show houses

    Houses of ADR:

    diag, tnslsnr, mspfh234, earphone

    diag, tnslsnr, mspfh234, prod

    diag/rdbms/bstgprd/BSTGPRD1

    ASM diag/asm / + / + ASM1

    diag/clients/user_oracle/host_1287719203_80

    adrci > set homepath diag, tnslsnr, mspfh234, listener_scan2

    DIA-48447: The path of entry [diag, tnslsnr, mspfh234, listener_scan2] does not contain what houses the ADR

    adrci >

    adrci > set home diag, tnslsnr, mspfh234, listener_scan2

    DIA-48447: The path of entry [diag, tnslsnr, mspfh234, listener_scan2] does not contain what houses the ADR

    adrci > set home diag, tnslsnr, mspfh234, earphone

    adrci > purge - age 30 - type ALERT

    adrci > purge - age 30 - type TRACK

    adrci >

    adrci > home

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ ls - alrdth /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    -rw - r - 1 oracle oinstall 2.7 G 13 Dec 11:40 /app/11.2.0/grid/log/diag/tnslsnr/mspfh234/listener_scan2/trace/listener_scan2.log

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $ adrci

    ADRCI: Version 11.2.0.3.0 - Production on Fri dec 13 11:40:40 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Basis of the ADR = "/ app/oracle '.

    adrci > show houses

    Houses of ADR:

    diag, tnslsnr, mspfh234, earphone

    diag, tnslsnr, mspfh234, prod

    diag/rdbms/bstgprd/BSTGPRD1

    ASM diag/asm / + / + ASM1

    diag/clients/user_oracle/host_1287719203_80

    adrci >

    adrci >

    adrci > set home diag, tnslsnr, mspfh234, earphone

    adrci >

    adrci > display the trace file

    diag/tnslsnr/mspfh234/listener/trace/listener.log

    adrci >

    adrci >

    adrci > output

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    [oracle@mspfh234 ~] $

    This is a bug, the logs and trace files will not get automatically purged. You must manually delete them when they are no longer needed.

    Also, see Notes MOS:

    Bug 13495885 : THE AUTOMATIC PURGE DOES NOT WORK FOR THE REPOSITORY of DIAG LISTENER

    How to purge the listener Log.Xml file? (Doc ID 816871.1)

    Why is my interlocutor connects & traces not served by ADR? (Doc ID 1438242.1)

    Adrci Purge did not clear the Alert. Log in text format in the Trace folder (Doc ID 751082.1)

  • The remote ADRCI

    Try calling adrci of several servers and homes via a simple script to implement something like coskan here.

    How | Approach of the Coskan for Oracle

    Is a report email with all the problems of any server.  I could set up a shell adrci on each server script and get to them via a remote ssh call, but thought Id ask to know if someone had found a way to call adrci directly from a remote server.

    (1) establish the ssh connectivity between the monitoring server and other servers

    (2) on the server control to run next to call the script of "Coskan" on each remote server:

    to svr in remote1 remote3 semote2...

    do

    SSH $svr '/opt/oracle/scripts/check_alert.sh D' >/path/to/mylocal/check_alert_ ' date of +%Y%m%d\-%H%M'.log

    fact

    HTH

  • How to delete/remove the incidents of the same type

    Hello
    the Incident of our cloud Control Manager contains open incidents. In our case we have more than 150 of "archiver hung on the time line number /...» ».
    Now, I would like to delete those - given that I am aware of the underlying problem. But I understand that I can only mark an incident and delete an incident. Of course, it would be great if it would be possible to remove it at once. Is it possible to do?

    Any help would be apprciated.

    Rgds
    Jan

    Hello

    You can delete multiple incidents via the command line with the command 'emcli clear_stateless_alerts '.

    Clear alerts without state associated with the target object specified.

    Only the user can clear these alerts stateless; the Enterprise Manager Agent does not automatically clear these alerts.

    To find the metric internal name associated with an alert without a State, use the verb get_metrics_for_stateless_alerts.
    Note: Before running any command to emcli, you must connect to emcli first of all if it is not already done.
    It may also be necessary to synchronize the emcli and WHO.
    Example:
    $ emcli login - username = SYSMAN
    $ emcli sync

    Format (one line)

    $ emcli clear_stateless_alerts-older_than = number_in_days-target_type target_type-target_name = target_name = [-include_members]

    [- metric_internal_name = target_type_metric:metric_name:metric_column] [- unacknowledged_only] [- ignore_notifications] [- Overview]

    [] indicates that the parameter is optional.

    Options

    * older_than

    Specify the age of the alert in days. (Specify 0 for the alerts currently open stateless.)

    * target_type

    Type of target identifier internal, as host, oracle_database and emrep.

    For a list of the valid target types in your repository database, you can do the following:

    1. start sqlplus and log in as user sysman to your repository database

    2 run the following query:
    SQL > select distinct mgmt_targets target_type;

    The sample output:

    SQL > select distinct mgmt_targets target_type;

    TARGET_TYPE
    ----------------------------------------------------------------
    oracle_listener
    oracle_ias_farm
    weblogic_j2eeserver
    j2ee_application
    metadata_repository
    oracle_csa_collector
    host
    oracle_database
    oracle_emd
    oracle_emrep
    weblogic_domain

    * target_name

    Name of the target.

    * include_members

    There is place for composite targets review alerts belonging to members as well.

    * metric_internal_name

    Metric to be cleaned. Use the verb get_metrics_for_stateless_alerts to see our full list of parameters taken in charge for a given target type.

    ExampleFor the target type oracle_database
    $ emcli get_metrics_for_stateless_alerts-target_type = oracle_database

    * unacknowledged_only

    Only disable alerts if they are not recognized.

    * ignore_notifications

    Use this option if you do not want to send notifications for the cleared alerts. This can reduce the notification subsystem.

    * Overview

    Displays the number of alerts to be deleted on the target.

    Examples

    The following example clears the alerts generated in the database alert log more than a week old. In this example, no notifications are sent when alerts are disabled.
    $ emcli clear_stateless_alerts-older_than = 7 - target_type = oracle_database-tar get_name = database - metric_internal_name = oracle_database:alertLog:genericErrStack - ignore_notifications

    Example for a database cluster

    If the target type for the cluster database is "rac_database". run the following command
    $ ./oms/bin/emcli clear_stateless_alerts-older_than = 1 - target_type = rac_database-target_name = oracle.rac.ccc.kk

    Kind regards
    Vincent

  • ADRCI and health monitor views

    Hello

    Forgive me for being stupid, but I (honestly) looked at the documentation before posting this thread.

    I strive to certain ADRCI housekeep relationships - in particular, the health monitor is running.

    I fight to figure out how to enumerate all the hm_runs who have more than 7 days. I tried to use all sorts of variations on those times and I can't quite it fold things:

    adrci > interview hm_run Pei "end_time < sysdate-8.
    adrci > show hm_run Pei "end_time < sysdate-8.

    I even tried to ' select * from hm_run' in the command line tool, but does not. Have you tried via batch mode too (adrci exec ="")

    The other issue I have is that I noticed that if you do this:

    adrci > purge - age 1 - type HM

    This removes the lines in the view v$ hm_run the database, but it does not remove related rows in the view v$ hm_finding. I suspect that he probably does not remove the related rows of the vm$ hm_recommendation view either.

    Is there a way to housekeep these two points of view? Or will they be supported by SHORTP and LONGP in the ADR control?

    Mark

    Refer to this
    https://mudasblog.WordPress.com/2011/04/05/Oracle-11g-R2-11-2-0-2-housekeeping-ADR-and-listener-logfiles/
    http://gavinsoorma.com/2010/09/purging-trace-and-dump-files-with-11g-adrci/

  • Adrci

    Hi all

    is there a way I defined cn adrci based on a server location to access from client

    use of x$ dbgalertext if you want to read from sqlplus
    Access alerts log

  • Journal alerts receive ADRCI message every two minutes

    Greetings all -.

    I get this message about every two minutes in my alert log.

    "Use ADRCI or Support established for the packaging of the incident.
    See Note 411,1 to My Oracle Support to error and packaging details. »

    She is accompanied by other errors that I deal with.

    It seems that by making this suggestion whenever he encounters an error-
    but I'm not in there. One mistake and then I see this message 60 times.

    Yes, I know - this is a feature, but it is in my alert log about 58000 times (really).

    Any suggestions to stop this annoyance?

    BB

    Published by: Blues Breaker on June 25, 2012 09:21

    Please see

    http://uhesse.com/2011/06/01/adrci-a-survival-guide-for-the-DBA/

    Rgds,

    Ahmer

  • ADRCI / show control

    Hi, I have a question about the option display the contol in adrci

    I open two sessions of server with PuTTY.

    in one session, I put

    adrci > set (SHORTP_POLICY = 360)

    adrci > set (LONGP_POLICY = 2160)

    adrci > see command

    Home of ADR = / usr/oracle/admin/KPLT/diag/rdbms/kplt/KPLT:
    *************************************************************************
    SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME ADRID
    -------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
    1784177330 360 2160 10:24:27.433749 2012-06-15 + 02:00 01:31:52.802958 2012-06-13 + 02:00 16:27:07.746174 2012-06-14 + 02:00 1 2 80 1 2011 - 12 - 06 11:51:30.445290 + 01:00
    1 lines read


    So far so good
    entering the purge removes everything know files to trace more than 2160 hours.

    BUT the logon adrci second Terminal Server, see the command displays the default values:

    adrci > see command

    Home of ADR = / usr/oracle/admin/diag/tnslsnr/nesv324/listener:
    *************************************************************************
    SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME ADRID
    -------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
    383698937 720 8760 2011 - 11 - 23 + 01:00 21:12:15.480667 1 2 80 1 2011-11-23 21:12:15.480667 + 01:00
    1 lines read


    So the changing of the SHORTP_POLICY and the LONGP_POLICY seems to be associated session.

    It is possible to make these changes permanent?

    I would use this option to get a housekeeping, I understand, that process PMON, without calling adrci purge, cleans automatically track which files.
    Am I right, I thought, PMON cleans purges autumatically the trace file or I call the adrci with purge (and changed SHORTP_POLICY and LONGP_POLICY settings)?

    Thanks in advance.

    Klaus

    It is possible to make these changes permanent?

    With "set control(SHORT/LONG_POLICY)" change is permanent. In your case you have changes of the value for "home ADR = / usr/oracle/admin/KPLT/diag/rdbms/kplt/KPLT:" and in the 2nd window you have "ADR home = / usr/oracle/admin/diag/tnslsnr/nesv324/listener: Set the good reception and check.

    http://docs.Oracle.com/CD/E11882_01/server.112/e22490/adrci.htm#BGBGFEJE

    Anand

  • The incidents database

    Hello

    I would like to ask if there is a chance to get the list of all incidents (associated with hosts and guests) for the specified period of time (say 15 minutes).

    It is possible to get it with a query of database of VC or simple just to enable a logging option (inside the interface chart or another option)?

    Better would be to have the list of all the incidents as visible on GUI in a log file.

    tips are welcome.

    Thnx.

    All logs of your server vCenter is visible by clicking the Administration button and the system logs tab.  For your ESX servers, they are stored in/var/log

  • adrci see home - different from that of the home of the oracle of the sid

    I am trying to figure to configure adrci to cleaning tracefiles.

    However I am confused which show adrci returned did not match the initial setting of: diagnostic_dest.

    Here is the example:

    adrci

    ADRCI: Version 11.1.0.7.0 - Production on Tue Aug 9 13:45:08 2011

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Basis of the ADR = "/ opt/oracle.
    adrci > view home
    Houses of ADR:
    diag, rdbms, wdbm, wdbm
    diag/clients/user_oracle/host_wdbm
    diag, tnslsnr, wdbm, listener_wdbm1
    diag, tnslsnr, wdbm, listener_wdbm_local
    adrci > output


    ---------------------

    SQL > show the diagnostic parameter

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    diagnostic_dest string/opt/oracle/admin/WDBM/diag

    Before I was running adrci, I install the. oraenv on behalf of sid and oracle home is oriented the right way.

    I'm off clue what is happening here and how do I configure adrci to point to the diagnostic_dest?

    Thank you

    Please read the documentation: http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/adrci.htm#BGBCAABI says:

    >
    If several houses are underway, it means homepath points to a directory in the ADR tree that contains several directories below ADR. To focus on a single House of ADR, you must set the homepath to the low point in the hierarchy of directories, a single home directory of ADR.
    >

    Edited by: P. Forstmann August 10, 2011 19:56

  • I can't use the oracle11g adrci to run a command

    TITLE:
    -------------------------------------------------------------------------------------------------
    I can't use the oracle11g adrci to run a command

    ENV:
    -------------------------------------------------------------------------------------------------
    oracle11g production (version 11.2.0.1.0 version of Red Hat Enterprise Linux AS 4 x86_64)

    The snapshot command
    -------------------------------------------------------------------------------------------------
    adrci > view home
    Houses of ADR:
    diag/rdbms/orcl/orcl
    adrci > see command
    DIA-48101: error occurred when attempting to read a file [block] [opt/oracle/diag/rdbms/orcl/orcl/metadata/ADR_CONTROL.ams] [0]
    DIA-27072: Message not found 27072. product = RDBMS. installation = DIA
    Linux error: 22: invalid argument
    Additional information: 4
    Additional information: 1
    Additional information:-1

    adrci > problem

    Home of ADR = / opt/oracle/diag/rdbms/orcl/orcl:
    *************************************************************************
    0 rows read

    adrci > view report hm_run hm_run_1
    DIA-48101: error occurred when attempting to read a file [block] [opt/oracle/diag/rdbms/orcl/orcl/metadata/HM_RUN.ams] [0]
    DIA-27072: Message not found 27072. product = RDBMS. installation = DIA
    Linux error: 22: invalid argument
    Additional information: 4
    Additional information: 1
    Additional information:-1

    Published by: user649619 on January 23, 2010 04:46

    user649619 wrote:
    TITLE:
    -------------------------------------------------------------------------------------------------
    I can't use the oracle11g adrci to run a command

    ENV:
    -------------------------------------------------------------------------------------------------
    oracle11g production (Release Red Hat Enterprise Linux AS release 4 x86_64 11.2.0.1.0)

    The snapshot command
    -------------------------------------------------------------------------------------------------
    adrci > view home
    Houses of ADR:
    diag/rdbms/orcl/orcl
    adrci > show control
    DIA-48101: error occurred when attempting to read a file [block] [opt/oracle/diag/rdbms/orcl/orcl/metadata/ADR_CONTROL.ams] [0]
    DIA-27072: Message not found 27072. product = RDBMS. installation = DIA
    Linux error: 22: invalid argument
    Additional information: 4
    Additional information: 1
    Additional information:-1

    adrci > show problem

    Home of ADR = / opt/oracle/diag/rdbms/orcl/orcl:
    *************************************************************************
    0 rows read

    adrci > show report hm_run hm_run_1
    DIA-48101: error occurred when attempting to read a file [block] [opt/oracle/diag/rdbms/orcl/orcl/metadata/HM_RUN.ams] [0]
    DIA-27072: Message not found 27072. product = RDBMS. installation = DIA
    Linux error: 22: invalid argument
    Additional information: 4
    Additional information: 1
    Additional information:-1

    Published by: user649619 on January 23, 2010 04:46

    DIA-48101: error occurred when attempting to read a file [%s] [s] [%s]
    Cause: There was an error when you try to play a file with file ADR interface.
    Action: Check the arguments specified in the playback interface.

    >

    HTH
    Aman...

  • A group of consecutive dates to get some absences (days, hours, minutes) and incidents

    Hello

    I'm trying to calculate and history of lack of list based on the details of lack follows.

    Here is what I got: (sorry for the dotted lines between the two, I put it just to format the data)

    EMP_ID - WORK_DT - PM - REASON - PAID
    =====-----=======------===-=====-- -- ====
    123---06/01/2009---8.0---malades---PAYE
    123---07/01/2009---8.0---malades---PAYE
    123---08/01/2009---8.0---malades---PAYE
    123---09/01/2009---8.0---malades---PAYE
    123---16/01/2009---8.0---FMLA EMP - paid
    123---17/02/2009---8.0---malades---PAYE
    123---18/02/2009---8.0---malades---PAYE
    123---30/03/2009---8.0---jure - paid
    123---21/05/2009---4.0---malades---PAYE
    123---22/05/2009---4.0---malades---PAYE
    123---03/07/2009---8.0---malades---PAYE
    123---25/08/2009---8.0---FMLA EMP - paid
    123---26/08/2009---4.5---FMLA EMP - paid
    123---21/09/2009---8.0---malades---non paid
    123---22/09/2009---8.0---malades---non paid


    I need to consolidate absences consecutive full day (8 hours) and show Start_dt, End_Dt, and also to calculate the duration of the absence in days, hours, min. If there is lack of half day (single or consecutive) is not followed by 8 hours, then they should be considered as a new incident (5/21 and 5/22). If the absence of half-day is followed by the absence of all day while they should be grouped together (8/25 and 8/26).

    So for the data mentioned above the result should look like:

    EMP_ID - START_DT - END_DT - DAYS - HOURS - minutes - INCIDENT - REASON - PAID
    ===---====== ---- ====== -- === - ==== - === - ====== - ====== -- -- =======
    123 4 06/01/2009-01/09/2009 - 0---0---1 - disease - paid
    123-16/01/2009 1-16/01/2009 - 0---0---2 - FMLA EMP - paid
    123 2 17/02/2009-02/18/2009 - 0---0---3 - disease - paid
    123 03/30/2009 1-30/03/2009 - 0---0---4 - Jury service - paid
    123 21/05/2009 0 - 21/05/2009 - 4---0---5 - disease - paid
    123 22/05/2009 0 - 22/05/2009 - 4---0---6 - disease - paid
    123 03/07/2009 1-2009-03-07 - 0---0---7 - disease - paid
    123-25/08/2009 1-08/26/2009 - 4-30-8 - EMP - paid FMLA
    123 21/09/2009-22/09/2009-2-0-0-9 - disease - unpaid

    I am able to group them to gether and get start_dt, end_dt and total days, hours as well as incident to help

    Work_Dt - Row_Number() over (order of MIN (Work_Dt) and)
    Row_Number() (order MIN (Work_Dt)

    but it includes absences consecutive half-day (5/21 and 5/22) together as a single incident that should be considered as separate incidents. any idea or help in this case will be a great help.

    Thank you

    Stéphane wrote:

    I'm trying to calculate and history of lack of list based on the details of lack follows.

    As promised:

    with t as (
               select 123 EMP_ID,to_date('01/06/2009','mm/dd/yyyy') WORK_DT,8.0 HRS,'Sick' REASON,'Paid' PAID from dual union all
               select 123,to_date('01/07/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/08/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/09/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/16/2009','mm/dd/yyyy'),8.0,'FMLA EMP','Paid' from dual union all
               select 123,to_date('02/17/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('02/18/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('03/30/2009','mm/dd/yyyy'),8.0,'Jury Service','Paid' from dual union all
               select 123,to_date('05/21/2009','mm/dd/yyyy'),4.0,'Sick','Paid' from dual union all
               select 123,to_date('05/22/2009','mm/dd/yyyy'),4.0,'Sick','Paid' from dual union all
               select 123,to_date('07/03/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('08/25/2009','mm/dd/yyyy'),8.0,'FMLA EMP','Paid' from dual union all
               select 123,to_date('08/26/2009','mm/dd/yyyy'),4.5,'FMLA EMP','Paid' from dual union all
               select 123,to_date('09/21/2009','mm/dd/yyyy'),8.0,'Sick','Unpaid' from dual union all
               select 123,to_date('09/22/2009','mm/dd/yyyy'),8.0,'Sick','Unpaid' from dual
              )
    select  EMP_ID,
            MIN(WORK_DT) START_DT,
            MAX(WORK_DT) END_DT,
            TRUNC(SUM(HRS) / 8) DAYS,
            TRUNC(MOD(SUM(HRS),8)) HOURS,
            MOD(SUM(HRS),1) * 60 MINs,
            INCIDENT,
            REASON,
            PAID
      from  (
             select  EMP_ID,
                     WORK_DT,
                     HRS,
                     REASON,
                     PAID,
                     sum(start_of_incident) over(partition by EMP_ID order by WORK_DT) INCIDENT
               from  (
                      select  t.*,
                              case
                                when     lag(WORK_DT,1,WORK_DT) over(partition by EMP_ID order by WORK_DT) = WORK_DT - 1
                                     and
                                         lag(HRS,1,8) over(partition by EMP_ID order by WORK_DT) = 8
                                     and
                                         lag(REASON,1,REASON) over(partition by EMP_ID order by WORK_DT) = REASON
                                     and
                                         lag(PAID,1,PAID) over(partition by EMP_ID order by WORK_DT) = PAID
                                  then 0
                                else 1
                              end start_of_incident
                        from  t
                     )
            )
      group by EMP_ID,
               INCIDENT,
               REASON,
               PAID
      order by EMP_ID,
               INCIDENT
    /
    
        EMP_ID START_DT   END_DT           DAYS      HOURS       MINS   INCIDENT REASON       PAID
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------------ ------
           123 01/06/2009 01/09/2009          4          0          0          1 Sick         Paid
           123 01/16/2009 01/16/2009          1          0          0          2 FMLA EMP     Paid
           123 02/17/2009 02/18/2009          2          0          0          3 Sick         Paid
           123 03/30/2009 03/30/2009          1          0          0          4 Jury Service Paid
           123 05/21/2009 05/21/2009          0          4          0          5 Sick         Paid
           123 05/22/2009 05/22/2009          0          4          0          6 Sick         Paid
           123 07/03/2009 07/03/2009          1          0          0          7 Sick         Paid
           123 08/25/2009 08/26/2009          1          4         30          8 FMLA EMP     Paid
           123 09/21/2009 09/22/2009          2          0          0          9 Sick         Unpaid
    
    9 rows selected.
    
    SQL>  
    

    SY.

Maybe you are looking for