ADDM Findings Recommendation Language

Hello.
I have a question on how to change the language that the ADDM Findings Recommendation are displayed. At this link you have a print-screen with the message I refer to.
I want to see these messages in English (the ones highlighted with green arrows).
To give some more details regarding the configuration of the instance, I should mention that initially the database was configured with a NLS_LANG (I can't remember it exactly right now), and then after a while I've changed it to ENGLISH_AMERICA.WE8MSWIN1252 because the language of sqlplus was the old one and it solved the problem and now it is English, but only the messages from ADDM findings are still in the old NLS_LANG setting.
Please let me know if you have any idea where from or how I can change this setting.
Also if you need any other detail, just tell me.
Thanks.

Every job has the NLS_ENV set on Romanian:
NLS_LANGUAGE='ROMANIAN' NLS_TERRITORY='ROMANIA' NLS_CURRENCY='LEI' NLS_ISO_CURRENCY='ROMANIA' NLS_NUMERIC_CHARACTERS=',.' NLS_CALENDAR='GREGORIAN' NLS_DATE_FORMAT='DD-MM-RRRR' NLS_DATE_LANGUAGE='ROMANIAN' NLS_SORT='ROMANIAN' NLS_TIME_FORMAT='HH24:MI:SSXFF' NLS_TIMESTAMP_FORMAT='DD-MM-RRRR HH24:MI:SSXFF' NLS_TIME_TZ_FORMAT='HH24:MI:SSXFF TZR' NLS_TIMESTAMP_TZ_FORMAT='DD-MM-RRRR HH24:MI:SSXFF TZR' NLS_DUAL_CURRENCY='LEI' NLS_COMP='BINARY' NLS_LENGTH_SEMANTICS='BYTE' NLS_NCHAR_CONV_EXCP='FALSE'
Where from can I change these settings. The instance nls is set like this:
SQL> show parameter nls
NAME                                 TYPE        VALUE
nls_calendar                         string
nls_comp                             string
nls_currency                         string
nls_date_format                      string
nls_date_language                    string
nls_dual_currency                    string
nls_iso_currency                     string
nls_language                         string      AMERICAN
nls_length_semantics                 string      BYTE
nls_nchar_conv_excp                  string      FALSE
nls_numeric_characters               string
NAME                                 TYPE        VALUE
nls_sort                             string
nls_territory                        string      AMERICA
nls_time_format                      string
nls_time_tz_format                   string
nls_timestamp_format                 string
nls_timestamp_tz_format              string

Similar Messages

  • I don't see the last addm findings when I enter in Enterprise Manager

    Hello:
    I don't see the last addm findings when I enter in Enterprise Manager. The Snapshots are being taken periodically but when I enter the Home of Enterprise Manager I don't see the findings of ADDM. I can run manually ADDM but in fact the ADDM is run every hour. Any idea?
    I use Oracle 10r2 Enterprise edition
    Thanks
    Jordi Martin

    hi,
    looks like that you cannot upload the xml files from your agent
    you can try to perform a clean restart of your agent :
    1) emctl stop agent
    2)Remove the following files:
    $AGENT_HOME/sysman/emd/state/*
    $AGENT_HOME/sysman/emd/collection/*
    $AGENT_HOME/sysman/emd/upload/*
    $AGENT_HOME/sysman/emd/lastupld.xml
    $AGENT_HOME/sysman/emd/agntstmp.txt
    $AGENT_HOME/sysman/emd/blackouts.xml
    $AGENT_HOME/sysman/emd/protocol.ini
    3) emctl start agent
    4) emctl clearstate agent
    5) emctl secure agent your_pwd
    6) emctl upload agent
    7)emctl status agent ->to check agent status
    br,
    mrak

  • Pressing the ADDM Findings Value Results in Internal Error

    My database page shows that I have 7 ADDM findings. When I press the value, it displays a page with the following message "Internal Error has occured. Check the log file for details.".
    I have checked the log, but nothing really pops out. The database is 10g and Toad does the report with no configuration.
    Anyone with any thoughts about this?
    Thanks,
    John

    Solved the problem. Reran Catproc. It re-created the proper synonyms, etc.

  • ADDM Findings Top SQL Statements

    Hi,
    I have run addmrpt.sql for 1 month of time using snapshots and every ADDM report says that sql statement having id **** listed under top sql statements findings and recommendation is to tune using sql tunning advisor. It has 2-4 seconds elapsed time.But when i go through AWR report  instance efficiency report and all are normal.
    Can anyone please confirm whether I should recommend to tune this SQL statement to my vendor ?
    Thanks,
    TK

    below is the sql I found in ADDM. As I understood it is an intername SQL not an application SQL. When i searched it in internet found that it is related with check_oracle_health plugin. can you please help me to understand this nagios concept and the relationship it has with oracle software. And also how should I identify which methods we are using to monitor database internally?
    SELECT
    a.tablespace_name "Tablespace",
             b.status                  "Status",
             b.contents                "Type",
    b.extent_management "Extent Mgmt",
             a.bytes                   bytes,
             a.maxbytes                bytes_max,
             c.bytes_free + NVL(d.bytes_expired,0) bytes_free
             FROM
             -- belegter und maximal verfuegbarer platz pro datafile
             -- nach tablespacenamen zusammengefasst
             -- => bytes
             -- => maxbytes
             SELECT
             a.tablespace_name,
             SUM(a.bytes)          bytes,
    SUM(DECODE(a.autoextensible, 'YES', a.maxbytes, 'NO', a.bytes))
             maxbytes
             FROM
             dba_data_files a
             GROUP BY
             tablespace_name
             ) a,
             sys.dba_tablespaces b,
             -- freier platz pro tablespace
             -- => bytes_free
             SELECT
             a.tablespace_name,
             SUM(a.bytes) bytes_free
             FROM
             dba_free_space a
             GROUP BY
             tablespace_name
             ) c,
             -- freier platz durch expired extents
             -- speziell fuer undo tablespaces
             -- => bytes_expired
             SELECT
             a.tablespace_name,
             SUM(a.bytes) bytes_expired
             FROM
             dba_undo_extents a
             WHERE
             status = 'EXPIRED'
             GROUP BY
             tablespace_name
             ) d
             WHERE
             a.tablespace_name = c.tablespace_name
             AND a.tablespace_name = b.tablespace_name@@@@@@@@
             AND a.tablespace_name = d.tablespace_name
             UNION ALL
             SELECT
             d.tablespace_name "Tablespace",
             b.status "Status",
             b.contents "Type",
             b.extent_management "Extent Mgmt",
             sum(a.bytes_free + a.bytes_used) bytes,   -- allocated
    SUM(DECODE(d.autoextensible, 'YES', d.maxbytes, 'NO', d.bytes))
             bytes_max,
             SUM(a.bytes_free + a.bytes_used - NVL(c.bytes_used, 0)) bytes_free
             FROM
    sys.v_$TEMP_SPACE_HEADER a,
             sys.dba_tablespaces b,
    sys.v_$Temp_extent_pool c,
             dba_temp_files d
             WHERE
             c.file_id(+)             = a.file_id
             and c.tablespace_name(+) = a.tablespace_name
             and d.file_id            = a.file_id
             and d.tablespace_name    = a.tablespace_name
             and b.tablespace_name    = a.tablespace_name
             GROUP BY
             b.status,
             b.contents,
             b.extent_management,
             d.tablespace_name
             ORDER BY
             1

  • ADDM Findings

    hi
    I get a finding 'Individual database segments responsible for significant
    user I/O wait were found' when i run ADDM
    Pls anybody help me to elaborate this.
    Database 10g rel2
    Windows 2003 EE 32 bit
    sga_max_size=1.5 gb
    db_cache=1gb
    pga=3 gb
    dedicated server
    sga

    Oracle instance parameters could be considered for tuning on this issue if memory advisors show constant low ratios, otherwise, the reason for poor segment performance could be explained depending if it is due to queries (multiple processes creating a bottle neck) or transactions (manually managed segments with an associated high cpu usage).
    ~ Madrid

  • Dubts about ADDM

    I'll try to understand something about ADDM. I just looking for my question in offical doc. and in other book but i don't find any answer.
    1) Where ADDM store its report (on AWR table? on other table on SYSAUX tablespace?)
    2) What process (mmon, mmnl, a simpler scheduler..) "deletes" the expired report (AWR and ADDM) ?
    Thanks!

    ADDM does not store its report output. It stores the findings, recommendations, etc.. in tables in the SYSAUX tablespace. You can view ADDM related information through the views with names starting with DBA_ADVISOR like DBA_ADVISOR_FINDINGS and DBA_ADVISOR_RECOMMENDATIONS.
    The old AWR data is purged by MMON.

  • ADDMRPT

    Hi all,
    11.2.0.1
    Aix 6.1
    This is on our DEV/UAT Server.
    Can you comment on my ADDM REPORT because the programmer is experiencing slow performance in her batch test run. She said it is not like last week.
    ======
    Activity During the Analysis Period
    Total database time was 2145 seconds.
    The average number of active sessions was .45.
    Summary of Findings
       Description                               Active Sessions      Recommendation
    s
                                                 Percent of Activity
    1  Virtual Memory Paging                     .45 | 100            1
    2  Top SQL Statements                        .39 | 87.02          5
    3  Top Segments by "User I/O" and "Cluster"  .01 | 2.37           1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Findings and Recommendations
    Finding 1: Virtual Memory Paging
    Impact is .45 active sessions, 100% of total activity.
    Significant virtual memory paging was detected on the host operating system.
       Recommendation 1: Host Configuration
       Estimated benefit is .45 active sessions, 100% of total activity.
       Action
          Host operating system was experiencing significant paging but no
          particular root cause could be detected. Investigate processes that do
          not belong to this instance running on the host that are consuming
          significant amount of virtual memory. Also consider adding more physical
          memory to the host.
    =======================
    Why is that our addm report always finds number 1 cause as Virtual Memory Paging? If I run "topas" I can not see any paging in swap.
    What does it mean by > The average number of active sessions was .45?   Is there a fraction session?
    Which of the tool in addm that recommends creation of indexes on certain column table?
    Thanks,
    pK

    Hi,
    Actually its a batch compiled pro*c program so she can not issue the sqltrace at session level.
    As dba can I run sqltrace at schema level or database level instead?
    ADDMRPT 

  • Oracle Performance tunning genral question

    Hi,
    Below is the list of Areas of Oracle db for which tunning activities are done. You are invited to comment to it weather this is complete list or need some addition or deletion. As I'm learning PT for Oracle now a days, therefore I want to expand my knowledge by sharing what I'm learning and what I need to learn.
    So comment with Open hearts on it. Espically from experts and Gurus.
    Here is the List
    1-Planning for Performance, include Storage consideration( Weather it is SAN, NAS, DAS), Network planning and host OS planning with proper configuration for running Oracle.
    2-Database desining (Not under-Normalized and not Over-Normalized with proper usage of Indexes, views and Stored Procedures)
    3- Instance tunning (Memory structure + B.g Processes)
    4- Session tunning.
    5- Segment Space tunning.
    6- SQL tunning.
    This is what uptill what I've learned. If it needs addition kindly tell me what are these. Please also provide me links(good and precise one) for PT tutorials on web.Also note that I'm discussing this w.r.t Single instance non-rac db.
    Looking for Good sugessions
    Regards,
    Abbasi

    Hello,
    This is the oracle course contents:
    Contents
    Preface
    1 Introduction
    Course Objectives 1-2
    Organization 1-3
    Agenda 1-4
    What Is Not Included 1-6
    Who Tunes? 1-7
    What Does the DBA Tune? 1-8
    How to Tune 1-10
    Tuning Methodology 1-11
    Effective Tuning Goals 1-13
    General Tuning Session 1-15
    Summary 1-17
    2 Basic Tuning Tools
    Objectives 2-2
    Performance Tuning Diagnostics 2-3
    Performance Tuning Tools 2-4
    Tuning Objectives 2-5
    Top Wait Events 2-6
    DB Time 2-7
    CPU and Wait Time Tuning Dimensions 2-8
    Time Model: Overview 2-9
    Time Model Statistics Hierarchy 2-10
    Time Model Example 2-12
    Dynamic Performance Views 2-13
    Dynamic Performance Views: Usage Examples 2-14
    Dynamic Performance Views: Considerations 2-15
    Statistic Levels 2-16
    Statistics and Wait Events 2-18
    System Statistic Classes 2-19
    Displaying Statistics 2-20
    Displaying SGA Statistics 2-22
    Wait Events 2-23
    Using the V$EVENT_NAME View 2-24
    Wait Classes 2-25
    Displaying Wait Event Statistics 2-26
    Oracle Internal & Oracle Academy Use Only
    iv
    Commonly Observed Wait Events 2-28
    Using the V$SESSION_WAIT View 2-29
    Precision of System Statistics 2-31
    Using Features of the Packs 2-32
    Accessing the Database Home Page 2-34
    Enterprise Manager Performance Pages 2-35
    Viewing the Alert Log 2-37
    Using Alert Log Information as an Aid in Tuning 2-38
    User Trace Files 2-40
    Background Processes Trace Files 2-41
    Summary 2-42
    Practice 2 Overview: Using Basic Tools 2-43
    3 Using Automatic Workload Repository
    Objectives 3-2
    Automatic Workload Repository: Overview 3-3
    Automatic Workload Repository Data 3-4
    Workload Repository 3-5
    Database Control and AWR 3-6
    AWR Snapshot Purging Policy 3-7
    AWR Snapshot Settings 3-8
    Manual AWR Snapshots 3-9
    Managing Snapshots with PL/SQL 3-10
    Generating AWR Reports in EM 3-11
    Generating AWR Reports in SQL*Plus 3-12
    Reading the AWR Report 3-13
    Snapshots and Periods Comparisons 3-14
    Compare Periods: Benefits 3-15
    Compare Periods: Results 3-16
    Compare Periods: Report 3-17
    Compare Periods: Load Profile 3-18
    Compare Periods: Top Events 3-19
    Summary 3-20
    Practice 3 Overview: Using AWR-Based Tools 3-21
    4 Defining Problems
    Objectives 4-2
    Defining the Problem 4-3
    Limit the Scope 4-4
    Setting the Priority 4-5
    Top Wait Events 4-6
    Oracle Internal & Oracle Academy Use Only
    v
    Setting the Priority: Example 4-7
    Top SQL Reports 4-8
    Common Tuning Problems 4-9
    Tuning Life Cycle Phases 4-11
    Tuning During the Life Cycle 4-12
    Application Design and Development 4-13
    Testing: Database Configuration 4-14
    Deployment 4-15
    Production 4-16
    Migration, Upgrade, and Environment Changes 4-17
    ADDM Tuning Session 4-18
    Performance Versus Business Requirements 4-19
    Performance Tuning Resources 4-20
    Filing a Performance Service Request 4-21
    RDA Report 4-22
    Monitoring and Tuning Tool: Overview 4-23
    Summary 4-25
    Practice 4 Overview: Identifying the Problem 4-26
    5 Using Metrics and Alerts
    Objectives 5-2
    Metrics, Alerts, and Baselines 5-3
    Limitation of Base Statistics 5-4
    Typical Delta Tools 5-5
    Oracle Database 11g Solution: Metrics 5-6
    Benefits of Metrics 5-7
    Viewing Metric History Information 5-8
    Using EM to View Metric Details 5-9
    Statistic Histograms 5-10
    Histogram Views 5-11
    Server-Generated Alerts 5-12
    Database Control Usage Model 5-13
    Setting Thresholds 5-14
    Creating and Testing an Alert 5-15
    Metric and Alert Views 5-16
    View User-Defined SQL Metrics 5-17
    Create User-Defined SQL Metrics 5-18
    View User-Defined Host Metrics 5-19
    Create User-Defined Host Metrics 5-20
    Summary 5-21
    Practice Overview 5: Working with Metrics 5-22
    Oracle Internal & Oracle Academy Use Only
    vi
    6 Baselines
    Objectives 6-2
    Comparative Performance Analysis with AWR Baselines 6-3
    Automatic Workload Repository Baselines 6-4
    Moving Window Baseline 6-5
    Baselines in Performance Page Settings 6-6
    Baseline Templates 6-7
    AWR Baselines 6-8
    Creating AWR Baselines 6-9
    Single AWR Baseline 6-10
    Creating a Repeating Baseline Template 6-11
    Managing Baselines with PL/SQL 6-12
    Generating a Baseline Template for a Single Time Period 6-13
    Creating a Repeating Baseline Template 6-14
    Baseline Views 6-15
    Performance Monitoring and Baselines 6-17
    Defining Alert Thresholds Using a Static Baseline 6-19
    Using EM to Quickly Configure Adaptive Thresholds 6-20
    Changing Adaptive Threshold Settings 6-22
    Summary 6-23
    Practice 6: Overview Using AWR Baselines 6-24
    7 Using AWR-Based Tools
    Objectives 7-2
    Automatic Maintenance Tasks 7-3
    Maintenance Windows 7-4
    Default Maintenance Plan 7-5
    Automated Maintenance Task Priorities 7-6
    Tuning Automatic Maintenance Tasks 7-7
    ADDM Performance Monitoring 7-8
    ADDM and Database Time 7-9
    DBTime-Graph and ADDM Methodology 7-10
    Top Performance Issues Detected 7-12
    Database Control and ADDM Findings 7-13
    ADDM Analysis Results 7-14
    ADDM Recommendations 7-15
    Database Control and ADDM Task 7-16
    Changing ADDM Attributes 7-17
    Retrieving ADDM Reports by Using SQL 7-18
    Active Session History: Overview 7-19
    Active Session History: Mechanics 7-20
    Oracle Internal & Oracle Academy Use Only
    vii
    ASH Sampling: Example 7-21
    Accessing ASH Data 7-22
    Dump ASH to File 7-23
    Analyzing the ASH Data 7-24
    Generating ASH Reports 7-25
    ASH Report Script 7-26
    ASH Report: General Section 7-27
    ASH Report Structure 7-28
    ASH Report: Activity Over Time 7-29
    Summary 7-30
    Practice 7 Overview: Using AWR-Based Tools 7-31
    8 Monitoring an Application
    Objectives 8-2
    What Is a Service? 8-3
    Service Attributes 8-4
    Service Types 8-5
    Creating Services 8-6
    Managing Services in a Single-Instance Environment 8-7
    Everything Switches to Services 8-8
    Using Services with Client Applications 8-9
    Using Services with the Resource Manager 8-10
    Services and Resource Manager with EM 8-11
    Services and the Resource Manager: Example 8-12
    Using Services with the Scheduler 8-13
    Services and the Scheduler with EM 8-14
    Services and the Scheduler: Example 8-16
    Using Services with Parallel Operations 8-17
    Using Services with Metric Thresholds 8-18
    Changing Service Thresholds by Using EM 8-19
    Services and Metric Thresholds: Example 8-20
    Service Aggregation and Tracing 8-21
    Top Services Performance Page 8-22
    Service Aggregation Configuration 8-23
    Service Aggregation: Example 8-24
    Client Identifier Aggregation and Tracing 8-25
    trcsess Utility 8-26
    Service Performance Views 8-27
    Summary 8-29
    Practice 8 Overview: Using Services 8-30
    Oracle Internal & Oracle Academy Use Only
    viii
    9 Identifying Problem SQL Statements
    Objectives 9-2
    SQL Statement Processing Phases 9-3
    Parse Phase 9-4
    SQL Storage 9-5
    Cursor Usage and Parsing 9-6
    SQL Statement Processing Phases: Bind 9-8
    SQL Statement Processing Phases: Execute and Fetch 9-9
    Processing a DML Statement 9-10
    COMMIT Processing 9-12
    Role of the Oracle Optimizer 9-13
    Identifying Bad SQL 9-15
    TOP SQL Reports 9-16
    What Is an Execution Plan? 9-17
    Methods for Viewing Execution Plans 9-18
    Uses of Execution Plans 9-19
    DBMS_XPLAN Package: Overview 9-20
    EXPLAIN PLAN Command 9-22
    EXPLAIN PLAN Command: Example 9-23
    EXPLAIN PLAN Command: Output 9-24
    Reading an Execution Plan 9-25
    Using the V$SQL_PLAN View 9-26
    V$SQL_PLAN Columns 9-27
    Querying V$SQL_PLAN 9-28
    V$SQL_PLAN_STATISTICS View 9-29
    Querying the AWR 9-30
    SQL*Plus AUTOTRACE 9-32
    Using SQL*Plus AUTOTRACE 9-33
    SQL*Plus AUTOTRACE: Statistics 9-34
    SQL Trace Facility 9-35
    How to Use the SQL Trace Facility 9-37
    Initialization Parameters 9-38
    Enabling SQL Trace 9-40
    Disabling SQL Trace 9-41
    Formatting Your Trace Files 9-42
    TKPROF Command Options 9-43
    Output of the TKPROF Command 9-45
    TKPROF Output with No Index: Example 9-50
    TKPROF Output with Index: Example 9-51
    Generate an Optimizer Trace 9-52
    Oracle Internal & Oracle Academy Use Only
    ix
    Summary 9-53
    Practice Overview 9: Using Execution Plan Utilities 9-54
    10 Influencing the Optimizer
    Objectives 10-2
    Functions of the Query Optimizer 10-3
    Selectivity 10-5
    Cardinality and Cost 10-6
    Changing Optimizer Behavior 10-7
    Using Hints 10-8
    Optimizer Statistics 10-9
    Extended Statistics 10-10
    Controlling the Behavior of the Optimizer with Parameters 10-11
    Enabling Query Optimizer Features 10-13
    Influencing the Optimizer Approach 10-14
    Optimizing SQL Statements 10-15
    Access Paths 10-16
    Choosing an Access Path 10-17
    Full Table Scans 10-18
    Row ID Scans 10-20
    Index Operations 10-21
    B*Tree Index Operations 10-22
    Bitmap Indexes 10-23
    Bitmap Index Access 10-24
    Combining Bitmaps 10-25
    Bitmap Operations 10-26
    Join Operations 10-27
    Join Methods 10-28
    Nested Loop Joins 10-29
    Hash Joins 10-31
    Sort-Merge Joins 10-32
    Join Performance 10-34
    How the Query Optimizer Chooses Execution Plans for Joins 10-35
    Sort Operations 10-37
    Tuning Sort Performance 10-38
    Reducing the Cost 10-39
    Index Maintenance 10-40
    Dropping Indexes 10-42
    Creating Indexes 10-43
    SQL Access Advisor 10-44
    Table Maintenance for Performance 10-45
    Oracle Internal & Oracle Academy Use Only
    x
    Table Reorganization Methods 10-46
    Summary 10-47
    Practice 10 Overview: Influencing the Optimizer 10-48
    11 Using SQL Performance Analyzer
    Objectives 11-2
    Real Application Testing: Overview 11-3
    Real Application Testing: Use Cases 11-4
    SQL Performance Analyzer: Process 11-5
    Capturing the SQL Workload 11-7
    Creating a SQL Performance Analyzer Task 11-8
    SQL Performance Analyzer: Tasks 11-9
    Optimizer Upgrade Simulation 11-10
    SQL Performance Analyzer Task Page 11-11
    Comparison Report 11-12
    Comparison Report SQL Detail 11-13
    Tuning Regressing Statements 11-14
    Preventing Regressions 11-16
    Parameter Change Analysis 11-17
    Guided Workflow Analysis 11-18
    SQL Performance Analyzer: PL/SQL Example 11-19
    SQL Performance Analyzer: Data Dictionary Views 11-21
    Summary 11-22
    Practice 11: Overview 11-23
    12 SQL Performance Management
    Objectives 12-2
    Maintaining SQL Performance 12-3
    Maintaining Optimizer Statistics 12-4
    Automated Maintenance Tasks 12-5
    Statistic Gathering Options 12-6
    Setting Statistic Preferences 12-7
    Restore Statistics 12-9
    Deferred Statistics Publishing: Overview 12-10
    Deferred Statistics Publishing: Example 12-12
    Automatic SQL Tuning: Overview 12-13
    SQL Statement Profiling 12-14
    Plan Tuning Flow and SQL Profile Creation 12-15
    SQL Tuning Loop 12-16
    Using SQL Profiles 12-17
    SQL Tuning Advisor: Overview 12-18
    Oracle Internal & Oracle Academy Use Only
    xi
    Using the SQL Tuning Advisor 12-19
    SQL Tuning Advisor Options 12-20
    SQL Tuning Advisor Recommendations 12-21
    Using the SQL Tuning Advisor: Example 12-22
    Using the SQL Access Advisor 12-23
    View Recommendations 12-25
    View Recommendation Details 12-26
    SQL Plan Management: Overview 12-27
    SQL Plan Baseline: Architecture 12-28
    Loading SQL Plan Baselines 12-30
    Evolving SQL Plan Baselines 12-31
    Important Baseline SQL Plan Attributes 12-32
    SQL Plan Selection 12-34
    Possible SQL Plan Manageability Scenarios 12-36
    SQL Performance Analyzer and SQL Plan Baseline Scenario 12-37
    Loading a SQL Plan Baseline Automatically 12-38
    Purging SQL Management Base Policy 12-39
    Enterprise Manager and SQL Plan Baselines 12-40
    Summary 12-41
    Practice 12: Overview Using SQL Plan Management 12-42
    13 Using Database Replay
    Objectives 13-2
    Using Database Replay 13-3
    The Big Picture 13-4
    System Architecture: Capture 13-5
    System Architecture: Processing the Workload 13-7
    System Architecture: Replay 13-8
    Capture Considerations 13-9
    Replay Considerations: Preparation 13-10
    Replay Considerations 13-11
    Replay Options 13-12
    Replay Analysis 13-13
    Database Replay Workflow in Enterprise Manager 13-15
    Capturing Workload with Enterprise Manager 13-16
    Capture Wizard: Plan Environment 13-17
    Capture Wizard: Options 13-18
    Capture Wizard: Parameters 13-19
    Viewing Capture Progress 13-20
    Viewing Capture Report 13-21
    Export Capture AWR Data 13-22
    Oracle Internal & Oracle Academy Use Only
    xii
    Viewing Workload Capture History 13-23
    Processing Captured Workload 13-24
    Using the Preprocess Captured Workload Wizard 13-25
    Using the Replay Workload Wizard 13-26
    Replay Workload: Prerequisites 13-27
    Replay Workload: Choose Initial Options 13-28
    Replay Workload: Customize Options 13-29
    Replay Workload: Prepare Replay Clients 13-30
    Replay Workload: Client Connections 13-31
    Replay Workload: Replay Started 13-32
    Viewing Workload Replay Progress 13-33
    Viewing Workload Replay Statistics 13-34
    Packages and Procedures 13-36
    Data Dictionary Views: Database Replay 13-37
    Database Replay: PL/SQL Example 13-38
    Calibrating Replay Clients 13-40
    Summary 13-41
    Practice 13: Overview 13-42
    14 Tuning the Shared Pool
    Objectives 14-2
    Shared Pool Architecture 14-3
    Shared Pool Operation 14-4
    The Library Cache 14-5
    Latch and Mutex 14-7
    Latch and Mutex: Views and Statistics 14-9
    Diagnostic Tools for Tuning the Shared Pool 14-11
    AWR/Statspack Indicators 14-13
    Load Profile 14-14
    Instance Efficiencies 14-15
    Top Waits 14-16
    Time Model 14-17
    Library Cache Activity 14-19
    Avoid Hard Parses 14-20
    Are Cursors Being Shared? 14-21
    Sharing Cursors 14-23
    Adaptive Cursor Sharing: Example 14-25
    Adaptive Cursor Sharing Views 14-27
    Interacting with Adaptive Cursor Sharing 14-28
    Avoiding Soft Parses 14-29
    Sizing the Shared Pool 14-30
    Oracle Internal & Oracle Academy Use Only
    xiii
    Shared Pool Advisory 14-31
    Shared Pool Advisor 14-33
    Avoiding Fragmentation 14-34
    Large Memory Requirements 14-35
    Tuning the Shared Pool Reserved Space 14-37
    Keeping Large Objects 14-39
    Data Dictionary Cache 14-41
    Dictionary Cache Misses 14-42
    SQL Query Result Cache: Overview 14-43
    Managing the SQL Query Result Cache 14-44
    Using the RESULT_CACHE Hint 14-46
    Using the DBMS_RESULT_CACHE Package 14-47
    Viewing SQL Result Cache Dictionary Information 14-48
    SQL Query Result Cache: Considerations 14-49
    UGA and Oracle Shared Server 14-50
    Large Pool 14-51
    Tuning the Large Pool 14-52
    Summary 14-53
    Practice Overview 14: Tuning the Shared Pool 14-54
    15 Tuning the Buffer Cache
    Objectives 15-2
    Oracle Database Architecture 15-3
    Buffer Cache: Highlights 15-4
    Database Buffers 15-5
    Buffer Hash Table for Lookups 15-6
    Working Sets 15-7
    Tuning Goals and Techniques 15-9
    Symptoms 15-11
    Cache Buffer Chains Latch Contention 15-12
    Finding Hot Segments 15-13
    Buffer Busy Waits 15-14
    Calculating the Buffer Cache Hit Ratio 15-15
    Buffer Cache Hit Ratio Is Not Everything 15-16
    Interpreting Buffer Cache Hit Ratio 15-17
    Read Waits 15-19
    Free Buffer Waits 15-21
    Solutions 15-22
    Sizing the Buffer Cache 15-23
    Buffer Cache Size Parameters 15-24
    Dynamic Buffer Cache Advisory Parameter 15-25
    Oracle Internal & Oracle Academy Use Only
    xiv
    Buffer Cache Advisory View 15-26
    Using the V$DB_CACHE_ADVICE View 15-27
    Using the Buffer Cache Advisory with EM 15-28
    Caching Tables 15-29
    Multiple Buffer Pools 15-30
    Enabling Multiple Buffer Pools 15-32
    Calculating the Hit Ratio for Multiple Pools 15-33
    Multiple Block Sizes 15-35
    Multiple Database Writers 15-36
    Multiple I/O Slaves 15-37
    Use Multiple Writers or I/O Slaves 15-38
    Private Pool for I/O Intensive Operations 15-39
    Automatically Tuned Multiblock Reads 15-40
    Flushing the Buffer Cache (for Testing Only) 15-41
    Summary 15-42
    Practice 15: Overview Tuning the Buffer Cache 15-43
    16 Tuning PGA and Temporary Space
    Objectives 16-2
    SQL Memory Usage 16-3
    Performance Impact 16-4
    Automatic PGA Memory 16-5
    SQL Memory Manager 16-6
    Configuring Automatic PGA Memory 16-8
    Setting PGA_AGGREGATE_TARGET Initially 16-9
    Monitoring SQL Memory Usage 16-10
    Monitoring SQL Memory Usage: Examples 16-12
    Tuning SQL Memory Usage 16-13
    PGA Target Advice Statistics 16-14
    PGA Target Advice Histograms 16-15
    Automatic PGA and Enterprise Manager 16-16
    Automatic PGA and AWR Reports 16-17
    Temporary Tablespace Management: Overview 16-18
    Temporary Tablespace: Best Practice 16-19
    Configuring Temporary Tablespace 16-20
    Temporary Tablespace Group: Overview 16-22
    Temporary Tablespace Group: Benefits 16-23
    Creating Temporary Tablespace Groups 16-24
    Maintaining Temporary Tablespace Groups 16-25
    View Tablespace Groups 16-26
    Monitoring Temporary Tablespace 16-27
    Oracle Internal & Oracle Academy Use Only
    xv
    Temporary Tablespace Shrink 16-28
    Tablespace Option for Creating Temporary Table 16-29
    Summary 16-30
    Practice Overview 16: Tuning PGA Memory 16-31
    17 Automatic Memory Management
    Objectives 17-2
    Oracle Database Architecture 17-3
    Dynamic SGA 17-4
    Granule 17-5
    Memory Advisories 17-6
    Manually Adding Granules to Components 17-7
    Increasing the Size of an SGA Component 17-8
    Automatic Shared Memory Management: Overview 17-9
    SGA Sizing Parameters: Overview 17-10
    Dynamic SGA Transfer Modes 17-11
    Memory Broker Architecture 17-12
    Manually Resizing Dynamic SGA Parameters 17-13
    Behavior of Auto-Tuned SGA Parameters 17-14
    Behavior of Manually Tuned SGA Parameters 17-15
    Using the V$PARAMETER View 17-16
    Resizing SGA_TARGET 17-17
    Disabling Automatic Shared Memory Management 17-18
    Configuring ASMM 17-19
    SGA Advisor 17-20
    Monitoring ASMM 17-21
    Automatic Memory Management: Overview 17-22
    Oracle Database Memory Parameters 17-24
    Automatic Memory Parameter Dependency 17-25
    Enabling Automatic Memory Management 17-26
    Monitoring Automatic Memory Management 17-27
    DBCA and Automatic Memory Management 17-29
    Summary 17-30
    Practice 17: Overview Using Automatic Memory Tuning 17-31
    Oracle Internal & Oracle Academy Use Only
    xvi
    18 Tuning Segment Space Usage
    Objectives 18-2
    Space Management 18-3
    Extent Management 18-4
    Locally Managed Extents 18-5
    Large Extents: Considerations 18-6
    How Table Data Is Stored 18-8
    Anatomy of a Database Block 18-9
    Minimize Block Visits 18-10
    The DB_BLOCK_SIZE Parameter 18-11
    Small Block Size: Considerations 18-12
    Large Block Size: Considerations 18-13
    Block Allocation 18-14
    Free Lists 18-15
    Block Space Management 18-16
    Block Space Management with Free Lists 18-17
    Automatic Segment Space Management 18-19
    Automatic Segment Space Management at Work 18-20
    Block Space Management with ASSM 18-22
    Creating an Automatic Segment Space Management Segment 18-23
    Migration and Chaining 18-24
    Guidelines for PCTFREE and PCTUSED 18-26
    Detecting Migration and Chaining 18-27
    Selecting Migrated Rows 18-28
    Eliminating Migrated Rows 18-29
    Shrinking Segments: Overview 18-31
    Shrinking Segments: Considerations 18-32
    Shrinking Segments by Using SQL 18-33
    Segment Shrink: Basic Execution 18-34
    Segment Shrink: Execution Considerations 18-35
    Using EM to Shrink Segments 18-36
    Table Compression: Overview 18-37
    Table Compression Concepts 18-38
    Using Table Compression 18-39
    Summary 18-40
    19 Tuning I/O
    Objectives 19-2
    I/O Architecture 19-3
    File System Characteristics 19-4
    I/O Modes 19-5
    Oracle Internal & Oracle Academy Use Only
    xvii
    Direct I/O 19-6
    Bandwidth Versus Size 19-7
    Important I/O Metrics for Oracle Databases 19-8
    I/O Calibration and Enterprise Manager 19-10
    I/O Calibration and the PL/SQL Interface 19-11
    I/O Statistics: Overview 19-13
    I/O Statistics and Enterprise Manager 19-14
    Stripe and Mirror Everything 19-16
    Using RAID 19-17
    RAID Cost Versus Benefits 19-18
    Should I Use RAID 1 or RAID 5? 19-20
    Diagnostics 19-21
    Database I/O Tuning 19-22
    What Is Automatic Storage Management? 19-23
    Tuning ASM 19-24
    How Many Disk Groups per Database 19-25
    Which RAID Configuration for Best Availability? 19-26
    ASM Mirroring Guidelines 19-27
    ASM Striping Granularity 19-28
    What Type of Striping Works Best? 19-29
    ASM Striping Only 19-30
    Hardware RAID Striped LUNs 19-31
    ASM Guidelines 19-32
    ASM Instance Initialization Parameters 19-33
    Dynamic Performance Views 19-34
    Monitoring Long-Running Operations by Using V$ASM_OPERATION 19-36
    ASM Instance Performance Diagnostics 19-37
    ASM Performance Page 19-38
    Database Instance Parameter Changes 19-39
    ASM Scalability 19-40
    Summary 19-41
    20 Performance Tuning Summary
    Objectives 20-2
    Necessary Initialization Parameters with Little Performance Impact 20-3
    Important Initialization Parameters with Performance Impact 20-4
    Sizing Memory Initially 20-6
    Database High Availability: Best Practices 20-7
    Undo Tablespace: Best Practices 20-8
    Temporary Tablespace: Best Practices 20-9
    General Tablespace: Best Practices 20-11
    Internal Fragmentation Considerations 20-12
    Oracle Internal & Oracle Academy Use Only
    xviii
    Block Size: Advantages and Disadvantages 20-13
    Automatic Checkpoint Tuning 20-14
    Sizing the Redo Log Buffer 20-15
    Sizing Redo Log Files 20-16
    Increasing the Performance of Archiving 20-17
    Automatic Statistics Gathering 20-19
    Automatic Statistics Collection: Considerations 20-20
    Commonly Observed Wait Events 20-21
    Additional Statistics 20-22
    Top 10 Mistakes Found in Customer Systems 20-23
    Summary 20-25
    Appendix A: Practices and Solutions
    Appendix B: Using Statspack
    Index

  • Cataloguing Solaris groups

    I created an OPML file of major Solaris discussion groups
    that provide RSS feeds. (An OPML file is a standard file
    format for sharing lists of RSS feeds such as BLOGs. More
    on this later.) It can be downloaded here:
        http://www.speakeasy.org/~boutilier/import.xml
    This is part of my attempt to start maintaining a list of
    "active" English-language Solaris groups and their attributes. I've
    defined "active" to mean groups that have, on average, at least a few
    messages posted per day (i.e. minimum 20 msgs per week). Following
    are the ones I know of. Please let me know if I've missed any.
    Name                  Traffic    Native Format      RSS Feed?
    comp.unix.solaris     Very high  Usenet Newsgroup    Yes
    solarisx86@yahoo      High       Mail-list           Yes
    sunmanagers.org       Med        Mail-list           Yes
    supportforum.sun.com  Med        Browser-only        Yes
    forum.sun.com         Med        Browser-only         Soon
    ITtoolbox solaris-l   Low        Mail-list            No
    Key:
      Very high ~=  500 - 700 msgs per week
      High      ~=  300 - 500    "
      Medium    ~=  100 - 300    "
      Low       ~=   20 - 100    "
    [ Posting note: The above tables don't format properly when this message
    is posted on forum.sun.com -- even though I used the `code' formatting tag ]
    Although there are 6 groups in the list above, two of them don't
    provide RSS feeds yet, therefore they aren't included in the
    OPML file. Also, one of the RSS feeds in the file is not actually
    a discussion group, it's a site that does on-the-fly aggregation of
    blog entries on planetsun.org that contain the word Solaris. (The URL
    for browsing the site is http://test.planetsun.com/solaris.)
    === Run-on message alert ===
    The rest of this message contains some findings,
    recommendations, and how-to info on the subject of RSS/OPML.
    === End Run-on message alert ===
    Personally, I have an account on bloglines.com for reading RSS
    feeds.  There are two really good things about Bloglines: It's
    free, and it's easy for RSS newbies (like me) to get up and running
    quickly. But Bloglines is web-based, and that makes it kinda slow
    and klunky. So I actually recommend using a regular RSS reader app;
    and since there are a lot of those out there, I went ahead and did
    some "comparison shopping" on places like freshmeat.net. These are
    the ones (for UNIX/Linux desktops) that piqued my interest the
    most:
    - Snownews:
      http://kiza.kcore.de/software/snownews
    - RSSOwl
      http://rssowl.sourceforge.net
    - Sage
      http://sage.mozdev.org/
    - Thunderbird and Mozilla also added RSS capabilities recently, but
      I think they lack a lot of features (like importing OPML files) that
      are standard with dedicated RSS readers and the bloglines service.
    To import the OPML file into a bloglines account, click on:
      My Feeds (tab near the top left corner)
        Edit (just under the tabs)
          Import Subscriptions (bottom of page)
    To import it into RSSOwl, see:
    http://rssowl.sourceforge.net/tutorial/en/ht_eximprint.html
    To import it into Snownews, see:
    http://kiza.kcore.de/software/snownews/download/patches/opml2snow
    Here are a couple excellent (and short) articles on RSS:
    Why is RSS Everywhere?
        http://www.wired.com/wired/archive/12.04/start.html?pg=7
    Getting Started with RSS: The Fifteen-Minute Tutorial
        http://frl.bluehighways.com/frlarchives/000123.html
    And finally, if you like reading specs, here's the one for OPML:
        http://opml.scripting.com/spec
    Eric Boutilier
    Sun Microsystems
    Operating Platforms Group

    If you're interested in tracking this project see:
    http://blogs.sun.com/roller/page/eric_boutilier/20041222#em_b_this_is_a

  • Poor database perfomance

    All,
    Recently we have faced extremely poor database performance.
    There were some observations and configuration details about environment setup.
    Configuration details
    - OS = Windows server 2003 64bit, Server RAM 16 GB
    - DB Ver = 10g 64 bit (10.2.0.1.0)
    - RAM = 16 GB, SGA 11 GB
    - Application is developed in java, and Compiere application server is used.
    - In application code to communicate with database bind variables are not used.
    - Database is ASM based, no raid configured.
    - Database is in no archive log mode, as this is not production environment, we were doing parallel run of the application.
    Observations
    - when database is started its response is much better but gradually it slow down and just after 20-30 minutes db response becomes very poor. During this time around 20-40 users were using application and there were around 150 plus database sessions.
    - during execution there are some stages when ADDM findings related to SGA size and the recommended size was around 22GB, other findings include hard parsing of queries
    I have shared the awr and stats_pack report for the time server was loaded and not performing as desired.
    for awr report visit http://asim.net84.net/awr.html
    & for stats pack report visit http://asim.net84.net/stat_pack.lst
    Any tip/guidance will be much appreciated.
    Regards,
    Asim

    right now SGA size is reduced to 4 GB, and no performance gain is observed even with less users connected with databases.
    SGA_SIZE     SGA_SIZE_FACTOR       ESTD_DB_TIME     ESTD_DB_TIME_FACTOR     ESTD_PHYSICAL_READS
    4096                    1             3027                1                 4519385
    1024                  0.25            3178              1.0499                 4646380
    2048                  0.5            3037              1.0033                 4528876
    8192                    2            3013              0.9954                 4508087
    5120                 1.25            3025              0.9993                 4518481
    6144                 1.5                    3024              0.999                 4518029
    7168                 1.75            3015              0.996                 4508538
    3072                 0.75            3031              1.0013                 4523904

  • Want help on Citical Tune Query

    ADDM suggested
    SQL statements consuming significant database time were found.
    RECOMMENDATION 1: SQL Tuning, 17% benefit (698 seconds)
    ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
    "2zcnyf9ypc2g7".
    RELEVANT OBJECT: SQL statement with SQL_ID 2zcnyf9ypc2g7 and
    PLAN_HASH 1170350465
    SELECT user_id, relation,status, to_char(ctime, :"SYS_B_0") as
    creation_at, to_char(utime, :"SYS_B_1") as last_modified_date
    FROM page_user WHERE page_id = :"SYS_B_2" AND upper(relation) =
    sys_context(:"SYS_B_3", :"SYS_B_4") AND upper(relation) =
    sys_context(:"SYS_B_5", :"SYS_B_6") AND upper(status) =
    sys_context(:"SYS_B_7", :"SYS_B_8") order by utime DESC
    Recommendations for SQL ID:2zcnyf9ypc2g7
    Only one recommendation should be implemented.
    SQL Text
    SELECT user_id, relation,status, to_char(ctime, :"SYS_B_0") as creation_at, to_char(utime, :"SYS_B_1") as last_modified_date FROM page_user WHERE page_id = :"SYS_B_2" AND upper(relation) = sys_contex...
    Select Recommendation
    Select     Type     Findings     Recommendations     Rationale     Benefit (%)     New Explain Plan     Compare Explain Plans
         Restructure SQL     The predicate UPPER("PAGE_USER"."RELATION")=SYS_CONTEXT(:B1,:B2) used at line ID 3 of the execution plan contains an expression on indexed column "RELATION". This expression prevents the optimizer from efficiently using indices on table "PAGES"."PAGE_USER".     Rewrite the predicate into an equivalent form to take advantage of indices. Alternatively, create a function-based index on the expression.     The optimizer is unable to use an index if the predicate is an inequality condition or if there is an expression or an implicit data type conversion on the indexed column.     
    Text
         SELECT user_id, relation,status, to_char(ctime, :"SYS_B_0") as creation_at, to_char(utime, :"SYS_B_1") as last_modified_date
    FROM page_user WHERE page_id = :"SYS_B_2" AND upper(relation) = sys_context(:"SYS_B_3", :"SYS_B_4") AND upper(relation) = sys_context(:"SYS_B_5", :"SYS_B_6") AND upper(status) = sys_context(:"SYS_B_7", :"SYS_B_8") order by utime DESC
    Details
    Select the plan hash value to see the details below.          Plan Hash Value     
         Statistics     Activity     
         Plan     
         Tuning Information     
         Data Source          Snapshot (4413)
         Capture Time          12-Mar-2010 16:30:33
         Parsing Schema          PAGES
         Optimizer Mode          ALL_ROWS
    Expand All | Collapse All
    Operation     Object     Object Type     Order     Rows     Size (KB)     Cost     Time (sec)     CPU Cost     I/O Cost
    [Select to collapse] SELECT STATEMENT
         5     0     0.000     5     0     0     0
    [Select to collapse] FILTER
         4     0     0.000     0     0     0     0
    [Select to collapse] SORT ORDER BY
         3     1     0.039     5     1     19,417,919     4
    [Select to collapse] TABLE ACCESS BY INDEX ROWID
         PAGE_USER     TABLE     2     1     0.039     4     1     37,794     4
    INDEX RANGE SCAN
         USER_PAGE_UK1     INDEX (UNIQUE)     1     1     0.000     3     1     30,364     3

    user8764012 wrote:
    Sir,
    Asking how to implement the advise provided by ADDM or also if you have a better suggestion to decrease the cost of the query
    SELECT user_id, relation,status, to_char(ctime, :"SYS_B_0") as
    creation_at, to_char(utime, :"SYS_B_1") as last_modified_date
    FROM page_user WHERE page_id = :"SYS_B_2" AND upper(relation) =
    sys_context(:"SYS_B_3", :"SYS_B_4") AND upper(relation) =
    sys_context(:"SYS_B_5", :"SYS_B_6") AND upper(status) =
    sys_context(:"SYS_B_7", :"SYS_B_8") order by utime DESC
    Restructure SQLThe predicate UPPER("PAGE_USER"."RELATION")=SYS_CONTEXT(:B1,:B2) used at line ID 3 of the execution plan contains an expression on
    indexed column "RELATION". This expression prevents the optimizer from efficiently using indices on table "PAGES"."PAGE_USER".     Rewrite the
    predicate into an equivalent form to take advantage of indices. Alternatively, create a function-based index on the expression.     The optimizer is unable to use an
    index if the predicate is an inequality condition or if there is an expression or an implicit data type conversion on the indexed column.The message is tellong you that although you have an index on RELATION the idex can't be used because you are changing the value with a function. You can do a couple of things:
    1. remove the UPPER() function from the RELATION clause elements (predicates) finding another way to force the columns to match
    2. use a function based index, based on upper(relation) something like (untested)
    create index fb_index on page_user (upper(relation));This may or may not help in the long run as function-based indexes only work when certain intialization parmeters are set (QUERY_REWRITE_ENABLED). You can read about function-based indexes in the documentation.

  • Run single, consolidated AWR report on 4 adjacent snapshots?

    We typically collect snapshots in 60 minute periods for our instances. Recently, a customer ran a test for 3.5 hours. I created an ADDM report spanning the 4 snapshots (useful). However, being able to generate an AWR report for the same 3.5 hour duration would add additional insight.
    Currently, I can generate 4 separate AWR reports, one for each hour. However, I'd like to be able to create a single, consolidated AWR report. This way, I don't have to manually sum useful numbers like Executions contained in 4 separate AWR reports for SQL ordered by Elapsed Time, etc.
    Can I create one, aggregated AWR report? Or is my only other option to revise the snapshot collection duration before the next scheduled load test occurs (e.g. to 3.5 hours for a 3.5 hour load test)? Would prefer not to have to do this. But is it the only available option to accomplish what I need?
    Thanks very much.

    Thanks Rob. I'm able to run an ADDM report for the 3.5 hour duration I need. No problem there. I want to run a consolidated "AWR report" on multiple snapshots, e.g:
    Performance > Snapshots > Click a snapshot ID > Click Report tab (by default you are on the Details tab).
    This AWR report gives a lot more information than an ADDM report.
    Can I select multiple snapshots for the AWR report? I'm already doing so with ADDM reports.
    The title for the "AWR" report I'm interested in is: "WORKLOAD REPOSITORY report for." It doesn't have ADDM findings in it because it's not making recommendations--just reporting a large amount of snapshot details.
    I'm guessing now that the answer is "no" to what I'm asking. Hope this makes sense.

  • How to change the Element structure of a DefaultSyledDocument

    Hello,
    I'm trying to override the insertUpdate method of DefaultStyledDocument so that I could build my own Element structure by adding my own BranchElement- and LeafElement-s. If I examine the Element hierarchy everything seems OK. But when I use my document in a JTextPane. I get the error Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: GlyphView: Stale view: javax.swing.text.BadLocationException: Invalid location (I add the whole dump at the end of this message), whenever I add a new line to the document (to test this compile and run the included code and press then newline after the 'He' in 'Hello'. I suspect that the error is caused by the fact that the view hierarchy is not updated correctly but I'm not sure. To be honest I have searched for a while for some example code, explaning how you can make your own element hierarchy in a DefaultStyledDocument (without using ElementBuffer), but to no avail.
    Can any of the Text gurus here shed some lights on my code and see what is wrong with it or point me to some example code.
    Thanks a lot in advance.
    Marc Mertens
    Full Stack Dump
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: GlyphView: Stale view: javax.swing.text.BadLocationException: Invalid location
    at javax.swing.text.GlyphView.getText(GlyphView.java:117)
    at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:43)
    at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:537)
    at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:689)
    at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:216)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)
    at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:325)
    at javax.swing.text.BoxView.layout(BoxView.java:682)
    at javax.swing.text.BoxView.setSize(BoxView.java:379)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1618)
    at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:812)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
    at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1227)
    at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
    at java.awt.Container.layout(Container.java:1401)
    at java.awt.Container.doLayout(Container.java:1390)
    at java.awt.Container.validateTree(Container.java:1473)
    at java.awt.Container.validate(Container.java:1448)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: GlyphView: Stale view: javax.swing.text.BadLocationException: Invalid location
    at javax.swing.text.GlyphView.getText(GlyphView.java:117)
    at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:43)
    at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:537)
    at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:689)
    at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:216)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)
    at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:325)
    at javax.swing.text.BoxView.layout(BoxView.java:682)
    at javax.swing.text.BoxView.setSize(BoxView.java:379)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1618)
    at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:946)
    at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1246)
    at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1225)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" javax.swing.text.StateInvariantError: GlyphView: Stale view: javax.swing.text.BadLocationException: Invalid location
    at javax.swing.text.GlyphView.getText(GlyphView.java:117)
    at javax.swing.text.GlyphPainter1.getSpan(GlyphPainter1.java:43)
    at javax.swing.text.GlyphView.getPreferredSpan(GlyphView.java:537)
    at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:689)
    at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:216)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:542)
    at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:879)
    at javax.swing.text.BoxView.checkRequests(BoxView.java:911)
    at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:325)
    at javax.swing.text.BoxView.layout(BoxView.java:682)
    at javax.swing.text.BoxView.setSize(BoxView.java:379)
    at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1618)
    at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:946)
    at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:952)
    at javax.swing.text.DefaultCaret.focusLost(DefaultCaret.java:347)
    at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:172)
    at java.awt.Component.processFocusEvent(Component.java:5380)
    at java.awt.Component.processEvent(Component.java:5244)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:840)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:530)
    at java.awt.Component.dispatchEventImpl(Component.java:3841)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.SentEvent.dispatch(SentEvent.java:50)
    at java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:161)
    at java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:188)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:595)
    at java.awt.Component.dispatchEventImpl(Component.java:3841)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Window.dispatchEventImpl(Window.java:1778)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    java.lang.ThreadDeath
    at java.lang.Thread.stop(Thread.java:698)
    at java.lang.ThreadGroup.stopOrSuspend(ThreadGroup.java:671)
    at java.lang.ThreadGroup.stop(ThreadGroup.java:584)
    at org.netbeans.core.execution.DefaultSysProcess.stop(DefaultSysProcess.java:54)
    at org.netbeans.core.execution.ProcessNodeItem$1.stop(ProcessNodeItem.java:41)
    at org.netbeans.core.execution.ProcessNodeItem$TerminateProcessAction.performAction(ProcessNodeItem.java:69)
    at org.openide.util.actions.NodeAction$3.run(NodeAction.java:531)
    at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47)
    at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:527)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1778)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    package Document;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.text.AbstractDocument.*;
    * EditorDocument.java
    * Created on September 10, 2006, 3:58 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    * Document to represent the content of a syntax highlighting editor
    * @author marc
    public class EditorDocument extends DefaultStyledDocument {
        /** List of the white space characters */
        private char[] _whiteSpaceChars;
        /** List of the delimiter characters */
        private char[] _delimiterChars;
        /** Creates a new instance of EditorDocument */
        public EditorDocument(char[] whiteSpaceChars,char[] delimiterChars) {
            _whiteSpaceChars=whiteSpaceChars;
            _delimiterChars=delimiterChars;
         * Updates document structure as a result of text insertion.  This
         * will happen within a write lock.  Since this document simply
         * maps out lines, we refresh the line map.
         * @param chng the change event describing the dit
         * @param attr the set of attributes for the inserted text
        protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr) {
            int begin=Math.max(0,chng.getOffset()-1);
            int end=begin+chng.getLength()+1;
            Element rootElement=getDefaultRootElement();
            int index;
            int m=rootElement.getElementCount();
            AbstractDocument.BranchElement line;
            super.insertUpdate(chng,attr);
            // Add the tokens
            index=rootElement.getElementIndex(begin);
            m=rootElement.getElementCount();
            if (index>=0)
                for (;index<m && (line=(AbstractDocument.BranchElement) rootElement.getElement(index)).getStartOffset()<=end;index++) {
                chng.addEdit(addTokens(line,attr));
            //fireChangedUpdate(chng);
        protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng,AttributeSet attr) {
            int begin=chng.getOffset();
            int end=begin+chng.getLength();
            BranchElement root=(BranchElement) getDefaultRootElement();
            // Find the lines that must be removed
            int indexFirstLine=root.getElementIndex(begin);
            int indexLastLine=root.getElementIndex(end);
            BranchElement[] removeLines=new BranchElement[indexLastLine-indexFirstLine+1];
            for (int i=indexFirstLine;i<=indexLastLine;i++)
                removeLines=(BranchElement) root.getElement(i);
    // Add the lines must replace the removed lines
    int beginFirstLine=removeLines[0].getStartOffset();
    int endLastLine=removeLines[removeLines.length-1].getEndOffset();
    Segment segment=new Segment();
    ArrayList<BranchElement> newLines=new ArrayList<BranchElement>(removeLines.length); // Guess the length of the new lines
    try {
    getText(beginFirstLine,endLastLine,segment);
    char c=segment.current();
    BranchElement line;
    while (c!=Segment.DONE) {
    if (c=='\n') {
    line=new BranchElement(root,attr);
    newLines.add(line);
    addTokens(line,attr,beginFirstLine,segment.getIndex()+1);
    beginFirstLine=segment.getIndex()+1;
    c=segment.next();
    if (beginFirstLine<endLastLine) {
    line=new BranchElement(root,attr);
    newLines.add(line);
    addTokens(line,attr,beginFirstLine,endLastLine);
    // Add the lines to the Root element
    BranchElement[] linesAdded=newLines.toArray(new BranchElement[newLines.size()]);
    root.replace(indexFirstLine,indexLastLine-indexFirstLine+1,linesAdded);
    // Notify listeners
    DefaultDocumentEvent edit=new DefaultDocumentEvent(begin,end-begin,DefaultDocumentEvent.EventType.CHANGE);
    edit.addEdit(new ElementEdit(root,indexFirstLine,removeLines,linesAdded));
    fireChangedUpdate(edit);
    } catch (Exception e) {
    throw new EditorException("Error in insertUpdate, message was "+e.getMessage(),e);
    //super.insertUpdate(chng,attr);
    private void addTokens(AbstractDocument.BranchElement line,AttributeSet attr,int begin,int end) {
    try {
    ArrayList<TokenElement> childTokens=new ArrayList<TokenElement>();
    int strLength=end-begin;
    // Create the new tokens
    Segment segment=new Segment();
    getText(begin,end-begin,segment);
    char c;
    int b=0;
    TokenElement token;
    //System.out.println(str);
    c=segment.current();
    while (c!=Segment.DONE) {
    if (isWhite(c)) {
    // Whitespace character
    if (b<segment.getIndex()) {
    token=new TokenElement(line,attr,begin+b,begin+segment.getIndex(),false);
    childTokens.add(token);
    b=segment.getIndex();
    // Find all the white spaces
    while ((c=segment.next())!=Segment.DONE && isWhite(c));
    token=new TokenElement(line,attr,begin+b,begin+segment.getIndex(),true);
    childTokens.add(token);
    b=segment.getIndex(); // Begin of next token
    } else if (isDelimiter(c)) {
    // Delimiter
    if (b<segment.getIndex()) {
    token=new TokenElement(line,attr,begin+b,begin+segment.getIndex(),false);
    childTokens.add(token);
    token=new TokenElement(line,attr,begin+segment.getIndex(),begin+segment.getIndex(),c);
    childTokens.add(token);
    b=segment.getIndex();
    c=segment.next();
    } else {
    c=segment.next();
    if (b<segment.getIndex()) {
    token=new TokenElement(line,attr,begin+b,begin+segment.getIndex(),false);
    childTokens.add(token);
    Element[] removed=new Element[line.getElementCount()];
    for (int i=0;i<removed.length;i++)
    removed[i]=line.getElement(i);
    TokenElement[] newElements=childTokens.toArray(new TokenElement[childTokens.size()]);
    line.replace(0,line.getElementCount(),newElements);
    } catch (Exception e) {
    throw new EditorException("Unexpected BadlocationException ");
    * Returns a iterator of the tokens starting from the given position
    * @param The position that is covered by the first token returned by this iterator
    * @return A iterator of all the tokens starting at the given position
    public Iterator<IToken> getTokensFrom(int position) {
    return new TokenIterator(position);
    private String getText(Element element) {
    int begin=element.getStartOffset();
    int end=Math.min(element.getEndOffset(),getLength());
    try {
    return getText(begin,end-begin);
    } catch (BadLocationException e) {
    throw new EditorException("Unexpected BadLocationException (this should not happen at all)");
    * Check if a character is a white space
    * @return True if a character is a white space
    private boolean isWhite(char c) {
    if (c=='\n') // End of line is always a white space
    return true;
    for (char whiteChar : _whiteSpaceChars)
    if (whiteChar==c)
    return true;
    return false;
    * Check if a character is a delimiter character (different from a white space character)
    * @return True if a character is a delimiter character
    private boolean isDelimiter(char c) {
    for (char delimiterChar : _delimiterChars)
    if (delimiterChar==c)
    return true;
    return c=='\0';
    * Test code
    public static void main(String[] args) {
    // Display a test frame containing a test document
    try {
    JFrame frm=new JFrame();
    EditorDocument doc=new EditorDocument(new char[] {' ','\n','\t','\r'},new char[0]);
    doc.insertString(0,"Hello",null);
    JTextPane pane=new JTextPane(doc);
    JScrollPane scroll=new JScrollPane(pane);
    frm.getContentPane().add(scroll);
    frm.setSize(200,300);
    frm.setVisible(true);
    } catch (Exception e) {
    * Class that is a iterator over the tokens in the document
    private class TokenIterator implements Iterator<IToken> {
    private int _lineIndex=-1;
    private int _tokenIndex=-1;
    public TokenIterator(int position) {
    AbstractDocument.BranchElement root=(AbstractDocument.BranchElement) getDefaultRootElement();
    _lineIndex=root.getElementIndex(position);
    AbstractDocument.BranchElement line=(AbstractDocument.BranchElement) root.getElement(_lineIndex);
    _tokenIndex=line.getElementIndex(position)-1;
    * Removes from the underlying collection the last element returned by the
    * iterator (optional operation). This method can be called only once per
    * call to <tt>next</tt>. The behavior of an iterator is unspecified if
    * the underlying collection is modified while the iteration is in
    * progress in any way other than by calling this method.
    * @exception UnsupportedOperationException if the <tt>remove</tt>
    *           operation is not supported by this Iterator.
    * @exception IllegalStateException if the <tt>next</tt> method has not
    *           yet been called, or the <tt>remove</tt> method has already
    *           been called after the last call to the <tt>next</tt>
    *           method.
    public void remove() {
    // Do nothing
    * Returns the next element in the iteration. Calling this method
    * repeatedly until the {@link #hasNext()} method returns false will
    * return each element in the underlying collection exactly once.
    * @return the next element in the iteration.
    * @exception NoSuchElementException iteration has no more elements.
    public IToken next() {
    Element root=getDefaultRootElement();
    if (_lineIndex>=root.getElementCount())
    return null;
    Element line=root.getElement(_lineIndex);
    _tokenIndex++;
    if (_tokenIndex>=line.getElementCount()) {
    _lineIndex++;
    if (_lineIndex>=root.getElementCount())
    return null;
    line=root.getElement(_lineIndex);
    if (line.getElementCount()==0)
    return null;
    _tokenIndex=0;
    return (IToken) line.getElement(_tokenIndex);
    * Returns <tt>true</tt> if the iteration has more elements. (In other
    * words, returns <tt>true</tt> if <tt>next</tt> would return an element
    * rather than throwing an exception.)
    * @return <tt>true</tt> if the iterator has more elements.
    public boolean hasNext() {
    int lineIndex=_lineIndex;
    int tokenIndex=_tokenIndex;
    Element root=getDefaultRootElement();
    if (lineIndex>=root.getElementCount())
    return false;
    Element line=root.getElement(lineIndex);
    tokenIndex++;
    if (tokenIndex>=line.getElementCount()) {
    lineIndex++;
    if (lineIndex>=root.getElementCount())
    return false;
    line=root.getElement(lineIndex);
    if (line.getElementCount()==0)
    return false;
    return true;
    * Represents a token in the document
    private class TokenElement extends AbstractDocument.LeafElement implements IToken, Comparable<TokenElement> {
    private boolean _isWhiteSpace;
    private char _separatorChar='\0';
    public TokenElement(Element parent,AttributeSet attributeSet,int offs0,int offs1,boolean whiteSpace) {
    super(parent,attributeSet,offs0,offs1);
    _isWhiteSpace=whiteSpace;
    public TokenElement(Element parent,AttributeSet attributeSet,int offs0,int offs1,char separatorChar) {
    super(parent,attributeSet,offs0,offs1);
    _separatorChar=separatorChar;
    * Returns the separator character if this token is a separator, returns '\0' otherwise
    * @return The separator charactor or null otherwise
    public char getSeparatorChar() {
    return _separatorChar;
    * Compares this object with the specified object for order. Returns a
    * negative integer, zero, or a positive integer as this object is less
    * than, equal to, or greater than the specified object.<p>
    * In the foregoing description, the notation
    * <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
    * <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
    * <tt>0</tt>, or <tt>1</tt> according to whether the value of <i>expression</i>
    * is negative, zero or positive.
    * The implementor must ensure <tt>sgn(x.compareTo(y)) ==
    * -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
    * implies that <tt>x.compareTo(y)</tt> must throw an exception iff
    * <tt>y.compareTo(x)</tt> throws an exception.)<p>
    * The implementor must also ensure that the relation is transitive:
    * <tt>(x.compareTo(y)>0 && y.compareTo(z)>0)</tt> implies
    * <tt>x.compareTo(z)>0</tt>.<p>
    * Finally, the implementer must ensure that <tt>x.compareTo(y)==0</tt>
    * implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
    * all <tt>z</tt>.<p>
    * It is strongly recommended, but <i>not</i> strictly required that
    * <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>. Generally speaking, any
    * class that implements the <tt>Comparable</tt> interface and violates
    * this condition should clearly indicate this fact. The recommended
    * language is "Note: this class has a natural ordering that is
    * inconsistent with equals."
    * @param o the Object to be compared.
    * @return a negative integer, zero, or a positive integer as this object
    *           is less than, equal to, or greater than the specified object.
    * @throws ClassCastException if the specified object's type prevents it
    * from being compared to this Object.
    public int compareTo(TokenElement o) {
    return getStartOffset()-o.getStartOffset();
    * Indicates this is a white space token
    * @return true if this is a white space token false otherwise
    public boolean isWhiteSpace() {
    return _isWhiteSpace;
    * Returns the string this token is representing
    * @return The string behind this token
    public String getText() {
    return EditorDocument.this.getText(this);
    class SearchToken implements IToken {
    private int _offset;
    public SearchToken(int offset) {
    _offset=offset;
    * @return The start of the token used in comparisation operations
    public int getEndOffset() {
    return _offset;
    public int getStartOffset() {
    return _offset;
    public boolean isWhiteSpace() {
    throw new EditorException("May not be called");
    public String getText() {
    throw new EditorException("May not be called");
    public char getSeparatorChar() {
    throw new EditorException("May not be called");

    I am trying to add primitive syntax highlighting to my JTextPane and have serious problems which I already stated in this forum. Now I read from uncle_alice that the text package from swing is not ment for that and that I need to write my own JTextPane and my own document and view.
    Can you explain what you mean by "writing my own JTextPane and View and Dcoument".
    My own Document I already have in order to provide SQL-highlighting.
    But what exactly do you mean by suggesting to write my own View! Whoever uses JTextPane doesnt really have much to do with its view. Can you give me a hint as I am completely stuck with an Exception : "javax.swing.text.StateInvariantError: GlyphView: Stale view: javax.swing.text.BadLocationException: Length must be positive"
    can you pinpoint the standard text-package's deficiency? it lacks what? what is the best work around?
    cheers
    ioannis

  • Java execution in database

    Dear all,
    We are using workflow 2.6.4 with oracle db 11g. Currently we are facing performance issues with the same..ADDM reports recommends the below
    Recommendation 1: SQL Tuning
       Estimated benefit is .58 active sessions, 29.74% of total activity.
       Action
          Tune the PL/SQL block with SQL_ID "6bd4fvsx8n42v". Refer to the "Tuning
          PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide and
          Reference".
          Related Object
             SQL statement with SQL_ID 6bd4fvsx8n42v.
             DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate;
             broken BOOLEAN := FALSE; BEGIN OWF_MGR.START_ODS_REFRESH(SYSDATE );
             :mydate := next_date; IF broken THEN :b := 1; ELSE :b := 0; END IF;
             END;
       Rationale
          SQL statement with SQL_ID "6bd4fvsx8n42v" was executed 1 times and had
          an average elapsed time of 31934 seconds.
       Rationale
          Average time spent in Java execution was 24904 seconds.
    CREATE OR REPLACE PROCEDURE OWF_MGR.START_ODS_REFRESH ( pSysdate in date ) is
        ItemType constant varchar2(30) := 'TABSRPT';
        WorkflowProcess constant varchar2(30) := 'ODS_REFRESH';
        ItemKey varchar2(30);
        ItemUserKey varchar2(80);
        l_Sysdate Date;
        begin
            if ( pSysdate is null ) then
                l_Sysdate:= sysdate;
            else
                l_Sysdate:= pSysdate;
            end if;
            --select ODS_REFRESH_SEQ.nextval into ItemKey from dual ;
        --    ItemKey:= to_char(l_Sysdate,'yyyy') || '-' || to_char(l_Sysdate,'mm') || '-' || to_char(l_Sysdate,'dd');
        ItemKey:= 'NEW_REF' || to_char(l_Sysdate,'yyyy') || '-' || to_char(l_Sysdate,'mm') || '-' || to_char(l_Sysdate,'dd');
            ItemUserKey:= to_char(l_Sysdate,'yyyy') || '-' || to_char(l_Sysdate,'mm') || '-' || to_char(l_Sysdate,'dd');
            wf_engine.CreateProcess (itemtype => ItemType,
                                     itemkey  => ItemKey,
                                     process  => WorkflowProcess );
            wf_engine.SetItemUserKey (itemtype => itemtype,
                                      itemkey  => itemkey,
                                      userkey => ItemUserKey);
            wf_engine.SetItemAttrDate (itemtype => itemtype,
                                       itemkey => itemkey,
                                       aname => 'PSYSDATE',
                                       avalue => l_Sysdate);
            wf_engine.StartProcess (itemtype => itemtype,
                                    itemkey  => itemkey );
        exception
            when others then
                wf_core.context(null,'ODS_REFRESH',ItemKey,null,'owf_mgr',null,Workflowprocess);
                raise;
    end START_ODS_REFRESH;
    /now, the question is :
    a) is there any parameters in the database that I have to tune in order to increase the performance ?
    b) where should I focus in the database or in the workflow engine ?
    Please guide
    Kai

    a) Tom Kyte has recommended setting the initialization parameter FAST=TRUE.
    b) With the basics
    Did you use the SQL_ID to find the statement referred to? Did you explain plan it? Post the DBMS_XPLAN.DISPLAY report
    http://www.morganslibrary.org/reference/explain_plan.html
    If you focus on the workflow engine do you have any control over what is written and what it submitted? If not then it is
    not the place to focus.
    What you need is a methodology. I would suggest this is a good place to start"
    http://www.amazon.com/Optimizing-Oracle-Performance-Cary-Millsap/dp/059600527X

  • Error While Importing DTD to XI

    Hi all,
    I have a DTD from cxml.org. While importing that DTD into the XI as external definitions, the message types couldn't be shown.
    Can anybody please suggest the reason?
    Any help will be appriciated.
    Kind regards,
    Kulwant

    Hi,
    Thanks alll for reply. Let me bit explain more. While i import this DTD, i get an error in the WSDL tab in the imported external definitions screen,
    Unable to convert imported document to WSDL
    Reason: Entity "Method.ANY" already declared
    Check the selected category
    Can any body suggest
    I have posted the dtd below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id: //ariba/cxml/modules/Common.mod#6 $
    -->
    <!--
        A few character entities the XML recommendation says should be defined
        "for interoperability" with existing SGML parsers.  By default, these
        are not included to avoid warnings (about entity redefinition) from
        many XML parsers.
    -->
    <!ENTITY % SGML-help "IGNORE">
    <![%SGML-help;[
    <!ENTITY lt     "&#38;#60;">
    <!ENTITY gt     "&#62;">
    <!ENTITY amp    "&#38;#38;">
    <!ENTITY apos   "&#39;">
    <!ENTITY quot   "&#34;">
    ]]>
    <!--
        Common types used throughout the cXML definition.
        The types try to follow the XML DATA definition submitted to the W3C. See
        the following for more information,
            http://msdn.microsoft.com/xml/reference/schema/datatypes.asp
            http://www.w3c.org/TR/1998/NOTE-XML-data-0105/
    -->
    <!-- Atomic-level Types -->
    <!ENTITY % bin.base64 "CDATA">
    <!ENTITY % bin.hex "CDATA">
    <!ENTITY % boolean "(0 | 1)">    <!-- 0 is false, 1 is true -->
    <!ENTITY % char "CDATA">
    <!ENTITY % date "CDATA">
    <!ENTITY % datetime.tz "CDATA">  <!-- Time zone is required -->
    <!ENTITY % fixed.14.4 "CDATA">
    <!ENTITY % i8 "CDATA">
    <!ENTITY % int "%i8;">
    <!ENTITY % r8 "CDATA">
    <!ENTITY % number "CDATA">       <!-- No limit on number of digits, unlike
                                          %r8; -->
    <!ENTITY % string "CDATA">
    <!ENTITY % time.tz "CDATA">      <!-- Time zone is required -->
    <!ENTITY % duration "CDATA">      <!--ISO8601 duration http://www.w3.org/TR/xmlschema-2/#duration  -->
    <!ENTITY % ui8 "CDATA">
    <!ENTITY % uint "%ui8;">         <!-- Unique to this specification -->
    <!ENTITY % uri "CDATA">
    <!ENTITY % uuid "CDATA">
    <!-- Higher-level Types -->
    <!--
        NOTE: The following is a temporary hack to allow empty values for
        some attributes with these types.  The nmtoken entity should resolve to
        NMTOKEN.
    -->
    <!ENTITY % nmtoken "CDATA">      <!-- Any combination of XML name chars. -->
    <!ENTITY % isoLangCode "%nmtoken;">         <!-- ISO 639 Language Code -->
    <!ENTITY % isoCountryCode "%nmtoken;">      <!-- ISO 3166 Country Code -->
    <!ENTITY % isoCurrencyCode "%nmtoken;">     <!-- ISO 4217 Currency Code -->
    <!ENTITY % xmlLangCode "%nmtoken;"> <!-- Language code as defined by XML
                                             recommendation: Language and
                              country. -->
    <!ENTITY % URL "%uri;">
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id: //ariba/cxml/schema/Modules/Base.mod#8 $
    -->
    <!--
        This file defines the basic elements used to build higher level
        constructs in cXML.
    -->
    <!-- Basic Name/Data Elements -->
    <!--
        Name is used to provide an identifier for other elements.
        xml:lang
            The language in which the name is written.
    -->
    <!ELEMENT Name (#PCDATA)> <!-- string -->
    <!ATTLIST Name
        xml:lang  %xmlLangCode;  #REQUIRED
    >
    <!--
        An Extrinsic is an element which can be used to extend the data
        associated with known elements.
        Since this Element is of type ANY, it could contain any arbitrary XML
        document within itself, or a binary ![CDATA[]] document.
        name
            Name used to identify this extrinsic.
    -->
    <!ELEMENT Extrinsic ANY>
    <!ATTLIST Extrinsic
        name  %string;  #REQUIRED
    >
    <!--
        Description is a string which describes something.
        Though text may be interspersed with ShortName elements in this content
        model, placing the ShortName at the beginning or end of the element is
        much preferred.  At most one ShortName element is allowed per
        Description.  The intended content model would be more like
        (( ShortName, #PCDATA ) | ( #PCDATA | ShortName? )) if DTD syntax
        supported it.
        xml:lang
            The language in which the description is written.
    -->
    <!ELEMENT Description ( #PCDATA | ShortName )* > <!-- mixed: string and
                                                          ShortName -->
    <!ATTLIST Description
        xml:lang  %xmlLangCode;  #REQUIRED
    >
    <!--
        A short string which describes something in fewer characters than the
        entire Description.  This should be used when limited space is available.
        For example, a table of elements might show the ShortName's of each.  A
        linked "details" view would show the entire Description (including the
        ShortName).  Without a ShortName, the user interface must default to a
        truncation of the Description.
        This element does not require an xml:lang attribute since it appears only
        within a Description element.  The language of the ShortName must match
        that of the surrounding Description.
    -->
    <!ELEMENT ShortName (#PCDATA)> <!-- string -->
    <!-- Telephone Number Elements -->
    <!--
        International ITU dial code for the country code in question.  This
        code would be entered after any escape code necessary to begin
        International dialing.  That is, the escape code does not appear in the
        content of this element.
        isoCountryCode
            The ISO 3166 2-letter country code for the dial code in question.
    -->
    <!ELEMENT CountryCode (#PCDATA)> <!-- uint -->
    <!ATTLIST CountryCode
        isoCountryCode  %isoCountryCode;  #REQUIRED
    >
    <!--
        The areacode or city code within a CountryCode.
    -->
    <!ELEMENT AreaOrCityCode (#PCDATA)> <!-- uint -->
    <!--
        The local number part of a telephone number.
    -->
    <!ELEMENT Number (#PCDATA)> <!-- string -->
    <!--
        An extension within relative to the Number element. This element has no
        meaning without an associated Number element.
    -->
    <!ELEMENT Extension (#PCDATA)> <!-- uint -->
    <!--
        TelephoneNumber represents international telephone numbers.
    -->
    <!ELEMENT TelephoneNumber (CountryCode, AreaOrCityCode, Number, Extension?)>
    <!--
         Phone is a "named" TelephoneNumber.
         name
              specifies an identifier which indicates the type of phone number.
              US examples would include "work","home", etc.
    -->
    <!ELEMENT Phone (TelephoneNumber)>
    <!ATTLIST Phone
        name  %string;  #IMPLIED
    >
    <!--
        Fax number.
    -->
    <!ELEMENT Fax (TelephoneNumber | URL | Email)>
    <!ATTLIST Fax
        name  %string;  #IMPLIED
    >
    <!-- Addressing Elements -->
    <!--
        URL. A string which represents a URL
    -->
    <!ELEMENT URL (#PCDATA)> <!-- URL -->
    <!ATTLIST URL
        name  %string;  #IMPLIED
    >
    <!--
        An email address. Address must conform to RFC 821 (SMTP Standard).
        preferredLang
            optional language that the email owner prefers to receive
            emails in. Refer to the definition of xmlLangCode entity.
    -->
    <!ELEMENT Email (#PCDATA)> <!-- string -->
    <!ATTLIST Email
        name          %string;       #IMPLIED
        preferredLang %xmlLangCode;  #IMPLIED
    >
    <!--
        Contact represents an entity at a location. The nature of this
        element is that it represents a communication "end point" for a
        location.
        role
            Position this person or group plays in the procurement process.
            Likely values include endUser, administrator, purchasingAgent,
            technicalSupport, customerService, sales,
            supplierCorporate, supplierMasterAccount, supplierAccount,
            buyerCorporate, buyerMasterAccount, buyerAccount, buyer,
            subsequentBuyer. Other values may be allowed in some cases.
            from and to roles are reserved for future use.
        addressID
            An id for the address. Needed to support address codes for
            relationships that require id references.
    -->
    <!ELEMENT Contact (Name, PostalAddress*, Email*, Phone*, Fax*, URL*)>
    <!ATTLIST Contact
        role             NMTOKEN           #IMPLIED
        addressID        %string;          #IMPLIED
    >
    <!--
        The DeliverTo part of an Address. This would be internal to the actual
        address know to the outside world. Similar to what an extension is to a
        TelephoneNumber.
    -->
    <!ELEMENT DeliverTo (#PCDATA)> <!-- string -->
    <!--
        Street is a single line of an Address' location.
    -->
    <!ELEMENT Street (#PCDATA)> <!-- string -->
    <!--
        City is the name of the city in an Address' location.
    -->
    <!ELEMENT City (#PCDATA)> <!-- string -->
    <!--
        State is an optional state identifier in an Address' location.
    -->
    <!ELEMENT State (#PCDATA)> <!-- string -->
    <!--
        PostalCode (I have no idea how to describe it)
    -->
    <!ELEMENT PostalCode (#PCDATA)> <!-- string -->
    <!--
        Country is the name of the country in an Address' location.  The
        content of this element is a string which may (for example) be printed
        directly to a shipping label.  The content is the human-readable
        equivalent of the isoCountryCode used by applications.
        isoCountryCode
            The ISO 3166 2-letter country code for this country.
    -->
    <!ELEMENT Country (#PCDATA)> <!-- string -->
    <!ATTLIST Country
        isoCountryCode  %isoCountryCode;  #REQUIRED
    >
    <!--
        PostalAddress is a real-world location for a business or person.
    -->
    <!ELEMENT PostalAddress (DeliverTo*, Street+, City, State?,
                             PostalCode?, Country)>
    <!ATTLIST PostalAddress
        name  %string;  #IMPLIED
    >
    <!--
        Address is the association of a Contact and an Location.
        isoCountryCode
            The ISO 3166 2-letter country code for the country containing this
            location.
        addressID
            An id for the address.  Needed to support address codes for
            relationships that require id references.  An example would be a
            shipping code.
    -->
    <!ELEMENT Address (Name, PostalAddress?, Email?, Phone?, Fax?, URL?)>
    <!ATTLIST Address
        isoCountryCode  %isoCountryCode;  #IMPLIED
        addressID       %string;          #IMPLIED
    >
    <!-- Financial Elements -->
    <!--
        Money is the representation of the object used to pay for items.
        currency
            specifies the currency in which amount is stated, must conform to ISO
            4217 currency codes.
        alternateAmount
            the amount of money in the alternateCurrency. Optional and used to
            support dual-currency requirements such as the Euro.
        alternateCurrency
            specifies the currency in which the alternateAmount is stated, must
            conform to ISO 4217 currency codes.
    -->
    <!ELEMENT Money (#PCDATA)> <!-- number -->
    <!ATTLIST Money
        currency           %isoCurrencyCode;  #REQUIRED
        alternateAmount    %number;           #IMPLIED
        alternateCurrency  %isoCurrencyCode;  #IMPLIED
    >
    <!--
        Optional textual child for communicating arbitrary comments or
        description along with the parent.
        Though text may be interspersed with Attachment elements in this content
        model, grouping the Attachment list at the begging or end of the element
        is much preferred.  The intended content model would be more like
        (( Attachment+, #PCDATA ) | ( #PCDATA | Attachment* )) if the DTD syntax
        supported it.
        xml:lang
            The language in which the Comments are written.  This attribute
        will be required in a future version of cXML.  (Leaving it out is
        deprecated.)
    -->
    <!ELEMENT Comments ( #PCDATA | Attachment )* > <!-- mixed: string and
                                                        opt. Attachment list -->
    <!ATTLIST Comments
        xml:lang  %xmlLangCode;  #IMPLIED
    >
    <!--
        Optional child of Comments element referencing a part in a multipart MIME
        transmission.
        The contained URL must use the scheme "cid:".  This is the identifier for
        the referenced attachment within the larger transmission.  Must match the
        Content-ID header of one (and only one) part of the MIME transmission
        containing this cXML document.  May also be used to retrieve the
        attachment file separately.
    -->
    <!ELEMENT Attachment (URL)>
    <!---
        Reference to a remote attachment.
        AttachmentReference is used inside Extrinsic elements that have a
        predefined name of "Attachments".
        In the context of AttachmentReference, the domain attribute of
        InternalID is currently optional. However, as a way to prevent
        circular request paths, the sending application may use a
        predefined value of "local" to indicate that the attachment
        requested is local to the other application.
        length
            length of the attachment in bytes.
    -->
    <!ELEMENT AttachmentReference (Name, Description, InternalID)>
    <!ATTLIST AttachmentReference
        length  %uint;  #IMPLIED
    >
    <!--
        Price per unit of item.
    -->
    <!ELEMENT UnitPrice (Money)>
    <!--
        Reference to an earlier document (for example, OrderRequest).  In a
        StatusUpdateRequest, this element identifies the purchase order to be
        updated.
        payloadID
            A unique identifier for the document.  Copied directly from the
            cXML element of the original document.
    -->
    <!ELEMENT DocumentReference EMPTY>
    <!ATTLIST DocumentReference
        payloadID       %string;      #REQUIRED
    >
    <!ELEMENT InternalID (#PCDATA)> <!-- string -->
    <!ATTLIST InternalID
        domain   %string;  #IMPLIED
    >
    <!-- ====
        Common to most variants of the PunchOut transaction set.  Defined here
        to be easily shared between multiple DTD files without requiring
        inclusion of Transaction.mod in all of them.
        All of the PunchOut transaction sets include an originating Request
        (ProviderSetupRequest for example), relatively simple Response
        (PunchOutSetupResponse for example) and final Message
        (ProviderDoneMessage or PunchOutOrderMessage).  The Request and
        Response comprise a back-end transaction between two cooperating
        applications that wish to extend an interactive session from one to the
        other.  The Request provides the destination application with
        authentication, identification and other setup information.  The
        Response provides the originating application with a unique starting
        location for the interactive (HTML) session at the destination system.
        After receiving a Response of this type, the originating application
        redirects the user's browser to the provided location.  (For some
        non-HTML applications, opening a new browser window at that location
        may be more appropriate.)  The destination system eventually provides
        an HTML form to the user's browser.  This form submits the final
        Message to close the remote session, return that user to the
        originating application and carry any required information back to the
        originating application.
    ==== -->
    <!--
        OriginatorCookie - Identification of a specific PunchOut session.  Used
        in both originating Request and later Message that returns user to
        originating application.
        Note: The BuyerCookie element used in a 'regular' PunchOut transaction
        (defined in Transaction.mod) is of type ANY.  That does not seem
        useful.  The string required below better matches the needs for this
        element.  Future transactions similar to the PunchOut transaction will
        use this element.
    -->
    <!ELEMENT OriginatorCookie (#PCDATA)>
    <!--
        BrowserFormPost - Location to which the user's browser must submit the
        final Message.  This location (carried in the originating Request) does
        not need to be specific to a PunchOut session since the
        OriginatorCookie is returned in the Message.
    -->
    <!ELEMENT BrowserFormPost (URL)>
    <!--
        SelectedService - Identification of a service offered by this provider
        and requested in this transaction.  Used only in the originating
        Request.
    -->
    <!ELEMENT SelectedService (#PCDATA)>
    <!--
        StartPage - Location to which the user's browser must be redirected to
        begin the interactive portion of the session at the remote site.  The
        destination system returns this information in the Response document.
        This location must be specific to a particular session.  It is
        effectively a one time key, providing authenticated entry into the
        destination system.
    -->
    <!ELEMENT StartPage (URL)>
    <!--
        ReturnData - Any information the originator must know about the
        completed operation at the provider site.  The ReturnValue is for
        applications; the Name is for human consumption (direct presentation in
        the User Interface of the application).  Where appropriate for the
        possible services, this element may appear in the final Message for a
        PunchOut session.
        name
            An identifier for the data returned.  Provides a meaning for the
            contents of a ReturnData element.
    -->
    <!ELEMENT ReturnData (ReturnValue, Name)>
    <!ATTLIST ReturnData
        name  %string;  #IMPLIED
    >
    <!ELEMENT ReturnValue (#PCDATA)>
    <!--
        Defines a time range. The start and end can be unbounded
        startDate
            The starting date of the time range
        endDate
            The ending date of the range
    -->
    <!ELEMENT TimeRange EMPTY>
    <!ATTLIST TimeRange
        startDate      %datetime.tz;         #IMPLIED
        endDate        %datetime.tz;         #IMPLIED
    >
    <!--
        Defines a period in time.
        startDate
            The starting date of the period
        endDate
            The ending date of the period
    -->
    <!ELEMENT Period EMPTY>
    <!ATTLIST Period
        startDate      %datetime.tz;         #REQUIRED
        endDate        %datetime.tz;         #REQUIRED
    >
    <!--
        Must be a UN/CEFACT (Recommendation 20) unit of measure code.
    -->
    <!ELEMENT UnitOfMeasure (#PCDATA)> <!-- nmtoken -->
    <!--
        Defines a reference to a term which is defined
        in another document.
        termName
            The name of the ID attribute containing the term.
        term
            The value of that attribute (i.e., the term itself).
    -->
    <!ELEMENT TermReference EMPTY>
    <!ATTLIST TermReference
         termName %string; #REQUIRED
         term %string; #REQUIRED
    >
    <!--
        Defines an optionally named monetary rate at which goods or services are
        charged or paid.
        Money
            The amount of Money per UnitOfMeasure to be charged or paid.
        UnitOfMeasure
            Unit of measure.
        TermReference
            Identifies the definition of this UnitRate
            (found, for example,  in contracts, master agreements, and other documents
            which may or may not be cXML documents).
    -->
    <!ELEMENT UnitRate (
        Money,
        UnitOfMeasure,
        TermReference?
    )>
    <!--
        The rate information used to define the rate of a purchase.  For
        example, this could be the total room rate for 4 nights of stay
        at a hotel.
        Total
            The total amount for the rate.  The total amount must equal
            to quantity x UnitRate.
        UnitRate
            The single unit rate.
        Description
            Textual description for the rate.  For example, hotel nightly rate.
        Quantity
            The quantity.  For example, a 4 nights stay at a hotel will
            have quantity set to 4 with UnitofMesure in UnitRate set to Day.
    -->
    <!ELEMENT Rate (Total, UnitRate, Description?)>
    <!ATTLIST Rate
        quantity    %r8;    #REQUIRED
    >
    <!--
        The total for something.
    -->
    <!ELEMENT Total (Money)>
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id: //ariba/cxml/modules/Version.mod#4 $
    -->
    <!--
         Another top-level entity used in Transport.mod.  Defined here to allow
         easy updates to the release version of cXML without opening
         Transport.mod.  This should also provide an easy file to search for
         the current release version string.
    -->
    <!-- cxml.version
        Current default string for the cXML@version attribute.  Corresponds to
        the final directory of the SYSTEM identifier used in all up-to-date
        cXML documents.
        For easy parsing of this file, do not remove whitespace surrounding the
        actual version string.
    -->
    <!ENTITY cxml.version "1.2.019" >
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id: //ariba/cxml/schema/Modules/Supplier.mod#1 $
    -->
    <!--
        Supplier of goods and services. Includes a list of SupplierIDs which
        identify the Supplier.
        corporateURL
            URL to web site about the supplier
        storeFrontURL
            URL to web site where a user can shop or browse
    -->
    <!ELEMENT Supplier (Name, Comments?, SupplierID+, SupplierLocation*)>
    <!ATTLIST Supplier
        corporateURL   %URL;  #IMPLIED
        storeFrontURL  %URL;  #IMPLIED
    >
    <!--
        One of the locations for a supplier. Supplier location is
        generally a physical location.
    -->
    <!ELEMENT SupplierLocation (Address, OrderMethods)>
    <!--
        OrderMethods is the list of methods by which one can order
        from a supplier. The contact element is the technical contact
        who should be able to assist with order processing issues.
        The list is to be ordered by supplier preference, the first
        element having the highest degree of preference.
    -->
    <!ELEMENT OrderMethods (OrderMethod+, Contact?)>
    <!--
        OrderMethod is a method for ordering. It is comprised of a
        target address for the order and the protocol expected by
        the address.
    -->
    <!ELEMENT OrderMethod (OrderTarget, OrderProtocol?)>
    <!--
        OrderTarget represents an address to which orders can be
        sent.
    -->
    <!ELEMENT OrderTarget (Phone | Email | Fax | URL | OtherOrderTarget)>
    <!--
        OrderProtocol is the communication method to be used when
        communicating an order to a supplier. An example would be "cXML".
    -->
    <!ELEMENT OrderProtocol (#PCDATA)> <!-- string -->
    <!--
        OtherOrderTarget represents an address which is not enumerated by
        default in the OrderTarget Element. This may contain address targets
        beyond the ability of this document to describe.
        name
            Optional name for target.
    -->
    <!ELEMENT OtherOrderTarget ANY>
    <!ATTLIST OtherOrderTarget
        name  %string;  #IMPLIED
    >
    <!--
        Definition of a supplier id.  A supplier id is a (domain, value)
        pair so that suppliers have the flexibility to define their id's
        according to an arbitrary convention (e.g., (DUNS, 12345),
        (TaxID, 88888888)).
        domain
            the domain of the id
    -->
    <!ELEMENT SupplierID (#PCDATA)> <!-- string -->
    <!ATTLIST SupplierID
        domain  %string;  #REQUIRED
    >
    <!--
       Defines a List of Suppliers that might be associated with a quote Item. Used in
       ItemOut.
    -->
    <!ELEMENT SupplierList (Supplier+)>
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id: //ariba/cxml/modules/Item.mod#6 $
    -->
    <!--
        ID with which the item's manufacturer identifies the item.
    -->
    <!ELEMENT ManufacturerPartID (#PCDATA)> <!-- string -->
    <!--
        Name of the item's manufacturer.
        xml:lang
            The language in which the ManufacturerName is written.  This
        attribute will be required in a future version of cXML.  (Leaving it
        out is deprecated.)
    -->
    <!ELEMENT ManufacturerName (#PCDATA)> <!-- string -->
    <!ATTLIST ManufacturerName
        xml:lang %xmlLangCode; #IMPLIED
    >
    <!--
        Classification is used to group items into similar categories.
        domain
            "name" of classification, ie., SPSC
    -->
    <!ELEMENT Classification (#PCDATA)> <!-- string -->
    <!ATTLIST Classification
        domain  %string;  #REQUIRED
    >
    <!--
         LeadTime specifies, in days, the amount of time required to
         receive the item.
    -->
    <!ELEMENT LeadTime (#PCDATA)>   <!-- uint -->
    <!--
        How the supplier identifies an item they sell.
        If SupplierPartID does not provide a unique key to identify the item,
        then the supplier should generate a key which identifies the part
        uniquely when combined with the SupplierID and SupplierPartID. The
        key is called SupplierPartAuxiliaryID.
        An example is where a Supplier would use the same PartID for an
        item but have a different price for units of "EA" versus "BOX".
        In this case, the ItemIDs should be:
        <ItemID>
            <SupplierPartID>pn12345</SupplierPartID>
            <SupplierPartAuxiliaryID>EA</SupplierPartAuxiliaryID>
        </ItemID>
        <ItemID>
            <SupplierPartID>pn12345</SupplierPartID>
            <SupplierPartAuxiliaryID>
               <foo>well formed XML here</foo>
            </SupplierPartAuxiliaryID>
        </ItemID>
        In this case, the "foo" element must be defined in an internal subset
        sent with the cXML document.  Otherwise, parsers will not be able to
        validate that document.
        In a preferred approach, the sending application may escape the contained
        XML using CDATA sections.  This would appear as:
           <SupplierPartAuxiliaryID>
               <![CDATA[<foo>well formed XML here</foo>]]>
           </SupplierPartAuxiliaryID>
        Finally, the angle brackets could be escaped using XML character
        entities.  This might be a bit harder for humans to read.  For example:
           <SupplierPartAuxiliaryID>
               &lt;foo&gt;well formed XML here&lt;/foo&gt;
           </SupplierPartAuxiliaryID>
    -->
    <!ELEMENT SupplierPartID (#PCDATA)> <!-- string -->
    <!ELEMENT SupplierPartAuxiliaryID ANY>
    <!--
        A unique identification of an item. SupplierID is not required since
        ItemIDs never travel alone.
        ItemIDs used to define a Supplier/Commodity level Blanket Order Item should
        use Empty SupplierPartID tag. These type of items do not have specific part numbers
        at the time of placing the Blanket Order. There will be subsequent release orders
        or invoices that will define the SupplierID.
    -->
    <!ELEMENT ItemID (SupplierPartID, SupplierPartAuxiliaryID?)>
    <!--
        ItemDetail contains detailed information about an item. All the data that
        a user would want to see about an item instead of the bare essentials
        that are represented in the ItemID.
        LeadTime
            time in days to receive the item
    -->
    <!ELEMENT ItemDetail (UnitPrice, Description+, UnitOfMeasure,
                          Classification+, ManufacturerPartID?,
                          ManufacturerName?, URL?, LeadTime?, Extrinsic*)>
    <!--
         Item details specific for items that describe blanket purchase order items.
         This element should only be used for items in a purchase order of
         type "blanket"     
    -->
    <!ELEMENT BlanketItemDetail (Description+, MaxAmount?, MinAmount?,
                                 MaxQuantity?, MinQuantity?,
                        UnitPrice?, UnitOfMeasure?,
                        Classification*, Extrinsic*)>
    <!--
        For cXML license agreement information, please see
        http://www.cxml.org/home/license.asp
        $Id$
    -->
    <!--
        This element captures travel information.  It could be one of four
        types: air, car rental, hotel or rail.
        AirDetail
            Air travel detail.
        CarRentalDetail
            Car rental detail.
        HotelDetail
            Hotel detail.
        RailDetail
            Rail detail.
        PolicyViolation
            List of policy violations (if any) associated with this
            travel line item.
        Comments
            Top level comments for this travel line item (if any).  This
            is not the policy violation comment but a top level comment
            given by the user for this travel line item while in Travel
            Booking Provider's web site.
        TermsAndConditions
            List of Terms and conditions (if any) associated with this
            travel line item.
        confirmationNumber
            A unique confirmation number that is useful to both the
            traveler and the vendor who is providing the service for this
            travel line item.  For example, hotel reservation number or
            e-ticket number from the airline.
        pnrLocator
            Passenger Name Record (PNR) Locator that is useful to the
            Travel Booking Provider.
        quoteExpirationTime
            Date and time that this quote will expire.  This value is
            normally supplied in the PunchoutOrderMessage.  If no value is
            supplied, it is assumed that there is no expiration time or
            date for this quote.
    -->
    <!ELEMENT  TravelDetail ((AirDetail | CarRentalDetail | HotelDetail | RailDetail),
                              PolicyViolation*,
                              Comments?,
                              TermsAndConditions?)>
    <!ATTLIST TravelDetail
        confirmationNumber  %string;        #REQUIRED
        pnrLocator          %string;        #IMPLIED
        quoteExpirationTime %datetime.tz;   #IMPLIED
    >
    <!-- Air -->
    <!--
        Air detail information for the air trip.
        TripType
            Round Trip, One Way, or Multi Leg
        AirLeg
            Different air leg that makes up this air detail.
            For example a round trip from SFO -> TPE with no stops
            will have two air legs.  One air leg from SFO -> TPE
            and another from TPE -> SFO.
        AvailablePrice
            Other available airfare prices that the user did not pick.
        Penalty
            Penalty amount (if any).  This is normally due to changes or
            cancelation of the ticket.
    -->
    <!ELEMENT AirDetail (TripType,
                         AirLeg+,
                         AvailablePrice*,
                         Penalty?)>
    <!--
        Define a single leg in the air travel.
        Vendor
            Airline vendor name and information.
        AirLegOrigin
            Originating airport for this air leg.
        AirLegDestination
            Destination airport for this air leg.
        BookingClassCode
            Airline booking class code.  This is the de-facto
            airline standard.  For example,
            F, FN, P, R, A      - first class
            C, CN, D, J, I, Z   - business class.
            Y, YN, B, BN, M, H, V, VN, O, Q, QN, S,
                K, KN, L, U, T, W - coach class.
        Rate
            Rate for this particular air leg.  If specify, the total
            of all the rate for the different air legs must add up
            to the total the line item level.
        Meal
            Meal information for this air leg (if any)
        travelSegment
            Textual information to identify this travel segment.
            This information is specific to the Travel Booking Provider.
        departureTime
            Departure date and time for this air leg
        arrivalTime
            Arrival date and time for this air leg
        flightNumber
            Flight number for this air leg
        seatNumber
            Seat number for this air leg
        seatType
             Seat type
                 aisle       - Aisle
                 window      - Window
                 middle      - Middle
        upgrade
            Is this ticket an upgrade?
        stops
            The number of stop for this air leg.
            0 if it is a direct flight.  If no information is supplied
            it is defaulted to 0.
        equipment
            The plane equipment information for this air leg
    -->
    <!ELEMENT AirLeg (Vendor,
                      AirLegOrigin,
                      AirLegDestination,
                      BookingClassCode?,
                      Rate?,
                      Meal*)>
    <!ATTLIST AirLeg
        travelSegment   %string;        #REQUIRED
        departureTime   %datetime.tz;   #REQUIRED
        arrivalTime     %datetime.tz;   #REQUIRED
        flightNumber    %string;        #REQUIRED
        seatNumber      %string;        #IMPLIED
        seatType        (window | aisle | middle) #IMPLIED
        upgrade         (yes)           #IMPLIED
        stops           %r8;            #IMPLIED
        equipment       %string;        #IMPLIED
    >
    <!--
        Originating airport for this Air Leg.
        Airport
            Originating airport
    -->
    <!ELEMENT AirLegOrigin (Airport)>
    <!--
        Destination airport for this Air Leg.
        Airport
            Destination airport
    -->
    <!ELEMENT AirLegDestination (Airport)>
    <!--
        Airport information that includes the iso airport code
        Address
            Physical adress of the airport.
        airportCode
            The 3 letter IATA airport code.
    -->
    <!ELEMENT Airport (Address?)>
    <!ATTLIST Airport airportCode %string; #REQUIRED>
    <!---
        Meal information used by air, hotel and rail.
        BookingClassCode
            Code for the meal.  For example, airlines use
              B     - Breakfast
                C     - Complimentary liquor
                D     - Dinner
                F     - Food for purchase
                G     - Food and beverage for purchase
                H     - Hot meal
                K     - Continental breakfast
                L     - Lunch
                M     - Meal
                N     - No meal service
                O     - Cold meal
                P     - Liquor for purchase
                R     - Refreshments
                S     - Snack or brunch
                V     - Refreshments for purchase
        Description
            Textual description of the meal, including any special needs
            such as vegetarian or dairy-free.
    -->
    <!ELEMENT Meal (BookingClassCode?, Description?)>
    <!-- Car Rental -->
    <!--
        Car rental information.
        Vendor
            Car rental vendor information.
        CarRentalPickup
            Pickup location for the rental car.
        CarRentalDropoff
            Drop off location for the rental car.
        BookingClassCode
            4 letter code for car.
            1st Letter - M (Mini), E (Economy), C (Compact), S (Standard),
                         I (Intermediate), F (Full size), P (Premium), L (Luxury)
                         V (MiniVan), X (Special)
            2nd Letter - B (2 door), C (2/4 door), D (4 door), T (Convertible),
                         F (Four wheel drive), V (Van), W (Wagon), S (Sport)
                         X (Special)
            3rd Letter - A (Automatic), M (Manual)
            4th Letter - R (A/c), N (No A/C)
        CarRentalFee
            Mutliple car rental fee can be specified to capture the
            break down of different fees.  The total of these fees must
            add up to the total at the line item level.
        LimitedMileage
            Mileage limit information
        AvailablePrice
            Other available prices for car rental that the user did not pick.
        travelSegment
            Textual information to identify this travel segment.
            This information is specific to the Travel Booking Provider.
        pickupTime
            The intended pickup date and time
        dropoffTime
            The intended dropoff date and time
    -->
    <!ELEMENT CarRentalDetail (Vendor,
                               CarRentalPickup,
                               CarRentalDropoff,
                               BookingClassCode?,
                               CarRentalFee+,
                               LimitedMileage?,
                               AvailablePrice*)>
    <!ATTLIST CarRentalDetail
        travelSegment %string;          #REQUIRED
        pickupTime    %datetime.tz;      #REQUIRED
        dropoffTime   %datetime.tz;      #REQUIRED
    >
    <!--
        Physical location where the rental car should be picked up.  This
        is either an Airport or off airport car rental location.
        Airport
            An airport location.
        Address
            Physical address of the car rental location
    -->
    <!ELEMENT CarRentalPickup (Airport | Address)>
    <!--
        Physical location where the rental car should be dropped off.
        This is either an Airport or off-airport car rental location.
        Airport
            An airport location.
        Address
            Physical address of the car rental location
    -->
    <!ELEMENT CarRentalDropoff (Airport | Address)>
    <!--
        This specifies the quantity and the unit of measure of the mileage
        limit.
        UnitOfMeasure
            Unit of measure either miles or kilometers.
        quantity
            The mileage limit amount.
    -->
    <!ELEMENT LimitedMileage (UnitOfMeasure)>
    <!ATTLIST LimitedMileage
        quantity   %r8;      #REQUIRED
    >
    <!--
        Car rental fee information.  CarRentalFee captures the actual
        charges and fee that applies to this rental.  Conditional charges
        such as extra mileages that are over the mileage limit should not
        be specified here but rather in the TermsAndConditions text.
        Total
            Total amount for this car rental fee.  All the total for the rates
            must add up to this amount.
        Rate
            The individual broken-down fee information.
        type
            Type of rate
                baseRate            - Base rental rate
                additionalDriver    - Additional driver fee
                airportAccessFee    - Airport Access fee
                dropOffCharge       - Drop off charge
                vehicleLicensingFee - Vehicle lincensing fee
                touristTax          - Tourist tax
                prepaidGasoline     - Prepaid gasoline charge
                navigationSystem    - Navigation system
                childSeat           - Child seat charge
                luggageRack         - Luggage rack charge
                collisionDamageInsurance    - Collision damage insurance
                liabilityInsurance          - Liability insurance
                mobilePhone         - Mobile phone base charge
                other               - Other charges.
    -->
    <!ELEMENT CarRentalFee (Total, Rate*)>
    <!ATTLIST CarRentalFee
        type (baseRate | additionalDriver | airportAccessFee | dropOffCharge |
              vehicleLicensingFee | touristTax | prepaidGasoline |
              navigationSystem | childSeat | luggageRack | collisionDamageInsurance |
              liabilityInsurance | mobilePhone | other) "baseRate"
    >
    <!-- Hotel -->
    <!--
        Hotel detail information.
        Vendor
            Hotel vendor information.
        Address
            Physical address of the hotel.  This is might be different
            from the address specified in the Vendor field as the vendor
            address might be the head quarter address.
        RoomType
            The type of room reserved.
        BookingClassCode
            Hotel booking class code.
        Meal
            Any complementary meals that are included with the room.  For
            example, complementary continental breakfast.
        Rate
            Hotel rate information.  Multiple rates can be specified.  For
            example, the night rate, valet parking rate, and other rates.
        AvailablePrice
            Other available prices that user did not pick.  Available
            prices can be from the same vendor or different vendor.
        travelSegment
            Textual information to identify this travel segment.  This
            information is specific to the Travel Booking Provider.

Maybe you are looking for

  • Can I check my Icloud email without using an apple device?

    I use my Icloud email address for almost everything, and I don't always have access to an apple product or I don't have my Iphone on me, but I always have access to a regular computer at work, I am tired of transfering emails all the time is there an

  • Iphone pictures on TV

    Has anybody figured out how to display iphone pictures on a television screen? I suppose you're going to need a special cable for the TV inputs. TIA Pingger

  • WEBi reporting requirement

    Hello All, I am stuck with one WEBi requirement. The requirement is as follows. I will try to make it simple. I have one BEx query from which i am getting data Cost Center (0COSTCENTER) & Actuals which i am displaying in WEBi report. For example BEx

  • HT4623 my iphone 3gs is locked i put different passcode now i cant disabled

    okay i have iphone 3 gs i try put  my passcode but i lock it now i cant out locked say connect itunes for disabled how can disabled some can help me....

  • Operating system file operation on file c9456ea79110a0.rpt failed.

    I have a report that failed this morning with the following error message: Operating system file operation on file c9456ea79110a0.rpt failed. I don't understand what to do about getting this resolved, I've never seen this error message before.  Thank