RMAN-06136: ORACLE error from auxiliary database

Dear All,
When i start to recover a tablespace(TSPITR) using RMAN, getting below errors. Could any guide me
RMAN-03002: failure of recover command at 02/07/2013 14:12:30
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01119: error in creating database file '/rman/SHFLCLN/oradata'
ORA-27056: could not delete file
IBM AIX RISC System/6000 Error: 1: Not owner
RMAN-06956: create datafile failed; retry after removing /rman/SHFLCLN/oradata from OS

01119, 00000, "error in creating database file '%s'"
// *Cause:  Usually due to not having enough space on the device.
// *Action:                                                                                                                                                                                                                                                                       

Similar Messages

  • ORACLE error from auxiliary database: ORA-01152: file 2 was not restored fr

    Hello,
    i'm trying to clone a database. It is in archive log mode.
    I took a full back using below command
    run {
      backup
         tag 'DAILY_WHOLE'
         format 'FULL_backup_%s_%p_%c.bkp'     database
         plus archivelog
         tag 'DAILY_WHOLE'
         delete all input;
      backup
         current controlfile
         format 'FULL_backup_%s_%p_%c.bkp'     tag 'WHOLE'
         spfile
         format 'FULL_backup_%s_%p_%c.bkp'     tag 'WHOLE';
    }then i issue a duplicate database command
    RUN
    DUPLICATE DATABASE TO TEST_DB
              NOFILENAMECHECK
               NOREDO
              BACKUP LOCATION '/disk10/flash_recovery_area/PROD';
    }at the very end I got this error.
    contents of Memory Script:
       Alter clone database open resetlogs;
    executing Memory Script
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/15/2013 11:59:21
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01152: file 2 was not restored from a sufficiently old backup
    ORA-01110: data file 2: 'sysaux.dbf'Can anyone help me? I would appreciate it. thanks

    NOREDO would be used when you have a Consistent Backup (i.e. backup taken when the database is MOUNTed but not OPEN) and so, no archivelogs need to be applied. (This would also be the case for a NOARCHIVELOG database).
    See the notes on NOREDO in the DUPLICATE command documentation in the Backup and Recovery Reference.
    http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#i81724
    Hemant K Chitale

  • RMAN-06004:ORACLE error from recovery catalog ... ORA-00904: : invalid ...

    Good Morning All,
    One of our RMAN backups is failing with the following error message. Any suggestions would be greatly appreciated.
    ==================================================================================================
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Edited by: ORA_UMAIR on Dec 31, 2008 7:51 AM

    This Oracle Database is 9.2.0.6.0. Here is the complete log file. The RMAN script that I am using ran successfully many times before.
    ====================================================================================================
    Recovery Manager: Release 9.2.0.6.0 - 64bit Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: CUSTPR (DBID=525071053)
    RMAN>
    RMAN> #########################################################################
    2> # LEVEL 0 BACKUP #
    3> #########################################################################
    4>
    5> # Configure backups to be written to disk.
    6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    old RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Set the retention policy to a recovery window of 7 days. This ensures that
    2> # RMAN retains all backups needed to recover the database to any point in time
    3> # in the last 7 days. You can use the DELETE OBSOLETE command to delete
    4> # backups that are no longer required by the retention policy. To exclude a
    5> # backup from consideration by the policy, you can use KEEP option with the
    6> # BACKUP command.
    7> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to use two disk channels for backup, restore, recovery, and
    2> # maintenance operations.
    3> CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write disk backups to the /backup directory.
    2> # The format specifier %t is replaced with a 4-byte timestamp, %s with the
    3> # backup set number, and %p with the backup piece number.
    4> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    old RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to back up the control file after each backup.
    2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write controlfile autobackups to the /backup directory.
    2> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Enable the backup optimization feature introduced in 9i to make sure that
    2> # RMAN won't backup an archivelog or datafile if there already exists a backup
    3> # of that file. The FORCE option can be used to override optimization on a
    4> # specific BACKUP command.
    5> CONFIGURE BACKUP OPTIMIZATION ON;
    old RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Use the SHOW ALL command to see the current configuration settings.
    2> SHOW ALL ;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%d_bkp_cf%F';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome2/custprdb/9.2.0/dbs/snapcf_custpr.f'; # default
    RMAN>
    RMAN> # The following commands are run each day to start the backup cycle.
    2> # The steps are:
    3> # - Take an incremental level 0 backup of the database. A level 0 backup is
    4> # a complete backup of the entire file which can be used as the basis
    5> # for a subsequent incremental backup.
    6> # - Backup all archivelogs that have not already been backed up.
    7> # - Delete on-disk archivelogs older than seven days.
    8>
    9> BACKUP INCREMENTAL LEVEL 0 FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p'
    10> DATABASE maxsetsize 33G
    11> PLUS ARCHIVELOG FORMAT '/backups/admin/custpr/%d_bkp_al%t_Set%s_Piece%p'
    12> delete all input;
    Starting backup at 12/30/2008 22:01:40
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=8008 recid=7910 stamp=674638862
    input archive log thread=1 sequence=8009 recid=7911 stamp=674671207
    input archive log thread=1 sequence=8010 recid=7912 stamp=674697380
    input archive log thread=1 sequence=8011 recid=7913 stamp=674780433
    input archive log thread=1 sequence=8012 recid=7914 stamp=674784211
    input archive log thread=1 sequence=8013 recid=7915 stamp=674863288
    input archive log thread=1 sequence=8014 recid=7916 stamp=674863300
    channel ORA_DISK_1: starting piece 1 at 12/30/2008 22:01:41
    channel ORA_DISK_1: finished piece 1 at 12/30/2008 22:03:47
    piece handle=/backups/admin/custpr/CUSTPR_bkp_al674863300_Set3083_Piece1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/custpr/arch/arch_custpr_8008.log recid=7910 stamp=674638862
    archive log filename=/custpr/arch/arch_custpr_8009.log recid=7911 stamp=674671207
    archive log filename=/custpr/arch/arch_custpr_8010.log recid=7912 stamp=674697380
    archive log filename=/custpr/arch/arch_custpr_8011.log recid=7913 stamp=674780433
    archive log filename=/custpr/arch/arch_custpr_8012.log recid=7914 stamp=674784211
    archive log filename=/custpr/arch/arch_custpr_8013.log recid=7915 stamp=674863288
    archive log filename=/custpr/arch/arch_custpr_8014.log recid=7916 stamp=674863300
    Finished backup at 12/30/2008 22:03:47
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Recovery Manager complete.

  • Error in duplicating dataguard, RMAN-04006: error from auxiliary,ORA-12514

    Hi All,
    Trying to duplicate using rman and facing below issue
    rman TARGET sys/oracle@pawsdb AUXILIARY sys/oracle@adpaws
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jun 19 20:47:09 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    connected to target database: PAWSDB (DBID=3014417093)
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    TNS on aux looks like this
    ADPAWS =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.210.23.227)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = adpaws)
    Listener under grid home  (ASM) on aux looks like this
    # listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/grid/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME= /home/oracle/app/oracle/product/11.2.0/grid)
    (SID_NAME = adpaws)
    (GLOBAL_DBNAME= adpaws.example.com)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cuscmetl.hillscte.com)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    ADR_BASE_LISTENER = /home/oracle/app/oracle
    output of lsnrctl on aux looks like this
    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 19-JUN-2012 20:53:49
    Copyright (c) 1991, 2011, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cuscmetl.hillscte.com)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
    Start Date 19-JUN-2012 20:53:42
    Uptime 0 days 0 hr. 0 min. 6 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /home/oracle/app/oracle/product/11.2.0/grid/network/admin/listener.ora
    Listener Log File /home/oracle/app/oracle/diag/tnslsnr/cuscmetl/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cuscmetl.hillscte.com)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    Services Summary...
    Service "adpaws.example.com" has 1 instance(s).
    Instance "adpaws", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    TNS on target is also configured properly, both are tnsping successful from each other, running this command from aux server results in failure
    Please help
    thanks

    Thanks for reply, below are the last 50 lines from listener log
    <msg time='2012-06-19T21:10:13.125-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56363)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:13.160-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56364)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:18.125-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56366)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:18.160-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56367)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:23.126-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:23 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56368)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:23.159-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:23 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56369)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:28.125-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:28 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56371)) * establish * etldb * 0
    </txt>
    </msg>
    <msg time='2012-06-19T21:10:28.160-05:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='server2.server.com'
    host_addr='10.210.23.227'>
    <txt>19-JUN-2012 21:10:28 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))(SERVICE_NAME=etldb)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.210.23.229)(PORT=56372)) * establish * etldb * 0
    </txt>
    </msg>

  • RMAN-04005: error from target database:

    Hi,
    when I want register my target by
    ]$ rman catalog prdrman/prdrman@PRD target sys/manager@DEV
    I receive this :
    RMAN-04005: error from target database:
    ORA-01031: insufficient privileges
    Do you have any idea ?
    Many thanks before.

    Here are some further hints from documentation:
    ORA-01031: insufficient privileges
    When : SQL> connect sym/sym as SYSDBA
    Additional : init.ora remote_login_passwordfile=EXCLUSIVE or SHARED
    Cause : Username/password is not correct (if the user is added by granting
    SYSDBA to the user, this user is added to the passwordfile with the
    password from the data dictionary)
    or:
    Password file has
    -> incorrect name orapw<name_of_database>
    -> is not in $ORACLE_HOME/dbs
    -> has wrong privileges
    They should be -rwSr-----
    For example:
    -rwSr----- 1 server sdb 1536 Mar 25 08:12 orapwv901
    Solve : You can set the correct privileges (Unix) by issueing
    $ chmod 4640 passwordfile
    As a last resort, recreate the password file and remind to add
    additional privileged (sysdba or sysoper) users

  • ORA-01031: insufficient privileges from auxiliary database while connecting

    i am getting this error ORA-01031: insufficient privileges from auxiliary database while connecting plz help.
    TNS-01106: Listener using listener name VINAR has already been started
    [oraclone@server VINTEST_server]$ tnsping VINAR
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 17-JAN-2013 19:10:49
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    /d04/oraclone/db/tech_st/11.1.0/network/admin/VINTEST_server/sqlnet_ifile.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1571)) (CONNECT_DATA= (SERVICE_NAME=VINAR) (INSTANCE_NAME=VINAR)))
    OK (0 msec)
    [oraclone@server VINTEST_server]$ rman target sys/change_on_install@VINAR auxiliary /
    Recovery Manager: Release 11.1.0.7.0 - Production on Thu Jan 17 19:11:38 2013
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-04005: error from target database:
    ORA-01031: insufficient privileges
    [oraclone@server VINTEST_server]$ sqlplus sys/change_on_install@VINAR as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 17 19:31:52 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name: sys@VINAR as sysdba
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name: [oraclone@server VINTEST_server]$
    [oraclone@server VINTEST_server]$
    SQL> select * from v$pwfile_users;
    no rows selected
    SQL>
    listner.ora
    SID_LIST_VINTEST =
      (SID_LIST =
        (SID_DESC =
          (ORACLE_HOME= /d04/oraclone/db/tech_st/11.1.0)
          (SID_NAME = VINTEST)
          #(GLOBAL_DBNAME = VINAR)
          #(ORACLE_HOME= /d03/oravnr/db/tech_st/11.1.0)
          #(SID_NAME = VINAR)
          (SID_DESC =
          #(ORACLE_HOME= /d04/oraclone/db/tech_st/11.1.0)
          #(SID_NAME = VINTEST)
          (GLOBAL_DBNAME = VINAR)
          (ORACLE_HOME= /d03/oravnr/db/tech_st/11.1.0)
          (SID_NAME = VINAR)
    tnsnames.ora
    VINTEST=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1591))
                (CONNECT_DATA=
                    (SERVICE_NAME=VINTEST)
                    (INSTANCE_NAME=VINTEST)
    VINAR=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1571))
                (CONNECT_DATA=
                    (SERVICE_NAME=VINAR)
                    (INSTANCE_NAME=VINAR)
    kind regards
    plz help

    Pl do not post duplicates - ORA-01031: insufficient privileges from auxiliary database while connecting

  • Can you intercept an Oracle error from a "Process Row" process?

    Hi,
    Can you intercept an Oracle error from a "Process Row" process?
    Example:
    I have been just creating a validation process to check if I'm about to insert a duplicate record so I can give the user a "User friendly" error message.
    It would be awesome if in the error message you can select "PL/SQL function returning result" and have it pass it to the Notification area..
    I doubt there is a way but I thought I would ask..

    >
    I think everyone is waiting for a better exception-handling, but even 4.0 won't bring any improvements in this area.This is kind of what bugged me about 4.0. I feel that they put more effort into making it cool and flashy and ignored some pretty basic core issues like error handling. I mean sure the new jquery powered application builder is nice, but your users never see that - they do however see you not being able to hook into the error handling. There are several issues that have lingered for years that keep getting passed over for other things - i mean the Forms conversion release was such a waste in my opinion. They could have used that release to fix some bugs.
    Of course thats my 2 cents.

  • RMAN DUPLICATE FOR STANDBY FROM ACTIVE DATABASE fails

    Hello
    I'm trying to use RMAN DUPLICATE to create a standby database using Oracle 11.2.0.3 with PSU 6 on HP-UX.
    Primary is 2 node RAC. Standby is also 2 node RAC.
    Standby database instance is started in nomount mode.
    I use:
    duplicate target database for standby from active database
      spfile
      <some spfile parameters>
    with PFILE I get:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/01/2013 12:41:13
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of sql command on clone_default channel at 10/01/2013 12:41:13
    RMAN-11003: failure during parse/execution of SQL statement: alter system set spfile= '/opt/oracle/db11203/dbs/spfileCU1.ora'
    ORA-02097: parameter cannot be modified because specified value is invalid
    ORA-01565: error in identifying file '/opt/oracle/db11203/dbs/spfileCU1.ora'
    ORA-27037: unable to obtain file status
    HPUX-ia64 Error: 2: No such file or directory
    With SPFILE I get;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/01/2013 13:06:34
    RMAN-05501: aborting duplication of target database
    RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause
    But I do have RMAN connexion to target database.
    Thanks for your help.

    Here is the output beginning of the script which clearly shows that I'm always connected to target database:
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 1 13:05:47 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: CU (DBID=1143962925)
    connected to auxiliary database: CU (not mounted)
    RMAN> set echo on
    2> run
    3> {
    4>  configure device type disk parallelism 10;
    5>   allocate channel pr1 type disk;
    6>   allocate channel pr2 type disk;
    7>   allocate channel pr3 type disk;
    8>   allocate channel pr4 type disk;
    9>   allocate channel pr5 type disk;
    10>   allocate channel pr6 type disk;
    11>   allocate channel pr7 type disk;
    12>   allocate channel pr8 type disk;
    13>   allocate channel pr9 type disk;
    14>   allocate channel pr10 type disk;
    15>   allocate auxiliary channel st1 type disk;
    16>   allocate auxiliary channel st2 type disk;
    17>   allocate auxiliary channel st3 type disk;
    18>   allocate auxiliary channel st4 type disk;
    19>   allocate auxiliary channel st5 type disk;
    20>   allocate auxiliary channel st6 type disk;
    21>   allocate auxiliary channel st7 type disk;
    22>   allocate auxiliary channel st8 type disk;
    23>   allocate auxiliary channel st9 type disk;
    24>   allocate auxiliary channel st10 type disk;
    25>   duplicate target database for standby from active database
    26>   spfile

  • Oracle Error from inserting a table from a table

    Hi all,
    We got a oracle error, as following,
    Thu Mar 2 16:34:03 2006
    Errors in file /oracle1/app/oracle/admin/M3US/udump/ora_1773234_m3us.trc:
    ORA-00600: internal error code, arguments: [4518], [], [], [], [], [], [], []
    The SQL is below,
    INSERT INTO MKT.TM_SAL_PGM_LOG
    SELECT B.SEQ + ROWNUM LOG_SEQ ,
    A.COM_CODE ,
    A.DIV_CODE ,
    A.PGM_NO ,
    A.PGM_SEQ ,
    A.PGM_TYPE ,
    A.CUST_CD ,
    A.BILL_TO ,
    A.TXN_TYPE ,
    A.TXN_NO ,
    A.TXN_SEQ ,
    A.TXN_DATE ,
    A.MODEL ,
    A.SUFFIX ,
    A.APPLY_AMT_LOC ,
    A.APPLY_AMT_TXN ,
    A.CN_ENTRY_FLAG ,
    A.CURRENCY ,
    A.APPLY_TYPE ,
    A.PCT_RATE ,
    A.AMT_PER_UNIT ,
    A.NET_AMT_LOC ,
    A.NET_AMT_TXN ,
    A.ACCRUAL_TYPE ,
    A.SALESMAN ,
    A.CREATE_DATE ,
    A.DEPT_CODE ,
    A.QTY ,
    A.ACCRUAL_FLAG ,
    A.APPLY_AMT ,
    A.FIXED_AMT ,
    A.SHIP_FROM ,
    A.AUTO_ADJUST ,
    A.CHINA_PRODUCT
    FROM MKT.TM_SAL_PGM_LOG_IT A,
    ( SELECT MAX(LOG_SEQ) SEQ FROM MKT.TM_SAL_PGM_LOG ) B
    WHERE PGM_NO = '2006-DA0004B'
    AND TXN_TYPE IN ( 'ACCR' ,'CRED' )
    AND COM_CODE = 'LGEUS';
    If we tried to insert into a table with one more condition,
    and rownum=1;
    it went throught without error.
    And, if we insert into the table with value( val1, val2,.....,valn), it also went through without any error message, but ONLY when the whole SQL is executed.
    There is no error either for the select statement in the SQL either.
    It is Oracle 8.1.7.4 64-bit on IBM AIX 5.2 machine.
    What is wrong?
    Thanks for advance!
    Robert

    Dump file /oracle1/app/oracle/admin/M3US/udump/ora_1773234_m3us.trc
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    ORACLE_HOME = /oracle1/app/oracle/product/8.1.7
    System name: AIX
    Node name: lgeus
    Release: 2
    Version: 5
    Machine: 00C9C4CD4C00
    Instance name: M3US
    Redo thread mounted by this instance: 1
    Oracle process number: 86
    Unix process pid: 1773234, image: oracle@lgeus (TNS V1-V3)
    *** SESSION ID:(184.8386) 2006-03-02 16:13:16.189
    *** 2006-03-02 16:13:16.189
    ksedmp: internal or fatal error
    ORA-00600: internal error code, arguments: [4518], [], [], [], [], [], [], []
    Current SQL statement for this session:
    INSERT INTO TM_SAL_PGM_LOG
    SELECT C.LOG_SEQ + ROWNUM,
    D.COM_CODE, D.DIV_CODE, '2006-DA0004B' PGM_NO,
    DECODE ( T.PRODUCT, 'WR', 1, 'WL', 2, 'WK', 3, 'JE', 4, 'JM', 5, 'FR', 6, 'FD',7, 0 ) PGM_SEQ , 'KO' ,
    M.CUST_CD, M.BILL_TO, 'ACCR' TXN_TYPE, D.ORDER_NO, D.SALES_SEQ,
    GREATEST ( M.INVO_DATE, '20060228') , D.MODEL, D.SUFFIX,
    D.NET_AMT_TXN * 0.02,D.NET_AMT_TXN * 0.02, 'S', 'USD', 'P', 2, 0, D.NET_AMT_LOC, D.NET_AMT_TXN, 'L',
    M.SALESMAN, SYSDATE, M.DEPT_CODE, D.PICK_QTY, NULL, NULL, NULL, NULL, 'N', NULL
    FROM TM_SAL_DTL D,
    TM_SAL_MST M,
    TM_MODEL T,
    ( SELECT NVL(MAX (LOG_SEQ ),0) LOG_SEQ FROM TM_SAL_PGM_LOG_IT ) C
    WHERE D.ORDER_NO = M.ORDER_NO
    AND D.COM_CODE = M.COM_CODE
    AND D.DIV_CODE = M.DIV_CODE
    AND D.MODEL = T.MODEL
    AND D.SUFFIX = T.SUFFIX
    AND D.COM_CODE = T.COM_CODE
    AND ( D.INVO_NO , D.INVO_SEQ ) IN (
    SELECT /*+ ORDERED M, D, T */
    D.INVO_NO, D.INVO_SEQ
    FROM TM_SAL_MST M,
    TM_SAL_DTL D,
    TM_MODEL T
    WHERE M.ORDER_NO = D.ORDER_NO
    AND M.COM_CODE = D.COM_CODE
    AND M.DIV_CODE = D.DIV_CODE
    AND D.MODEL = T.MODEL
    AND D.SUFFIX = T.SUFFIX
    AND D.COM_CODE = T.COM_CODE
    AND M.INVO_DATE BETWEEN '20060101' AND '20061231'
    AND M.BILL_TO IN ( 'US006900' )
    AND T.PRODUCT IN (
    SELECT PRODUCT FROM TM_SAL_PGM_DTL
    WHERE PGM_NO = '2006-DA0004B' )
    MINUS
    SELECT TXN_NO, TXN_SEQ
    FROM TM_SAL_PGM_LOG
    WHERE PGM_NO = '2006-DA0004B'
    AND COM_CODE = 'LGEUS'
    AND TXN_TYPE = 'ACCR' )
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    ksedmp+00cc bl ksedst 1 ?
    ksfdmp+0018 bl ksedmp 110276CD ?
    kgeriv+0104 bl _ptrgl
    kgeasi+0104 bl kgeriv 84 ? 70 ? 6 ? 6 ? 2FF1A24C ?
    ktbwbi+00f8 bl kgeasi 20009408 ? 201287D4 ? 11A6 ?
    2 ? 0 ? C0 ? 8000 ? 0 ?
    kdisle+100c bl ktbwbi 2FB0 ? 11919F50 ? 0 ? 0 ?
    kdiins0+0f84 bl kdisle 69362E20 ? 2FF1A740 ?
    2FF1B008 ? 1000001 ? 80008 ?
    22243DE8 ? 2C002C ? 0 ?
    kauxsin+13e8 bl kdiins0 69362E20 ? 0 ? 0 ? 0 ? 0 ?
    0 ? 0 ? 80000 ?
    insidx+0388 bl kauxsin 69362DD4 ? 117694C4 ? 0 ?
    201B4278 ? 201B4308 ?
    201B4350 ? 201B4260 ? 0 ?
    insflush+013c bl insidx 88 ?
    insrow+04a0 bl insflush 201B41D4 ? 1 ? 2FF1DE48 ?
    insdrv+0450 bl insrow 201B41D4 ? 2FF1DE48 ? 0 ?
    insexe+04ec bl insdrv 201B41D4 ?
    opiexe+1f2c bl insexe 63406C80 ? 3 ?
    opiall0+0c60 bl opiexe 4 ? 2 ? 2FF1F7F0 ?
    kpoal8+0678 bl opiall0 5E ? 22 ? 2FF1FAA8 ? 0 ?
    2FF1FA50 ? 20121CB8 ? 5EB ?
    4422022 ?
    opiodr+0668 bl _ptrgl
    ttcpip+09d8 bl _ptrgl
    opitsk+066c bl ttcpip 57B ? 200AEA88 ? 2FF21288 ?
    7FF ? 1 ? 0 ? 20067B70 ? 4C ?
    opiino+061c bl opitsk 2000CE18 ?
    opiodr+0668 bl _ptrgl
    opidrv+0450 bl opiodr 3C ? 4 ? 2FF229C8 ? 0 ?
    sou2o+0028 bl opidrv 3C ? 4 ? 2FF229C8 ?
    main+0130 bl sou2o 0 ? A0 ? 2FF22890 ? 0 ?
    __start+0088 bl main 2 ? 2FF22A38 ?
    ----- Argument/Register Address Dump -----
    Argument/Register addr=1.
    Dump of memory from 0x0 to 0x101
    000 00000000 00000000 00000000 00000000 [................]
    Repeat 15 times
    100 7C7243A6 [|rC.]
    Argument/Register addr=110276cd.
    Dump of memory from 0x1102768D to 0x110277CD
    11027680 4BFFFCA5 [K...]
    11027690 2C030000 40820020 3B5A0001 80010040 [,...@.. ;Z.....@]
    110276A0 3B390001 7C1A0040 4180FDF8 80610050 [;9..|[email protected]]
    110276B0 48000010 4BFD2989 60000000 38600001 [H...K.).`...8`..]
    110276C0 800100A8 818100A4 382100A0 7C0803A6 [........8!..|...]
    110276D0 BA21FFC4 7D808120 4E800020 00000000 [.!..}.. N.. ....]
    110276E0 00002043 800F0600 00000000 000002D8 [.. C............]
    110276F0 00096472 65696931 696E7300 BE21FFC4 [..dreii1ins..!..]
    11027700 607F0000 7C0802A6 7D800026 90010008 [`...|...}..&....]
    11027710 8003000C 91810004 2C000000 9421EF70 [........,....!.p]
    11027720 408207A0 60960000 83DF0000 60B50000 [@...`.......`...]
    <and go on>
    this file is huge, I just copy/paste the first part. I hope it helps.
    Thanks a lot, Sri.
    Robert

  • Calling an Oracle Report from a database trigger

    At the moment I have an Oracle form with a timer checking a table for new orders. when
    the form finds new orders an oracle report is run from the form (sending it to the printer directly) with the run_product procedure with parameters being passed also.
    Is there a way to run the report directly from a database/table trigger (also passing parameters)? or failing that how about a batch file or something.
    Info:
    I am using forms/reports 6.
    I believe the database is 7.x
    Cheers,
    Simon
    null

    hello,
    assuming you are using the oracle reports server, you can use UTIL_HTTP to submit a job to the server using http.
    with oracle9i reports we will introduce a feature called event-based reporting API. a plsql package that allows you not only to submit jobs but also check their status.
    oracle9i reports will be part of iAS Release 2.
    regards,
    the oracle reports

  • Handle Oracle Error from Oracle Forms

    Actually I have a form with all types of validation and Id will be auto-generated by forms.
    Now if any oracle error occures after pre-insert, auto-generated number will generate but record is not saving.
    I want to handle this oracle error in my form and nullify the auto-generated ID forcefully.
    Edited by: Sudipto Nag on Sep 16, 2008 12:07 PM

    The way we handle database error generally is this:
    You should in any case have a NOT NULL constraint on the database column. In the ON-ERROR trigger, we then check for the dbms_error_code value to see, what error message the database returned, after checking for Forms returning the general trigger exception 40735. For example, to trap a NOT NULL constraint voilation, you would do something like this.
    if error_code= 40735 then --Forms error code = "Trigger raised unhandled exception".         
      if dbms_error_code in (-1400, -1407) then --mandatory not null column missing     
        --do something, like alerting the user
      elsif dbms_error_code in (&lt;other DBMS error codes goes here&gt;) then
        --do something else
      end if;
    end if;I believe this is what you are looking for. Hope it helps.
    Regards,
    Jacob

  • Oracle error from to_date in WHERE clause but not in SELECT clause

    If I issue a query like:
    select * from view_1
    where to_date(col1, 'mm/dd/yyyy') > sysdate
    I get an ora-01858 error.
    If I issue a query like
    select to_date(col1, 'mm/dd/yyyy') from view_1
    I don't get any error.
    I've verified the data both visually and using several recommended methods( checking with translate or regular expression), but I can't seem to find any problems with the data.
    Any suggestions for what I should try next?
    cheers,
    dz

    Hi user552575,
    Very strangeNothing mystical, especially if you say that VStudyPatientData is some view. You didn't post its underlying query so one can only guess about what is going on with your queries.
    This is my hypothetical scenario and my guess of what might happen. Consider:
    SQL> create table TStudyPatientData
      2    (SomeKey,
      3     StudyDatasetItemId,
      4     StudyPatientDataValue) as
      5   select rownum,
      6          4232,
      7          '01/12/2008'
      8     from dual
      9  connect by level <= 3;
    Table created.
    SQL> -- Now, let's insert row with incorrect date
    SQL> insert into TStudyPatientData values (4, 4232, 'AA/12/2008');
    1 row created.Here is what we have in TStudyPatientData:
    SQL> select * from TStudyPatientData;
       SOMEKEY STUDYDATASETITEMID STUDYPATIE
             1               4232 01/12/2008
             2               4232 01/12/2008
             3               4232 01/12/2008
             4               4232 AA/12/2008Now, let's create one extra "lookup" table and our hypothetical view:
    SQL> create table SomeTable (x, y) as
      2  select 4232, 4 from dual;
    Table created.
    SQL> create or replace view VStudyPatientData as
      2  select a.*
      3    from TStudyPatientData a
      4   where a.SomeKey <
      5         (select b.y
      6            from SomeTable b
      7           where b.x = a.StudyDatasetItemId);
    View created.It's clear that our simple view will return three rows (row with SomeKey = 4 won't be returned):
    SQL> select * from VStudyPatientData;
       SOMEKEY STUDYDATASETITEMID STUDYPATIE
             1               4232 01/12/2008
             2               4232 01/12/2008
             3               4232 01/12/2008Now, let's see what happens about your queries. This one will succeed:
    SQL> select to_date(StudyPatientDataValue, 'MM/DD/YYYY')
      2    from VStudyPatientData
      3   where StudyDatasetItemId = 4232
      4     and StudyPatientDataValue is not null;
    TO_DATE(S
    12-JAN-08
    12-JAN-08
    12-JAN-08But this one fails, just as in your case:
    SQL> select *
      2    from VStudyPatientData
      3   where StudyDatasetItemId = 4232
      4     and StudyPatientDataValue is not null
      5     and to_date(StudyPatientDatavalue, 'MM/DD/YYYY') > sysdate;
    ERROR:
    ORA-01858: a non-numeric character was found where a numeric was expected
    no rows selectedSo how did this happen? Once we have query execution plans, the answer is obvious. Let's start with "good" query:
    SQL> explain plan for
      2  select to_date(StudyPatientDataValue, 'MM/DD/YYYY')
      3    from VStudyPatientData
      4   where StudyDatasetItemId = 4232
      5     and StudyPatientDataValue is not null;
    Explained.
    SQL> @utlxpls
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name              | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |                    |       |       |       |
    |*  1 |  FILTER              |                    |       |       |       |
    |*  2 |   TABLE ACCESS FULL  | TSTUDYPATIENTDATA  |       |       |       |
    |*  3 |   TABLE ACCESS FULL  | SOMETABLE          |       |       |       |
    Predicate Information (identified by operation id):
       1 - filter("SYS_ALIAS_1"."SOMEKEY"< (SELECT "B"."Y" FROM "SOMETABLE"
                  "B" WHERE "B"."X"=:B1))
       2 - filter("SYS_ALIAS_1"."STUDYPATIENTDATAVALUE" IS NOT NULL AND
                  "SYS_ALIAS_1"."STUDYDATASETITEMID"=4232)
       3 - filter("B"."X"=:B1)
    Note: rule based optimization
    20 rows selected.Take a close look at FILTER operation (with Id = 1). It filters out rows which do not satisfy subquery within a view (where a.SomeKey < (select ... )). Thus, row with incorrect date (AA/12/2008) is simply filtered out.
    But what happens with "bad" query? Let's see:
    SQL> explain plan for
      2  select *
      3    from VStudyPatientData
      4   where StudyDatasetItemId = 4232
      5     and StudyPatientDataValue is not null
      6     and to_date(StudyPatientDatavalue, 'MM/DD/YYYY') > sysdate;
    Explained.
    SQL> @utlxpls
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name              | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |                    |       |       |       |
    |*  1 |  FILTER              |                    |       |       |       |
    |*  2 |   TABLE ACCESS FULL  | TSTUDYPATIENTDATA  |       |       |       |
    |*  3 |   TABLE ACCESS FULL  | SOMETABLE          |       |       |       |
    Predicate Information (identified by operation id):
       1 - filter("SYS_ALIAS_1"."SOMEKEY"< (SELECT "B"."Y" FROM "SOMETABLE"
                  "B" WHERE "B"."X"=:B1))
       2 - filter(TO_DATE("SYS_ALIAS_1"."STUDYPATIENTDATAVALUE",'MM/DD/YYYY')>S
    YSDATE@! AND "SYS_ALIAS_1"."STUDYPATIENTDATAVALUE" IS NOT NULL AND
                  "SYS_ALIAS_1"."STUDYDATASETITEMID"=4232)
       3 - filter("B"."X"=:B1)
    Note: rule based optimization
    21 rows selected.Please notice the second step of the plan (with Id = 2) and the corresponding filtering predicates (especially the one I've marked bold). As we can see, TO_DATE(...) > SYSDATE predicate is evaluated at very first stage, before subquery filtering is done.
    In general, Oracle tries to evaluate single-table predicates first, before evaluating joins and subqueries. In our case, this means that Oracle tries to apply TO_DATE(...) to every row in TStudyPatientData, and it throws exception as soon as it reaches 'AA/12/2008' value.
    Of course, this is hypothetical scenario - I haven't seen your view text so the best I can do is guess.
    However, as you can see, everything is possible with views and, without seeing query plans, it can be hard to understand what is going on.
    Regards.

  • How 2 invoke an oracle form from a database procedure?

    I have a procedure.When i run the procedure itt invokes an oracle form. This procedure is a database procedure.
    Is this possible? if possible how?

    I have the url to launch the forms application...
    can that url be invoked by a procedure?

  • Setting up new dbname/sid while creating oracle db from rman backups in 11g

    Hi all,
    I have rman backups and need to create another database from rman backups with different name... but it is unsuccessful..
    created instance with new db...
    running create new db connecting rman auxiliary sys/password@newdb
    run {
    SET NEWNAME FOR DATAFILE 1 TO 'F:\app\HOME\oradata\clonedb1\SYSTEM01.DBF';
    SET NEWNAME FOR DATAFILE 2 TO 'F:\app\HOME\oradata\clonedb1\SYSAUX01.DBF';
    SET NEWNAME FOR DATAFILE 3 TO 'F:\app\HOME\oradata\clonedb1\UNDOTBS01.DBF';
    SET NEWNAME FOR DATAFILE 4 TO 'F:\app\HOME\oradata\clonedb1\USERS01.DBF';
    SET NEWNAME FOR DATAFILE 5 TO 'F:\app\HOME\oradata\clonedb1\EXAMPLE01.DBF';
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';
    DUPLICATE DATABASE TO clonedb
    pfile 'D:\TESTDELETE\initclonedb1.ora'
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'
    LOGFILE GROUP 1 ('F:\APP\HOME\ORADATA\ORCL\REDO01.LOG') SIZE 60M REUSE,
    GROUP 2 ('F:\APP\HOME\ORADATA\ORCL\REDO02.LOG.rdo') SIZE 60M REUSE,
    GROUP 3 ('F:\APP\HOME\ORADATA\ORCL\REDO03.LOG') SIZE 60M REUSE;
    Error it shown is in rman backup creation is as follows
    <part>>
    sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN
    duplicate'' scope=spfile
    Oracle instance shut down
    Oracle instance started
    Total System Global Area 640286720 bytes
    Fixed Size 1376492 bytes
    Variable Size 314576660 bytes
    Database Buffers 318767104 bytes
    Redo Buffers 5566464 bytes
    Starting restore at 20-DEC-11
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=133 device type=DISK
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
    output file name=F:\APP\HOME\ORADATA\CLONEDB1\CONTROL01.CTL
    output file name=F:\APP\HOME\FLASH_RECOVERY_AREA\CLONEDB1\CONTROL02.CTL
    Finished restore at 20-DEC-11
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 12/20/2011 07:07:11
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06136: ORACLE error from auxiliary database: ORA-01102: cannot mount databa
    se in EXCLUSIVE mode
    RMAN> EXIT
    how can i prevent rman setting db_name=orcl which is already exists in the db.. i need to create db from rman backups with different dbname...
    whould someone help me out, how can i create database from another database rman backups with different dbname/sid on same host..
    My pfile has new db_name , but while db creation rman setting to db_name to source dbname.. it should be new db name that i want create with new db name...
    is there any RMAN command to specify new DB name it should set while running
    sql statement: alter system set db_name = newdbname -- as part rman script execution...
    it appears to be i should not touch the soruce db.. i have access to only source db rman backups and need to create another db with different dbname/sid.. please do help...

    When you performing RMAN duplicate why you making your script so complicated?
    Your instance name and DB name can be different, But what is the contents in your pfile "D:\TESTDELETE\initclonedb1.ora" ? please do post
    Have you started any other services related to ORACLE? check in start --> run --> services.msc any other active oracles services, Make sure you have clonedb1.
    Startup in nomount
    check the connectivity to target server.
    SET NEWNAME FOR TEMPFILE 1 TO 'F:\app\HOME\oradata\clonedb1\TEMP01.DBF';Why you mentioning SET NEWNAME FOR DATAFILE ? You have option of db_file_name_convert/log_file_name_convert in case if your file system different in Target & auxiliary.
    BACKUP LOCATION 'F:\app\HOME\flash_recovery_area\orcl\'When you have backup in same location why you are mentioning this clause?
    First run duplicate from auxiliary server as
    rman target sys/*****@prod auxiliary /
    RMAN> duplicate target database to "db_name";
    Am not sure what you are trying to do. is it 11gR1 or 11gR2?
    You have option of duplicate from active database without having backup also..
    here some links please check it.
    http://docs.oracle.com/cd/E14072_01/backup.112/e10642/rcmdupdb.htm#BGBFDJHB
    RMAN 11GR2 : DUPLICATE WITHOUT CONNECTING TO TARGET DATABASE [ID 874352.1]
    knowledgespring      
         Newbie
    Handle:      knowledgespring
    Status Level:      Newbie (10)
    Registered:      Dec 26, 2007
    Total Posts:      243
    Total Questions:      77 (75 unresolved)
    So sad that forum was able to help only in two answers out of your 77 questions :(
    Edited by: CKPT on Dec 21, 2011 5:12 PM

  • Control file failed error while duplicating database using RMAN

    I am using oracle database 10g R2 and trying to make a clone of the source database orcl on the same machine but with different directory structure with the name of test.
    When i run the duplicate command to create test database, then following error is generted:
    D:\>rman target sys@orcl nocatalog auxiliary /
    Recovery Manager: Release 10.2.0.1.0 - Production on Fri Nov 11 12:13:26 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    target database Password:
    connected to target database: ORCL (DBID=1264668332)
    using target database control file instead of recovery catalog
    connected to auxiliary database: TEST (not mounted)
    RMAN> @script.txt
    RMAN> Run {
    2> Allocate channel C1 type disk;
    3> allocate auxiliary channel 'adisk_0' type DISK;
    4> duplicate target database to "test";
    5> #BACKUP INCREMENTAL LEVEL 1 DATABASE;
    6> #BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
    7> #BACKUP INCREMENTAL LEVEL 0 DATABASE;
    8> #delete obsolete;
    9> }
    allocated channel: C1
    channel C1: sid=140 devtype=DISK
    allocated channel: adisk_0
    channel adisk_0: sid=157 devtype=DISK
    Starting Duplicate Db at 11-NOV-11
    contents of Memory Script:
       set until scn  12926250;
       set newname for datafile  1 to
    "D:\TEST\ORADATA\SYSTEM01.DBF";
       set newname for datafile  2 to
    "D:\TEST\ORADATA\UNDOTBS01.DBF";
       set newname for datafile  3 to
    "D:\TEST\ORADATA\SYSAUX01.DBF";
       set newname for datafile  4 to
    "D:\TEST\ORADATA\USERS01.DBF";
       set newname for datafile  5 to
    "D:\TEST\ORADATA\EXAMPLE01.DBF";
       set newname for datafile  6 to
    "D:\TEST\ORADATA\GL.DBF";
       restore
       check readonly
       clone database
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 11-NOV-11
    channel adisk_0: starting datafile backupset restore
    channel adisk_0: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to D:\TEST\ORADATA\SYSTEM01.DBF
    restoring datafile 00002 to D:\TEST\ORADATA\UNDOTBS01.DBF
    restoring datafile 00003 to D:\TEST\ORADATA\SYSAUX01.DBF
    restoring datafile 00004 to D:\TEST\ORADATA\USERS01.DBF
    restoring datafile 00005 to D:\TEST\ORADATA\EXAMPLE01.DBF
    restoring datafile 00006 to D:\TEST\ORADATA\GL.DBF
    channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ
    P
    channel adisk_0: restored backup piece 1
    piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ44MH4_.BKP tag=TAG20111107T220
    channel adisk_0: restore complete, elapsed time: 00:01:46
    Finished restore at 11-NOV-11
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
      MAXLOGFILES     16
      MAXLOGMEMBERS      3
      MAXDATAFILES      100
      MAXINSTANCES     8
      MAXLOGHISTORY      292
    LOGFILE
      GROUP  1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M  REUSE,
      GROUP  2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M  REUSE,
      GROUP  3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M  REUSE
    DATAFILE
      'D:\TEST\ORADATA\SYSTEM01.DBF'
    CHARACTER SET WE8MSWIN1252
    contents of Memory Script:
       switch clone datafile all;
    executing Memory Script
    datafile 2 switched to datafile copy
    input datafile copy recid=1 stamp=766930525 filename=D:\TEST\ORADATA\UNDOTBS01.DBF
    datafile 3 switched to datafile copy
    input datafile copy recid=2 stamp=766930525 filename=D:\TEST\ORADATA\SYSAUX01.DBF
    datafile 4 switched to datafile copy
    input datafile copy recid=3 stamp=766930526 filename=D:\TEST\ORADATA\USERS01.DBF
    datafile 5 switched to datafile copy
    input datafile copy recid=4 stamp=766930526 filename=D:\TEST\ORADATA\EXAMPLE01.DBF
    datafile 6 switched to datafile copy
    input datafile copy recid=5 stamp=766930526 filename=D:\TEST\ORADATA\GL.DBF
    contents of Memory Script:
       set until scn  12926250;
       recover
       clone database
        delete archivelog
    executing Memory Script
    executing command: SET until clause
    Starting recover at 11-NOV-11
    channel adisk_0: starting incremental datafile backupset restore
    channel adisk_0: specifying datafile(s) to restore from backup set
    destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
    destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
    destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
    destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
    destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
    destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
    channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7CO
    P
    channel adisk_0: restored backup piece 1
    piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7COGJZVT_.BKP tag=TAG20111109T223
    channel adisk_0: restore complete, elapsed time: 00:00:07
    channel adisk_0: starting incremental datafile backupset restore
    channel adisk_0: specifying datafile(s) to restore from backup set
    destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
    destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
    destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
    destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
    destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
    destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
    channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR
    P
    channel adisk_0: restored backup piece 1
    piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR1MQFO_.BKP tag=TAG20111110T221
    channel adisk_0: restore complete, elapsed time: 00:00:16
    starting media recovery
    archive log thread 1 sequence 524 is already on disk as file D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CS
    C
    archive log filename=D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CSG2HVT_.ARC thread=1 sequence=524
    media recovery complete, elapsed time: 00:00:14
    Finished recover at 11-NOV-11
    contents of Memory Script:
       shutdown clone;
       startup clone nomount ;
    executing Memory Script
    database dismounted
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area     230686720 bytes
    Fixed Size                     1248236 bytes
    Variable Size                 67109908 bytes
    Database Buffers             155189248 bytes
    Redo Buffers                   7139328 bytes
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
      MAXLOGFILES     16
      MAXLOGMEMBERS      3
      MAXDATAFILES      100
      MAXINSTANCES     8
      MAXLOGHISTORY      292
    LOGFILE
      GROUP  1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M  REUSE,
      GROUP  2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M  REUSE,
      GROUP  3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M  REUSE
    DATAFILE
      'D:\TEST\ORADATA\SYSTEM01.DBF'
    CHARACTER SET WE8MSWIN1252
    released channel: C1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/11/2011 12:16:21
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
    RMAN> **end-of-file**
    Script.txt
    Run {
    Allocate channel C1 type disk;
    allocate auxiliary channel 'adisk_0' type DISK;
    duplicate target database to "test";
    }Kindly help?

    Moazzam wrote:
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
    Kindly help?>Please check what is the value of parameter db_name in the standby database? It should be match with TEST name
    Cheers

Maybe you are looking for

  • How to get out of fullscreen exclusive mode?

    I have a program that runs in full screen exclusive mode, I'd like the program to start up in windowed mode instead. I spent several hours trying to make it run in window mode, but I can't seem to figure it out :/ Here's the code:         if (graphic

  • Cooling fan on OS X 10.7.5 runs at high all the time. Have tried SMC reset, putting it to sleep

    Cooling fan on Mac desktop OS X 10.7.5 will not turn off. have tried resetting SMC, putting to sleep and force quit programs. Started after replacement of hard drive and LCD cable. Please help! Thanks!

  • Creation ofcondition records

    Dear all, What is the difference in creating condition records in COB1 with respect to MBC1, usually we use COB1 when we want the batch determination to take place in process order and we use MBC1 if we want to have batch determination during goods i

  • JDeveloper Connections AQ Setup?

    We are still using BPEL & JDeveloper 10.1.2 . I'm trying to set up a AQ service in JDeveloper so I can use it in the Partner Link wizard. Can someone either explain the steps required, or point me to a URL that explains how to set up the AQ service.

  • FXO Issues

    Howdy, Short story long... Currently I am using a VG200 with an VIC-2FXO. This VG200 is configured for MGCP in relation to dial-plan and signalling between it and a CCM cluster. I have setup the VIC-2FXO for Loopstart via the CCM, and I seem to get n