Nov 27, 2014

ROWID & ROWNUM Pseudocolumn

What is ROWID Pseudocolumns ::
For each row in the database, the ROWID pseudocolumn returns the address of the row. Oracle Database rowid values contain information necessary to locate a row:
  • The data object number of the object
  • The data block in the datafile in which the row resides
  • The position of the row in the data block (first row is 0)
  • The datafile in which the row resides (first file is 1). The file number is relative to the tablespace.
Usually, a rowid value uniquely identifies a row in the database. However, rows in different tables that are stored together in the same cluster can have the same rowid.
Values of the ROWID pseudocolumn have the datatype ROWID or UROWID. Please refer to "ROWID Datatype" and "UROWID Datatype"for more information.
Rowid values have several important uses:
  • They are the fastest way to access a single row.
  • They can show you how the rows in a table are stored.
  • They are unique identifiers for rows in a table.
You should not use ROWID as the primary key of a table. If you delete and reinsert a row with the Import and Export utilities, for example, then its rowid may change. If you delete a row, then Oracle may reassign its rowid to a new row inserted later.
Although you can use the ROWID pseudocolumn in the SELECT and WHERE clause of a query, these pseudocolumn values are not actually stored in the database. You cannot insert, update, or delete a value of the ROWID pseudocolumn.

Don't use ROW_ID with MIN and MAX as MAX(ROWID) won't  always return me last inserted row because that row should not  have the biggest ROWID value.
The value of ROW_ID is not in sequence but it's only unique value.


What is ROWNUM Pseudocolumns ::
For each row returned by a query, the ROWNUM pseudocolumn returns a number indicating the order in which Oracle selects the row from a table or set of joined rows. The first row selected has a ROWNUM of 1, the second has 2, and so on.
You can use ROWNUM to limit the number of rows returned by a query, as in this example:
SELECT * FROM employees WHERE ROWNUM < 10; 

If an ORDER BY clause follows ROWNUM in the same query, then the rows will be reordered by the ORDER BY clause. The results can vary depending on the way the rows are accessed. For example, if the ORDER BY clause causes Oracle to use an index to access the data, then Oracle may retrieve the rows in a different order than without the index. Therefore, the following statement will not have the same effect as the preceding example:
SELECT * FROM employees WHERE ROWNUM < 11 ORDER BY last_name;

If you embed the ORDER BY clause in a subquery and place the ROWNUM condition in the top-level query, then you can force theROWNUM condition to be applied after the ordering of the rows. For example, the following query returns the employees with the 10 smallest employee numbers. This is sometimes referred to as top-N reporting:
SELECT * FROM
   (SELECT * FROM employees ORDER BY employee_id)
   WHERE ROWNUM < 11;

In the preceding example, the ROWNUM values are those of the top-level SELECT statement, so they are generated after the rows have already been ordered by employee_id in the subquery.
Conditions testing for ROWNUM values greater than a positive integer are always false. For example, this query returns no rows:
SELECT * FROM employees
    WHERE ROWNUM > 1;

The first row fetched is assigned a ROWNUM of 1 and makes the condition false. The second row to be fetched is now the first row and is also assigned a ROWNUM of 1 and makes the condition false. All rows subsequently fail to satisfy the condition, so no rows are returned.
You can also use ROWNUM to assign unique values to each row of a table, as in this example:
UPDATE my_table
    SET column1 = ROWNUM;


Please refer to the function ROW_NUMBER for an alternative method of assigning unique numbers to rows.


Sources ::  https://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

Nov 26, 2014

Oracle Business Intelligence Developers Guide (Oracle Press)

Overview


Main description

Master Oracle Business Intelligence 11g Reports and Dashboards
Deliver meaningful business information to users anytime, anywhere, on any device, using Oracle Business Intelligence 11g. Written by Oracle ACE Director Mark Rittman, Oracle Business Intelligence 11g Developers Guide fully covers the latest BI report design and distribution techniques. Find out how to execute effective queries, build accurate models, use scorecards and KPIs, create dynamic reports, set up dashboards, and publish to smartphones and wireless devices. This Oracle Press guide contains comprehensive details on Oracle Exalytics In-Memory Machine, the best-in-class, preintegrated BI platform.
  • Install or upgrade to Oracle Business Intelligence 11g
  • Develop and manage custom Oracle Business Intelligence repositories
  • Access relational, file, and multidimensional data sources
  • Design print-quality reports with Oracle Business Intelligence Publisher
  • Create web-enabled analyses, dashboards, and visualizations
  • Integrate with other applications using Oracle Business Intelligence 11g Action Framework
  • Employ authentication, authorization, and row-level security
  • Configure and deploy Oracle Exalytics In-Memory Machine

Table of contents

