"ORA-01203 - wrong creation SCN" got during copy of a db on another machine

Hello colleagues,
I copy a database from a machine to a second one through this procedure:
I set each tablespace (data and temp) in backup mode
I copy the datafiles (data and temp)
I copy the control file
I copy archived redo logs
On the second machine I try to startup the database by the command
On the second machine I try to startup the database but the following errors are got:
SQL> @/usr/Systems/1359HA_9.0.0_Master/HA_EOMS_1_9.0.0_Master/tmp/oracle/CACH
E/apply_redo.sql;
ORACLE instance started.
Total System Global Area 423624704 bytes
Fixed Size 2044552 bytes
Variable Size 209718648 bytes
Database Buffers 209715200 bytes
Redo Buffers 2146304 bytes
Database mounted.
alter database recover automatic from '/usr/Systems/1359HA_9.0.0_Master/HA_EOMS_1_9.0.0_Master/data/warm_rep
l/WarmArchive/CACHE' database until cancel using backup controlfile
but the following errors are got:
SQL> @/usr/Systems/1359HA_9.0.0_Master/HA_EOMS_1_9.0.0_Master/tmp/oracle/CACH
E/apply_redo.sql;
ORACLE instance started.
Total System Global Area 423624704 bytes
Fixed Size 2044552 bytes
Variable Size 209718648 bytes
Database Buffers 209715200 bytes
Redo Buffers 2146304 bytes
Database mounted.
alter database recover automatic from '/usr/Systems/1359HA_9.0.0_Master/HA_EOMS_1_9.0.0_Master/data/warm_rep
l/WarmArchive/CACHE' database until cancel using backup controlfile
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: '/cache/db/db01/system_1.dbf'
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/cache/db/db01/system_1.dbf'
ORA-01203: wrong incarnation of this file - wrong creation SCN
You see the mount command and the error got.
What can I do to troubleshoot the problem?
thanks for the support
Enrico
The complete copy procedure is the following:
#!/bin/ksh
# Step 2 -- Verifying the DBMS ARCHIVELOG mode
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
spool ${ORACLE_TMP_DIR}/archive.log
archive log list;
spool off
EOF
grep NOARCHIVELOG ${ORACLE_TMP_DIR}/archive.log >/dev/null 2>&1
# Step 3 -- Creating DB_filenames.conf / DB_controfile.conf fles
[ -f ${ORACLE_TMP_DIR}/DB_filenames.conf ] && rm -f ${ORACLE_TMP_DIR}/DB_filenames.conf
[ -f ${ORACLE_TMP_DIR}/DB_controfile.conf ] && rm -f ${ORACLE_TMP_DIR}/DB_controfile.conf
[ -f ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf ] && rm -f ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
set linesize 600;
spool ${ORACLE_TMP_DIR}/DB_filenames.conf
select 'TABLESPACE=',tablespace_name from sys.dba_data_files;
select 'FILENAME=',file_name from sys.dba_data_files;
select 'LOGFILE=',MEMBER from v\$logfile;
spool off
EOF
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
set linesize 600;
spool ${ORACLE_TMP_DIR}/DB_controfile.conf
select name from v\$controlfile;
spool off
EOF
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
set linesize 600;
spool ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf
select 'TABLESPACE=',tablespace_name from sys.dba_temp_files;
select 'FILENAME=',file_name from sys.dba_temp_files;
spool off
EOF
note "Executing cp ${ORACLE_TMP_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf ..."
cp ${ORACLE_TMP_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf
[ $? -ne 0 ] && error "Error executing cp ${ORACLE_TMP_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf!"\
     && LocalExit 1
chmod ug+x ${INSTANCE_DATA_DIR}/DB_filenames.conf
note "Executing cp ${ORACLE_TMP_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf ..."
cp ${ORACLE_TMP_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf
[ $? -ne 0 ] && error "Error executing cp ${ORACLE_TMP_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf!"\
     && LocalExit 1
chmod ug+x ${INSTANCE_DATA_DIR}/DB_controfile.conf
note "Executing cp ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf ..."
cp ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf
[ $? -ne 0 ] && error "Error executing cp ${ORACLE_TMP_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf!"\
     && LocalExit 1
chmod ug+x ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf
set -a
set -A arr_tablespace `grep "^TABLESPACE=" ${INSTANCE_DATA_DIR}/DB_filenames.conf | awk '{ print \$2 }'`
index=`grep "^TABLESPACE" ${INSTANCE_DATA_DIR}/DB_filenames.conf | wc -l`
backup_status=0
i=0
while [ $i -lt $index ]
do
note "tablespace=${arr_tablespace[$i]}"
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
set linesize 600;
spool ${ORACLE_TMP_DIR}/tablespace.log
select 'FILENAME=',file_name from sys.dba_data_files where tablespace_name='${arr_tablespace[$i]}';
spool off
alter tablespace ${arr_tablespace[$i]} end backup;
spool ${ORACLE_TMP_DIR}/backup_tablespace.log
alter tablespace ${arr_tablespace[$i]} begin backup;
spool off
EOF
set -A arr_filename `grep "^FILENAME=" ${ORACLE_TMP_DIR}/tablespace.log | awk '{ print \$2 }'`
index1=`grep "^FILENAME" ${ORACLE_TMP_DIR}/tablespace.log | wc -l`
h=0
while [ $h -lt $index1 ]
do
name=`basename ${arr_filename[$h]}`
note "filename = ${arr_filename[$h]}"
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
host compress -c ${arr_filename[$h]} > ${BACKUP_AREA}/$name.Z
EOF
h=`expr $h + 1`
done
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
spool ${ORACLE_TMP_DIR}/backup_tablespace.log
alter tablespace ${arr_tablespace[$i]} end backup;
spool off
EOF
i=`expr $i + 1`
done
[ $backup_status -eq 1 ] && LocalExit 1
set -a
set -A arr_tablespace `grep "^TABLESPACE=" ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf | awk '{ print \$2 }'`
index=`grep "^TABLESPACE" ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf | wc -l`
${ORACLE_TMP_DIR}/tablespace.logi=0
while [ $i -lt $index ]
do
note "tablespace=${arr_tablespace[$i]}"
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
set linesize 600;
spool ${ORACLE_TMP_DIR}/tablespace.log
select 'FILENAME=',file_name from sys.dba_temp_files where tablespace_name='${arr_tablespace[$i]}';
spool off
EOF
set -A arr_filename `grep "^FILENAME=" ${ORACLE_TMP_DIR}/tablespace.log | awk '{ print \$2 }'`
index1=`grep "^FILENAME" ${ORACLE_TMP_DIR}/tablespace.log | wc -l`
h=0
while [ $h -lt $index1 ]
do
name=`basename ${arr_filename[$h]}`
note "filename = ${arr_filename[$h]}"
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
host compress -c ${arr_filename[$h]} > ${BACKUP_AREA}/$name.Z
EOF
h=`expr $h + 1`
done
i=`expr $i + 1`
done
# "log switch & controlfile backup"
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
spool ${ORACLE_TMP_DIR}/backup_controlfile.log
alter database backup controlfile to '${BACKUP_AREA}/ctrl_pm.ctl' reuse;
host chmod a+rw ${BACKUP_AREA}/ctrl_pm.ctl
alter system archive log current;
spool off
spool ${ORACLE_TMP_DIR}/archive_info.log
archive log list;
spool off
EOF
# Step 5 -- Copying the DBMS on the companion node
note "transferring archived redo log files from ACT to SBY host"
name=`grep 'Archive destination' ${ORACLE_TMP_DIR}/archive_info.log| awk '{ print \$3 }'`
set -A vett_logfiles `grep "^LOGFILE=" ${INSTANCE_DATA_DIR}/DB_filenames.conf | awk '{ print \$2 }'`
index=`grep "^LOGFILE" ${INSTANCE_DATA_DIR}/DB_filenames.conf | wc -l`
i=0
while [ $index -gt 0 ]
do
name=`basename ${vett_logfiles[$i]}`
###MOD001
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
host cp ${vett_logfiles[$i]} ${BACKUP_AREA}/$name
host chmod a+rw ${BACKUP_AREA}/$name
EOF
if [ $? -ne 0 ]; then
error "Error copying logfile on LOCAL_BACKUP_AREA"
LocalExit 1
fi
note "log_file=${vett_logfiles[$i]}"
index=`expr $index - 1`
i=`expr $i + 1`
done
note "Executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf 0 -k -ret 2 ..."
RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf 0 -k -ret 2
if [ $? -ne 0 ]; then
error "Error executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_filenames.conf ${INSTANCE_DATA_DIR}/DB_filenames.conf 0 -ret 2!"
LocalExit 1
fi
note "Executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf 0 -k -ret 2 ..."
RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf 0 -k -ret 2
if [ $? -ne 0 ]; then
error "Error executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf ${INSTANCE_DATA_DIR}/DB_TEMP_filenames.conf 0 -ret 2!"
LocalExit 1
fi
note "Executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf 0 -k -ret 2 ..."
RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf 0 -k -ret 2
if [ $? -ne 0 ]; then
error "Error executing RemoteCopy ${COMPANION_HOSTNAME} ${INSTANCE_DATA_DIR}/DB_controfile.conf ${INSTANCE_DATA_DIR}/DB_controfile.conf 0 -k -ret 2!"
LocalExit 1
fi
note "Executing RemoteCopy ${COMPANION_HOSTNAME} ${BACKUP_AREA} ${RECOVER_AREA} 0 -k -ret 2 ..."
RemoteCopy ${COMPANION_HOSTNAME} ${BACKUP_AREA} ${RECOVER_AREA} 0 -k -ret 2

If the Operating system is same :
Working Machine
================
Shutdown the database and copy everything
Copy the init.ora
Copy the pdf,ctl,and log
Copy the bdump, udump etc..
On the second machine
==================
Copy your file in the same path as original i.e
C:\oracle..<dbname>\system.dbf
C:\oracle..<dbname>\system.dbf
Start the database
If your paths in second machine does not match as original update this thread again
Michael
http://mikegeorgiou.blogspot.com

Similar Messages

  • Wrong incarnation of this file - wrong creation SCN

    We currently have a media recovery problem, and the problem seems not to get resolved.
    System is Solaris 10 on a 64bits Sparc with 10.2.4 Oracle database.
    Problem:
    Can't recover from backup and archivelog fiiles.
    We ran "alter database recover" and we got database altered and we open the database. But when query datafile table, the datafile (datafile 14) was still in recovered mode - I don't know how that happed.
    Next, drop tablespace, inlucuding contents and added a new tablespace and the database opened again without error. But this time we still need the data from the old datafile.
    We tried to add the old datafile to the tablespace, then we got "Wrong incarnation of this file - wrong creation SCN".
    Where do we go from here?

    Hemant K Chitale wrote:
    drop tablespace, inlucuding contents and added a new tablespace That was absolutely the wrong thing to do.
    Did you check to see if that datafile had been OFFLINE ? You could have attempted a RECOVER DATAFILE n and then ALTER DATABASE DATAFILE n ONLINE;Yes the datafile was offline
    Given the situation you are in, you cannot add that tablespace back into the database.
    So where do we start from here?
    Your problem statement and the line "We ran "alter database recover"" aren't clear enough. Did you restore the database ? Or did you restore only a datafile ? OR did you not have to restore anything but just did a RECOVER DATABASE ?
    This database does not have RMAN backup, ( the backup system is copy datafile to another folder) but we did a recover and the database recovered - as I said, we got "database alter" after we ran the recover command.
    >
    (if you can restore the database again and re-attempt recovery / online of that datafile, that would be one path to take --- but before you do so, please take another full {preferably COLD} backup of the database as it currently is !)
    Yes, we back it up lastnight.

  • How to copy file from server to another machine in network through JSP

    Hello!
    any body can solve my problem.
    i m working in JSP. i want to copy a file from server on which JSP engine is running to another computer in the same network.
    i used Java File Object to copy file from one machine to another in network. and its working fine on network. but the problem is when i used the same code in web page there is exception which is Access is Denied. what i should do now.
    i m writing the code i m using in my JSP page
    String fileToCopy = "C:/oracle/Apache/Apache/htdocs/FAO/FAO_MiddleFrame.jsp";
         String destinationDir = "\\\\af09\\c";
    File source = new File(fileToCopy);
    String fileName1 = source.getName();
    if ((!destinationDir.endsWith("\\")) && (!destinationDir.endsWith("/"))) {
    destinationDir = destinationDir + "\\";
    File destination = new File(destinationDir + fileName1);
    if (!destination.exists()) {
    if (!destination.createNewFile()) {
    //throw new IOException("Unable to create file. May be you don't have permissions.");
    byte[] buffer = new byte[1024];
    FileInputStream in = new FileInputStream(source);
    FileOutputStream outStream = new FileOutputStream(destination);
    int bytesRead = 0;
    while ((bytesRead = in.read(buffer)) != -1) {
    outStream.write(buffer, 0, bytesRead);
    out.println("File copied successfully ....");
    plz reply me as soon as possible.
    i will be very thankful
    Saad

    Thats the way it works. Cause servlet contaner doesnot allow other machines in the network to access other than machine which it came from as in case of applets. What you can do is if the other machine is also based on webserver or app server .. you can upload the file as it gets to that page do the process.
    I would like to hear more on my comments..
    Suggestions ??
    Ban

  • Ora-12914: cannot create dictionary tablespace during tablespace creation.

    Hi All,
            I am new to Database and trying to create the dictionary tablespace in Database but its showing error like ora-12914: cannot create dictionary tablespace during tablespace creation.
    Do i need to set any parameter for this error?
    Please let me know the cause for this error.
    Regards
    Narender B

    Hi
    from doc.
    12914, 00000, "Cannot migrate tablespace to dictionary managed type"
    // *Cause: Attemp to migrate locally managed tablespace to  dictionary managed
    //         type when the database has locally managed system tablespace.
    // *Action: Command cannot be issued.
    $
    If system tablespace (I think from release 10g) is local management, all tablespaces must be local, dictionary is not possible
    HTH
    Antonio NAVARRO

  • ORA-19645: datafile 17: incremental-start SCN is prior to creation SCN 8180

    hi Experts i m recieved ORA-19645: datafile 17: incremental-start SCN is prior to creation SCN 8180101895458 error durring backup by rman
    can any one explain what may b the cause of this
    my database version is 10g(10.2.0.4) O/S AIX 6.1
    pls help me out

    19645, 00000, "datafile %s: incremental-start SCN is prior to creation SCN %s"
    // *Cause:  The incremental-start SCN which was specified when starting an
    //          incremental datafile backup is less than the datafile's
    //          creation SCN.
    // *Action: Specify a larger incremental-start SCN.

  • ORA-00932: inconsistent datatypes: expected - got -

    Hi,
    I have writen PL/SQL packages for data loging through pipe lined function for better peformance.The below packages has been compiled sucessfully but during the run time it shows an error
    like "ORA-00932: inconsistent datatypes: expected - got -".
    CREATE OR REPLACE PACKAGE pkg_mkt_hub_load
    AS
         PROCEDURE sp_final_load_mkt_hub;
           FUNCTION fnc_pipe_tot_lvl_idx_mon_hub
        (pi_input_cur IN SYS_REFCURSOR)
       RETURN tot_lvl_idx_mon_tt
       PIPELINED;
    END pkg_mkt_hub_load;
    CREATE OR REPLACE PACKAGE BODY pkg_mkt_hub_load
    AS
      c_default_limit CONSTANT PLS_INTEGER:=5000;
      c_created_dt    CONSTANT DATE:=SYSDATE;
      c_created_user  CONSTANT VARCHAR2(20):='SYSTEM';
      c_updated_dt    CONSTANT DATE:=SYSDATE;
      c_updated_user  CONSTANT VARCHAR2(20):='SYSTEM';
      -- to get the debug desc for updating process log table
      vg_debug_log_desc mkt_process_log.debug_log_desc%TYPE;
      --to get process log key
      vg_process_log_ky mkt_process_log.process_log_ky%TYPE;
       -- reset the all variables.
      PROCEDURE sp_reset_global_variables;
      PROCEDURE sp_final_lvl_idx_mon_hub;
      --PROCEDURE sp_final_lvl_idx_dly_hub;
      FUNCTION fnc_pipe_tot_lvl_idx_mon_hub
        (pi_input_cur IN SYS_REFCURSOR)
       RETURN tot_lvl_idx_mon_tt
       PIPELINED
      AS
       vl_lvl_idx_mon_cur_data tot_lvl_idx_mon_tt;
       BEGIN
         LOOP
          FETCH pi_input_cur BULK COLLECT INTO vl_lvl_idx_mon_cur_data LIMIT c_default_limit;
          EXIT WHEN vl_lvl_idx_mon_cur_data.COUNT = 0;
          FOR i IN 1 .. vl_lvl_idx_mon_cur_data.COUNT
          LOOP
            PIPE ROW (tot_lvl_idx_mon_ot(vl_lvl_idx_mon_cur_data(i).SSIA_INDEX_ID,
            vl_lvl_idx_mon_cur_data(i).start_date,vl_lvl_idx_mon_cur_data(i).currency,
          vl_lvl_idx_mon_cur_data(i).level1,vl_lvl_idx_mon_cur_data(i).type,
          vl_lvl_idx_mon_cur_data(i).RETURN_MONTH,vl_lvl_idx_mon_cur_data(i).RETURN_3MONTHS,
          vl_lvl_idx_mon_cur_data(i).RETURN_6MONTHS,vl_lvl_idx_mon_cur_data(i).RETURN_YTD,
          vl_lvl_idx_mon_cur_data(i).RETURN_1YEAR,vl_lvl_idx_mon_cur_data(i).RETURN_3YEARS,
          vl_lvl_idx_mon_cur_data(i).RETURN_5YEARS,vl_lvl_idx_mon_cur_data(i).RETURN_10YEARS,
          vl_lvl_idx_mon_cur_data(i).MARKET_CAP));
          END LOOP;
          END LOOP;
          CLOSE pi_input_cur;
          RETURN;
       END fnc_pipe_tot_lvl_idx_mon_hub;     
       PROCEDURE sp_final_lvl_idx_mon_hub
       AS
       BEGIN
       MERGE INTO mkt_total_lvl_indx_mon_hub idxhub  
       USING TABLE(pkg_mkt_hub_load.fnc_pipe_tot_lvl_idx_mon_hub(CURSOR(SELECT idxmap.ssia_index_code,idxstg.start_date,idxstg.currency,idxstg.level1,idxstg.type,
           idxstg.return_month,idxstg.return_3months, idxstg.return_6months, idxstg.return_ytd, idxstg.return_1year,
           idxstg.return_3years, idxstg.return_5years,idxstg.return_10years,idxstg.market_cap
         FROM   mkt_total_lvl_indx_mon_stg idxstg,
                 md_vendor_index_map idxmap
         WHERE  idxmap.source = idxstg.source
                 AND idxmap.base_currency = idxstg.currency
                 AND idxmap.return_type = idxstg.TYPE
                 AND idxmap.mkt_index_id = idxstg.vendor_code
                 AND idxmap.monthly = 'Y'
                 AND idxmap.file_type = 'T'))) idxmonstg
         ON (idxhub.ssia_index_id=idxmonstg.ssia_index_id)
         WHEN MATCHED THEN
         UPDATE set effective_date=idxmonstg.start_date,
                      CURRENCY=idxmonstg.currency,
                      INDEX_LEVEL=idxmonstg.LEVEL1,
                      TYPE=idxmonstg.type,
                      return_month=idxmonstg.return_month,
                      return_3months=idxmonstg.return_3months,
                      return_6months=idxmonstg.return_6months,
                      return_ytd=idxmonstg.return_ytd,
                      return_1year=idxmonstg.return_1year,
                      return_3years=idxmonstg.return_3years,
                      return_5years=idxmonstg.return_5years,
                      return_10years=idxmonstg.return_10years,
                      market_cap=idxmonstg.market_cap,
                      updated_dt=SYSDATE,
                      updated_user='MICHAEL'
         WHEN NOT MATCHED THEN
          INSERT (  ssia_index_id,
                    effective_date,
                      currency,
                      INDEX_LEVEL,
                      TYPE,
                      return_month,
                      return_3months,
                      return_6months,
                      return_ytd,
                      return_1year,
                      return_3years,
                      return_5years,
                      return_10years,
                      market_cap,
                      created_dt,
                      created_user)
         VALUES(        idxmonstg.ssia_index_id,
                      idxmonstg.start_date,
                      idxmonstg.currency,
                      idxmonstg.LEVEL1,
                      idxmonstg.type,
                      idxmonstg.return_month,
                      idxmonstg.return_3months,
                      idxmonstg.return_6months,
                      idxmonstg.return_ytd,
                      idxmonstg.return_1year,
                      idxmonstg.return_3years,
                      idxmonstg.return_5years,
                      idxmonstg.return_10years,
                      idxmonstg.market_cap,
                   SYSDATE,
                   'MICHAEL');     
       END sp_final_lvl_idx_mon_hub;
       PROCEDURE sp_final_load_mkt_hub
       as
       BEGIN
        sp_final_lvl_idx_mon_hub;
       END sp_final_load_mkt_hub;
       PROCEDURE Sp_reset_global_variables
       AS
       BEGIN
       vg_debug_log_desc := NULL;
       END sp_reset_global_variables;      
    END pkg_mkt_hub_load;
    SHOW ERRORS  Error:
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got -
    ORA-06512: at "GPAIHMKTDTA.PKG_MKT_HUB_LOAD", line 33
    ORA-06512: at "GPAIHMKTDTA.PKG_MKT_HUB_LOAD", line 55
    ORA-06512: at "GPAIHMKTDTA.PKG_MKT_HUB_LOAD", line 92
    ORA-06512: at line 1
    types scripts:
    create or replace type tot_lvl_idx_mon_ot as object
    (SSIA_INDEX_ID  VARCHAR2(60),
    start_date date,
    CURRENCY               VARCHAR2(10),
    LEVEL1                  NUMBER(31,11),
    TYPE                    VARCHAR2(31) ,
    RETURN_MONTH            NUMBER(31,11),
    RETURN_3MONTHS          NUMBER(31,11),
    RETURN_6MONTHS          NUMBER(31,11),
    RETURN_YTD              NUMBER(31,11),
    RETURN_1YEAR            NUMBER(31,11),
    RETURN_3YEARS           NUMBER(31,11),
    RETURN_5YEARS           NUMBER(31,11),
    RETURN_10YEARS          NUMBER(31,11),
    MARKET_CAP              NUMBER(31,11));
    create or replace type tot_lvl_idx_mon_tt is table of tot_lvl_idx_mon_ot;how to resolve this issue?

    >
    could you please pointed out whether ref cursor used method correct or not?
    >
    The use looks correct but without your tables and DDL we can't even try to reproduce the problem.
    Notice how you had to break down the process to find out the query that is causing the problem?
    select *
    from TABLE(pkg_mkt_hub_load.fnc_pipe_tot_lvl_idx_mon_hub(CURSOR(SELECT . . .Unfortunately, this is where you should have started when you began creating the process.
    You are trying to design, implement and debug a process using code that has 3,4, 5 or more layers and objects and tables that have a dozen or more columns.
    That is not the way I would recommend especially if you do not have experience with some of the pieces like object types and tables, pipelined functions and ref cursors. You are trying to deal with too many complications at the same time.
    Here is how I would approach this if I were you.
    1. Get the process to work first and then build on it. Start by copying and hacking up what you already have.
    2. Create a very simple version of each of the pieces
    3. Create an object type like 'tot_lvl_idx_mon_ot' with only one or two columns.
    4. Create an object type like 'tot_lvl_idx_mon_tt' as a table of that simple object type
    5. Create a pipelined function that uses the two new simple types, simply hard-codes a value for one or two rows and then pipes out the rows.
    6. Use a simple query like the last one you posted to query the simple pipelined function
    select *
    from TABLE(pkg_mkt_hub_load.simpe_pipeline_function(CURSOR(SELECT . . .Work on that simple set of objects until you have the process defined and working.
    Then expand the now working example to use get the data values dynamically and to use more complicated objects.
    Start with something simple that works. Then build on it.
    It will take a lot less time and will point out other issues with your approach to this. Also, if you try a simple version using the SCOTT emp or dept table and it doesn't work you can post the code and we can try to reproduce it and help find the problem.

  • ORA-19906: recovery target incarnation changed during recovery

    Hi All,
    I am doing a simple clone from hot backup(copy files,create control file ,recovery etc..)
    After control file creation, when i fire recovery and supply an archive log , i am getting below error ,please note RMAN is nowhere in picture in may case. I referred some notes but none of these seem to be relevant, any clues:
    SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
    ORA-00279: change 4762493 generated at 10/06/2011 21:00:05 needed for thread 1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/OTMPRS/archivelog/2011_10_07/o1_mf_1_278_%u_
    .arc
    ORA-00280: change 4762493 for thread 1 is in sequence #278
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /home/oracle/o1_mf_1_278_78wqrfsx_.arc
    ORA-00283: recovery session canceled due to errors
    ORA-19906: recovery target incarnation changed during recovery

    796808 wrote:
    SQL> select INCARNATION#, RESETLOGS_TIME from V$DATABASE_INCARNATION order by RESETLOGS_TIME ;
    INCARNATION# RESETLOGS
    1 15-SEP-11
    2 03-OCT-11I suggest u you to clone the database using the active duplicate command which runs on 11g. It requires no rman backup and very simple to create the clone . check the below link for active clonning ...
    http://www.orafaq.com/node/2383
    Hope this help you
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Automatic creation of po during goods receipt

    Dear all,
    po has not been created, but while receiving the material i want automatic generation of po. i have some knowledge about it but it is not working. Can some one send detailed information. with navigation details. Tips that are posted on the sdn is not working.
    Regards

    Hi
    Pl Make sure you have done following settings for the Automatic Creation of PO during GR:
    1) In SPRO ---> Enterprise Structure ---> Assignment -
    >  Material Management ---> Assign Std. Purchase Org. to your Plant...
    2) In Material Master -
    > Purchasing View -
    > Pl. Check. Automatic PO check Box   and  Maintain Purchasing Group....
    3)Create your Vendor for oyur Company Code and  Std. Pur. Org. combination and in that Vendor Master -> Purchasing Data View--- > Pl. Check Auto. PO Check Box...
    4)For your Vendor -Material Master - Plant -Std. Pur. Org combination Maintain valid Info record...
    5)In OLMB --->  Goods Receipt -
    > Automatic Creation of PO ---> for the M.Type:101  pl. check  Auto PO check Box
    6) In OLMB ---> Movement types ---> Copy,Delete, Check M.Types ---> Choose the M.Type:101   and go into Details -
    > Then goto  allowed Fields for M.Types for M.Type:101 --->  there for the M.Type:101   make the field   LIFNR as a Mandatoty field...
    If you have done the above settings properly...then  in  MIGO ---> Choose Transaction GR  and referance as Others
      and do the GR....Make sure you are doing GR with M.Type:101....and yougive the Vendor's name during   GR....
    Now If you save the GR ...automatically PO will be created...
    this you can see it by displaying the MIGO Document..
    Reward if useful
    Regards
    S.baskaran

  • Error during copy of partner: Partner role VN

    I am creating an Inbound Delivery from an Outbound using SPED output type on the Outbound Delivery.
    When I process the output using vl71 I get the following error.
    Can anyone tell me what im missing.
    The same scenario works for other plants except this one, its between 2 new plants in a new company code.
    What do i do?
    Type Message text
         Object 0080011663
         Output type: Stk.Transf.CrteDeliv
         Processing log for program /SPE/STO_ID_PROCESSING routine STO_ID_CREATION
         Error during copy of partner: Partner role VN
         Error during copy of partner: Partner role VN
         Error during copy of partner: Partner role VN
         No inbound delivery created for the replenishment delivery 0080011663

    This issue has been resolved.
    I recreated the Vendor from scratch and switched plant config settings to the new Vendor and entered the new vendor number in the Customer and retried the process. It works.
    So i think there was something wrong with the initial Vendor setup.(Though i checked view by view and didnt find any difference)

  • ORA-26687: no instantiation SCN provided for ... in source database ...

    We are testing streams on Databases between our Main and Branch Campus. We set up the Capture, Propagation and the Apply for the databases and receive the error on the Apply process when doing an insert:
    ORA-26687: no instantiation SCN provided for [TABLE] in source database [DATABASE]
    We are running Oracle 10.2.0.2.0
    Thank you in advance for your help.

    At source, execute the following as strmadmin
    SELECT * FROM DBA_CAPTURE_PREPARED_TABLES;
    Get the SCN for the correspoing table and use at destination
    At destination:
    BEGIN
    DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN (
    source_object_name => 'schema.tablename',
    source_database_name => 'global db name of source',
    instantiation_scn => &iscn);
    END;
    Enter iscn that you got at souce.
    Retry the error. This will work.

  • ORA-00932: inconsistent datatypes: expected - got SCOTT.TEST_T

    I am trying to copy the data from one tabel t Other table. Both are located in diffrent schemas.
    while doing so, i am getting the below error.
    CONN SCOTT/TIGER
    CREATE OR REPLACE TYPE  TEST_T AS TABLE OF VARCHAR2(20);
    CREATE TABLE TEST_TAB
    (ID NUMBER,
    NAME TEST_T,
    LOCATION VARCHAR2(100)
    GRANT SELECT ON TEST_TAB TO LOCALUSR;
    GRANT EXECUTE ON TEST_T TO LOCALUSR;
    CONN LOCALUSR/LOCALUSR
    CREATE OR REPLACE TYPE  TEST_T AS TABLE OF VARCHAR2(20);
    CREATE TABLE TEST_TAB
    (ID NUMBER,
    NAME TEST_T,
    LOCATION VARCHAR2(100)
    INSERT INTO TEST_TAB
    SELECT * FROM SCOTT.TEST_TAB;
    ORA-00932: inconsistent datatypes: expected - got SCOTT.TEST_T Pls suggest.
    Raj
    Edited by: KrChowdary on Jun 11, 2009 12:52 PM

    You have two different objects (one for localuser and one for scott) which you might think are identical but they are not. Basically it is the same as
    SQL> create or replace type test_t as table of varchar2 (20)
    Type created.
    SQL> create table test_tab (id      number, name    test_t, location varchar2 (100))
    nested table name store as nested_tab
       return as value
    Table created.
    SQL> create or replace type test2_t as table of varchar2 (20)
    Type created.
    SQL> create table test2_tab (id      number, name    test2_t, location varchar2 (100))
    nested table name store as nested2_tab
       return as value
    Table created.
    SQL> insert into test_tab
      values   (1, test_t (1, 2, 3), 'some location')
    1 row created.
    SQL> insert into test2_tab
         select   * from test_tab
    insert into test2_tab
         select   * from test_tab
    Error at line 21
    ORA-00932: inconsistent datatypes: expected - got MICHAEL.TEST_T
    SQL> insert into test2_tab
         select   id, cast(name as test2_t), location from test_tab
    1 row created.As shown, the insert succeeds (at least on 11g) when casting the type to the table's type.
    In your case I'd try
    insert into test_tab select id, cast(name as localuser.test_t) location from scott.test_tab

  • ORA-00932: inconsistent datatypes: expected - got CHAR in 10.1.3 ADF BC.

    "ORA-00932: inconsistent datatypes: expected - got CHAR"
    i got SQL error during statement preparation. Statement: SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE, Emp.SAL, Emp.COMM, Emp.DEPTNO, Emp.ROWID FROM EMP Emp WHERE (EMPNO in (SELECT * FROM TABLE(CAST(:no AS TABLE_OF_NO))))
    Oct 29, 2008 1:53:09 PM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ORA-00932: inconsistent datatypes: expected - got CHAR
    while running the emp.jspx page.
    Thanks
    Rama.
    Edited by: user634195 on Oct 31, 2008 5:10 AM
    Edited by: user634195 on Oct 31, 2008 5:13 AM

    "ORA-00932: inconsistent datatypes: expected - got CHAR"
    i got SQL error during statement preparation. Statement: SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE, Emp.SAL, Emp.COMM, Emp.DEPTNO, Emp.ROWID FROM EMP Emp WHERE (EMPNO in (SELECT * FROM TABLE(CAST(:no AS TABLE_OF_NO))))
    Oct 29, 2008 1:53:09 PM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ORA-00932: inconsistent datatypes: expected - got CHAR
    while running the emp.jspx page.
    Thanks
    Rama.
    Edited by: user634195 on Oct 31, 2008 5:10 AM
    Edited by: user634195 on Oct 31, 2008 5:13 AM

  • STREAMS ORA-26687: no instantiation SCN provided for...

    Hi guys,
    I set streams replication on two instance oracle 10.2.0.3 capture and propagation seems working fine but on the apply side I got error message ORA-26687: no instantiation SCN provided for "SCOTT"."EMP" in source database "DB5.REGRESS.RDBMS.DEV.US.ORACLE.COM" and I tried to instantiate the SCN to Required SCN from
    select REQUIRED_CHECKPOINT_SCN
    from dba_capture;
    also tried to export import the table scott.emp again to instantiate to SCN but it didn't work still get the same error. Any Idea ?

    Set the instantiation SCN to few thousands less to current SCN. It will take care of the SCN. Otherwise find the required SCN and instantiate that number. Of course you need to stop streams process before doing it.
    You can find the required SCN by using the following qury:
    select REQUIRED_CHECKPOINT_SCN
    from dba_capture;

  • Error during copy of partner: Partner role SP Message no. VL864

    while we are doing delivery in consignment issue process i am getting "Error during copy of partner: Partner role SP"
    message no.VL864
    i was tried previous posts in scn with this message no but i didn't get suitable answer.so scn experts do the needfull
    best regards,
    venkateswar dama

    Hi,
    Have you read the thread below?
    http://scn.sap.com/thread/1831385
    Also if not resolved then I suggest you to better to post this issue in SD forum.
    Regards
    Shishir

  • Can't turn on FileVault, get message "an error occured during encryption (An error occurred during copying). FileVault won't be turned on for this account"

    Every time I try to turn on FileVault I get a message "an error occured during encryption (An error occurred during copying). FileVault won't be turned on for this account".
    The file is only 96GB and I have 800GB free space

    I had this issue with my Mac Pro. I needed to turn off Filevault because it was causing performance issues with my Adobe video editing software. I got the same message you did. It took some time, but I finally figured out how to solve the problem!! If you look in the console (Finder/Go/Utilities/Console) and go to the system log, you will be able to pinpoint what happened when the filevault failed to turn off. In my case, it was a few Firefox profile cahe files that were an issue (so I copied the profile folder to another disk, trashed the folder on my system drive, then emptied the trash). Then I tried again, and this time it was because of a few photos that were "locked". I unlocked the offending images and then tried once again and SUCCESS! I then replaced the Firefox profile folder to it's original location and everything is working like a charm. But most definately if people have "locked" folders or photos, Filevault will not be able to copy them and delete the encrypted version. I wish I had found a thread like this when I was going through my Filevault nightmare! Would have saved me a lot of trouble, worry and aggravation.
    If you really need to keep files encrypted or protected, simply create an encrypted disk image and keep only the files you want to protect in that image. It's extremely easy to do if you have Carbon Copy Cloner (An amazing and highly recommended  FREE system backup and hard drive cloning app. It will create a backup of whatever files or folders you chose and create a 128bit or 256bit password protected encrypted disk image that you can very easily access at any time.
    Hope this helps!!!!! Good luck!

Maybe you are looking for