Need help on DR Failover to production database

Database : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
OS: Solaris
Replication type: Dataguard (with out broker)
Problem:
Due to power fail on production we switched our secondary to primary for our safety purpose we enabled flashback point on present production(old standby), Now hope we will face problem while switching back to production please help and guide what will be the best practice in this situation and due to the flashback on squnce is not changing how to come out of this problem please help and guide
MAX(SEQUENCE#)
9221
========#######================
Last login: Wed Sep 5 01:51:32 from 10.245.13.6
$ su - oracle
Password:
mesg: cannot change mode
$ ps -ef|grep pmon
oratst 2978 1 0 Sep 08 ? 233:10 ora_pmon_amantst
oracle 3039 1 0 Sep 08 ? 209:09 ora_pmon_airman
oracle 17582 17574 0 05:41:15 pts/1 0:00 grep pmon
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 05:56:21 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/oradata/airman/archive
Oldest online log sequence 9220
Next log sequence to archive 0
Current log sequence 9222
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 05:57:08 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /u01/app/oracle/admin/airman/b
dump
core_dump_dest string /u01/app/oracle/admin/airman/c
dump
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string /u01/app/oracle/admin/airman/u
dump
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ cd /u01/app/oracle/admin/airman/bdump
$ ls -lrt alert
alert: No such file or directory
$ *
ksh: airman_arc0_11192.trc: cannot execute
$ ls -lrt alert*
-rw-r----- 1 oracle oinstall 5323818 Sep 4 20:54 alert_airman.log
$ mkdir flashback
$ chmod 755 flashback
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 06:10:06 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221
SQL> select NAME,DATABASE_ROLE,GUARD_STATUS,SWITCHOVER_STATUS, SWITCHOVER#,OPEN_MODE,PROTECTION_MODE from v$database;
NAME DATABASE_ROLE GUARD_S SWITCHOVER_STATUS SWITCHOVER# OPEN_MODE
PROTECTION_MODE
AIRMAN PHYSICAL STANDBY NONE SESSIONS ACTIVE 4176335025 MOUNTED
MAXIMUM PERFORMANCE
SQL> select NAME,DATABASE_ROLE,GUARD_STATUS from v$database;
NAME DATABASE_ROLE GUARD_S
AIRMAN PHYSICAL STANDBY NONE
SQL> select SWITCHOVER_STATUS, SWITCHOVER#,OPEN_MODE,PROTECTION_MODE from v$database;
SWITCHOVER_STATUS SWITCHOVER# OPEN_MODE PROTECTION_MODE
SESSIONS ACTIVE 4176335025 MOUNTED MAXIMUM PERFORMANCE
==================================================
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN MOUNTED
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/u01/oradata/airman/a
rchive VALID_FOR=(ALL_LOGFILES
,ALL_ROLES) db_unique_name=air
man_sj
log_archive_dest_10 string
log_archive_dest_2 string SERVICE=airman_kj LGWR ASYNC V
ALID_FOR=(ONLINE_LOGFILE,PRIMA
RY_ROLE) db_unique_name=airman
_kj
log_archive_dest_3 string
log_archive_dest_4 string
NAME TYPE VALUE
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
NAME TYPE VALUE
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL>
SQL> alter system set log_archive_dest_2=defer;
alter system set log_archive_dest_2=defer
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_2=defer scope=memory;
alter system set log_archive_dest_2=defer scope=memory
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_2=defer scope=both;
alter system set log_archive_dest_2=defer scope=both
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
SQL> show parameter spfile
NAME TYPE VALUE
spfile string
$ sqlplus
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Sep 5 06:26:40 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN MOUNTED
SQL> create spfile from pfile;
File created.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> show parameter dump
NAME TYPE VALUE
background_core_dump string partial
background_dump_dest string /u01/app/oracle/admin/airman/b
dump
core_dump_dest string /u01/app/oracle/admin/airman/c
dump
max_dump_file_size string UNLIMITED
shadow_core_dump string partial
user_dump_dest string /u01/app/oracle/admin/airman/u
dump
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 2029008 bytes
Variable Size 150997552 bytes
Database Buffers 54525952 bytes
Redo Buffers 2162688 bytes
SQL> show parameter spfile
NAME TYPE VALUE
spfile string /u01/app/oracle/product/10.2.0
/Db_1/dbs/spfileairman.ora
SQL> alter database mount standby database;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
SQL> show parameter log_archive_dest_
NAME TYPE VALUE
log_archive_dest_1 string LOCATION=/u01/oradata/airman/a
rchive VALID_FOR=(ALL_LOGFILES
,ALL_ROLES) db_unique_name=air
man_sj
log_archive_dest_10 string
log_archive_dest_2 string SERVICE=airman_kj LGWR ASYNC V
ALID_FOR=(ONLINE_LOGFILE,PRIMA
RY_ROLE) db_unique_name=airman
_kj
log_archive_dest_3 string
log_archive_dest_4 string
NAME TYPE VALUE
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
NAME TYPE VALUE
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL> alter system set log_archive_dest_2=defer scope=both;
alter system set log_archive_dest_2=defer scope=both
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_2" not allowed with SPFILE
SQL> alter system set log_archive_dest_2=defer scope=memory;
alter system set log_archive_dest_2=defer scope=memory
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16024: parameter LOG_ARCHIVE_DEST_2 cannot be parsed
SQL> alter system set log_archive_dest_state_2=defer scope=both;
System altered.
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
log_archive_dest_state_2 string DEFER
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
SQL> alter system set db_recovery_file_dest='/u01/oradata/flashback';
alter system set db_recovery_file_dest='/u01/oradata/flashback'
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE
SQL> alter system set db_recovery_file_dest_size=14G;
System altered.
SQL> alter system set db_recovery_file_dest='/u01/oradata/flashback';
System altered.
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
db_recovery_file_dest string /u01/oradata/flashback
db_recovery_file_dest_size big integer 14G
SQL> show parameter db_flashback_retention_target
NAME TYPE VALUE
db_flashback_retention_target integer 1440
SQL> alter system set db_flashback_retention_target=2880;
System altered.
SQL> create pfile from spfile;
File created.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database flashback on;
Database altered.
SQL> create restore point before_open_standby guarantee flashback database;
Restore point created.
SQL> select scn, storage_size, time, name from v$restore_point;
SCN STORAGE_SIZE
TIME
NAME
1536320779 8192000
05-SEP-12 06.37.50.000000000 AM
BEFORE_OPEN_STANDBY
SQL> set linesize 200
SQL> col scn,storage_size,time,name format a25
SQL> select scn,storage_size,time,name from v$restore_point;
SCN STORAGE_SIZE TIME
NAME
1536320779 8192000 05-SEP-12 06.37.50.000000000 AM
BEFORE_OPEN_STANDBY
SQL> alter database activate standby database;
Database altered.
SQL> select database_role from v$database;
DATABASE_ROLE
PRIMARY
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 2029008 bytes
Variable Size 150997552 bytes
Database Buffers 54525952 bytes
Redo Buffers 2162688 bytes
Database mounted.
Database opened.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
AIRMAN READ WRITE
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
9221
Edited by: SHANOJ on Sep 7, 2012 9:31 AM

Looking at the information provided by you. You have created a flashback restore point and then activated your standby database. As you have flashback restore you can flashback your current primary database(old standby) to standby mode but all your changes made on your database will be lost. And you have not done a switchover. you have activated your standby.

Similar Messages

  • Need Help: Generate Customer Data from Prod Database

    Hi All,
    My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
    Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
    PA/PA
    APPLSYS/APPS
    APPS/APPS
    ALR/ALR
    AX/AX
    AK/AK
    GL/GLRG/RG
    FA/FAHR/HR
    SSP/SSP
    HXT/HXT
    OTA/OTA
    RLA/RLA
    VEH/VEH
    QA/QA
    ICX/ICX
    AZ/AZ
    AP/AP
    AR/AR
    OE/OE
    OSM/OSM
    NSM/NSM2020
    CN/CN
    MFG/MFG
    INV/INV
    PO/PO
    BOM/BOM
    ENG/ENG
    MRP/MRP
    CRP/CRP
    WIP/WIP
    CZ/CZ
    PJM/PJM
    FLM/FLM
    MSC/MSC
    CS/CS
    CE/CE
    EC/EC
    JG/JG
    APPS/APPS
    All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
    Is that anybody got hands on this case before? Urgent

    We have this table: And need to unload this table data in flat file format.
    Need help with unload SQL file with these two columns:
    AMT_PAID_ORIG, AMT_PAID_ADJ
    SQL> desc flconv.claim_adj_less
    Name Null? Type
    SAK_CLAIM_ADJ_LESS NUMBER(10)
    SAK_CLAIM_ADJ NUMBER(10)
    ADJ_CLAIM_ICN NUMBER(13)
    ORIGINAL_CLAIM_ICN NUMBER(13)
    DATE_PAID_ORIG NUMBER(8)
    DATE_PAID_ADJ NUMBER(8)
    AMT_PAID_ORIG NUMBER(10,2)
    AMT_PAID_ADJ NUMBER(10,2)
    SAK_PROV_LOC NUMBER(9)
    SAK_FUND_CODE NUMBER(9)
    CHECK_SAK NUMBER(9)
    SAK_PUB_HLTH NUMBER(9)

  • Need help connecting to Oracle to create database

    Am student taking DBA course; have altered pfile so that path shows where createdb is located. Cannot connect to Oracle; keep getting message "insufficient privileges." Createdb file amended per book to "REMOTE_LOGIN_PASWORDFILE=exclusive" and still can't connect. Can I grant connect privileges to internal/oracle? Tried several times to create database and am now using new database name to try again, but when I get to svrmgrl and type in "connect internal" and give password "oracle" as book says to do I get the "insufficient privileges" message again. Need help.

    Linda,
    when you use exclusive in remote_login_passwordfile is necessary make one file. Use the following instructions:
    orapw file=orapw<SID> password=<password> entries=<users>
    where
    file=name of password file (mandatory)
    password=password for SYS and INTERNAL (mandatory)
    entries=maximum number of distinct DBA and OPERs (opt)
    There are no spaces around the equal to (=) character.
    Find orapwd.exe by Windows Explorer
    Bye,
    DQC

  • Need help installing Adobe Pro 9 Product code [removed by moderator] to my new PC tower.

    Need help installing Adobe Pro 9 to my new PC.

    Hi albertc40027908,
    You might need to deactivate Acrobat 9 from your old machine.
    Then, install the software from a CD (if you have) and activate with the same serial number.
    If you don't have a CD, then you might install Acrobat 9 pro from the below mentioned link:
    Download Acrobat products | 9, 8
    Hope this helps.
    Regards,
    Anubha

  • Need help Installing OID Repository on existing database server using RepCA

    I have an oracle database server running 10g (10.2.0.4) and I want to install metadata repository on it. I downloaded the Application Server Metadata Repository Creation Assistant 10.1.2.0.1 (standard edition).
    I find that there are no batch files in the download, just setup.exe. When I run that I am asked for an ORA_HOME - when I provide the home where the database is installed I get the message that the home already has the database and the software cannot be installed on it.
    How do I add the repository to an existing instance of oracle database server? Also, is the version I downloaded the right version #
    Thanks

    Hi sameer khan,
    first let me ask, are you talking about Netweaver04s (WAS 7.00), in this case my answer can give you some hints.
    Note 883948 gives information of the installation of an additional usage tye (like BI JAVA)
    You have more than one possibility to install the usage type BI JAVA. The most common installation types are:
    1. BI installation and a separate BI JAVA installation with 2 <SID>
    2. BI JAVA Addin Installation in an existing NW04s
    I recommend to use option 1:
    In case you install a separate BI-JAVA instance, you need a separate <SID> for your J2EE environment. In this case it is not possible to use the same <SID>. This installation can be done on the same or a separate server. Furthermore, you can use a separate database or install the J2EE instance in the same database (--> MCOD). I recommend to use a separate database. Note: In this installation option, Sapinst normally installs a separate user store. With the usage type BI JAVA it makes (in most cases) sense, to use the user store of the BI system, where it belongs to. If you want to do so, "Revise" the user store option before you start the installation and and choose the production client of the BI system.
    If you like to use an Addin Installation, another <SID> is not possible. I would only recommend this kind of installation in test environments.
    It doesn't matter, which kind you choose, after installation, you have to do the steps for "Setting up bex Web", see Note 917950. This is sometimes a little bit tricky, with Note 937697 there is a Support Tool, which can help.
    Good luck with your installation
    Kind Regards
    Marc

  • Need Help with complex query for productio database

    Hello again,
    i need your help again, for an query how Shows me how long every production step takes per Order.
    See sample data and what i expect.
    Thank you all for your help.
    We use Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Here the sample data tables:
    CREATE      TABLE      TABLE_2
    (     "ORDER_NR"      VARCHAR2 (12)
    ,      "PRIORITY"      VARCHAR2 (2)
    ,      "WO_STEP"      VARCHAR2 (1)
    ,      "STEP_DATE"      DATE
    CREATE      TABLE      TABLE_1
    (     "ORDER_NR"           VARCHAR2     (12) PRIMARY KEY
    ,      "PRIORITY"           VARCHAR2      (2)
    ,      "CREATE_DATE"      DATE
    ,     "ACT_STEP"          VARCHAR2     (2)
    ,     "STEP_DATE"          DATE
    ,     "EMPLOYEE"          VARCHAR2     (5)
    ,     "DESCRIPTION"     VARCHAR2     (20)
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,      CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION)
                        VALUES           ('1KKA1T205634',     '12',          TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'),     'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'),     'W0010',     'CLEAN HOUSE');
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,     CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION)
                        VALUES           ('1KKA1Z300612',     '12',          TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'),     'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'),     'K0052',     'REPAIR CAR');
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'A',          TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'S',          TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'R',          TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'A',          TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    COMMIT;And here is what i expect from my query:
    SYSDATE     28.Feb.13 14:00                                                                                     
    ORDER_NR     PRIORITYCREATE_DATE     STATUS     STATUS_DATE     DESCRIPTION     AGE_1     AGE_2     WAITNG     STEP_A     STEP_B     STEP_C     STEP_5     STEP_K     STEP_E     STEP_F     STEP_S     STEP_R     
    1KKA1T205634     12     10.Feb.13 10:00     U     28.Feb.13 12:00     CLEAN HOUSE     18,083     8,833     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666     0,042     7,125     
    1KKA1Z300612     12     08.Feb.13 14:00     F     20.Feb.13 16:00     REPAIR CAR     20,000     16,042     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666          And now the explanation to the query result:
    The AGE_1 is the difference in days between the 'CREATE_DATE' and IF EXSIST the STEP 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the 'CREATE_DATE' and the 'SYSDATE'
    The AGE_2 is the difference in days between the STEP 'A' STEP_DATE and IF EXSIST the STEP 'R' then STEP_DATE or if the STEP 'R' is not found in TABLE_2 then it should show the difference in days between the 'CREATE_DATE' and the 'SYSDATE'
    The WAITING is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
    The following columns show the days how long the ORDER_NR stays in these STEP, if an ORDER_NR comes into the same STEP more then one time it should be calculated together.
    If the ORDER_NR skips a step it should show a zero in the specific field.
    I hope my explanation is good enough, my english skills are far away from good.
    Thanks all for your help.
    Greets Reinhard W.

    Hi,
    i changed this query:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            sum(
                case t2.wo_step
                  when 'B' then t2.next_step_date - t2.step_date
                end
               ) step_b
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.descriptionTo this:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.order_nr,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            sum(
                case t2.wo_step
                  when 'B' then t2.next_step_date - t2.step_date
                end
               ) step_b
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nrthen i get the ORA-00979 Error.
    Whats wrong?
    I have another question.
    How can i handle i i want to group to or more 'STEP's in one Column.
    in Case of this i want that the column 'STEP_B' contains all days for STEP 'B' and STEP '5'.
    I tried already with a + Operation like this:
    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
               sysdate
              ) - t1.create_date age_2,
            Round( sum(
                case t2.wo_step
                  when 'B' then t2.next_step_date - t2.step_date
                end
               ) +
            sum(
                case t2.wo_step
                  when '5' then t2.next_step_date - t2.step_date
                end
               ), 3 ) step_b
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.descriptionBut this does reply evertime a NULL.
    Thank You.

  • Need Help Connecting Crystal XI to Progress Database

    Post Author: leomclaughlin
    CA Forum: Data Connectivity and SQL
    I am new to Crystal Reports and need some help figuring out how to connect to my database. I am using Crystal Reports XI and the database is Progress ver 91 (at least as best I can tell, anyway).
    Thanks in advance!

    Post Author: elowell
    CA Forum: Data Connectivity and SQL
    First you need to make sure you have the proper OBDC driver installed so Windows knows where to look. What OS is on your desktop?

  • HELP!  Need help in restoring APEX application from database backup

    I accidentally deleted many pages from my development APEX environment when I thought I was deleting from QA.  By the time I discovered it, it was too late to do a flash back.  The DBQ I am working with is now trying to recover from a database backup, but we are not having much success.  Can someone point me to any documentation that may exist on exactly what to restore from what schemas?  It is not intuitively obvious what should be extracted and restored?  Any help would be GREATLY appreciated!

    I have older exports, but I would loose 2 weeks of work by going back to them. I need to be able to restore from a database backup so I get back my changes. What we tried to restore didn't bring back the deleted pages so we must have done something wrong.

  • I need help retrieveing cs3 design standard product key

    I purchased 2 adobe cs3 design standard in 2008. The purchase was made from new egg. I have a copy of the invoice. Need to get the product key. Can you help?

    We can't help you. This is a user forum and we can't help with product key/ registration numbers/ etc.
    You need to use Adobe Chat to talk to an Adobe rep:
    Contact Customer Care

  • Need help getting dreamweaver to recognize my database file

    For a couple of years I have maintained a website that lists available apartments for a rental company.  I want to create a search function to help potential tenants find an apartment more efficiently on the website.  All the data (about 20 columns per apartment) for around 500 apartments is on a microsoft access .accdb file, database.accdb.  I am following the adobe forum page:
    http://www.adobe.com/support/ultradev/building/multiple_param_search/multiple_param_search 03.html
    The page tells me to go to the Bindings page and click the + sign, then select Recordset.  However, Recordset is not an option given to me.  I am confused as to how to get Recordset to appear.  Here are some technicals:
    The site folder currently contains 3 files.  #1 is database.accdb, the microsoft access database.  #2 is getresults.jsp, which is the page I am trying to do the recordset on.  #3 is searchpage.html, which contains a single search parameter with a submit button.  The site is set up as a testing server.
    I am using Dreamweaver CS5.5.  Thank you in advance for your help

    >#2 is getresults.jsp, which is the page I am trying to do the recordset on.
    1) JSP's are no longer supported in Dreamweaver
    2) Access 2007 database was never supported in Dreamweaver
    3) As far as I know JSP/Access was never a supported server model in DW.
    So you are either going to have to pick a supported server model, or learn how to write code.  I already mentioned most of this yesterday in your previous post.

  • Need help on inserting multiple records into database

    Hello every body,
    In my web page there is multiple select box.In that contains
    service-servicecategory-priority-filecontent -data in each item.
    suppose if select ten items and press submit button then that ten item schould be insert into database at a time. I don't know how to do?
    if any body know or any sample code ..plz help me.
    thanks in advance.

    suppose if select ten items and press submit button
    then that ten item schould be insert into database at
    a time. I don't know how to do?
    if any body know or any sample code ..plz help me.I'll give you the answer if you give me dukes.

  • Need help Recording SQL Execution Times in Database

    Hello,
    I have an interesting thing I am tiring to do. I want to record how much time (Wall Clock) it took the database to execute any select statement against o one particular view lets call it CUST_ORDERS_V.
    I would like to record who ran it, what the select statement was (SQL Text) and how much time it took and maybe a few other ancillary things if possible.
    Looking at most of my requirements took me right to Oracle Auditing and the SYS.AUD$ table. After setting up auditing with:
    audit_trail=db,extended
    and
    audit select on ME.CUST_ORDERS_V by access;I get every piece of information I need except for the execution time! Wow that would be great if Oracle recorded that!!! So I was thinking if I could. I was considering a trigger on SYS.AUD$ (I know evil thoughts) that would look into some V$ view and get the execution time and write it into some custom table with a link back to SYS.AUD$.
    This might be the complete wrong way to do it. I was wondering if anyone had any ideas on this.
    I am running on 11.2.0.3 EE. I am on EE so I can use Fine Grained Auditing if it is needed. However I DO NOT have the Tuning or Diagnostic Pack.

    >
    Hi again,
    Yes, a complete set of times from end to end would be great. However
    for now I need to stick with what is in my domain of control, the database.
    Maybe after the DB I will look to get the others.But your point about the operators blaming the db brings up the probability
    that after you tell them that the db is not the issue, they'll start to blame
    the app server, the cabling, their OS, the browser, the tea-lady...
    If you have click===> page, they have no more places to hide and have to
    actually work for a living ;)
    I do not think I can access v$active_session_history as I do not have the Tuning Pack.Well, presumably there is a business case for this project. Why not tell management
    that it's required?
    Otherwise, you could go to ashmasters.com - a site run by Kyle Hailey (Oak Table
    member and author). He has an Open Source ASH "substitute" which you might
    like to try - haven't used it myself, but if Kyle Hailey's behind it, then it's at
    least worthy of investigation.
    HTH,
    Paul...

  • Need help, implementing streams between oracle 10g databases

    Hello all.
    Please help me, and give me instruction if any body implement streams between databases (Oracle 10g)
    I have implemented streams between schema table on (10g) and result was success.
    Firstly I want to know some thing, such as:
    1) Is it possible make streams with conditions, (make only DML or DDL i know) but make DML and not DELETE operation, just INSERT and UPDATE operations on the table?
    2) After changes was applied on target database, can I delete that records which copied (replicated) on source database?
    I have 2 databases and one of them is for archive purpose (I want use it as target database for streams). Other one is PROD database, applications make DML operation.
    I) record insert with null status
    II) processing (status 1)
    III) if success (status 2) unsuccess (status 3)
    For now, I have cron script on (Linux host) and in this script has PLSQL anonymous block and it works couple times during the day. This script works as archive.
    My task is: Make it via Oracle streams.
    Thank you beforehand.

    For conditions on the type of operation (Insert) check in the doc after apply handler and you can associate what ever code and conditions you want. You can also choose to work with a subset rules but there are some restriction as no lobs :
    [http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#insertedID7|http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_rules.htm#insertedID7]
    For a complete list of the restrictions :
    [http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/ap_restrictions.htm#i1012965|http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/ap_restrictions.htm#i1012965]

  • Need help getting large schema registered in database ORA-19046

    Hi All,
    I'm trying to get this schema registered in our oracle db so we can use the XML as structured storage.  I'm using 11g XE locally and 10.2g in production.  I'm trying to get it loaded locally first.  Here is the command i am using:
    BEGIN
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL => 'http://ACORD.org/Standards/Life/2',
        SCHEMADOC => bfilename('TEMP','TXLife2.28.00.xsd'),
        CSID => nls_charset_id('AL32UTF8'));
    END;
    And this is the error i get back:
    Error report:
    ORA-19046: Out-of-line table cannot be shared by two top-level tables.
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
    ORA-06512: at line 2
    You can download the schema from here:  http://www.chinacitystpete.com/TXLife2.28.00.xsd
    Any help or suggestions would be greatly appreciated.
    Added link to xsd file. Message was edited by: user5463804

    Hi SonicSwap,
    Spry 1.4 doesn't handle "nested structures" due to the way we
    flatten the data into a tabular row/column structure. Because you
    are selecting "playlist/tracklist/track" as your source of data,
    the repeating <link> nodes under track are considered as a
    "nested structure". You've noticed that the last one wins.
    That said, we are previewing some "nested structure" support
    we are planning on releasing in Spry 1.5. This support comes in the
    form of allowing more control over how the data is flattened, and
    the introduction of "specialized" data sets that know how to
    iterate over nested data.
    You can check out this support here:
    http://labs.adobe.com/technologies/spry/preview/samples/data_region/NestedXMLDataSample.ht ml
    The main 1.5 preview page is here:
    http://labs.adobe.com/technologies/spry/preview/
    --== Kin ==--

  • I need help on choosing an Adobe Product

    Greetings! 
    I'm working on web application that deals with large sets of raw data, and the app needs to be able to take that data, plot it, and display that plot to the user.  Whatever I go with needs to be able to play nice with PHP and MySQL.  Would Adobe Flash Pro be more up my ally to do the plotting?  I came across some blog posts that made it seem like Flex might be a good choice, too.  Any thoughts or opinions would be greatly appreciated.  Thanks!
    -zjedens

    Flash can be used with PHP/MySQL but your request is ambiguous. Flash might be overkill.
    PHP can command an image toolkit on a web server to generate an image file with plotted data.  You can even get premade SWF charts to render data...
    http://www.google.com/search?q=free+php+flash+charts

Maybe you are looking for

  • Saving a jpeg from Yahoo email in pictures but it will only save as a firefox doc

    I am trying to save a jpeg picture from my yahoo email inbox, but when I click "save image as" it will save as a Firfox Document only. It will save, but when I open the pic it only shows numbers and letters! HELP! How do I save a pic when this happen

  • JSP Ajax XML problem

    Hi ! i am creating a program using JSP Ajax to read PUBLIC enteries of Google calender but when i run to check the JSP file that is Server Side process & return result to HTML i got the following result: 375/-+1750/-Bunty [email protected]

  • Image larger than specified

    Hey guys, I started a new project. I set the file criteria for 4" wide 5" high, 300 resolution, CMYK. When I save the file as a JPEG and export it for print the image is huge. I don't know what I'm doing wrong. I check the settings again, after notic

  • 10.5.5 changes IMAP settings - can't receive email messages

    Since upgrading to 10.5.5, I cannot receive messages from my IMAP server. Initially, on start-up, the Inbox account was shown "Offline". In Mail/Preferences/Accounts/ Advanced, I note that the authentication was changed from "Password", to "NTLM". Th

  • HELP! can't sort a STL list

    I declare a list like this:                std::list<swedSim> usedSimList; and a compare function to sort it:      bool lt_fun_equip(const swedSim& s1, const swedSim& s2)      return s1._maxAssEquipment - s1._assEquipmentCount - s1._assEquipmentReque