1. Overview and Product Architecture
2. Installations and Upgrades, for the Oracle BI Developers Handbook
3. Creating Repositories from Relational Sources
4. Creating Repositories from Oracle Essbase and Other OLAP Data Sources
5. Configuring and Maintaining the BI Server
6. Creating Reports Using Answers and Dashboards
7. Actionable Intelligence
8. KPIs and Scorecards
9. Creating Published Reports (BI Publisher)
10. Systems Management
11. High Availability, Clustering and Backup & Recovery
12. Managing Change, Versioning and Promotion Between Environments
13. Oracle Exalytics Business Intelligence Machine

Author comments

Mark Rittman, Oracle ACE Director, is Technical Director and co-founder of Rittman Mead, specializing in BI, DW and EPM solutions using Oracle Business Intelligence, Oracle Database, Oracle Data Integrator and Oracle Essbase. Mark is a strong supporter of Oracle user groups around the world, was previously an executive board member of ODTUG and speaks regularly at conferences in the UK, Europe, USA and around the world. Mark also writes for the Rittman Mead blog (http://www.rittmanmead.com/blog) and contributes a regular column on business intelligence for Oracle Magazine.

Original Source::  http://www.rittmanmead.com/obiee11gbook/
http://www.mhprofessional.com/product.php?isbn=0071798749



Feb 11, 2014

Oracle Apps Testing

1          Testing:: 

The ORACLE Apps testing strategy defines five levels of testing.  The ORACLE Testing Strategy deliverable contains detailed information on each testing level.  The Developer’s Handbook only provides brief explanations for developers to use as a quick reference guide.  The Developer’s Handbook does provide a minimal level of additional detail for those levels of testing in which developers themselves play a primary role.  The levels of testing include:
·         Construction Testing, which focuses on RICE elements and application configuration.
·         Process Testing, which verifies delivered and enhanced software functionality.
·         Integration Testing, which validates end-to-end business processes
·         User Acceptance Testing, which validates the solution to the end-user community
·         Technical Testing, which validate the hardware, software, and ancillary components function properly

Although not a separate deliverable from the code itself, developers will perform unit testing on each RICE component.  The developer will be responsible for defining and executing the unit test for the development item.  Unit tests will validate required functionality as detailed in the functional requirements document and that adequate exception handling is included in the developed item.  Unit testing focuses on detailed testing of all paths through a piece of code.  Developers should place emphasis on error processing.  For example, when testing a custom form, developers should place special characters in all fields and have the form attempt to process.  Upon successful completion of unit testing for a RICE component, the developers will conduct string testing on the component.
Developers perform all testing.

1.1.2          String Testing
String testing involves both the source and target systems for interfaces and conversions.  In sting testing, the source application produces output, whether a flat file or a message.  The target application receives and processes the input file or message.  String testing proves that data elements transfer from the source to the target application.  Upon successful completion of string testing, the technical team makes the components available for processing testing.
Developers from both the source and target divisions perform string testing.

Application configuration testing verifies the settings within the Oracle Applications.  The tests ensure that the configured application meets documented requirements.  Application configuration testing does not involve RICE components.
Developers have no responsibility for application configuration testing, although they may need to assist functional team members.

Members of the process project team will define and execute individual process tests on each function.  Process testing combines the configured application and the RICE components into an integrated environment.  Process testing takes place within the ORACLE TEAM and does not focus on division specific data.  Upon successful completion of process testing a RICE component, the process team will make the development package available for Integration testing.
Developers do not create or execute process test.  However, developers will investigate potential errors uncovered during testing and will resolve coding or Oracle bug issues as necessary.

1.3        Integration Testing
During integration testing, the process team performs end-to-end testing on processes.  During this testing cycle,  tests interfaces with the legacy application and integration with third parties, such as a bank.  Upon successful completion of integration testing a RICE component, the process team will make the development package available for user acceptance testing.

1.4        User Acceptance Testing
’s user acceptance testing performs “a day in the life” testing scenario.  For example, users execute daily, weekly, and monthly processes.  ’s user community will perform user acceptance testing on each RICE component.  User acceptance tests will validate required functionality as detailed in the functional requirements document.  Upon successful completion of acceptance testing for a RICE component, the end-users will make the development package available for production.

Production readiness testing executes one time, immediately before the first production implementation.  Production readiness testing occurs on the production hardware using the production software.  Production readiness testing enables  to test the exact hardware and software configurations that will exist after deployment to the Oracle Application.  Production readiness testing focuses on validating that all the proper connections exist between the Oracle Application environment and other systems, whether internal or external to .  (The UAT/FAT3 tests will serve as Production Readiness testing for the ORACLE implementation.)

1.5.2          Stress Testing
The ORACLE TEAM will conduct stress testing before the implementation of the pilot division, EPT.  Stress testing will send a high volume of transactions through the system to test the performance of the application components.  In the case of the ORACLE TEAM, stress testing will focus primarily on the interfaces.

1.5.3          Patch Testing
From a technical perspective, patch testing allows the person who applies the patch to ensure that repair software from the supplier will install completely and successfully and that the system is still accessible online.  In addition, by having the functional resources participate, patch testing validates the functionality of an application after receiving a software update from the supplier.  Patch testing identifies whether the patch fixes the known problem or not.  In addition, patch testing also involves verifying that the patch does adversely affect any other software functionality.

1.5.4          Infrastructure Verification
Infrastructure verification testing validates whether new hardware platforms or network connections function as expected.  Infrastructure verification testing only occurs when new hardware platforms or major network upgrades exist.


Oracle Reserved Words

1          Appendix A – Oracle Reserved Words
1.1        Oracle 8.1.7 Reserved Words
This appendix lists Oracle reserved words.  Oracle changes reserved words with each version of its product.  For a complete listing of reserved words, developers must use https://metalink.oracle.com.  Words followed by an asterisk (*) are also ANSI reserved words.  Developers must only use these words in Oracle related context.
Note: In addition to the following reserved words, Oracle uses system-generated names beginning with "SYS_" for implicitly generated schema objects and sub-objects.  Oracle discourages developers from using this prefix in the names explicitly given to custom schema objects and sub-objects to avoid possible conflict in name resolution.


ACCESS
ADD*
ALL*
ALTER*
AND*
ANY*
AS*
ASC*
AUDIT
BETWEEN*
BY*
CHAR*
CHECK*
CLUSTER
COLUMN
COMMENT
COMPRESS
CONNECT*
CREATE*
CURRENT*
DATE*
DECIMAL*
DEFAULT*
DELETE*
DESC*
DISTINCT*
DROP*
ELSE*

EXCLUSIVE
EXISTS
FILE
FLOAT*
FOR*
FROM*
GRANT*
GROUP*
HAVING*
IDENTIFIED
IMMEDIATE*
IN*
INCREMENT
INDEX
INITIAL
INSERT*
INTEGER*
INTERSECT*
INTO*
IS*
LEVEL*
LIKE*
LOCK
LONG
MAXEXTENTS
MINUS
MLSLABEL


MODE
MODIFY
NOAUDIT
NOCOMPRESS
NOT*
NOWAIT
NULL*
NUMBER
OF*
OFFLINE
ON*
ONLINE
OPTION*
OR*
ORDER*
PCTFREE
PRIOR*
PRIVILEGES*
PUBLIC*
RAW
RENAME
RESOURCE
REVOKE*
ROW
ROWS*
ROWID
ROWNUM


SELECT*
SESSION*
SET
SHARE
SIZE
SMALLINT*
START
SUCCESSFUL
SYNONYM
SYSDATE
TABLE*
THEN*
TO*
TRIGGER
UID
UNION*
UNIQUE*
UPDATE*
USER*
VALIDATE
VALUES*
VARCHAR*
VARCHAR2
VIEW*
WHENEVER*
WHERE
WITH*




1.2        PL/SQL 8.1.7 Reserved Words

PL/SQL reserves the words listed in this appendix.  That is, they have a special syntactic meaning to PL/SQL.  Therefore, developers should not use them to name program objects such as constants, variables, or cursors.  SQL also reserves some of these words (marked by an asterisk).  Therefore, developers should not use them to name schema objects such as columns, tables, or indexes.  Oracle changes reserved words with each version of its product.  For a complete listing of reserved words, developers must use https://metalink.oracle.com


ALL*
ALTER*
AND*

ANY*
ARRAY
AS*
ASC*
AT
AUTHID
AVG
BEGIN
BETWEEN*
BINARY_INTEGER
BODY
BOOLEAN
BULK
BY*
CHAR*
CHAR_BASE
CHECK*
CLOSE
CLUSTER*
COLLECT
COMMENT*
COMMIT
COMPRESS*
CONNECT*
CONSTANT
CREATE*
CURRENT*
CURRVAL
CURSOR
DATE*
DAY
DECIMAL*
DECLARE
DEFAULT*
DELETE*
DESC*
DISTINCT*
DO
DROP*
ELSE*
ELSIF
END
EXCEPTION
EXCLUSIVE*
EXECUTE
EXISTS*
EXIT
EXTENDS
FALSE
FETCH
FLOAT*
FOR*
FORALL
FROM*
FUNCTION
GOTO
GROUP*
HAVING*
HEAP
HOUR
IF
IMMEDIATE*
IN*
INDEX*
INDICATOR
INSERT*
INTEGER*
INTERFACE
INTERSECT*
INTERVAL
INTO*
IS*
ISOLATION
JAVA
LEVEL*
LIKE*
LIMITED
LOCK*
LONG*
LOOP
MAX
MIN
MINUS*
MINUTE
MLSLABEL*
MOD
MODE*
MONTH
NATURAL
NATURALN
NEW
NEXTVAL
NOCOPY
NOT*
NOWAIT*
NULL*
NUMBER*
NUMBER_BASE
OCIROWID
OF*
ON*
OPAQUE
OPEN
OPERATOR
OPTION*
OR*
ORDER*
ORGANIZATION
OTHERS
OUT
PACKAGE
PARTITION
PCTFREE*
PLS_INTEGER
POSITIVE
POSITIVEN
PRAGMA
PRIOR*
PRIVATE
PROCEDURE
PUBLIC*
RAISE
RANGE
RAW*
REAL
RECORD
REF
RELEASE
RETURN
REVERSE
ROLLBACK
ROW*
ROWID*
ROWNUM*
ROWTYPE
SAVEPOINT
SECOND
SELECT*
SEPARATE
SET*
SHARE*
SMALLINT*
SPACE
SQL
SQLCODE
SQLERRM
START*
STDDEV
SUBTYPE
SUCCESSFUL*
SUM
SYNONYM*
SYSDATE*
TABLE*
THEN*
TIME
TIMESTAMP
TO*
TRIGGER*
TRUE
TYPE
UID*
UNION*
UNIQUE*
UPDATE*
USE
USER*
VALIDATE*
VALUES*
VARCHAR*
VARCHAR2*
VARIANCE
VIEW*
WHEN
WHENEVER*
WHERE*
WHILE

WITH*

Jan 16, 2014

FRM-10102: Cannot attach PL/SQL library APPCORE



Problem :: FRM-10102: Cannot attach PL/SQL library APPCORE. This library attachment will be lost if the module is saved

Solution :: Need to add FORMS_PATH  in registry of windows.

Press Win R to open windows Run and put regedit to edit the windows registry.
and search ofr FORMS_PATH
and custom Forms and plls path in this variable.


Jan 15, 2014

Query for Extracting Employee Information:

Query for Employee Information: Oracle Apps Employee Data Extract :

SELECT   p.FULL_NAME,p.employee_number Employee_Number,
         p.last_name Last_Name,
         p.first_name First_Name,
         p.original_date_of_hire Hire_date,
         p.DATE_OF_BIRTH DOB,
         p.SEX Gender,
         p.EMAIL_ADDRESS EMAIL_Address,
         (SELECT   name
            FROM   apps.hr_all_organization_units
           WHERE   organization_id = p.business_group_id)
            Organization,
         (SELECT   location_code
            FROM   apps.hr_locations_all_tl
           WHERE   location_id = a.location_id
                   AND language = USERENV ('LANG'))
            Location_Name,
         'A' Status_Flag,
         (SELECT   CONCATENATED_SEGMENTS
            FROM   apps.GL_CODE_COMBINATIONS_KFV
           WHERE   code_combination_id = a.DEFAULT_CODE_COMB_ID)
            Expense_Account,
         (SELECT   papf1.full_name supervisor_name
            FROM   apps.per_all_people_f papf,
                   apps.per_all_assignments_f paaf,
                   apps.per_all_people_f papf1
           WHERE       papf.person_id = paaf.person_id
                   AND paaf.primary_flag = 'Y'
                   AND paaf.assignment_type = 'E'
                   AND paaf.supervisor_id = papf1.person_id
                   AND papf1.current_employee_flag = 'Y'
                   AND papf.business_group_id = paaf.business_group_id
                   AND SYSDATE BETWEEN papf.effective_start_date
                                   AND  papf.effective_end_date
                   AND SYSDATE BETWEEN paaf.effective_start_date
                                   AND  paaf.effective_end_date
                   AND SYSDATE BETWEEN papf1.effective_start_date
                                   AND  papf1.effective_end_date
                   AND papf.employee_number = p.employee_number
                   and   papf.person_id = p.person_id)
            Supervisor
  FROM   apps.per_all_people_f p,
         apps.per_all_assignments_f a,
         apps.pay_people_groups ppg,
         apps.hr_all_positions_f hap
 WHERE       P.Person_Id = A.Person_Id
         AND SYSDATE BETWEEN P.Effective_Start_Date AND P.Effective_End_Date
         AND SYSDATE BETWEEN a.effective_start_date AND a.effective_end_date
         AND a.people_group_id = ppg.people_group_id
         AND hap.position_id(+) = a.position_id

OraApps Search

Custom Search

Search This Blog