Creating more rollback segments

Hi,
in a performence report we have :
Contention for undo header = 2.35%
Contention for undo block = 15.34%
If the percentage for an area is more than 1% or 2%, consider
creating more rollback segments.
Does it mean that we should add a file to rollback tablespace ? Is it the only action ? how to create more rollback segments ?
what should we do ?
regards

Try setting UNDO_MANAGEMENT=AUTOIf big1362000 (presumably Big1 to his friends) is still using rollback segments then they shouldn't switch to automatically managed UNDO without a little thought and some impact analysis. However, given the version of the database they're on I think moving to an UNDO tablespace is the better plan in the long run.
Big1362000
Does it mean that we should add a file to rollback tablespace ? No. It means create more rollback segments. You may want/need to add another datafile to the tablesapce used by the rollback segments or even create a new tablespace for the new rollback segments (depending on what your policy is). However, your really ought to think about progressing to Automated Undo Management (it's the wave of the future).
Cheers, APC

Similar Messages

  • How to Create Exclusive Rollback Segment

    How can we create exclsive rollback segment for a particular
    session,
    Even setting "set transaction use rollback segment
    rollack_segment"
    still other session can step on newly created rollback segment

    Hi Santanu,
    The steps that you mentioned are in sequence. You also need to check if  user exist for this requirement.
    sap help can give u a good deal of information.

  • Error while creating the rollback segment (Oracle 8i & OS Win NT)

    hi
    I am using Oracle 8i and when i am creating the new rollback segment for my database i have got following error message
    ORA-01593 Rollback segment optimal size (30 blks) is smaller than the computed initial size (2560 blks)
    CREATE ROLLBACK SEGMENT "RBS11" TABLESPACE "RBS1"
    STORAGE ( INITIAL 120K NEXT
    120K OPTIMAL
    240K MINEXTENTS 2
    MAXEXTENTS 100)
    Note:- db_block size is 8k
    Tablespace RBS1 is the Locally managed Tablespace having datafile of 50m and uniform size of 10m
    But Given statement processed while i am using Tablespace RBS (winch is data dictionary managed)
    Plz, suggest me to cause of that error and solution

    You said 120K optimal and initial is 120K with minextents of 2. The optimal size then will be smaller than the initial allocation for the rbs.
    ORA-01593: rollback segment optimal size (string blks) is smaller than the computed initial size (string blks)
    Cause: Specified OPTIMAL size is smaller than the cumulative size of the initial extents during create rollback segment.
    Action: Specify a larger OPTIMAL size.

  • Can not create Rollback segment

    Hi,
    in 8i on Win 2003
    unfortunately I have dropped rollback tablespace. Now when creating I receive ORA-01552 :
    SQL> CREATE PUBLIC ROLLBACK SEGMENT "RBS1"
      2      TABLESPACE "RBS"
      3      STORAGE ( INITIAL 204k NEXT 10K MINEXTENTS 2 MAXEXTENTS
      4      32);
    CREATE PUBLIC ROLLBACK SEGMENT "RBS1"
    ERROR at line 1:
    ORA-01552: cannot use system rollback segment for non-system tablespace 'RBS'Any solution ?
    Thank you.

    @Satish,
    DRSYS is one of the default tablespaces which used to come with the DBCA ,
    http://download-west.oracle.com/docs/cd/A87860_01/doc/paraserv.817/a76934/chap1.htm#1014437
    @OP,
    Firrst thing is that you shouldn't create any segment , rollback or other in any system alike tablespace like DRSYS. You should create a seperate tablespace in which you should create the segments. As Satish asked already, there shouldn't be any problems as such but only the expectation of 1555 error due to the improper sizing of the rollback segments. But this is just a thought, it would be better if you explain your doubt(s) .
    HTH
    Aman....

  • How to increase rollback segment

    hi,
    I am using oracle8i in solaris
    I got a situation to increase rollback segment but i dont know how to do so?
    can any one help me in solving this..........
    I also want to know wat is the maximum max_extents size we can keep.....
    This is my rollback segments
    SQL> select segment_name, max_extents,TABLESPACE_NAME FROM dba_rollback_segs;
    SEGMENT_NAME MAX_EXTENTS TABLESPACE_NAME
    SYSTEM 121 SYSTEM
    RBS 121 SYSTEM
    RBS1 121 RBS
    RBS2 121 RBS
    RBS3 121 RBS
    RBS4 121 RBS
    RBS99 32765 RBS1
    7 rows selected.
    With Regards
    Boo

    If you have metalink access, there are really couple of good notes on how to tune and create optimal rollback segments.
    Rollback Segment Configuration Tips Doc ID:      Note:69464.1
    Regarding the size of the rollback segment, it is depends on the nature of the application and the transaction size, whether short transaction or lenghty transactions.
    If oltp with very small transaction, create rollback segment with very small value and make minextents 20, so that you dont need to have recursive call to create extents initially.
    ORA-01628: max # extents (121) reached for rollback segment RBS1Make the extent unlimited.
    ALTER ROLLBACK SEGMENT RBS1
    STORAGE ( MAXEXTENTS UNLIMITED)
    2) how many rollback segment can we hav?1 rollback segment = 4 concurrent transactions.
    Now you decide, how many concurrent transaction do you have.
    .3) what is the maximum extent size we can set?I would recommend to set the extent size according to nature of your application.
    <<1) if there is more than one rollback segment in that, i want to know which one is active how to know this....... where to check this.........
    SELECT r.name "RB NAME ", p.pid "ORACLE PID",
    p.spid "SYSTEM PID ", NVL (p.username, 'NO TRANSACTION') "OS USER",
    p.terminal
    FROM v$lock l, v$process p, v$rollname r, v$session s
    WHERE l.sid = s.sid(+)
    AND s.paddr = p.addr
    AND TRUNC (l.id1(+)/65536) = r.usn
    AND l.type(+) = 'TX'
    AND l.lmode(+) = 6
    ORDER BY r.name;
    Jaffar

  • How to online datafile of rollback segment of NO archive log available

    I set offline datafile of rool back segement and rename it
    but when I try to online , get error to recover
    I try to recover but unfortunately all archive log was deleted ( kind of cron job in unix aotu delete these file)
    Pls advice how can I set this data file online without the archive log ( while databse still up and running) Oracle version is 8i not possible to drop datafile by sql.
    in roll back segment I have 3 data files as below and the rb04.dbf is offline
    usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs01.dbf
    /usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs03.dbf
    /usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf
    sequence of what I did is below:
    SQL> alter database datafile '/usr/Systems/1354RM_1/databases/dbsnml/data/rbs04.dbf' offline;
    Database altered.
    SQL> alter tablespace RBS rename datafile '/usr/Systems/1354RM_1/databases/dbsnml/data/rbs04.dbf' to '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf';
    Tablespace altered.
    SQL> alter database datafile '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf' online;
    alter database datafile '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf' online
    ERROR at line 1:
    ORA-01113: file 13 needs media recovery
    ORA-01110: data file 13:
    '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf'
    SQL> recover datafile '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf';
    ORA-00279: change 71449081 generated at 12/23/2008 20:18:05 needed for thread 1
    ORA-00289: suggestion :
    /usr/Systems/1354RM_1_7.1_Master/OSRES/data/warm_repl/WarmArchive/arch_1_455922.
    arc
    ORA-00280: change 71449081 for thread 1 is in sequence #455922
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log
    '/usr/Systems/1354RM_1_7.1_Master/OSRES/data/warm_repl/WarmArchive/arch_1_455922
    .arc'
    ORA-27037: unable to obtain file status
    HP-UX Error: 2: No such file or directory
    Additional information: 3

    SQL> alter tablespace RBS rename datafile '/usr/Systems/1354RM_1/databases/dbsnml/data/rbs04.dbf' to '/usr/Systems/1354RM_1_7.1_Master/databases/dbsnml/data/rbs04.dbf';Did you rename the file at OS level after you issued above command? Oracle will not rename the file at OS level.
    Other than that, if you plan to change rollback segment tablespace, better create a new one and create new rollback segment in new tablespace and drop the old one.

  • Datafile containing rollback segment crashed

    Hi,
    In one of our production box (oracle 8.1.7.4 and HP UX), datafile containing rollback segment crashed. To open the database, i commented rollback segment line in init file and started the db and brought the crashed datafile to offline for dropping as
    alter database datafile '/db10/rollback/rbs01.dbf' offline drop;
    and then tried to drop the tablespace containing that datafile but it threw an error saying an active rollback segment R0 is still there in the tablespace. I donot know how to drop this and create new rollback segments. Any help would be greatly appreciated.
    Thanks
    Guna

    Hi,
    Serious case. In case of a failure the instance recovery is automatic but the rollback segments are needed. Having the database open does not mean everything is OK. Just read that :
    Crash or instance recovery consists of the following steps:
    +# Rolling forward to recover data that has not been recorded in the datafiles, yet has been recorded in the online redo log, including the contents of rollback segments. This is called cache recovery.+
    +# Opening the database. Instead of waiting for all transactions to be rolled back before making the database available, Oracle allows the database to be opened as soon as cache recovery is complete. Any data that is not locked by unrecovered transactions is immediately available.+
    +# Marking all transactions system-wide that were active at the time of failure as DEAD and marking the rollback segments containing these transactions as PARTLY AVAILABLE.+
    +# Rolling back dead transactions as part of SMON recovery. This is called transaction recovery.+
    +# Resolving any pending distributed transactions undergoing a two-phase commit at the time of the instance failure.+
    +# As new transactions encounter rows locked by dead transactions, they can automatically roll back the dead transaction to release the locks. If you are using Fast-Start Recovery, just the data block is immediately rolled back, as opposed to the entire transaction.+
    What did you do exactly after the crash ? Can you post commands/output + last 50-100 lines of your alert.log ?
    Best regards
    Phil

  • Oracle9i How to convert from undo tables to rollback segments

    Hi,
    Anyone try before converting from UNDO management to using rollback segment....What are the procedures for the conversion...
    Thank You...

    Hi,
    Follow these steps to convert from Auto UNDO to Rollback Segs....
    1. With the database opened, create a rollback tablespace and then create some rollback segments and bring them online like this
    CREATE ROLLBACK SEGMENT RBS1 TABLESPACE RBS;
    ALTER ROLLBACK SEGMENT RBS1 ONLINE;
    2. Then edit the PFILE and modify these parameters
    Add: ROLLBACK_SEGMENTS=(RBS1,RBS2,RBS3....)
    Comment: UNDO_MANAGEMENT=AUTO and UNDO_TABLESPACE=UNDOTBS or whatever name you have for your UNDO tablespace.
    3. Shutdown the database gracefully(normal).
    4. Startup pfile=<Pfile path>
    5. Sync these new parameter changes to the SPFILE by recreating the SPFILE.
    6. Take a full level 0 backup of your database as the structure has changed.
    The next time you start the database, it will use the SPFILE which is same as the PFILE.
    Regards.

  • General - rollback segments

    Been reading manuals, I have few question to clarify about rollback segments ( Lets leave undo tablespace and automatic undo management aside )
    1) Rollback segments can be created in a tablespace - is there a max size/limit which could be specified for a rollback segment to use within a tablespace? - From reading manuals, the storage clause doesnt mention about max size/limt for a rollback segment; is it possible for rollback segment to fill-up tablespace (ummm due to some wired query[read consistency]/transaction) ?
    2) We can create a separate rollback tablespace and have multiple rollback segments.
    If there are 3 user tablespaces (T1/T2/T3), 1 rollback tablespace (RT).
    - I create 1 rollback segment in tablespace T1, T2, T3
    - I create 2 rollback segments in rollback tablespace RT
    A user with "default tablespace T1" when running a transaction, which rollback segment will be used by this user (when rollback segment is not explicitly specified)?
    Oracle-Student

    user11359766 wrote:
    Will the transaction spill over to the second rollback segment (i.e start using the 2nd rollback segment which is available and not being used by any other active transaction) or oracle will return an error since the first rollback segment assigned is filled up and the transaction is still active?This will be applied to both SMU and MMU.
    From the same link above,
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/b_deprec.htm#634941
    For the duration of a transaction, the associated user process writes rollback information only to the assigned rollback segment.I hope its self explanatory that the transaction can't roll over to any other roll back segment once its own gets out of space. In teh case of SMU also, if the undo datafile can't grow, your transaction would be stopped.
    HTH
    Aman....

  • Help me regarding Rollback Segment!! It is Very Very Urgent.

    My Oracle Version is 8.1.5.0.0
    I have created my Database with one Data File and after creating of the Database I have found that my Database is having one Tablespace and then name is "System" and I have also found that a Rollback Segment is also created by Default on The "System" Tablespace and the name of that Rollback Segment is also "System".
    Then what I did, I did create another Tablespace name "HR" with the help of the following syntax:
    CREATE TABLESPACE HR
    DATAFILE 'E:\MANODATA\U5\HR01.DBF' SIZE 100M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K;
    Then I tried to create a Rollback segment on the "HR" with the following syntax:
    CREATE ROLLBACK SEGMENT HR_RS TABLESPACE HR;
    Tablespace is not created but I am getting an error, which I am mentioning below:
    Cannot Use System Rollback Segment For Non-System Tablespace 'HR'
    Then what I did, I did create another Tablespace name "USERS" with the help of following syntax:
    CREATE TABLESPACE USERS
    DATAFILE 'E:\MANODATA\U4\USERS01.DBF' SIZE 10M
    EXTENT MANAGEMENT DICTIONARY;
    Then what I did, I did create a Rollback segment on the Tablespace "USERS" with the following syntax:
    CREATE PUBLIC ROLLBACK SEGMENT USERS_RS
    TABLESPACE USERS
    STORAGE (
    INITIAL 50K
    NEXT 50K
    OPTIMAL 750K
    MINEXTENTS 15
    MAXEXTENTS 100);
    Then what I did, I again tried to create a Rollback segment on the "HR" with the following syntax that you provided:
    CREATE ROLLBACK SEGMENT HR_RS TABLESPACE HR;
    Now the Rollback Segment is created without any problem.
    Now Please tell me why it is so happening. I am very much confused of all this. Can't I create any Rollback Segment on a Locally managed Tablespace unless and until I do not Create a Dictionary managed Tablespace and unless I don't create a Rollback Segment on that dictionary managed Tablespace? Is there any restriction in my Version of Oracle (8.1.5.0.0)?
    Please help me in this matter as soon as possible.
    Thanking You,
    Manojit.

    My Oracle Version is 8.1.5.0.0
    I have created my Database with one Data File and after creating of the Database I have found that my Database is having one Tablespace and then name is "System" and I have also found that a Rollback Segment is also created by Default on The "System" Tablespace and the name of that Rollback Segment is also "System".
    Then what I did, I did create another Tablespace name "HR" with the help of the following syntax:
    CREATE TABLESPACE HR
    DATAFILE 'E:\MANODATA\U5\HR01.DBF' SIZE 100M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K;
    Then I tried to create a Rollback segment on the "HR" with the following syntax:
    CREATE ROLLBACK SEGMENT HR_RS TABLESPACE HR;
    Tablespace is not created but I am getting an error, which I am mentioning below:
    Cannot Use System Rollback Segment For Non-System Tablespace 'HR'
    Then what I did, I did create another Tablespace name "USERS" with the help of following syntax:
    CREATE TABLESPACE USERS
    DATAFILE 'E:\MANODATA\U4\USERS01.DBF' SIZE 10M
    EXTENT MANAGEMENT DICTIONARY;
    Then what I did, I did create a Rollback segment on the Tablespace "USERS" with the following syntax:
    CREATE PUBLIC ROLLBACK SEGMENT USERS_RS
    TABLESPACE USERS
    STORAGE (
    INITIAL 50K
    NEXT 50K
    OPTIMAL 750K
    MINEXTENTS 15
    MAXEXTENTS 100);
    Then what I did, I again tried to create a Rollback segment on the "HR" with the following syntax that you provided:
    CREATE ROLLBACK SEGMENT HR_RS TABLESPACE HR;
    Now the Rollback Segment is created without any problem.
    Now Please tell me why it is so happening. I am very much confused of all this. Can't I create any Rollback Segment on a Locally managed Tablespace unless and until I do not Create a Dictionary managed Tablespace and unless I don't create a Rollback Segment on that dictionary managed Tablespace? Is there any restriction in my Version of Oracle (8.1.5.0.0)?
    Please help me in this matter as soon as possible.
    Thanking You,
    Manojit. Manojit -
    Maybe too late but here goes anyways -
    You need to have another SYSTEM Rollback segment before you begin the process you mention above. At this stage of developing your database, the SYSTEM tablespace will keep the one rollback segment for it's own use and you need another one to create rollback info in for other objects. Create another system rollback segment in the existing rollback tablespace, then create a separate rollback tablepace with extent management local, then create some rollback segments. You may even want to use the SET TRANSACTION USER ROLLBACK SEGMENT RBS2 for the creation of the new Rollback Tablespace. Then you can continue with the creation of other objects.
    Hope this helps,
    the Infamous,
    Eric Cartman

  • Rollback segments using UNDO Tablespace?

    First, I created a database for a vendor with an Undo Tablespace UNDOTBS. Then the vendor requested me to create rollback segments instead. So I created a new tablespace RBSTBS just to hold these segments. When I tried to create the rollback segment using the newly created tablespace RBSTBS, it complained that I am not allowed to use non-system tablespaces.
    So instead, I used the Undo tablespace UNDOTBS to hold the rollback segment. It worked.
    Am I really allowed to use the UNDO tablespace to hold rollback segments? Can't I use normal tablespaces for rollback segments?
    Another thing, the vendor wanted me to create rollback segments of 200MB each. Where do I set this while creating the rollback segment? Is this the INITIAL, NEXT, or OPTIMAL size?
    I know that Oracle recommends using UNDO rather than rollback segments. Is there any advantage in using traditional rollback segments?
    Thanks for any help!

    Advantage with rollback segment is you can force your transaction to use any specific rollback segment, where as with undo you don't have any control. Oracle does it for us.
    Thanks and Regards,
    Satheesh Babu.S
    Bangalore.

  • Rollback segment corruption on oracle 7.3

    We have an oracle 7.3 database on solaris(sparc) 2.6.
    In the midddle of the transactions, the following error message occured:
    ORA 1578 Data block corrupted(file #2, block#8274)
    ORA-1110 Datafile 2:'/user1/oradb/rbstbl.dbf'
    (this datafile corresponds to the rollback segment table space).
    Action Taken:
    1. Tried to make the rollback segments offline, but out of 11, 2 rollback segments could not be taken offline. The status for these 2 was 'pending offline'.
    2. Made the table space and datafile offline.
    3. Created new rollback segments with new datafile and rollback segments, duly commenting the same in init.ora.
    4. The status for these 2 rollback segments has now changed to 'needs recovery'. This status is preventing us from taking any further action.
    We would like to drop the old table space.
    We need you kind help in getting out of this loop!
    Pls. mail your reply to [email protected]

    Kathleen,
    Sorry, the character set scanner only supports 8.0.6 and above. Can you first migrate your US7ACII database to 9.2, and run the scanner before changing database character set to WE8ISO8859P15? Also you can read this paper http://www.oracle.com/technology/tech/globalization/pdf/mwp.pdf
    to understand why you may have invalid data in your US7ASCII database and the best way to migrate it. I am also wondering about your choice of P15 versus P1 and WIN1252? If you need further information you can contact me directly at [email protected]

  • ROLLBACK SEGMENT VERSION 7.3

    We have an oracle 7.3 database on solaris(sparc) 2.6.
    In the midddle of the transactions, the following error message
    occured:
    ORA 1578 Data block corrupted(file #2, block#8274)
    ORA-1110 Datafile 2:'/user1/oradb/rbstbl.dbf'
    (this datafile corresponds to the rollback segment table space).
    Action Taken:
    1. Tried to make the rollback segments offline, but out of 11, 2
    rollback
    segments could not be taken offline. The status for these 2
    was 'pending
    offline'.
    2. Made the table space and datafile offline.
    3. Created new rollback segments with new datafile and rollback
    segments,
    duly commenting the same in init.ora.
    4. The status for these 2 rollback segments has now changed
    to 'needs
    recovery'. This status is preventing us from taking any further
    action.
    We would like to drop the old table space.
    We need you kind help in getting out of this loop!
    We don't have any backup and the archivlog was not activated.
    HELP is there any way to solve this problem?????
    Thank for your help

    Oracle XML Team wrote:
    : Jerome Sigua (guest) wrote:
    : : My company has version 7.3.4 and my group is thinking of
    using
    : : XML for some data transfers between us and our vendors. From
    : : what I could see from this web site, it looks like we would
    : need
    : : to move to ver 8i in order to do so. Is there any way of
    : : leveraging ver 7 to do XML? I'm sure we'll move up to ver 8
    : : sometime in the future but I don't know if we will within our
    : : timeline(next 3-4 months) for the next phase of the project
    : I'm
    : : working on.
    : : TIA
    : : Jerome Sigua
    : As long as you have the appropriate JDBC 1.1 drivers for 7.3.4
    : you should be able to use the XML SQL Utility to extract data
    in
    : XML.
    : Oracle XML Team
    : http://technet.oracle.com
    : Oracle Technology Network
    For JDBC drivers, please take a look at
    http://technet.oracle.com/tech/java/sqlj_jdbc/
    Take a look at : Oracle 7 JDBC OCI and JDBC Thin Drivers
    Oracle Technology Network
    http://technet.oracle.com
    null

  • How to make rollback segments online on database startup?

    I create some rollback segments in users tablespace, but how can I auto make these rollback segment online on database startup?
    thanks!!

    Add the name of the rollback segments to rollback_segments parameter in the init.ora file.
    edwin

  • Rollback segment Error coming for 8 lacks Record while creating MV

    Hi All,
    i am creating a materialized View and it gives us 8 lacks record but when we creates in production its fails due to rollback segment does not have enough space to handle it and it did not create the MV.
    can anyone help me out to resolve this issue for the below query while creating MV.
    SELECT DISTINCT NVL
    ((ROUND ((jt_date_completed - jt_date_requested) * 24, 2)
    0
    ) AS actual_hrs_to_complete,
    NVL ((ROUND ((jt_date_responded - jt_date_requested) * 24, 2)
    0
    ) AS actual_hrs_to_respond,
    peo1.peo_name AS agent_name,
    peo1.peo_user_name AS asagent_soe_id,
    le.lglent_desc AS ap_system,
    ' ' AS assign_work_request_comment,
    DECODE (jt.jt_bill_id,
    138802, 'CLIENT BILLABLE',
    138803, 'CONTRACTED',
    138804, 'INTERNAL BILLABLE',
    NULL, ' '
    ) AS billable,
    bl.bldg_name_cc AS building, bl.bldg_id_ls AS building_id,
    DECODE (bl.bldg_active_cc,
    'Y', 'ACTIVE',
    'INACTIVE'
    ) AS building_status,
    DECODE (jt.jt_wrk_cause_id,
    141521, 'STANDARD WEAR AND TEAR',
    141522, 'NEGLIGENCE',
    141523, 'ACCIDENTAL',
    141524, 'MECHANICAL MALFUNCTION',
    141525, 'OVERSIGHT',
    141526, 'VANDAL',
    141527, 'STANDARD',
    141528, 'PROJECT WORK',
    6058229, 'TEST',
    NULL, ' '
    ) AS cause_type,
    ' ' AS comments, peo3.peo_name AS completed_by,
    jt.jt_requestor_email AS contact_email,
    jt.jt_requestor_name_first
    || ' '
    || jt.jt_requestor_name_last AS contact_name,
    jt.jt_requestor_phone AS contact_phone,
    cc.cstctrcd_apcode AS corp_code,
    cc.cstctrcd_code AS cost_center,
    jt.jt_date_closed AS date_closed,
    jt.jt_date_completed AS date_completed,
    jt.jt_date_requested AS date_requested,
    jt.jt_date_responded AS date_responded,
    jt.jt_date_response_ecd AS date_response_ecd,
    jt.jt_date_scheduled AS date_scheduled,
    DECODE (jt.jt_def_id,
    139949, 'WTG VENDOR RESPONSE',
    139950, 'WAITING ON PARTS',
    139951, 'LABOR AVAILABILITY',
    139952, 'DEFERRED- HI PRI WORK',
    139953, 'WTG APPROVAL',
    139954, 'FUNDING REQUIRED',
    139955, 'ACCESS DENIED',
    139956, 'WTG MATERIAL',
    NULL, ' '
    ) AS deferral_reason,
    jt.jt_description AS description,
    jt.jt_date_resched_ecd AS ecd,
    fmg.facility_manager AS facility_manager,
    fl.floors_text AS FLOOR, gl.genled_desc AS general_ledger,
    ' ' AS kiosk_date_requested, ' ' AS kiosk_dispatch_confirmed,
    ' ' AS kiosk_dispatched,
    eqp.equip_customer_code AS linked_equipment_alias,
    eqp.equip_id AS linked_equipment_id,
    eqp.equip_text AS linked_equipment_name,
    DECODE (jt_originator_type_id,
    1000, 'PROJECT MOVE REQUEST',
    138834, 'CUSTOMER INITIATED CORRECTION',
    138835, 'CUSTOMER INITIATED REQUEST',
    138836, 'CORRECTIVE MAINTENANCE',
    138837, 'CONFERENCE ROOM BOOKING',
    138838, 'PROJECT INITIATED REQUEST',
    138839, 'PLANNED PREVENTIVE MAINTENANCE',
    138840, 'SELF INITATED REQUEST',
    NULL, ' '
    ) AS originator_type,
    ' ' AS payment_terms, priority_text AS priority_code,
    swoty.sworktype_text AS problem_type,
    prop.property_name_cc AS property,
    jt.jt_cost_quote_total AS quote_total,
    par.levels_name AS region,
    DECODE (jt.jt_repdef_id,
    141534, 'ADJUSTED SETTING',
    141535, 'TRAINING FOR END',
    141536, 'NEW REQUEST',
    141537, 'NO REPAIR REQUIR',
    141538, 'REPLACED PARTS',
    141539, 'REPLACE EQUIPMEN',
    1000699, 'NEW REQUEST',
    NULL, ' '
    ) AS repair_definitions,
    jt.jt_repairdesc AS repair_description,
    jt.jt_requestor AS requestor, ' ' AS requestor_cost_center,
    jt.jt_requestor_email AS requestor_email,
    jt.jt_requestor_name_first AS requestor_name,
    jt.jt_requestor_phone AS requestor_phone,
    ' ' AS response_time, rm.room_name_cc AS room,
    p1.peo_provider_code1 AS service_provider,
    p1.peo_address_1 AS service_provider_address,
    peocity.city_text service_provider_city,
    p1.peo_provider_code1 AS service_provider_code,
    peocity.city_country_name AS service_provider_country,
    peocur.currency_text AS service_provider_currency,
    p1.peo_name AS service_provider_description,
    p1.peo_dispatch_method AS serv_prov_dispatc_hmethod,
    p1.peo_rate_double AS serv_prov_double_time_rate,
    p1.peo_email AS service_provider_email,
    p1.peo_emergency_phone AS serv_prov_emergency_phone,
    p1.peo_fax AS service_provider_fax_number,
    p1.peo_home_phone AS service_provider_home_phone,
    p1.peo_rate_hourly AS service_provider_hourly_rate,
    p1.peo_title AS service_provider_job_title,
    p1.peo_method_id AS service_provider_method,
    p1.peo_cell_phone AS service_provider_mobile_phone,
    p1.peo_pager AS service_provider_pager,
    p1.peo_rate_differential AS service_provider_rates,
    p1.peo_rate_differential AS ser_prov_shift_differential,
    peocity.city_state_prov_text AS serv_prov_state_province,
    DECODE (p1.peo_active,
    'Y', 'ACTIVE',
    'INACTIVE'
    ) AS service_provider_status,
    p1.peo_url AS serv_prov_web_site_address,
    p1.peo_phone AS service_provider_work_phone,
    p1.peo_postal_code AS serv_prov_zip_postal_code, ' ' AS shift,
    ' ' AS skill,
    DECODE (jt.jt_bigstatus_id,
    138813, 'NEW',
    138814, 'PENDING',
    138815, 'OPEN',
    138816, 'COMPLETED',
    138817, 'CLOSED',
    138818, 'CANCELLED',
    NULL, ' '
    ) AS status,
    lev.levels_name AS subregion, ' ' AS trade,
    p1.peo_ls_interface_code1 AS vendor_id,
    p1.peo_fax AS vendor_purchasing_fax,
    p1.peo_vendor_site_code AS vendor_sitecode,
    jt.jt_id AS vendor_ticket, p1.peo_name AS vendor_companyname,
    jt.jt_requestor_vip AS vip, wo.wo_id AS work_order_no,
    jt.jt_id AS work_request,
    jt.jt_class_id AS work_request_class,
    woty.worktype_text AS work_type, ' ' AS wr_cost,
    jt.jt_description AS wr_description,
    ' ' AS wr_dispatch_method,
    DECODE (jt.jt_bigstatus_id,
    138813, 'NEW',
    138814, 'PENDING',
    138815, 'OPEN',
    138816, 'COMPLETED',
    138817, 'CLOSED',
    138818, 'CANCELLED',
    NULL, ' '
    ) AS wr_status,
    ctry.country_name AS country
    FROM citi.jobticket jt,
    citi.property prop,
    citi.bldg bl,
    citi.bldg_levels bldglvl,
    citi.LEVELS lev,
    citi.LEVELS par,
    (SELECT crstools.stragg (peo_name) facility_manager,
    bldgcon_bldg_id
    FROM citi.bldg_contacts, citi.people
    WHERE bldgcon_peo_id = peo_id
    AND bldgcon_contype_id IN (40181, 10142)
    GROUP BY bldgcon_bldg_id) fmg,
    citi.floors fl,
    citi.room rm,
    citi.general_ledger gl,
    citi.legal_entity le,
    citi.cost_center_codes cc,
    citi.equipment eqp,
    citi.worktype woty,
    citi.subworktype swoty,
    citi.work_order wo,
    citi.jt_workers jtwo,
    citi.priority,
    citi.country ctry,
    citi.people p1,
    citi.people peo3,
    citi.people peo1,
    citi.city peocity,
    citi.currency peocur
    WHERE jt.jt_bldg_id = bl.bldg_id
    AND bl.bldg_id = bldglvl.bldg_levels_bldg_id
    AND bldglvl.bldg_levels_levels_id = lev.levels_id
    AND lev.levels_parent = par.levels_id(+)
    AND prop.property_id = bl.bldg_property_id
    AND bl.bldg_active_ls <> 'N'
    AND jt.jt_floors_id = fl.floors_id(+)
    AND jt.jt_room_id = rm.room_id(+)
    AND jt.jt_bldg_id = fmg.bldgcon_bldg_id(+)
    AND jt.jt_genled_id = gl.genled_id(+)
    AND gl.genled_lglent_id = le.lglent_id(+)
    AND jt.jt_cstctrcd_id = cc.cstctrcd_id(+)
    AND jt.jt_equip_id = eqp.equip_id(+)
    AND jt.jt_id = jtwo.jtw_jt_id(+)
    AND jt.jt_worktype_id = woty.worktype_id(+)
    AND jt.jt_sworktype_id = swoty.sworktype_id(+)
    AND jt.jt_wo_id = wo.wo_id
    AND jt.jt_priority_id = priority_id(+)
    AND jt.jt_date_requested >= ADD_MONTHS (SYSDATE, -12)
    AND bl.bldg_country_id = ctry.country_id
    AND jtwo.jtw_peo_id = p1.peo_id(+)
    AND p1.peo_city_id = peocity.city_id(+)
    AND jt.jt_completed_by_peo_id = peo3.peo_id(+)
    AND p1.peo_rate_currency_id = peocur.currency_id(+)
    AND jt.jt_agent_peo_id = peo1.peo_id(+);
    Regards
    shyam~

    Hi,
    Its ora-1555? IS your undo_retention sufficient?
    Since you are developer the only option you have is to tune the query?
    Am curious to know like I create materialized view so that I do not have to run complex query on the master database / or to prevent the access to master database more than once to get the same data?
    Like to know which is your case because your query seem to be too complex to be the case for former. Do you think this materialized view would be used frequently in your application?
    Regards
    Anurag Tibrewal.

Maybe you are looking for