You are on page 1of 259

Page 1 of 259

What is Oracle Financials? Oracle Financials products provide organizations with solutions to a wide range of long- and short-term accounting system issues. Regardless of the size of the business, Oracle Financials can meet accounting management demands with:

Oracle Assets: Ensures that an organization's property and equipment investment is accurate and that the correct asset tax accounting strategies are chosen. Oracle General Ledger: Offers a complete solution to journal entry, budgeting, allocations, consolidation, and financial reporting needs. Oracle Inventory: Helps an organization make better inventory decisions by minimizing stock and maximizing cash flow. Oracle Order Entry: Provides organizations with a sophisticated order entry system for managing customer commitments. Oracle Payables: Lets an organization process more invoices with fewer staff members and tighter controls. Helps save money through maximum discounts, bank float, and prevention of duplicate payment. Oracle Personnel: Improves the management of employee- related issues by retaining and making available every form of personnel data. Oracle Purchasing: Improves buying power, helps negotiate bigger discounts, eliminates paper flow, increases financial controls, and increases productivity. Oracle Receivables:. Improves cash flow by letting an organization process more payments faster, without off-line research. Helps correctly account for cash, reduce outstanding receivables, and improve collection effectiveness. Oracle Revenue Accounting Gives an organization timely and accurate revenue and flexible commissions reporting. Oracle Sales Analysis: Allows for better forecasting, planning. and reporting of sales information.

What is the most important module in Oracle Financials? The General Ledger (GL) module is the basis for all other Oracle Financial modules. All other modules provide information to it. If you implement Oracle Financials, you should switch your current GL system first.GL is relatively easy to implement. You should go live with it first to give your implementation team a chance to be familiar with Oracle Financials. What is the MultiOrg and what is it used for? MultiOrg or Multiple Organizations Architecture allows multiple operating units and their relationships to be defined within a single installation of Oracle Applications. This keeps each operating unit's transaction data separate and secure. Use the following query to determine if MultiOrg is intalled: select multi_org_flag from fnd_product_groups; What is the difference between Fields and FlexFields? A field is a position on a form that one uses to enter, view, update, or delete information. A field prompt describes each field by telling what kind of information appears in the field, or alternatively, what kind of information should be entered in the field. A flexfield is an Oracle Applications field made up of segments. Each segment has an assigned name and a set of valid values. Oracle Applications uses flexfields to capture information about your organization. There are two types of flexfields: key flexfields and descriptive flexfields.

Page 2 of 259

Where can one get more info about Oracle Apps?

This FAQ: Oracle Applications Scripts Oracle Applications Home Page Oracle AppsNet Oracle Applications Users Group ITtoolbox Portal for Oracle (formerly OracleAssist) Oracle Applications 10.7 NCA Documentation Library The ERP SuperSite

1. How do I find the list of responsibility assigned to menu. Just the table name will do ? There are two views are involved in this case 1) FND_RESPONSIBILITY_VL 2) FND_MENUS_VL First you have to find the menu_id of the menu from FND_MENUS_VL Then you have to search in the FND_RESPONSIBILITY_VL with the condition of menu_id The query goes like this SELECT responsibility_name FROM FND_RESPONSIBILITY_VL WHERE menu_id = (SELECT menu_id FROM FND_MENUS_VL WHERE user_menu_name LIKE '%MENU_NAME%') 2. How many user is using the given menu ?What is the table name to identify he above relations.

The Table to identiy is FND_USER_RESP_GROUPS. From this table, you can get the User_id and then map it with the FND_USER table to get the user name 3. Relation between the menu and form. What is the table name maintain this relation.

4. Can any one tell how many Key FlexFields are there in Oracle Applications and there names with Module name. Run This qury: SELECT fat.application_name, fif.id_flex_name FROM fnd_id_flexs fif JOIN fnd_application_tl fat ON fat.application_id = fif.application_id AND fat.language = 'US' ORDER BY fat.application_name 1. 1.i Suppliers There is more than one account for the same supplier, which one do I choose? Check the supplier site addresses and choose the supplier whose site address matches your invoice address. If none of them match your invoice then ask DP section to create a new site. If all

Page 3 of 259

the supplier accounts have the same site addresses then choose the Supplier with the lowest number. We are in the process of merging all the multiple accounts into one. 1.ii I cannot find a supplier or an employee on the database Please send details of the supplier or employee to DP section. Minimum details required are as follows: Name and full address If an individual please confirm if the person is an employee or not Standard forms for full supplier set-up can be obtained from DP section. 2. 2.i Batch Headers How to print batch headers 2.ii Select the batch header you want to print by clicking on Query, and Find. Then enter the batch number you require and click on the Find button The system brings up the batch details Confirm that you have the right folder open ie UCL BATCH HEADER Click on the Action menu and then click Print A copy of the batch header would be printed on your printer

Can I adjust or delete batch header details? You can add invoices to a batch at any time You can change the invoice type on the batch header after entering invoices against a batch and the new invoice type will default onto new invoices entered after the change. Changing the batch header does not affect invoices entered before the change You can delete an invoice from a batch at any time before the invoice has been approved. See 5.i You cannot delete an invoice batch that contains invoices. If you want to delete an invoice batch, you must delete the invoices in the batch first. See 5.i

3. 3.i

Grant related Invoice Distributions I am unable to post an expense claim to a grant Please check that you have used the standard invoice type and not expense report type. If you have used the wrong invoice type then you would have to delete the invoice and re-enter the invoice. See 5.i I am unable to enter a grant distribution against a 6P expenditure type because the system is requesting for a valid quantity Please enter the expenditure amount in the quantity field.

3.ii

3.iii

I wish to enter a distribution against a grant code but the system is requesting for an expenditure Item date In this case you are trying to enter an expense against a completed grant. Please confirm the completion date of the grant and enter a date on or before the grant completion date. You can confirm the date as follows: Select the grant field Click on the picklist button on the toolbar or press CTRL+F11 Enter the grant code and click the Find button The system would then bring up brief details about the grant. Scroll to the right to view the grant completion date.

Page 4 of 259

3.iv

I have entered my distributions against grant codes and the system generated account codes are different from the grant codes that I entered? The grants were set-up to map to control accounts in the general ledger. The account codes for these control accounts are different from the grant codes that you have entered. See further details on COA Philosophy document on the NewFis website

4. 4.i

VAT Distributions How do I confirm that the VAT amount is correct before the first level approval process is run? After entering all your distribution lines, Select Special on the menu options at the top of the window. Choose Generate VAT distributions. The system then comes up with a note indicating that VAT is being calculated, click OK on the box and wait for the system to complete the process by bringing up the VAT lines and updating the distribution total. Check that your Invoice total agree with the distribution total, if not then make the necessary changes as described in section 4.ii below.

4.ii

System calculated VAT amount does not agree with the invoice VAT amount due to rounding differences or insignificant arithmetical errors on Supplier invoices Manually change the system calculated VAT amount on the VAT distribution line to agree with the invoice VAT amount.

4.iii

5. 5.i

Most of our expenses are VAT recoverable, and I am not sure of the VAT codes to use Recoverability is now defined at the account code level. The code to enter is the one that corresponds with the VAT rate on your invoice. Please find further details on the VAT overview document on the Newfis website. Adjusting and deleting invoices and invoice distributions How do I delete an invoice if I have made an error? If invoice is unapproved (first level approval has not been done) Ensure that you are on the invoices window and the cursor is on the invoice line that you wish to delete Click on the red X button on your toolbar Click OK on the delete message box. Once the deletion is completed save your work.

5.i.i

5.i.ii

If invoice is approved ie after 1st or secondary level approval An approved Invoice cannot be deleted because funds have already been committed against the invoice during the approval process. However, the system would allow you to cancel the invoice.

5.ii

How do I cancel an invoice that has been approved? Navigate to the invoices window Select the invoice to be cancelled. Please note that if you wish to re-enter the invoice it is advised that you add A to the number of the invoice to be cancelled and then re-enter the invoice with the number as written on the Supplier invoice. This is necessary because the system would not allow you to enter the same number twice for the same supplier. On your invoices screen, click on the Actions..1 button and this brings up the Actions wndow. On the Actions window click on the Cancel Invoice check box Click OK and click OK to the messages that come up during the cancellation process. Once the process have been completed save your work

Page 5 of 259

5.iii

I have entered an expense claim with the wrong invoice type, how do I correct this error Delete the invoice and re-enter it with the standard invoice type.

5.iv

I How can I amend input errors on my distribution window Before approval

Purchase order matched distributions cannot be adjusted but can be reversed and the correcting entries entered on a new distribution line. Distribution details that are not generated from purchase orders can be changed or deleted before the first level approval stage. Follow the procedure for adjusting invoices and remember to save your work . After first Level Approval

5.v 6. 6.i

Distributions cannot be amended or deleted once they have been approved. The system would only allow you to reverse the entries by clicking on the Reverse 1 button. Please see the invoice adjustment chart at the end of this document. Invoice Approval After running the batch approval process, how do I confirm that all the invoices in the batch have been approved? The batch approval process normally takes a few minutes to run. The time it takes depend on the number of entries in the batch and how busy the system is. Please wait a few minutes before checking that all the invoices in your batch have been approved. After waiting for a few minutes you may open the invoices window of the batch and click on Query, then Run. This refreshes the screen and you may then check if your invoices have been approved by reviewing the holds placed on them. Another alternative is to view your requests by carrying out the following: i. Click on the help menu and select View My Request and the Find request window comes up. ii. Click on the Find button and this takes you to the Requests window. iii. On the Requests window click on the refresh data button and the system would bring up all your outstanding requests and show the status of your requests ie whether it is pending, running or completed. If not completed click refresh again after a few minutes and click again until completed.

6.ii

If you process large volumes of batches then it is advisable to print the Invoice on Hold report once or twice a day instead of checking batches individually. See page 45 of your AP training documentation for guidance on how to print reports. I have approved my invoices but don't know where they have gone for secondary approval? Invoices are automatically available for all authorised signatories in your Department once the First Level approval is carried out. You do not need to send them to anyone for approval. An invoice was not approved in my batch of 10 invoices. Does this stop the rest from being processed further? No General advice It is advisable that you print out or review the Invoice on Hold Report at the end of every day to ensure that all your invoices were successfully entered. You may approve more than one batch at a time. To do this Navigate to the Invoice batches window

6.iii

7. 7.i 7.ii

Page 6 of 259

7.iii

Press the SHIFT key and then click on the invoice batches that you wish to approve. The batches would become highlighted in blue and the Approve button would indicate the number of batches that you have highlighted Lift your finger off the shift key and then click on the approve button The system would ask you to confirm the number of batches to be approved. Click OK

The on screen 'help' is very useful and provides the following information: Window help: topics relating to the window you are working on Keyboard help : A list of keyboard shortcuts View My Request : Confirm the status of your requests About this Record: Details of who created a record and when it was created

Page 7 of 259

The Invoice document is used to bill the Buyer for services and/or products delivered by the Seller. Credit is the means by which we are able to obtain immediate benefit of goods or services upon the promise of payment at a future date.

Page 8 of 259

Buyer

R e c o n c ile in v o ic e

C r e a t e in v o ic e re s p o n s e

G e n e ra te paym ent

In v o ic e

In v o ic e

Marketplace

In v o ic e R esponse N Is s u e r e s o lu tio n m a y ta k e p la c e v ia p h o n e , e m a il, e tc .

Supplier

M a y in c lu d e in fo r m a tio n fr o m fie ld tic k e t( s ) a n d a n y th ir d p a r ty c h a rg e s

C r e a te in v o ic e

P ro c e s s in v o ic e re s p o n s e

D is p u te d ite m s ?

R e s o lv e is s u e s a n d re c re a te in v o ic e

Credit memo: When you want to adjust an invoice, document issued by the vendor to record an adjustment against an invoice. Description The supplier presents to the customer for the ordered or delivered, received or consumed goods or services a detailed invoice. The customer disputes the invoice and works with supplier to resolve issue. If any discrepancy is found, the customer shall start the process to treat incorrect invoices. Once Supplier and Customer agree upon the nature of the dispute, Supplier issues a credit memo to correct the problem. Buyer receives credit memo, reconciles with order and contract information and issues payment. Negative = Credit Positive = Debit

Verify its correctness.

o o o o o

Note the reason for the credit if it is not clear on the credit memo itself Indicate the account and center where the credit should be applied. Forward all credits to Accounts Payable immediately so that the credit can be applied to your cost center and deducted from the next payment to the vendor. DO NOT HOLD CREDITS IN THE DEPARTMENT FOR ANY REASON. Accounts Payable will apply the credit against any open invoices in the system. Make a copy for your records.

Debit memo: Negative amount invoice created by us and sent to supplier to notifying him about the credit we are recording. AP is divided in to 2 workbenches. Invoice workbench Payable workbench We usually enter supplier invoice either in Invoice workbench or quick invoice window.

Page 9 of 259

Invoice workbench: Contains: Invoice Batch window Invoice window Distribution window Other associated windows When to use: Incase of complex invoices or invoices that requires online validation. When an invoice requires immediate action. Quick invoice window: Used for quick high volume invoice entry for invoices that dont requires extensive validation. After entry just import into payable system, validation and defaulting will occur during import. For more see page 342 of Oracle payables.pdf Invoice distribution: It allocates total invoice allowance to various expense or asset accounts. Expanse Reports: Invoice Creation: Invoice Distributions: Account: Company have different COA so follow that hierarchy for each set of item. Accounting Date: Date when we are planning to post it to GL ie. GL Date. Payments: Record: Manual payments(checks,wire) which are made out of OP and they will be recorded in Op and update the invoice for which you have paid. Computer Generated: Combined: Payment: Lookup: It is a predefined values used as a LOV. In some fields we select a value from a predefined set of values, In some cases we have defined them in the setup windows such as supplier name,payment terms or tax codes. Other predefined set of values are Lookup codes. Lookup Category Lookup type ex. Invoice type Allowed values are called Lookup names. Ex. Standard, Debit memo, Credit ,memo, Prepayment. For a lookup type we can define upto 250 Lookup names. Navigation: SetupLookups For more details see Developers Guide pg. 58. Distribution Sets: It is a predefined set of distribution for a repeated or a same set of distribution form a supplier. We can either link it to supplier site or we can link it to the invoice. There are 2 types of distribution sets. Full Distribution Sets: We will define % amount of the invoice to each distribution line and sum of all lines must be either 0 or 100. We can enter ve % values. Skeleton Distribution Sets: Leave the % field as 0 so that at the time of invoice creation you ca enter amount in different distribution lines. For more details see Developers Guide pg. 63.

Page 10 of 259

Purchase document: Use Bank window to define internal bank branch from which you disburse payments. For each bank account we can define payment document for check, EFT, EDI or wire transfer and other payment methods.

Oracle Interview Questions and Answers : SQL 1. To see current user name Sql> show user; 2. Change SQL prompt name SQL> set sqlprompt Manimara > Manimara > Manimara > 3. Switch to DOS prompt SQL> host 4. How do I eliminate the duplicate rows ? SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.dv=tb.dv); Example. Table Emp Empno Ename 101 Scott 102 Jiyo 103 Millor 104 Jiyo 105 Smith delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename); The output like, Empno Ename 101 Scott 102 Millor 103 Jiyo 104 Smith 5. How do I display row number with records? To achive this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp; Output: 1 Scott 2 Millor 3 Jiyo 4 Smith 6. Display the records between two range select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start); Enter value for upto: 10 Enter value for Start: 7 ROWNUM EMPNO ENAME --------- --------- ---------1 7782 CLARK 2 7788 SCOTT 3 7839 KING 4 7844 TURNER 7. I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text Not Applicable want to display, instead of blank space. How do I write the query? SQL> select nvl(to_char(comm.),'NA') from emp;

Page 11 of 259

Output : NVL(TO_CHAR(COMM),'NA') ----------------------NA 300 500 NA 1400 NA NA 8. Oracle cursor : Implicit & Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements. PL/SQL construct to identify each and every work are used, is called as Cursor. For SQL queries returning a single row, PL/SQL declares all implicit cursors. For queries that returning more than one row, the cursor needs to be explicitly declared. 9. Explicit Cursor attributes There are four cursor attributes used in Oracle cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN 10. Implicit Cursor attributes Same as explicit cursor but prefixed by the word SQL SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements. : 2. All are Boolean attributes. 11. Find out nth highest salary from emp table SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); Enter value for n: 2 SAL --------3700 12. To view installed Oracle version information SQL> select banner from v$version; 13. Display the number value in Words SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; the output like, SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP')) --------- ----------------------------------------------------800 eight hundred 1600 one thousand six hundred 1250 one thousand two hundred fifty If you want to add some text like, Rs. Three Thousand only. SQL> select sal "Salary ", (' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.')) "Sal in Words" from emp / Salary Sal in Words ------- -----------------------------------------------------800 Rs. Eight Hundred only. 1600 Rs. One Thousand Six Hundred only. 1250 Rs. One Thousand Two Hundred Fifty only. 14. Display Odd/ Even number of records Odd number of records: select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp); 1 3 5 Even number of records: select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp) 2

Page 12 of 259

4 6 15. Which date function returns number value? months_between 16. Any three PL/SQL Exceptions? Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others 17. What are PL/SQL Cursor Exceptions? Cursor_Already_Open, Invalid_Cursor 18. Other way to replace query result null value with a text SQL> Set NULL N/A to reset SQL> Set NULL 19. What are the more common pseudo-columns? SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM 20. What is the output of SIGN function? 1 for positive value, 0 for Zero, -1 for Negative value. 21. What is the maximum number of triggers, can apply to a single table? 12 triggers. PL/SQL Basiscs of PL/SQL 1. What is PL/SQL ? PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration, conditional branching. 2. What is the basic structure of PL/SQL ? PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL. 3. What are the components of a PL/SQL block ? A set of related declarations and procedural statements is called block. 4. What are the components of a PL/SQL Block ? Declarative part, Executable part and Execption part. Datatypes PL/SQL 5. What are the datatypes a available in PL/SQL ? Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN. Some composite data types such as RECORD & TABLE. 6. What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes? % TYPE provides the data type of a variable or a database column to that variable. % ROWTYPE provides the record type that represents a entire row of a table or view or columns selected in the cursor. The advantages are : I. Need not know about variable's data type ii. If the database definition of a column in a table changes, the data type of a variable changes accordingly. 7. What is difference between % ROWTYPE and TYPE RECORD ?

Page 13 of 259

% ROWTYPE is to be used whenever query returns a entire row of a table or view. TYPE rec RECORD is to be used whenever query returns columns of different table or views and variables. E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp ename %type ); e_rec emp% ROWTYPE cursor c1 is select empno,deptno from emp; e_rec c1 %ROWTYPE. 8. What is PL/SQL table ? Objects of type TABLE are called "PL/SQL tables", which are modelled as (but not the same as) database tables, PL/SQL tables use a primary PL/SQL tables can have one column and a primary key. Cursors 9. What is a cursor ? Why Cursor is required ? Cursor is a named private SQL area from where information can be accessed. Cursors are required to process rows individually for queries returning multiple rows. 10. Explain the two type of Cursors ? There are two types of cursors, Implict Cursor and Explicit Cursor. PL/SQL uses Implict Cursors for queries. User defined cursors are called Explicit Cursors. They can be declared and used. 11. What are the PL/SQL Statements used in cursor processing ? DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or Record types, CLOSE cursor name. 12. What are the cursor attributes used in PL/SQL ? %ISOPEN - to check whether cursor is open or not % ROWCOUNT - number of rows fetched/updated/deleted. % FOUND - to check whether cursor has fetched any row. True if rows are fetched. % NOT FOUND - to check whether cursor has fetched any row. True if no rows are fetched. These attributes are proceded with SQL for Implict Cursors and with Cursor name for Explict Cursors. 13. What is a cursor for loop ? Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closes when all the records have been processed. eg. FOR emp_rec IN C1 LOOP salary_total := salary_total +emp_rec sal; END LOOP; 14. What will happen after commit statement ? Cursor C1 is Select empno, ename from emp; Begin open C1; loop Fetch C1 into eno.ename; Exit When

Page 14 of 259

C1 %notfound;----commit; end loop; end; The cursor having query as SELECT .... FOR UPDATE gets closed after COMMIT/ROLLBACK. The cursor having query as SELECT.... does not get closed even after COMMIT/ROLLBACK. 15. Explain the usage of WHERE CURRENT OF clause in cursors ? WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers 16. What is a database trigger ? Name some usages of database trigger ? Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modificateions, Log events transparently, Enforce complex business rules Derive column values automatically, Implement complex security authorizations. Maintain replicate tables. 17. How many types of database triggers can be specified on a table ? What are they ? Insert Update Delete Before Row o.k. o.k. o.k. After Row o.k. o.k. o.k. Before Statement o.k. o.k. o.k. After Statement o.k. o.k. o.k. If FOR EACH ROW clause is specified, then the trigger for each Row affected by the statement. If WHEN clause is specified, the trigger fires according to the retruned boolean value. 18. Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ? It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it affects logical transaction processing. 19. What are two virtual tables available during database trigger execution ? The table columns are referred as OLD.column_name and NEW.column_name. For triggers related to INSERT only NEW.column_name values only available. For triggers related to UPDATE only OLD.column_name NEW.column_name values only available. For triggers related to DELETE only OLD.column_name values only available. 20. What happens if a procedure that updates a column of table X is called in a database trigger of the same table ? Mutation of table occurs. 21. Write the order of precedence for validation of a column in a table ? I. done using Database triggers. ii. done using Integarity Constraints. I & ii.

Page 15 of 259

Exception : 22. What is an Exception ? What are types of Exception ? Exception is the error handling part of PL/SQL block. The types are Predefined and user_defined. Some of Predefined execptions are. CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX NO_DATA_FOUND TOO_MANY_ROWS INVALID_CURSOR INVALID_NUMBER LOGON_DENIED NOT_LOGGED_ON PROGRAM-ERROR STORAGE_ERROR TIMEOUT_ON_RESOURCE VALUE_ERROR ZERO_DIVIDE OTHERS. 23. What is Pragma EXECPTION_INIT ? Explain the usage ? The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error. e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number) 24. What is Raise_application_error ? Raise_application_error is a procedure of package DBMS_STANDARD which allows to issue an user_defined error messages from stored sub-program or database trigger. 25. What are the return values of functions SQLCODE and SQLERRM ? SQLCODE returns the latest code of the error that has occured. SQLERRM returns the relevant error message of the SQLCODE. 26. Where the Pre_defined_exceptions are stored ? In the standard package. Procedures, Functions & Packages ; 27. What is a stored procedure ? A stored procedure is a sequence of statements that perform specific function. 28. What is difference between a PROCEDURE & FUNCTION ? A FUNCTION is alway returns a value using the return statement. A PROCEDURE may return one or more values through parameters or may not return at all. 29. What are advantages fo Stored Procedures / Extensibility,Modularity, Reusability, Maintainability and one time compilation. 30. What are the modes of parameters that can be passed to a procedure ? IN,OUT,IN-OUT parameters. 31. What are the two parts of a procedure ?

Page 16 of 259

Procedure Specification and Procedure Body. 32. Give the structure of the procedure ? PROCEDURE name (parameter list.....) is local variable declarations BEGIN Executable statements. Exception. exception handlers end; 33. Give the structure of the function ? FUNCTION name (argument list .....) Return datatype is local variable declarations Begin executable statements Exception execution handlers End; 34. Explain how procedures and functions are called in a PL/SQL block ? Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is called as a PL/SQL statement calculate_bonus ('A822'); 35. What is Overloading of procedures ? The Same procedure name is repeated with parameters of different datatypes and parameters in different positions, varying number of parameters is called overloading of procedures. e.g. DBMS_OUTPUT put_line 36. What is a package ? What are the advantages of packages ? Package is a database object that groups logically related procedures. The advantages of packages are Modularity, Easier Applicaton Design, Information. Hiding,. reusability and Better Performance. 37.What are two parts of package ? The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Package Specification contains declarations that are global to the packages and local to the schema. Package Body contains actual procedures and local declaration of the procedures and cursor declarations. 38. What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ? A cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package. A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures.

Page 17 of 259

39. How packaged procedures and functions are called from the following? a. Stored procedure or anonymous block b. an application program such a PRC *C, PRO* COBOL c. SQL *PLUS a. PACKAGE NAME.PROCEDURE NAME (parameters); variable := PACKAGE NAME.FUNCTION NAME (arguments); EXEC SQL EXECUTE b. BEGIN PACKAGE NAME.PROCEDURE NAME (parameters) variable := PACKAGE NAME.FUNCTION NAME (arguments); END; END EXEC; c. EXECUTE PACKAGE NAME.PROCEDURE if the procedures does not have any out/in-out parameters. A function can not be called. 40. Name the tables where characteristics of Package, procedure and functions are stored ? User_objects, User_Source and User_error. FORMS4.0 12. what is a display item? Display items are similar to text items but store only fetched or assigned values. Operators cannot navigate to a display item or edit the value it contains. 13. What is a list item? It is a list of text elements. 14. What are the display styles of list items? Poplist, No text Item displayed in the list item. Tlist, No element in the list is highlighted. 15. What is a radio Group? Radio groups display a fixed no of options that are mutually Exclusive . User can select one out of n number of options. 16. How many maximum number of radio buttons can you assign to a radio group? Unlimited no of radio buttons can be assigned to a radio group 17. can you change the default value of the radio button group at run time? No. 18.What triggers are associated with the radio group? Only when-radio-changed trigger associated with radio group Visual Attributes. 19. What is a visual attribute? Visual Attributes are the font, color and pattern characteristics of objects that operators see and intract with in our application. 20. What are the types of visual attribute settings?

Page 18 of 259

Custom Visual attributes Default visual attributes Named Visual attributes. Window 21. What is a window? A window, byitself , can be thought of as an empty frame. The frame provides a way to intract with the window, including the ability to scroll, move, and resize the window. The content of the window ie. what is displayed inside the frame is determined by the canvas View or canvas-views displayed in the window at run-time. 22. What are the differrent types of windows? Root window, secondary window. 23. Can a root window be made modal? No. 24. List the buil-in routine for controlling window during run-time? Find_window, get_window_property, hide_window, move_window, resize_window, set_window_property, show_View 25. List the windows event triggers available in Forms 4.0? When-window-activated, when-window-closed, when-window-deactivated, when-window-resized 26. What built-in is used for changing the properties of the window dynamically? Set_window_property Canvas-View 27. What is a canvas-view? A canvas-view is the background object on which you layout the interface items (text-items, check boxes, radio groups, and so on.) and boilerplate objects that operators see and interact with as they run your form. At run-time, operators can see only those items that have been assiged to a specific canvas. Each canvas, in term, must be displayed in a specfic window. 28. Give the equivalent term in forms 4.0 for the following. Page, Page 0? Page - Canvas-View Page 0 - Canvas-view null. 29. What are the types of canvas-views? Content View, Stacked View. 30. What is the content view and stacked view?

Page 19 of 259

A content view is the "Base" view that occupies the entire content pane of the window in which it is displayed. A stacked view differs from a content canvas view in that it is not the base view for the window to which it is assigned 31. List the built-in routines for the controlling canvas views during run-time? Find_canvas Get-Canvas_property Get_view_property Hide_View Replace_content_view Scroll_view Set_canvas_property Set_view_property Show_view Alert 32. What is an Alert? An alert is a modal window that displays a message notifies the operator of some application condition 33. What are the display styles of an alert? Stop, Caution, note 34. Can you attach an alert to a field? No 35. What built-in is used for showing the alert during run-time? Show_alert. 36. Can you change the alert messages at run-time? If yes, give the name of th built-in to chage the alert messages at run-time. Yes. Set_alert_property. 37. What is the built-in function used for finding the alert? Find_alert Editors 38. List the editors availables in forms 4.0? Default editor User_defined editors system editors. 39. What buil-in routines are used to display editor dynamicaly? Edit_text item show_editor Q) What is TableSpace and Users? Tablespace is the amount of disk space you get on the oracle database server to create tables and store

Page 20 of 259

data. Oracle users are like database users for any database server such as MySQL. Normally, one user is sufficient to full-fill the requirements of a standard web application. Additional users and their rights over your tablespace can be created and modified from the end-user control panel.

Q)What is the result of comparing NULL with NULL? NULL is neither equal to NULL, nor it is not equal to NULL. Any comparison to NULL is evaluated to NULL. Look at this code example to convince yourself. Q) What is the difference between %TYPE and %ROWTYPE? %ROWTYPE is used to declare a record with the same types as found in the specified database table, view or cursor. %TYPE is used to declare a field with the same type as that of a specified table's column. Q)What is a mutating and constraining table? "Mutating" means "changing". A mutating table is a table that is currently being modified by an update, delete, or insert statement. When a trigger tries to reference a table that is in state of flux (being changed), it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state. Another way this error can occur is if the trigger has statements to change the primary, foreign or unique key columns of the table off which it fires. If you must have triggers on tables that have referential constraints, the workaround is to enforce the referential integrity through triggers as well. There are several restrictions in Oracle regarding triggers:

A row-level trigger cannot query or modify a mutating table. (Of course, NEW and OLD still can be accessed by the trigger) . A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete. Etc.

Q)Can one pass an object/table as an argument to a remote procedure? The only way to reference an object type between databases is via a database link. Note that it is not enough to just use "similar" type definitions. Look at this example: -- Database A: receives a PL/SQL table from database B CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL.VARCHAR2S) IS BEGIN -- do something with TabX from database B null; END; /

-- Database B: sends a PL/SQL table to database A CREATE OR REPLACE PROCEDURE pcalling IS TabX DBMS_SQL.VARCHAR2S@DBLINK2; BEGIN pcalled@DBLINK2(TabX);

Page 21 of 259

END; / what is Pragmas ? The PRAGMA keyword is used to give instructions to the compiler. There are four types of pragmas in PL/SQL: EXCEPTION_INIT Tells the compiler to associate the specified error number with an identifier that has been declared an EXCEPTION in your current program or an accessible package. See the Section 1.10, "Exception Handling " section for more information on this pragma. RESTRICT_REFERENCES Tells the compiler the purity level of a packaged program. The purity level is the degree to which a program does not read/write database tables and/or package variables. See the Section 1.15, "Calling PL/SQL Functions in SQL" section for more information on this pragma. SERIALLY_REUSABLE Tells the runtime engine that package data should not persist between references. This is used to reduce per-user memory requirements when the package data is only needed for the duration of the call and not for the duration of the session. See the Section 1.14, "Packages" section for more information on this pragma. AUTONOMOUS_TRANSACTION (Oracle8i ) Tells the compiler that the function, procedure, top-level anonymous PL/SQL block, object method, or database trigger executes in its own transaction space. See the Section 1.8, "Database Interaction and Cursors " section for more information on this pragma. Autonomous Transactions (Oracle8i) Autonomous transactions execute within a block of code as separate transactions from the outer (main) transaction. Changes can be committed or rolled back in an autonomous transaction without committing or rolling back the main transaction. Changes committed in an autonomous transaction are visible to the main transaction, even though they occur after the start of the main transaction. Changes committed in an autonomous transaction are visible to other transactions as well. The RDBMS suspends the main transaction while the autonomous transaction executes: For more info see http://www.unix.org.ua/orelly/oracle/langpkt/ch01_08.htm Kill session: ALTER SYSTEM KILL SESSION session id; Session id can be find from following qry select * from v$session where machine like 'IPDOMAINK\ERPNEW_USER%'

Page 22 of 259

How to create dynamic LOV in a form? Show_lov(lov_name);

Synonym : A synonym (synonym-name) is an alias for an object (such as a table). The object does not need to exist at the time of its creation. Synonyms can't be used in a drop and truncate statements. If this is tried, it results in a ORA-00942: table or view does not exist. Truncate: A statement like delete from tablename deletes all records in the table, but it does not free any space. In order to free the space as well, use truncate. However, truncate can not be rolled back . truncate table table_name; truncate cluster cluster_name; The truncate statement is not the same as the <trunc.html> statement. trunc (date) trunc (date, 'format-string')

For ER-Diagram: http://members.iinet.net.au/~lonsdale/docs/erd.pdf What is a lookup code? A lookup code is a word or string of characters that you provide for your event listing when it's entered into the system. This code can then be used to quickly and easily locate the event with a database search. The code, along with The RideShare Alliance Web site address can be passed out with organizational documentation and advertisements to let your participants know where to find your ridesharing page. The lookup code serves another purpose as well. When an event is marked as private it will not come up in any database query except for the lookup code search. This means that the event cannot be found by anyone who doesn't have the correct code (It is possible, though unlikely, that someone could guess your code). This feature should be viewed as a way to keep your event out of normal search results, not as a guaranteed method of security.

Troubleshooting Database Links Each Oracle DBA knowns this story of course ... sorry, but not every Oracle user is a DBA. One early morning your management staff complains about missing sales data, which must be ready for the daily trend analysis. What's happen ... nobody changed the calculation procedure during the night ... here it is ... the database link is down. Why ... well the remote DBA changed all passwords. This is only one of the famous database link trobleshooting stories. Read the following article and you have less annoyance with database links. Global Naming Oracle enforces the requirement that the database.domain portion of the database link name must match the complete global name of the remote database by setting GLOBAL_NAMES to TRUE in the initialization parameter file initSID.ora. Example: Local DB is 'SOL3' (Oracle 8.1.6), remote DB is 'SOL1' (Oracle 7.3.4) # Parameter file initSOL3.ora for Database SOL3 # ### Global Naming ### ------------# Enforce that a dblink has same name as the DB it connects to

Page 23 of 259

global_names = TRUE # Parameter file initSOL1.ora for Database SOL1 # ### Global database name is db_name.db_domain ### ----------------------------------------db_name = SOL1 db_domain = world Our database link points from the local database SOL3 to the remote database SOL1. Therefore we need the global database name for SOL1. Ask the remote database administrator for these information or connect to SOL1 and execute the following query on SOL1: SQL> select GLOBAL_NAME from GLOBAL_NAME; GLOBAL_NAME ----------SOL1.WORLD We found the database link name 'SOL1.WORLD' for our local database SOL3. Now connect to the local database database SOL3 as a user, who has the privilege to create a database link and create the following named database link to SOL1. $ sqlplus jones/lion@SOL3 SQL> CREATE DATABASE LINK sol1.world CONNECT TO scott IDENTIFIED BY tiger using 'SOL1'; With this DB-Link, you (jones/lion) can connect to the remote database SOL1 as user scott/tiger. This user must exist on the remote database SOL1. Test the database link as user jones/lion from SOL3. SQL> SELECT * FROM emp@SOL1.WORLD; You may ask, what's this strange 'SOL1' in ..... using 'SOL1' means ?. Well this is the so called connect_string (or net_connect_string in Oracle8i). This string has nothing common with the DB-Link name, but very often the same name is used. The connect string must be defined in the Net8 configuration file TNSNAMES.ORA, if you don't use Oracle Names. # # TNSNAMES.ORA for SOL3 ############################### # SOL1.world = (DESCRIPTION = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = saturn) (Port = 1521)) (CONNECT_DATA = (SID = SOL1) (GLOBAL_NAME = SOL1.world) (SERVER = DEDICATED))) Well, now you understand our short story at the beginning of this article. If the DBA on SOL1 changes scott's password to snake, we have the disaster with our missing sales data ... poor management. External references Oracle allows three kinds of external references to DB-links, which are resolved as follows:

Page 24 of 259

Named Link: The username specified in the link is used. You specify the username and password used to connect to the remote database (this database link is sometimes called fixed user database link). CREATE DATABASE LINK sol1.world CONNECT TO scott IDENTIFIED BY tiger USING 'sol1';

Anonymous Link: The session username is used. If you omit the CONNECT TO clause, the database link uses the username and password of each user who is connected to the database (this database link is sometimes called connected user database link). CREATE DATABASE LINK sol1.world USING 'sol1';

Privileged Link: The username of the invoker is used. The current user must be a 'global' user with a valid account on the remote database for the link to succeed. If the database link is used directly, that is, not from within a stored object, then the current user is the same as the connected user. When executing a stored object (such as a procedure, view, or trigger) that initiates a database link, CURRENT_USER is the username that owns the stored object, and not the username that called the object. For example, if the database link appears inside procedure SCOTT.show_emp (created by SCOTT), and user JONES calls procedure SCOTT.show_emp, the current user is SCOTT. However, if the stored object is an invoker-rights function, procedure, or package (new in Oracle8i), the invoker's authorization ID is used to connect as a remote user. For example, if the privileged database link appears inside procedure SCOTT.show_emp (an invoker-rights procedure created by SCOTT), and user JONES calls procedure SCOTT.show_emp, then CURRENT_USER is JONES and the procedure executes with JONES's privileges. For more information on invoker-rights functions click here CREATE DATABASE LINK sol1.world CONNECT TO CURRENT_USER USING 'sol1';

Besides these often used DB-Links, you can create a database link as PUBLIC. Be very careful with PUBLIC database links, they may open a door for everybody to a remote database. We suggest, NOT TO USE public database links without Authentication. Shared PUBLIC DB-Link with Authentication A shared PUPLIC DB-Link with Authentication uses a single network connection to create a PUBLIC database link that can be shared between multiple users with more security. This DB-Link is available only with the multi-threaded server configuration. Example SQL> CREATE SHARED PUBLIC DATABASE LINK sol1.world CONNECT TO scott IDENTIFIED BY tiger AUTHENTICATED BY jones IDENTIFIED BY lion USING 'sol1'; The AUTHENTICATED clause specifies the username and password (JONES/LION) on the target instance (SOL1). This clause authenticates the user to the remote server and is required for security. The specified username and password (JONES/LION) must be a valid username and password on the remote instance (SOL1). The username and password are used only for authentication. No other operations are performed on behalf of this user. 1. How many payment methods can be assigned to a customer? a. b. One Two

Page 25 of 259

c. d. 2. 3.

Eight Unlimited

What are the two types of commitments in Oracle Receivables? While entering Invoices manually, Ship to Address of the customer is mandatory. a. b. True False

4. 5.

Name the two Invoicing Rules in Oracle Receivables Assuming a payment term IMMEDIATE is attached to a Transaction Type, can we raise an Invoice with Payment term 30 Days for the transaction type? a. b. Yes No

6.

In which of the following field, Standard Memo Lines appear as List of values a. b. c. d. Invoice Lines Description Transaction Type Miscellaneous Receipt Description Invoice Item Code

7.

Auto Cash Rule Sets are defined to a. b. c. d. Automatically apply receipts to invoices Automatically apply commitments to invoices Automatically apply credit memos to invoices All of the above

8.

If a value in a Profile class is changed, the system will a. b. c. d. Automatically change the value for all existing customers with the profile class Assign the new value only to new customers Prompt the user whether to update for all customers or only for new customers. None of the above

9.

Which is of the following is a mandatory descriptive Flexfield to be defined before importing simple invoices through Auto Invoice? a. b. c. d. Line Transaction Flexfield Link-to Transaction Flexfield Reference Transaction Flexfield None of the above

10. Name the interface tables used for Auto Invoice Lines and Distributions 11. What are the valid values for the column LINE_TYPE in the interface table? 12. Can the user import invoices with user defined code combinations without using auto accounting? a. b. Yes No

13. Which of the following information is not required when the user is importing Credit memos? a. b. c. d. Transaction Type Customer Payment terms Amount

Page 26 of 259

14. Miscellaneous Receipts can be imported into Oracle Receivables using Auto Lockbox c. d. True False

15. Name the interface table used for Auto Lockbox. 16. The three steps in Auto Lockbox in sequence are a. b. c. d. Validation, Import, Post QuickCash Import, Validation, Post QuickCash Post QuickCash, Import, Validation Any of the above

17. Lockbox is defined for a a. b. c. d. Bank Bank Branch Bank Account None of the above

18. Lockbox transmission formats are normal copied into a. b. c. d. $AR_TOP/sql $AR_TOP/out $AR_TOP/reports $AR_TOP/bin

19. Assuming a transaction number is not assigned to a receipt in the transmission file and Auto Cash rules are not used, the system will a. b. c. d. Assign a status of Unidentified Assign a status of Unapplied Ignore the receipt Apply to the oldest invoice

20. Dunning Letters are a. b. c. d. Answers: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. D Deposits and Guarantees False Bill in Advance and Bill in Arrears Yes A A C A RA_INTERFACE_LINES_ALL and RA_INTERFACE_DISTRIBUTIONS_ALL A LINE,TAX,FREIGHT & CHARGES C B AR_PAYMENTS_INTERFACE_ALL Statement of Account Covering Letter Invoice Covering Letter Reminder Letters Receipt Covering Letters

Page 27 of 259

16. 17. 18. 19. 20.

B C D B C

Important Questions in Oracle, Developer /2000(Form 4.5 and Reports 2.5) Oracle 1) What are the Back ground processes in Oracle and what are they. 1) This is one of the most frequently asked question.There are basically 9 Processes but in a general system we need to mention the first five background processes.They do the house keeping activities for the Oracle and are common in any system. The various background processes in oracle are a) Data Base Writer(DBWR) :: Data Base Writer Writes Modified blocks from Database buffer cache to Data Files.This is required since the data is not written whenever a transaction is commited. b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transaction commits and log buffer fills, LGWR writes log entries into online redo log file. c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup.This is useful for recovery from system failure d)Process Monitor(PMON) :: The Process Monitor peforms process recovery when user Process fails. Pmon Clears and Frees resources that process was using. e) CheckPoint(CKPT) :: At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the most recent checkpoint f) Archives (ARCH) :: The Archiver copies online redo log files to archival storal when they are busy. g) Recoveror(RECO) :: The Recoveror is used to resolve the distributed transaction in network h) Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture i) Lckn :: We can have upto 10 lock processes for inter instance locking in parallel sql. 2) How many types of Sql Statements are there in Oracle 2) There are basically 6 types of sql statments. They are a) Data Defination Language(DDL) :: The DDL statments define and maintain objects and drop objects. b) Data Manipulation Language(DML) :: The DML statments manipulate database data. c) Transaction Control Statements :: Manage change by DML d) Session Control :: Used to control the properties of current session enabling and disabling roles and changing .e.g :: Alter Statements,Set Role e) System Control Statements :: Change Properties of Oracle Instance .e.g:: Alter System f) Embedded Sql :: Incorporate DDL,DML and T.C.L in Programming Language.e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close 3) What is a Transaction in Oracle 3) A transaction is a Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statment and ends when it is explicitly commited or rolled back. 4) Key Words Used in Oracle 4) The Key words that are used in Oracle are :: a) Committing:: A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements. b) Rollback :: A transaction that retracts any of the changes resulting from SQL statements in Transaction. c) SavePoint :: For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transaction into smaller points. d) Rolling Forward :: Process of applying redo log during recovery is called rolling forward. e) Cursor :: A cursor is a handle ( name or a pointer) for the memory associated with a specific statement. A cursor is basically an area allocated by Oracle for executing the Sql Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explicit cursor for a multi row query.

Page 28 of 259

f) System Global Area(SGA) :: The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance. It consists of Database Buffer Cache and Redo log Buffer. g) Program Global Area (PGA):: The PGA is a memory buffer that contains data and control information for server process. g) Database Buffer Cache :: Database Buffer of SGA stores the most recently used blocks of database data. The set of database buffers in an instance is called Database Buffer Cache. h) Redo log Buffer :: Redo log Buffer of SGA stores all the redo log entries. i) Redo Log Files :: Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes. j) Process :: A Process is a 'thread of control' or mechanism in Operating System that executes series of steps. 5) What are Procedure, functions and Packages 5) Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks. Procedures do not Return values while Functions return one One Value Packages :: Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents 6) What are Database Triggers and Stored Procedures 6) Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in, update to, or delete from table. Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. e.g:: operations insert,update ,delete 3 before ,after 3*2 A total of 6 combinatons At statment level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12. Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards. Stored Procedures :: Stored Procedures are Procedures that are stored in Compiled form in the database.The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format. 7) How many Integrity Rules are there and what are they 7) There are Three Integrity Rules. They are as follows :: a) Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced. When there is data in Child Tables the Master tables cannot be deleted. c) Business Integrity Rules :: The Third Integrity rule is about the complex business processes which cannot be implemented by the above 2 rules. 8) What are the Various Master and Detail Relation ships. 8) The various Master and Detail Relationship are a) Non Isolated :: The Master cannot be deleted when a child is exisiting b) Isolated :: The Master can be deleted when the child is exisiting c) Cascading :: The child gets deleted when the Master is deleted. 9) What are the Various Block Coordination Properties 9) The various Block Coordination Properties are a) Immediate Default Setting. The Detail records are shown when the Master Record are shown. b) Deffered with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the detail block. c) Deffered with No Auto Query The operator must navigate to the detail block and explicitly execute a query 10) What are the Different Optimisation Techniques 10) The Various Optimisation techniques are a) Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes

Page 29 of 259

b) Optimizer_hint :: set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS'); Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept where (Deptno > 25) c) Optimize_Sql :: By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT statement. All other SQL statements reuse the cursor. f45run module = my_firstform userid = scott/tiger optimize_Tp = No 11) How do u implement the If statement in the Select Statement 11) We can implement the if statement in the select statement by using the Decode statement. e.g select DECODE (EMP_CAT,'1','First','2','Second'Null); Here the Null is the else statement where null is done . 12)How many types of Exceptions are there 12) There are 2 types of exceptions. They are a) System Exceptions e.g. When no_data_found, When too_many_rows b) User Defined Exceptions e.g. My_exception exception When My_exception then 13) What are the inline and the precompiler directives 13) The inline and precompiler directives detect the values directly 14) How do you use the same lov for 2 columns 14) We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code 15) How many minimum groups are required for a matrix report 15) The minimum number of groups in matrix report are 4 16) What is the difference between static and dynamic lov 16) The static lov contains the predetermined values while the dynamic lov contains values that come at run time 17) What are snap shots and views 17) Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated 18) What are the OOPS concepts in Oracle. 18) Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects 19) What is the difference between candidate key, unique key and primary key 19) Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table. 20)What is concurrency 20) Cuncurrency is allowing simultaneous access of same data by different users. Locks useful for accesing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert,update or delete is being done.This lock should not be applied when we do only select from the row. b) Share lock

Page 30 of 259

We can do the table as Share_Lock as many share_locks can be put on the same resource. 21) Previleges and Grants 21) Previleges are the right to execute a particulare type of SQL statements. e.g :: Right to Connect, Right to create, Right to resource Grants are given to the objects so that the object might be accessed accordingly.The grant has to be given by the owner of the object. 22)Table Space,Data Files,Parameter File, Control Files 22)Table Space :: The table space is useful for storing the data in the database.When a database is created two table spaces are created. a) System Table space :: This data file stores all the tables related to the system and dba tables b) User Table space :: This data file stores all the user related tables We should have seperate table spaces for storing the tables and indexes so that the access is fast. Data Files :: Every Oracle Data Base has one or more physical data files.They store the data for the database.Every datafile is associated with only one database.Once the Data file is created the size cannot change.To increase the size of the database to store more data we have to add data file. Parameter Files :: Parameter file is needed to start an instance.A parameter file contains the list of instance configuration parameters e.g.:: db_block_buffers = 500 db_name = ORA7 db_domain = u.s.acme lang Control Files :: Control files record the physical structure of the data files and redo log files They contain the Db name, name and location of dbs, data files ,redo log files and time stamp. 23) Physical Storage of the Data 23) The finest level of granularity of the data base are the data blocks. Data Block :: One Data Block correspond to specific number of physical database space Extent :: Extent is the number of specific number of contigious data blocks. Segments :: Set of Extents allocated for Extents. There are three types of Segments a) Data Segment :: Non Clustered Table has data segment data of every table is stored in cluster data segment b) Index Segment :: Each Index has index segment that stores data c) Roll Back Segment :: Temporarily store 'undo' information 24) What are the Pct Free and Pct Used 24) Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg.:: Pctfree 20, Pctused 40 25) What is Row Chaining 25) The data of a row in a table may not be able to fit the same data block.Data for row is stored in a chain of data blocks . 26) What is a 2 Phase Commit 26) Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply 27) What is the difference between deleting and truncating of tables 27) Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved. 28) What are mutating tables 28) When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select. 29) What are Codd Rules

Page 31 of 259

29) Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules. 30) What is Normalisation 30) Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normalisation rules. a) 1 Normal Form :: A table is said to be in 1st Normal Form when the attributes are atomic b) 2 Normal Form :: A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key c) 3rd Normal Form :: A table is said to be third Normal form when it is not dependant transitively 31) What is the Difference between a post query and a pre query 31) A post query will fire for every row that is fetched but the pre query will fire only once. 32) Deleting the Duplicate rows in the table 32) We can delete the duplicate rows in the table by using the Rowid 33) Can U disable database trigger? How? 33) Yes. With respect to table ALTER TABLE TABLE [ DISABLE all_trigger ] 34) What is pseudo columns ? Name them? 34) A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns: * CURRVAL * NEXTVAL * LEVEL * ROWID * ROWNUM 35) How many columns can table have? The number of columns in a table can range from 1 to 254. 36) Is space acquired in blocks or extents ? In extents . 37) what is clustered index? In an indexed cluster, rows are stored together based on their cluster key values . Can not applied for HASH. 38) what are the datatypes supported By oracle (INTERNAL)? Varchar2, Number,Char , MLSLABEL. 39 ) What are attributes of cursor? %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT 40) Can you use select in FROM clause of SQL select ? Yes.

Page 32 of 259

Forms 4.5 Questions 1) Which trigger are created when master -detail rela? 1) master delete property * NON-ISOLATED (default) a) on check delete master b) on clear details c) on populate details * ISOLATED a) on clear details b) on populate details * CASCADE a) per-delete b) on clear details c) on populate details 2) which system variables can be set by users? 2) SYSTEM.MESSAGE_LEVEL SYSTEM.DATE_THRESHOLD SYSTEM.EFFECTIVE_DATE SYSTEM.SUPPRESS_WORKING 3) What are object group? 3) An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module. 4) What are referenced objects? 4) Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. 5) Can you store objects in library? 5) Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.

Page 33 of 259

6) Is forms 4.5 object oriented tool ? why? 6) yes , partially. 1) PROPERTY CLASS - inheritance property 2) OVERLOADING : procedures and functions. 7) Can you issue DDL in forms? 7) yes, but you have to use FORMS_DDL. Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. Any string expression up to 32K: a literal an expression or a variable representing the text of a block of dynamically created PL/SQL code a DML statement or a DDL statement Restrictions: The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. 8) What is SECURE property? 8)- Hides characters that the operator types into the text item. This setting is typically used for password protection. 9 ) What are the types of triggers and how the sequence of firing in text item 9) Triggers can be classified as Key Triggers, Mouse Triggers ,Navigational Triggers. Key Triggers :: Key Triggers are fired as a result of Key action.e.g :: Key-next-field, Key-up,Key-Down Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-buttonpresed,when-mouse-doubleclicked,etc Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g : Post-Text-item,Pre-text-item. We also have event triggers like when new-form-instance and when-new-block-instance. We cannot call restricted procedures like go_to(my_block.first_item) in the Navigational triggers But can use them in the Key-next-item. The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event. The sequence of firing in a text item are as follows :: a) pre - text b) when new item c) key-next d) when validate e) post text 10 ) Can you store pictures in database? How? 10)Yes , in long Raw datatype. 11) What are property classes ? Can property classes have trigger? 11) Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly. By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class. Yes . All type of triggers . * 12 a) If you have property class attached to an item and you have same trigger written for the item .

Page 34 of 259

Which will fire first? 12)Item level trigger fires , If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger. 13) What are record groups ? * Can record groups created at run-time? 13)A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined. A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. Record group column names cannot exceed 30 characters. Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable. TYPES OF RECORD GROUP: Query Record Group A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group. Non-query Record Group A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime. Static Record Group A static record group is not associated with a query; rather, you define its structure and row values at design time, and they remain fixed at runtime. 14) What are ALERT? 14)An ALERT is a modal window that displays a message notifiying operator of some application condition. 15) Can a button have icon and lable at the same time ? 15) -NO 16) What is mouse navigate property of button? 16) When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse. 17) What is FORMS_MDI_WINDOW? 17) forms run inside the MDI application window. This property is useful for calling a form from another one. 18) What are timers ? when when-timer-expired does not fire? 18) The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing. 19 ) Can object group have a block? 19)Yes , object group can have block as well as program units. 20) How many types of canvases are there. 20)There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect. The following questions might not be asked in an Average Interview and could be asked when the Interviewer wants to trouble u and go deepppppppppppppHe cannot go further.. 1) What are user-exits? 1) It invokes 3GL programs. 2) Can you pass values to-and-fro from foreign function ? how ? 2) Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms

Page 35 of 259

variable or item. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function. After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface. 3) What is IAPXTB structure ? 3) The entries of Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB table in d/b. 4) Can you call WIN-SDK thruo' user exits? 4) YES. 5) Does user exits supports DLL on MSWINDOWS ? 5) YES . 6) What is path setting for DLL? 6) Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL. If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL. 7) How is mapping of name of DLL and function done? 7) The dll can be created using the Visual C++ / Visual Basic Tools and then the dll is put in the path that is defined the registery. 8) what is precompiler? 8) It is similar to C precompiler directives. 9) Can you connect to non - oracle datasource ? How? 9) Yes . 10 ) what are key-mode and locking mode properties? level ? 10) Key Mode : Specifies how oracle forms uniquely identifies rows in the database.This is property includes for application that will run against NON-ORACLE datasources . Key setting unique (default.) dateable n-updateable. Locking mode : Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form. a) immediate b) delayed 11) What are savepoint mode and cursor mode properties ? level? 11) Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily for applications that will run against non-ORACLE data sources. For applications that will run against ORACLE, use the default setting. Cursor mode - define cursur state across transaction Open/close. 12) Can you replace default form processing ? How ? 13) What is transactional trigger property? 13) Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage as transactional block.(NON-ORACLE datasource) default - FALSE. 14) What is OLE automation ? 14) OLE automation allows an OLE server application to expose a set of commands and functions that can be invoked from an OLE container application. OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE)

Page 36 of 259

15) What does invoke built-in do? 15) This procedure invokes a method. Syntax: PROCEDURE OLE2.INVOKE (object obj_type, method VARCHAR2, list list_type := 0); Parameters: object Is an OLE2 Automation Object. method Is a method (procedure) of the OLE2 object. list Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function. 16) What are OPEN_FORM,CALL_FORM,NEW_FORM? diff? 16) CALL_FORM : It calls the other form. but parent remains active, when called form completes the operation , it releases lock and control goes back to the calling form. When you call a form, Oracle Forms issues a savepoint for the called form. If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint. OPEN_FORM : When you call a form, Oracle Forms issues a savepoint for the called form. If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint. NEW_FORM : Exits the current form and enters the indicated form. The calling form is terminated as the parent form. If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form. Oracle Forms releases memory (such as database cursors) that the terminated form was using. Oracle Forms runs the new form with the same Runform options as the parent form. If the parent form was a called form, Oracle Forms runs the new form with the same options as the parent form.

17 ) What is call form stack? 17) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack. 18) Can u port applictions across the platforms? how? 18) Yes we can port applications across platforms.Consider the form developed in a windows system.The form would be generated in unix system by using f45gen my_form.fmb scott/tiger GUI 1) What is a visual attribute? 1) Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface. 2) Diff. between VAT and Property Class? imp 2)Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties. You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically. When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored. 3 ) Which trigger related to mouse? 3) When-Mouse-Click When-Mouse-DoubleClick When-Mouse-Down When-Mouse-Enter When-Mouse-Leave When-Mouse-Move When-Mouse-Up

Page 37 of 259

4) What is Current record attribute property? 4) Specifies the named visual attribute used when an item is part of the current record. Current Record Attribute is frequently used at the block level to display the current row in a multi-record If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus changes. 5) Can u change VAT at run time? 5) Yes. You can programmatically change an object's named visual attribute setting to change the font, color, and pattern of the object at runtime. 6) Can u set default font in forms? 6) Yes. Change windows registry(regedit). Set form45_font to the desired font. 7) Can u have OLE objects in forms? 7) Yes. 8) Can u have VBX and OCX controls in forms ? 8) Yes. 9) What r the types of windows (Window style)? 9) Specifies whether the window is a Document window or a Dialog window. 10) What is OLE Activation style property? 10) Specifies the event that will activate the OLE containing item. 11) Can u change the mouse pointer ? How? 11) Yes. Specifies the mouse cursor style. Use this property to dynamically change the shape of the cursor. Reports 2.5 1) 1) How many types of columns are there and what are they Formula columns :: For doing mathematical calculations and returning one value Summary Columns :: For doing summary calculations such as summations etc. Place holder Columns :: These columns are useful for storing the value in a variable Can u have more than one layout in report It is possible to have more than one layout in a report by using the additional layout option in the layout editor. Can u run the report with out a parameter form Yes it is possible to run the report without parameter form by setting the PARAM value to Null

2) 2) 3) 3)

4) What is the lock option in reports layout 4) By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields . 5) What is Flex 5) Flex is the property of moving the related fields together by setting the flex property on 6) 6) What are the minimum number of groups required for a matrix report The minimum of groups required for a matrix report are 4

1. What is database? A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

Page 38 of 259

2. What is DBMS? It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications. 3. What is a Database system? The database and DBMS software together is called as Database system. 4. Advantages of DBMS? Redundancy is controlled. Unauthorised access is restricted. Providing multiple user interfaces. Enforcing integrity constraints. Providing backup and recovery. 5. Disadvantage in File Processing System? Data redundancy & inconsistency. Difficult in accessing data. Data isolation. Data integrity. Concurrent access is not possible. Security Problems. 6. Describe the three levels of data abstraction? The are three levels of abstraction: Physical level: The lowest level of abstraction describes how data are stored. Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. View level: The highest level of abstraction describes only part of entire database. 7. Define the "integrity rules" There are two Integrity rules. Entity Integrity: States that Primary key cannot have NULL value Referential Integrity: States that Foreign Key can be either a NULL value or should be Primary Key value of other relation. 8. What is extension and intension? Extension It is the number of tuples present in a table at any instance. This is time dependent. Intension It is a constant value that gives the name, structure of table and the constraints laid on it. 9. What is System R? What are its two major subsystems? System R was designed and developed over a period of 1974-79 at IBM San Jose Research Center. It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system. Its two subsystems are Research Storage System Relational Data System. 10. How is the data structure of System R different from the relational structure? Unlike Relational systems in System R Domains are not supported Enforcement of candidate key uniqueness is optional Enforcement of entity integrity is optional Referential integrity is not enforced 11. What is Data Independence? Data independence means that the application is independent of the storage structure and access strategy of data. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.

Page 39 of 259

Two types of Data Independence: Physical Data Independence: Modification in physical level should not affect the logical level. Logical Data Independence: Modification in logical level should affect the view level. NOTE: Logical Data Independence is more difficult to achieve 12. What is a view? How it is related to data independence? A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary. Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence. 13. What is Data Model? A collection of conceptual tools for describing data, data relationships data semantics and constraints. 14. What is E-R model? This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes. 15. What is Object Oriented model? This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes. 16. What is an Entity? It is a 'thing' in the real world with an independent existence. 17. What is an Entity type? It is a collection (set) of entities that have same attributes. 18. What is an Entity set? It is a collection of all entities of particular entity type in the database. 19. What is an Extension of entity type? The collections of entities of a particular entity type are grouped together into an entity set. 20. What is Weak Entity set? An entity set may not have sufficient attributes to form a primary key, and its primary key compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set. 21. What is an attribute? It is a particular property, which describes the entity. 22. What is a Relation Schema and a Relation? A relation Schema denoted by R(A1, A2, , An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn). 23. What is degree of a Relation? It is the number of attribute of its relation schema. 24. What is Relationship? It is an association among two or more entities. 25. What is Relationship set? The collection (or set) of similar relationships. 26. What is Relationship type? Relationship type defines a set of associations or a relationship set among a given set of entity types. 27. What is degree of Relationship type?

Page 40 of 259

It is the number of entity type participating. 25. What is DDL (Data Definition Language)? A data base schema is specifies by a set of definitions expressed by a special language called DDL. 26. What is VDL (View Definition Language)? It specifies user views and their mappings to the conceptual schema. 27. What is SDL (Storage Definition Language)? This language is to specify the internal schema. This language may specify the mapping between two schemas. 28. What is Data Storage - Definition Language? The storage structures and access methods used by database system are specified by a set of definition in a special type of DDL called data storage-definition language. 29. What is DML (Data Manipulation Language)? This language that enable user to access or manipulate data as organised by appropriate data model. Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data. Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data. 31. What is DML Compiler? It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand. 32. What is Query evaluation engine? It executes low-level instruction generated by compiler. 33. What is DDL Interpreter? It interprets DDL statements and record them in tables containing metadata. 34. What is Record-at-a-time? The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time. 35. What is Set-at-a-time or Set-oriented? The High level or Non-procedural DML can specify and retrieve many records in a single DML statement. This retrieve of a record is said to be Set-at-a-time or Set-oriented. 36. What is Relational Algebra? It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation. 37. What is Relational Calculus? It is an applied predicate calculus specifically tailored for relational databases proposed by E.F. Codd. E.g. of languages based on it are DSL ALPHA, QUEL. 38. How does Tuple-oriented relational calculus differ from domain-oriented relational calculus The tuple-oriented calculus uses a tuple variables i.e., variable whose only permitted values are tuples of that relation. E.g. QUEL The domain-oriented calculus has domain variables i.e., variables that range over the underlying domains instead of over relation. E.g. ILL, DEDUCE. 39. What is normalization? It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties Minimizing redundancy Minimizing insertion, deletion and update anomalies. 40. What is Functional Dependency? A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two

Page 41 of 259

tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y. 41. When is a functional dependency F said to be minimal? Every dependency in F has a single attribute for its right hand side. We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F. We cannot remove any dependency from F and still have set of dependency that is equivalent to F. 42. What is Multivalued dependency? Multivalued dependency denoted by X Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties t3[x] = t4[X] = t1[X] = t2[X] t3[Y] = t1[Y] and t4[Y] = t2[Y] t3[Z] = t2[Z] and t4[Z] = t1[Z] where [Z = (R-(X U Y)) ] 43. What is Lossless join property? It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition. 44. What is 1 NF (Normal Form)? The domain of attribute must include only atomic (simple, indivisible) values. 45. What is Fully Functional dependency? It is based on concept of full functional dependency. A functional dependency X Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more. 46. What is 2NF? A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key. 47. What is 3NF? A relation schema R is in 3NF if it is in 2NF and for every FD X A either of the following is true X is a Super-key of R. A is a prime attribute of R. In other words, if every non prime attribute is non-transitively dependent on primary key. 48. What is BCNF (Boyce-Codd Normal Form)? A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X A, X must be a candidate key. 49. What is 4NF? A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true X is subset or equal to (or) XY = R. X is a super key. 50. What is 5NF? A Relation schema R is said to be 5NF if for every join dependency {R1, R2, ..., Rn} that holds R, one the following is true Ri = R for some i. The join dependency is implied by the set of FD, over R in which the left side is key of R. 51. What is Domain-Key Normal Form? A relation is said to be in DKNF if all constraints and dependencies that should hold on the the constraint can be enforced by simply enforcing the domain constraint and key constraint on the relation. 52. What are partial, alternate,, artificial, compound and natural key? Partial Key: It is a set of attributes that can uniquely identify weak entities and that are related to same owner entity. It is sometime called as Discriminator. Alternate Key:

Page 42 of 259

All Candidate Keys excluding the Primary Key are known as Alternate Keys. Artificial Key: If no obvious key, either stand alone or compound is available, then the last resort is to simply create a key, by assigning a unique number to each record or occurrence. Then this is known as developing an artificial key. Compound Key: If no single data element uniquely identifies occurrences within a construct, then combining multiple elements to create a unique identifier for the construct is known as creating a compound key. Natural Key: When one of the data elements stored within a construct is utilized as the primary key, then it is called the natural key. 53. What is indexing and what are the different kinds of indexing? Indexing is a technique for determining how quickly specific data can be found. Types: Binary search style indexing B-Tree indexing Inverted list indexing Memory resident table Table indexing 54. What is system catalog or catalog relation? How is better known as? A RDBMS maintains a description of all the data that it contains, information about every relation and index that it contains. This information is stored in a collection of relations maintained by the system called metadata. It is also called data dictionary. 55. What is meant by query optimization? The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is referred to as query optimization. 56. What is join dependency and inclusion dependency? Join Dependency: A Join dependency is generalization of Multivalued dependency.A JD {R1, R2, ..., Rn} is said to hold over a relation R if R1, R2, R3, ..., Rn is a lossless-join decomposition of R . There is no set of sound and complete inference rules for JD. Inclusion Dependency: An Inclusion Dependency is a statement of the form that some columns of a relation are contained in other columns. A foreign key constraint is an example of inclusion dependency. 57. What is durability in DBMS? Once the DBMS informs the user that a transaction has successfully completed, its effects should persist even if the system crashes before all its changes are reflected on disk. This property is called durability. 58. What do you mean by atomicity and aggregation? Atomicity: Either all actions are carried out or none are. Users should not have to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions. Aggregation: A concept which is used to model a relationship between a collection of entities and relationships. It is used when we need to express a relationship among relationships. 59. What is a Phantom Deadlock? In distributed deadlock detection, the delay in propagating local information might cause the deadlock detection algorithms to identify deadlocks that do not really exist. Such situations are called phantom deadlocks and they lead to unnecessary aborts. 60. What is a checkpoint and When does it occur? A Checkpoint is like a snapshot of the DBMS state. By taking checkpoints, the DBMS can reduce the amount of work to be done during restart in the event of subsequent crashes. 61. What are the different phases of transaction? Different phases are

Page 43 of 259

Analysis phase Redo Phase Undo phase 62. What do you mean by flat file database? It is a database in which there are no programs or user access languages. It has no cross-file capabilities but is user-friendly and provides user-interface management. 63. What is "transparent DBMS"? It is one, which keeps its Physical Structure hidden from user. 64. Brief theory of Network, Hierarchical schemas and their properties Network schema uses a graph data structure to organize records example for such a database management system is CTCG while a hierarchical schema uses a tree data structure example for such a system is IMS. 65. What is a query? A query with respect to DBMS relates to user commands that are used to interact with a data base. The query language can be classified into data definition language and data manipulation language. 66. What do you mean by Correlated subquery? Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query or it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called a correlated subquery. A correlated subquery can be easily identified if it contains any references to the parent subquery columns in its WHERE clause. Columns from the subquery cannot be referenced anywhere else in the parent query. The following example demonstrates a non-correlated subquery. E.g. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where CUST.CNUM = ORDER.CNUM) 67. What are the primitive operations common to all record management systems? Addition, deletion and modification. 68. Name the buffer in which all the commands that are typed in are stored Edit Buffer 69. What are the unary operations in Relational Algebra? PROJECTION and SELECTION. 70. Are the resulting relations of PRODUCT and JOIN operation the same? No. PRODUCT: Concatenation of every row in one relation with every row in another. JOIN: Concatenation of rows from one relation and related rows from another. 71. What is RDBMS KERNEL? Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the kernel to manage the database You might think of an RDBMS as an operating system (or set of subsystems), designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatches and schedules user requests; and manages space usage within its table-space structures . 72. Name the sub-systems of a RDBMS I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management 73. Which part of the RDBMS takes care of the data dictionary? How Data dictionary is a set of tables and database objects that is stored in a special area of the database and maintained exclusively by the kernel. 74. What is the job of the information stored in data-dictionary? The information in the data dictionary validates the existence of the objects, provides access to them, and

Page 44 of 259

maps the actual physical storage location. 75. Not only RDBMS takes care of locating data it also determines an optimal access path to store or retrieve the data 76. How do you communicate with an RDBMS? You communicate with an RDBMS using Structured Query Language (SQL) 77. Define SQL and state the differences between SQL and other conventional programming Languages SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them. 78. Name the three major set of files on disk that compose a database in Oracle There are three major sets of files on disk that compose a database. All the files are binary. These are Database files Control files Redo logs The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. All three sets of files must be present, open, and available to Oracle for any data on the database to be useable. Without these files, you cannot access the database, and the database administrator might have to recover some or all of the database using a backup, if there is one. 79. What is an Oracle Instance? The Oracle system processes, also known as Oracle background processes, provide functions for the user processesfunctions that would otherwise be done by the user processes themselves Oracle database-wide system memory is known as the SGA, the system global area or shared global area. The data and control structures in the SGA are shareable, and all the Oracle background processes and user processes can use them. The combination of the SGA and the Oracle background processes is known as an Oracle instance 80. What are the four Oracle system processes that must always be up and running for the database to be useable The four Oracle system processes that must always be up and running for the database to be useable include DBWR (Database Writer), LGWR (Log Writer), SMON (System Monitor), and PMON (Process Monitor). 81. What are database files, control files and log files. How many of these files should a database have at least? Why? Database Files The database files hold the actual data and are typically the largest in size. Depending on their sizes, the tables (and other objects) for all the user accounts can go in one database filebut that's not an ideal situation because it does not make the database structure very flexible for controlling access to storage for different users, putting the database on different disk drives, or backing up and restoring just part of the database. You must have at least one database file but usually, more than one files are used. In terms of accessing and using the data in the tables and other objects, the number (or location) of the files is immaterial. The database files are fixed in size and never grow bigger than the size at which they were created Control Files The control files and redo logs support the rest of the architecture. Any database must have at least one control file, although you typically have more than one to guard against loss. The control file records the name of the database, the date and time it was created, the location of the database and redo logs, and the synchronization information to ensure that all three sets of files are always in step. Every time you add a new database or redo log file to the database, the information is recorded in the control files. Redo Logs Any database must have at least two redo logs. These are the journals for the database; the redo logs record all changes to the user objects or system objects. If any type of failure occurs, the changes recorded in the redo logs can be used to bring the database to a consistent state without losing any committed transactions. In the case of non-data loss failure, Oracle can apply the information in the redo logs automatically without intervention from the DBA. The redo log files are fixed in size and never grow dynamically from the size at which they were created.

Page 45 of 259

82. What is ROWID? The ROWID is a unique database-wide physical address for every row on every table. Once assigned (when the row is first inserted into the database), it never changes until the row is deleted or the table is dropped. The ROWID consists of the following three components, the combination of which uniquely identifies the physical storage location of the row. Oracle database file number, which contains the block with the rows Oracle block address, which contains the row The row within the block (because each block can hold many rows) The ROWID is used internally in indexes as a quick means of retrieving rows with a particular key value. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID 83. What is Oracle Block? Can two Oracle Blocks have the same address? Oracle "formats" the database files into a number of Oracle blocks when they are first createdmaking it easier for the RDBMS software to manage the files and easier to read data into the memory areas. The block size should be a multiple of the operating system block size. Regardless of the block size, the entire block is not available for holding data; Oracle takes up some space to manage the contents of the block. This block header has a minimum size, but it can grow. These Oracle blocks are the smallest unit of storage. Increasing the Oracle block size can improve performance, but it should be done only when the database is first created. Each Oracle block is numbered sequentially for each database file starting at 1. Two blocks can have the same block address if they are in different database files. 84. What is database Trigger? A database trigger is a PL/SQL block that can defined to automatically execute for insert, update, and delete statements against a table. The trigger can e defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call database procedures that are also written in PL/SQL. 85. Name two utilities that Oracle provides, which are use for backup and recovery. Along with the RDBMS software, Oracle provides two utilities that you can use to back up and restore the database. These utilities are Export and Import. The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file. The Import utility reads the file produced by an export, recreates the definitions of objects, and inserts the data If Export and Import are used as a means of backing up and recovering the database, all the changes made to the database cannot be recovered since the export was performed. The best you can do is recover the database to the time when the export was last performed. 86. What are stored-procedures? And what are the advantages of using them. Stored procedures are database objects that perform a user defined operation. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic. 87. How are exceptions handled in PL/SQL? Give some of the internal exceptions' name PL/SQL exception handling is a mechanism for dealing with run-time errors encountered during procedure execution. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination. The exception handler must be defined within a subprogram specification. Errors cause the program to raise an exception with a transfer of control to the exception-handler block. After the exception handler executes, control returns to the block in which the handler was defined. If there are no more executable statements in the block, control returns to the caller. User-Defined Exceptions PL/SQL enables the user to define exception handlers in the declarations area of subprogram specifications. User accomplishes this by naming an exception as in the following example: ot_failure EXCEPTION; In this case, the exception name is ot_failure. Code associated with this handler is written in the EXCEPTION specification area as follows: EXCEPTION when OT_FAILURE then out_status_code := g_out_status_code; out_msg := g_out_msg; The following is an example of a subprogram exception:

Page 46 of 259

EXCEPTION when NO_DATA_FOUND then g_out_status_code := 'FAIL'; RAISE ot_failure; Within this exception is the RAISE statement that transfers control back to the ot_failure exception handler. This technique of raising the exception is used to invoke all user-defined exceptions. System-Defined Exceptions Exceptions internal to PL/SQL are raised automatically upon error. NO_DATA_FOUND is a system-defined exception. Table below gives a complete list of internal exceptions. PL/SQL internal exceptions. PL/SQL internal exceptions. Exception Name Oracle Error CURSOR_ALREADY_OPEN ORA-06511 DUP_VAL_ON_INDEX ORA-00001 INVALID_CURSOR ORA-01001 INVALID_NUMBER ORA-01722 LOGIN_DENIED ORA-01017 NO_DATA_FOUND ORA-01403 NOT_LOGGED_ON ORA-01012 PROGRAM_ERROR ORA-06501 STORAGE_ERROR ORA-06500 TIMEOUT_ON_RESOURCE ORA-00051 TOO_MANY_ROWS ORA-01422 TRANSACTION_BACKED_OUT ORA-00061 VALUE_ERROR ORA-06502 ZERO_DIVIDE ORA-01476 In addition to this list of exceptions, there is a catch-all exception named OTHERS that traps all errors for which specific error handling has not been established. 88. Does PL/SQL support "overloading"? Explain The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered. PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or internal functions. To further ensure calling the proper procedure, you can use the dot notation. Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference. 89. Tables derived from the ERD a) Are totally unnormalised b) Are always in 1NF c) Can be further denormalised d) May have multi-valued attributes (b) Are always in 1NF 90. Spurious tuples may occur due to i. Bad normalization ii. Theta joins iii. Updating tables from join a) i & ii b) ii & iii c) i & iii d) ii & iii (a) i & iii because theta joins are joins made on keys that are not primary keys. 91. A B C is a set of attributes. The functional dependency is as follows AB -> B AC -> C C -> B a) is in 1NF

Page 47 of 259

b) is in 2NF c) is in 3NF d) is in BCNF (a) is in 1NF since (AC)+ = { A, B, C} hence AC is the primary key. Since C B is a FD given, where neither C is a Key nor B is a prime attribute, this it is not in 3NF. Further B is not functionally dependent on key AC thus it is not in 2NF. Thus the given FDs is in 1NF. 92. In mapping of ERD to DFD a) entities in ERD should correspond to an existing entity/store in DFD b) entity in DFD is converted to attributes of an entity in ERD c) relations in ERD has 1 to 1 correspondence to processes in DFD d) relationships in ERD has 1 to 1 correspondence to flows in DFD (a) entities in ERD should correspond to an existing entity/store in DFD 93. A dominant entity is the entity a) on the N side in a 1 : N relationship b) on the 1 side in a 1 : N relationship c) on either side in a 1 : 1 relationship d) nothing to do with 1 : 1 or 1 : N relationship (b) on the 1 side in a 1 : N relationship 94. Select 'NORTH', CUSTOMER From CUST_DTLS Where REGION = 'N' Order By CUSTOMER Union Select 'EAST', CUSTOMER From CUST_DTLS Where REGION = 'E' Order By CUSTOMER The above is a) Not an error b) Error - the string in single quotes 'NORTH' and 'SOUTH' c) Error - the string should be in double quotes d) Error - ORDER BY clause (d) Error - the ORDER BY clause. Since ORDER BY clause cannot be used in UNIONS 95. What is Storage Manager? It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system. 96. What is Buffer Manager? It is a program module, which is responsible for fetching data from disk storage into main memory and deciding what data to be cache in memory. 97. What is Transaction Manager? It is a program module, which ensures that database, remains in a consistent state despite system failures and concurrent transaction execution proceeds without conflicting. 98. What is File Manager? It is a program module, which manages the allocation of space on disk storage and data structure used to represent information stored on a disk. 99. What is Authorization and Integrity manager? It is the program module, which tests for the satisfaction of integrity constraint and checks the authority of user to access data. 100. What are stand-alone procedures? Procedures that are not part of a package are known as stand-alone because they independently defined. A good example of a stand-alone procedure is one written in a SQL*Forms application. These types of procedures are not available for reference from other Oracle tools. Another limitation of stand-alone procedures is that they are compiled at run time, which slows execution. 101. What are cursors give different types of cursors. PL/SQL uses cursors for all database information accesses statements. The language supports the use two

Page 48 of 259

types of cursors Implicit Explicit 102. What is cold backup and hot backup (in case of Oracle)? Cold Backup: It is copying the three sets of files (database files, redo logs, and control file) when the instance is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the instance to guarantee a consistent copy. If a cold backup is performed, the only option available in the event of data file loss is restoring all the files from the latest backup. All work performed on the database since the last backup is lost. Hot Backup: Some sites (such as worldwide airline reservations systems) cannot shut down the database while making a backup copy of the files. The cold backup is not an available option. So different means of backing up database must be used the hot backup. Issue a SQL command to indicate to Oracle, on a tablespace-by-tablespace basis, that the files of the tablespace are to backed up. The users can continue to make full use of the files, including making changes to the data. Once the user has indicated that he/she wants to back up the tablespace files, he/she can use the operating system to copy those files to the desired backup destination. The database must be running in ARCHIVELOG mode for the hot backup option. If a data loss failure does occur, the lost database files can be restored using the hot backup and the online and offline redo logs created since the backup was done. The database is restored to the most consistent state without any loss of committed transactions. 103. What are Armstrong rules? How do we say that they are complete and/or sound The well-known inference rules for FDs Reflexive rule : If Y is subset or equal to X then X Y. Augmentation rule: If X Y then XZ YZ. Transitive rule: If {X Y, Y Z} then X Z. Decomposition rule : If X YZ then X Y. Union or Additive rule: If {X Y, X Z} then X YZ. Pseudo Transitive rule : If {X Y, WY Z} then WX Z. Of these the first three are known as Amstrong Rules. They are sound because it is enough if a set of FDs satisfy these three. They are called complete because using these three rules we can generate the rest all inference rules. 104. How can you find the minimal key of relational schema? Minimal key is one which can identify each tuple of the given relation schema uniquely. For finding the minimal key it is required to find the closure that is the set of all attributes that are dependent on any given set of attributes under the given set of functional dependency. Algo. I Determining X+, closure for X, given set of FDs F 1. Set X+ = X 2. Set Old X+ = X+ 3. For each FD Y Z in F and if Y belongs to X+ then add Z to X+ 4. Repeat steps 2 and 3 until Old X+ = X+ Algo.II Determining minimal K for relation schema R, given set of FDs F 1. Set K to R that is make K a set of all attributes in R 2. For each attribute A in K a. Compute (K A)+ with respect to F b. If (K A)+ = R then set K = (K A)+ 105. What do you understand by dependency preservation? Given a relation R and a set of FDs F, dependency preservation states that the closure of the union of the projection of F on each decomposed relation Ri is equal to the closure of F. i.e.,

Page 49 of 259

((PR1(F)) U U (PRn(F)))+ = F+ if decomposition is not dependency preserving, then some dependency is lost in the decomposition. 106. What is meant by Proactive, Retroactive and Simultaneous Update. Proactive Update: The updates that are applied to database before it becomes effective in real world . Retroactive Update: The updates that are applied to database after it becomes effective in real world . Simulatneous Update: The updates that are applied to database at the same time when it becomes effective in real world . 107. What are the different types of JOIN operations? Equi Join: This is the most common type of join which involves only equality comparisions. The disadvantage in this type of join is that there FAQ In SQL 1. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables? Data Definition Language (DDL) 2. What operator performs pattern matching? LIKE operator 3. What operator tests column for the absence of data? IS NULL operator 4. Which command executes the contents of a specified file? START <filename> or @<filename> 5. What is the parameter substitution symbol used with INSERT INTO command? & 6. Which command displays the SQL command in the SQL buffer, and then executes it? RUN 7. What are the wildcards used for pattern matching? _ for single character substitution and % for multi-character substitution 8. State true or false. EXISTS, SOME, ANY are operators in SQL. True 9. State true or false. !=, <>, ^= all denote the same operation. True 10. What are the privileges that can be granted on a table by a user to others? Insert, update, delete, select, references, index, execute, alter, all 11. What command is used to get back the privileges offered by the GRANT command? REVOKE 12. Which system tables contain information on privileges granted and privileges obtained? USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD 13. Which system table contains information on constraints on all the tables created? USER_CONSTRAINTS 14. TRUNCATE TABLE EMP; DELETE FROM EMP; Will the outputs of the above two commands differ? Both will result in deleting all the rows in the table EMP. 15. What is the difference between TRUNCATE and DELETE commands? TRUNCATE is a DDL command whereas DELETE is a DML command. Hence DELETE operation can be

Page 50 of 259

rolled back, but TRUNCATE operation cannot be rolled back. WHERE clause can be used with DELETE and not with TRUNCATE. 16. What command is used to create a table by copying the structure of another table? Answer : CREATE TABLE .. AS SELECT command Explanation : To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following. CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2; If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table. 17. What will be the output of the following query? SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '**'),'*','TROUBLE') FROM DUAL; TROUBLETHETROUBLE 18. What will be the output of the following query? SELECT DECODE(TRANSLATE('A','1234567890','1111111111'), '1','YES', 'NO' ); Answer : NO Explanation : The query checks whether a given string is a numerical digit. 19. What does the following query do? SELECT SAL + NVL(COMM,0) FROM EMP; This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary. 20. Which date function is used to find the difference between two dates? MONTHS_BETWEEN 21. Why does the following command give a compilation error? DROP TABLE &TABLE_NAME; Variable names should start with an alphabet. Here the table name starts with an '&' symbol. 22. What is the advantage of specifying WITH GRANT OPTION in the GRANT command? The privilege receiver can further grant the privileges he/she has obtained from the owner to any other user. 23. What is the use of the DROP option in the ALTER TABLE command? It is used to drop constraints specified on the table. 24. What is the value of comm and sal after executing the following query if the initial value of sal is 10000? UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1; sal = 11000, comm = 1000 25. What is the use of DESC in SQL? Answer : DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order. Explanation : The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order. 26. What is the use of CASCADE CONSTRAINTS? When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. 27. Which function is used to find the largest integer less than or equal to a specific value? FLOOR

Page 51 of 259

28. What is the output of the following query? SELECT TRUNC(1234.5678,-2) FROM DUAL; 1200

SQL QUERIES I. SCHEMAS Table 1 : STUDIES PNAME (VARCHAR), SPLACE (VARCHAR), COURSE (VARCHAR), CCOST (NUMBER) Table 2 : SOFTWARE PNAME (VARCHAR), TITLE (VARCHAR), DEVIN (VARCHAR), SCOST (NUMBER), DCOST (NUMBER), SOLD (NUMBER) Table 3 : PROGRAMMER PNAME (VARCHAR), DOB (DATE), DOJ (DATE), SEX (CHAR), PROF1 (VARCHAR), PROF2 (VARCHAR), SAL (NUMBER) Important Questions in Oracle, Developer /2000(Form 4.5 and Reports 2.5) Oracle 1) What are the Back ground processes in Oracle and what are they. 1) This is one of the most frequently asked question. There are basically 9 Processes but in a general system we need to mention the first five background processes. They do the house keeping activities for the Oracle and are common in any system. The various background processes in oracle are a) Data Base Writer(DBWR) :: Data Base Writer Writes Modified blocks from Database buffer cache to Data Files. This is required since the data is not written whenever a transaction is commited. b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transaction commits and log buffer fills, LGWR writes log entries into an online redo log file. c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup. This is useful for recovery from system failure. d)Process Monitor(PMON) :: The Process Monitor performs process recovery when user process fails. PMON Clears and Frees resources that process was using. e) CheckPoint(CKPT) :: At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the most recent checkpoint f)Archieves(ARCH) :: The Archiver copies online redo log files to archival storal when they are busy. g) Recoveror(RECO) :: The Recoveror is used to resolve the distributed transaction in network h) Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture i) Lckn :: We can have upto 10 lock processes for inter instance locking in parallel sql. 2) How many types of Sql Statements are there in Oracle 2) There are basically 6 types of sql statments.They are a) Data Definition Language (DDL) :: The DDL statements define and maintain objects and drop objects. Create, alter, drop, truncate b) Data Manipulation Language (DML) :: The DML statements manipulate database data. Eg: select, update, delete

Page 52 of 259

c) Transaction Control Statements :: Manage change by DML eg : grant, revoke d) Session Control Statements :: Used to control the properties of current session enabling and disabling roles and changing .e.g :: Alter Statements, Set Role e) System Control Statements :: Change Properties of Oracle Instance .e.g:: Alter System f) Embedded Sql :: Incorporate DDL,DML and TCS in Programming Language. e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close

3) What is a Transaction in Oracle 3) A transaction is a Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statement and ends when it is explicitly commited or rolled back. 4) Key Words Used in Oracle 4) The Key words that are used in Oracle are :: a) Commit :: A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements. b) Rollback :: A transaction that retracts any of the changes resulting from SQL statements in Transaction. c) SavePoint :: For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transaction into smaller points. d) Rolling Forward :: Process of applying redo log during recovery is called rolling forward. e) Cursor :: A cursor is a handle ( name or a pointer) for the memory associated with a specific statement. A cursor is basically an area allocated by Oracle for executing the Sql Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explcit cursor for a multi row query. f) System Global Area(SGA) :: The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance. It consists of Database Buffer Cache and Redo log Buffer. g) Program Global Area (PGA) :: The PGA is a memory buffer that contains data and control information for server process. g) Database Buffer Cache :: Databese Buffer of SGA stores the most recently used blocks of datatbase data. The set of database buffers in an instance is called Database Buffer Cache. h) Redo log Buffer :: Redo log Buffer of SGA stores all the redo log entries. i) Redo Log Files :: Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes. j) Process :: A Process is a 'thread of control' or mechansim in Operating System that executes series of steps. 5) What are Procedure,functions and Packages 5) Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks. Procedures do not Return values while Functions return one One Value Packages :: Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents 6) What are Database Triggers and Stored Procedures 6) Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert into, update to, or delete from table. Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. e.g:: operations insert, update, delete 3 before ,after 3*2 A total of 6 combinatons At statment level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12. Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards. Stored Procedures:: Stored Procedures are Procedures that are stored in Compiled form in the database. The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format.

Page 53 of 259

7) How many Integrity Rules are there and what are they 7) There are Three Integrity Rules. They are as follows :: a) Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced. When there is data in Child Tables the Master tables cannot be deleted. c) Business Integrity Rules :: The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules. 8) What are the Various Master and Detail Relationships? 8) The various Master and Detail Relationship are a) NonIsolated :: The Master cannot be deleted when a child is existing b) Isolated :: The Master can be deleted when the child is existing c) Cascading :: The child gets deleted when the Master is deleted. 9) What are the Various Block Coordination Properties 9) The various Block Coordination Properties are a) Immediate Default Setting. The Detail records are shown when the Master Record is shown. b) Deffered with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the c) Deffered with No Auto Query The operator must navigate to the detail block and explicitly execute a query

detail block.

10) What are the Different Optimisation Techniques 10) The Various Optimisation techniques are a) Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes b) Optimizer_hint : ::set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS'); Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept where (Deptno > 25) c) Optimize_Sql :: By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements. This slow downs the processing because for every time the SQL must be parsed whenever they are executed. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT statement. All other SQL statements reuse the cursor. f45run module = my_firstform userid = scott/tiger optimize_Tp = No 11) How do u implement the If statement in the Select Statement 11) We can implement the if statement in the select statement by using the Decode statement. e.g select DECODE (EMP_CAT,'1','First','2','Second'Null); Here the Null is the else statement where null is done. 12) How many types of Exceptions are there? 12) There are 2 types of exceptions. They are a) System defined Exceptions e.g. WHEN NO_DATA_FOUND, WHEN TOO_MANY_ROWS b) User Defined Exceptions e.g. My_exception exception When My_exception then 13) What are the inline and the precompiler directives 13) The inline and precompiler directives detect the values directly 14) How do you use the same lov for 2 columns 14) We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code 15) How many minimum groups are required for a matrix report 15) The minimum number of groups in matrix report are 4 16) What is the difference between static and dynamic lov

Page 54 of 259

16) The static lov contains the predetermined values while the dynamic lov contains values that come at run time 17) What are snap shots and views? 17) Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated. Views with joins or grouping expressions cannot be updated. 18) What are the OOPS concepts in Oracle. 18) Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorize the properties by setting the visual attributes and then attach the property classes for the objects. OOPS supports the concepts of objects and classes and we can consider the property classes as classes and the items as objects 19) What is the difference between candidate key, unique key and primary key 19) Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table. 20) What is concurrency 20) Cuncurrency is allowing simultaneous access of same data by different users. Locks useful for accessing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert, update or delete is being done. This lock should not be applied when we do only select from the row. b) Share lock We can do the table as Share_Lock as many share_locks can be put on the same resource. 21) Previleges and Grants 21) Previleges are the right to execute a particular type of SQL statements. e.g :: Right to Connect, Right to create, Right to resource Grants are given to objects so that the objects might be accessed accordingly. The grant has to be given by the owner of the object. 22)Table Space, Data Files, Parameter File, Control Files 22)Table Space :: The table space is useful for storing the data in the database. When a database is created two table spaces are created. a) System Table space :: This data file stores all the tables related to the system and dba tables b) User Table space :: This data file stores all the user related tables We should have seperate table spaces for storing the tables and indexes so that the access is fast. Data Files :: Every Oracle Data Base has one or more physical data files. They store the data for the database. Every datafile is associated with only one database. Once the Data file is created the size cannot change. To increase the size of the database to store more data we have to add data file. Parameter Files :: Parameter file is needed to start an instance. A parameter file contains the list of instance configuration parameters e.g.:: db_block_buffers = 500 db_name = ORA7 db_domain = u.s.acme lang Control Files :: Control files record the physical structure of the data files and redo log files. They contain the Db name, name and location of dbs, data files ,redo log files and time stamp. 23) Physical Storage of the Data 23) The finest level of granularity of the data base are the data blocks. Data Block :: One Data Block correspond to specific number of physical database space Extent :: Extent is the number of specific number of contiguous data blocks. Segments :: Set of Extents allocated for Extents. There are three types of Segments a) Data Segment :: Non Clustered Table has data segment data of every table is stored in cluster data segment. b) Index Segment :: Each Index has index segment that stores data c) Roll Back Segment :: Temporarily stores 'undo' information 24) What are the Pct Free and Pct Used

Page 55 of 259

24) Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg.:: Pctfree 20, Pctused 40 25) What is Row Chaining 25) The data of a row in a table may not be able to fit in the same data block. Data for row is stored in a chain of data blocks. 26) What is a 2 Phase Commit 26) Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply 27) What is the difference between deleting and truncating of tables 27) Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved. 28) What are mutating tables? 28) When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select. 29) What are Codd Rules 29) Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules. 30) What is Normalisation 30) Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normal rules/forms. a) 1 Normal Form :: A table is said to be in 1st Normal Form when the attributes are atomic. b) 2 Normal Form :: A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key c) 3rd Normal Form :: A table is said to be third Normal form when it is not dependant transitively 31) What is the Difference between a post query and a pre query 31) A post query will fire for every row that is fetched but the pre query will fire only once. 32) Deleting the Duplicate rows in the table 32) We can delete the duplicate rows in the table by using the Rowid 33) Can U disable database trigger? How? 33) Yes. With respect to table ALTER TABLE TABLE [ DISABLE all_trigger ] 34) What is pseudo columns ? Name them? 34) A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns: * CURRVAL * NEXTVAL * LEVEL * ROWID * ROWNUM 35) How many columns can table have? The number of columns in a table can range from 1 to 254. 36) Is space acquired in blocks or extents? In extents

Page 56 of 259

37) What is clustered index? In an indexed cluster, rows are stored together based on their cluster key values. Can not applied for HASH. 38) what are the datatypes supported By oracle (INTERNAL)? Varchar2, Number,Char , MLSLABEL. 39 ) What are attributes of cursor? %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT 40) Can you use select in FROM clause of SQL select ? Yes. Forms 4.5 Questions 1) Which triggers are created when master -detail relation? 1) master delete property * NON-ISOLATED (default) a) on check delete master b) on clear details c) on populate details * ISOLATED a) on clear details b) on populate details * CASCADing a) pre-delete b) on clear details c) on populate details 2) Which system variables can be set by users? 2) SYSTEM.MESSAGE_LEVEL SYSTEM.DATE_THRESHOLD SYSTEM.EFFECTIVE_DATE SYSTEM.SUPPRESS_WORKING 3) What is object group? 3) An object group is a container for a group of objects. You define an object group when you want to package related objects so that you can copy or reference them in another module. 4) What are referenced objects? 4) Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. 5) Can you store objects in library? 5) 6) Is forms 4.5 object oriented tool ? why? 6) yes , partially. 1) PROPERTY CLASS - inheritance property 2) OVERLOADING : procedures and functions. 7) Can you issue DDL in forms? 7) yes, but you have to use FORMS_DDL. Any string expression up to 32K: a literal

Page 57 of 259

an expression or a variable representing the text of a block of dynamically created PL/SQL code a DML statement or a DDL statement Restrictions :: The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. 8) What is SECURE property? 8) Hides characters that the operator types into the text item. This setting is typically used for password protection. 9 ) What are the types of triggers and how the sequence of firing in text item 9) Triggers can be classified as Key Triggers, Mouse Triggers, Navigational Triggers. Key Triggers :: Key Triggers are fired as a result of Key action. e.g :: Key-next-field, Key-up,Key-Down Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-buttonpresed,when-mouse-doubleclicked,etc Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g : Post-Text-item,Pre-text-item. We also have event triggers like when new-form-instance and when-new-block-instance. We cannot call restricted procedures like go_to (my_block.first_item) in the Navigational triggers But can use them in the Key-next-item. ***The Difference between Key-next and Post-Text is a very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event. The sequence of firing in a text item are as follows :: a) pre text-item b) when-new-item-Instance c) key-next-item d) when-validate-item e) post-text-item 10) Can you store pictures in database? How? 10) Yes , in long Raw datatype. 11) What are property classes ? Can property classes have triggers? 11) Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly. By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class. Yes . All type of triggers . * 12) If you have property class attached to an item and you have same trigger written for the item. Which will fire first? 12) Item level trigger fires, If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger. 13) What are record groups? * Can record groups be created at run-time? 13) A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined. A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. Record group column names cannot exceed 30 characters. Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable. TYPES OF RECORD GROUPS: 1. Query Record Group :: A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group. 2. Non-query Record Group :: A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.

Page 58 of 259

3.

Static Record Group :: A static record group is not associated with a query; rather, you define its structure and row values at design time, and they remain fixed at runtime.

14) What is an ALERT? 14) An ALERT is a modal window that displays a message notifying the operator of some application condition. 15) Can a button have icon and label at the same time? 15) -NO 16) What is mouse navigate property of button? 16) When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse. 17) What is FORMS_MDI_WINDOW? 17) Forms run inside the MDI application window. This property is useful for calling a form from another one. 18) What are timers? When when-timer-expired does not fire? 18) The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing. 19) Can object group have a block? 19) Yes, object group can have block as well as program units. 21) How many types of canvases are there? 20) There are 2 types of canvases called as Content and Stacked Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect. The following questions might not be asked in an Average Interview and could be asked when the Interviewer wants to trouble u and go deepppppppppppppHe cannot go further.. 1) What are user-exits? 1) It invokes 3GL programs. 2) Can you pass values to-and-fro from foreign function? how ? 2) Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function. After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface. 3) What is IAPXTB structure ? 3) The entries of Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB table in d/b. 4) Can you call WIN-SDK thruo' user exits? 4) YES. 5) Does user exits supports DLL on MSWINDOWS ? 5) YES . 6) What is path setting for DLL? 6) Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL. If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL. 7) How is mapping of name of DLL and function done? 7) The dll can be created using the Visual C++ / Visual Basic Tools and then the dll is put in the path that is defined the registery.

Page 59 of 259

8) what is precompiler? 8) It is similar to C precompiler directives. 9) Can you connect to non - oracle datasource ? How? 9) Yes . 10 ) what are key-mode and locking mode properties? level ? 10) Key Mode : Specifies how oracle forms uniquely identifies rows in the database. This is property includes for application that will run against NON-ORACLE datasources . Key setting unique (default.) dateable n-updateable. Locking mode : Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form. a) immediate b) delayed 11) What are savepoint mode and cursor mode properties ? level? 11) Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily for applications that will run against non-ORACLE data sources. For applications that will run against ORACLE, use the default setting. Cursor mode - define cursur state across transaction Open/close. 12) Can you replace default form processing ? How ? 13) What is transactional trigger property? 13) Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage as transactional block.(NON-ORACLE datasource) default - FALSE. 14) What is OLE automation ? 14) OLE automation allows an OLE server application to expose a set of commands and functions that can be invoked from an OLE container application. OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE) 15) What does invoke built-in do? 15) This procedure invokes a method. Syntax: PROCEDURE OLE2.INVOKE (object obj_type, method VARCHAR2, list list_type := 0); Parameters: object Is an OLE2 Automation Object. method Is a method (procedure) of the OLE2 object. list Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function. 16) What are OPEN_FORM,CALL_FORM,NEW_FORM? diff? 16) CALL_FORM : It calls the other form. but parent remains active, when called form completes the operation , it releases lock and control goes back to the calling form. When you call a form, Oracle Forms issues a savepoint for the called form. If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint. OPEN_FORM : When you call a form, Oracle Forms issues a savepoint for the called form. If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint. NEW_FORM : Exits the current form and enters the indicated form. The calling form is terminated as the parent form. If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form. Oracle Forms releases memory (such as database cursors) that the terminated form was using. Oracle Forms runs the new form with the same Runform options as the parent form. If the parent form was a called form, Oracle Forms runs the new form with the same options as the parent form.

Page 60 of 259

17 ) What is call form stack? 17) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack. 18) Can u port applications across the platforms? how? 18) Yes we can port applications across platforms. Consider the form developed in a windows system. The form would be generated in unix system by using f45gen my_form.fmb scott/tiger GUI 1) What is a visual attribute? 1) Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface. ***2) Diff. between VAT and Property Class? imp 2) Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties. You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically. When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored. 3 ) Which trigger related to mouse? 3) When-Mouse-Click When-Mouse-DoubleClick When-Mouse-Down When-Mouse-Enter When-Mouse-Leave When-Mouse-Move When-Mouse-Up 4) What is Current record attribute property? 4) Specifies the named visual attribute used when an item is part of the current record. Current Record Attribute is frequently used at the block level to display the current row in a multi-record. If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus changes. 5) Can u change VAT at run time? 5) Yes. You can programmatically change an object's named visual attribute setting to change the font, color and pattern of the object at runtime. 6) Can u set default font in forms? 6) Yes. Change windows registry (regedit). Set form45_font to the desired font. 7) Can u have OLE objects in forms? 7) Yes. 8) Can u have VBX and OCX controls in forms? 8) Yes. 9) What r the types of windows (Window style)? 9) Specifies whether the window is a Document window or a Dialog window. 10) What is OLE Activation style property? 10) Specifies the event that will activate the OLE containing item. 11) Can u change the mouse pointer ? How? 11) Yes. Specifies the mouse cursor style. Use this property to dynamically change the shape of the cursor. Reports 2.5

Page 61 of 259

7) 3)

How many types of columns are there and what are they Formula columns :: For doing mathematical calculations and returning 1 value Summary Columns :: For doing summary calculations such as summations etc. Place holder Columns :: These columns are useful for storing the value in a variable Can u have more than one layout in report It is possible to have more than one layout in a report by using the additional layout option in the layout editor.

4) 8)

3) Can u run the report with out a parameter form 9) Yes it is possible to run the report without parameter form by setting the PARAM value to Null. 4) What is the lock option in reports layout 10) By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields. 11) What is Flex 5) Flex is the property of moving the related fields together by setting the flex property on. 12) What are the minimum number of groups required for a matrix report 7) The minimum of groups required for a matrix report are 4

Forms Path In UNIX: \\192.168.20.107\ildev2_appl\au\11.5.0\forms\US Reports path in UNIX: \\192.168.20.102:\ildev2_appl\ap\11.5.0\reports\US Encumbrance Accounting: Definition: An encumbrance is an obligation to disburse funds in the future. Recording encumbrances helps prevent over-spending the amount available in the account. Encumbrances can be created by:

Creating a Purchase Order for payments to vendors outside the university Obtaining services from Telecommunications or Administrative Technology Services Submitting an Electronic Personnel Action for a salaried employee Entering an Authorization or Air Ticket Requisition on the Web Travel system.

What is encumbrance accounting? What is Accrual account? For more info see P360 of Application developer guide. What is dynamic insertion? When we are trying to insert flexfield through the foreign key reference forms. If you have used mandatory application specific column with flexfield table defn then u cannt use dynamic insertion. Defining a Flexfield in your application: Decide which application entities require key or descriptive flexfield. Design flexfield columns into application DB. Register table with AOL. Register the flexfield with Oracle-AOL. Assign flexfield and segment qualifier. (Optional) Develop forms that uses flexfield and calls AOL to activate them.

Key FF can be implemented for the following three types of forms:

Page 62 of 259

Combination Forms: General forms where you can enter the combination of different segment to constitute a flexfield. Form with foreign key reference: Forms whose base table foreign key reference to the combination table. Basically these type of forms uses flexfeild, such as entereing orders, receiving parts etc. Form with key flexfield range:

Page 63 of 259

Design flexfield columns into application DB: Id column to uniquely identify your flexfiled rows. Type Number Length 38, Not Null. Name should be like XXX_ID, This column is known as CCID(ie. Code combination ID). Column for each key segment Type Varchar2 Length (1-60) Null allowed. Max no of key FF segment columns supported by AOL are 70. Define Summery_Flag and Enable_Flag Type Varchar2 Length 1 Not NULL Define Start_Date_Active and End_Date_Active Type Date Not Null Define a structure defining column(Structure Id Column) - Optional Column Used for defining multiple structure. Type Number Length 38 Not Null Name this column as XXX_Structure_ID Define a Unique index on Unique Id column Create Oracle sequence for that column with the same grants as of code combination table It should be named as YOUR_TABLE_NAME_S Define Who columns Last_Update_Date(Type Date Not Null) Last_Updated_By(Type NUMBER length 15 NotNull). All other columns should have NULL Allowed.

For using dynamic insertion we should not define any mandatory application specific column in this table.

For a base table with foreign key reference Define one column with the same name as of Unique Id name in the corresponding combination table. Type Number Length 38 and Null or Not Null depending upon application needs. If you have used structure column in the combination table then you should have to define that column. For more info see Pg369 of Application Developer Guide. Descriptive Flex Fields: Define DFF column into DB. Register ur table with AOL. Register ur DFF with AOL. Create DFF into ur forms. Add DFF routines to ur forms.

Reference fields: Fields are used for storing context information of DFF. ATTRIBUTE_CATEGORY column is used for storing DFF.

Page 64 of 259

Design DFF columns into application DB:

Column for each descriptive segment Type Varchar2 Length (1-150) Null allowed. Max no of key FF segment columns supported by AOL are 70. Define Summery_Flag and Enable_Flag Type Varchar2 Length 1 Not NULL Define Start_Date_Active and End_Date_Active Type Date Not Null Define a structure defining column(Context column) Preferably named is ATTRIBUTE_CATEGORY column. Type Varchar2 Length 30 Null Allowed Maximum of 200 attribute column we can define in a table. Adding FF to forms: Create table: create table test_Flex_Field (Acc_ID Number(38) Not Null, segment1 varchar2(60), segment2 varchar2(60), segment3 varchar2(60), segment4 varchar2(60), segment5 varchar2(60), segment6 varchar2(60), segment7 varchar2(60), segment8 varchar2(60), segment9 varchar2(60), Summery_Flag varchar2(1) Not Null, Enable_Flag varchar2(1) Not Null, Start_Date_Active Date Not Null, End_Date_Active Date Not Null, Last_Update_Date Date Not Null, Last_Update_By Number(15) Not Null, CREATION_DATE DATE, CREATED_BY NUMBER(15), LAST_UPDATE_LOGIN NUMBER(15)) grant all on TEST_FLEX_FIELD to APPLSYS; grant all on test_Flex_Field_S to APPLSYS; Register table in the APPS: execute AD_DD.register_table(Application_short_name,Table_name,p_tab_type,P_pct_free, P_pct_used); p_tab_type: Use T , If it is a transaction table, S for seed data. P_next_extend: P_pct_free: P_pct_used: execute AD_DD.register_table('FND','TEST_FLEX_FIELD','T',8,10,90);

Page 65 of 259

Register column in the APPS: execute AD_DD.register_column(Application_short_name,Table_name,p_col_name,p_col_seq,p_ col_type,p_col_width,p_nullable,p_translate,p_precesion,p_scale); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','ACC_ID',1,'NUMBER',38,'N','N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT1',2,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT2',3,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT3',4,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT4',5,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT5',6,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT6',7,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT7',8,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT8',9,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','SEGMENT9',10,'VARCHAR2',60,'Y',' N'); execute AD_DD.register_column('FND','TEST_FLEX_FIELD','CREATION_DATE',17,'DATE',9,'N',' N'); For finding the application long name see table fnd_Application_Tl and for short name see fnd_Application.

Page 66 of 259

Page 67 of 259

Define state table: desc test_state Name Null? Type ------------------------------- -------- ---STATE_NAME VARCHAR2(60) STATE_ID NOT NULL VARCHAR2(10) execute AD_DD.register_table('FND','TEST_STATE','T',8,10,90); execute AD_DD.register_column('FND','TEST_STATE','STATE_NAME',1,'VARCHAR2',60,'Y','N'); execute AD_DD.register_column('FND','TEST_STATE','STATE_ID',2,'VARCHAR2',60,'N','N'); grant all on TEST_STATE to applsys; Defining Value Set:

Adding flexfield segment def in APPS:

Page 68 of 259

Page 69 of 259

Adding Flexfields to forms: Create hidden fields Create display field: Create ur concatenated segment field of size 2000. Text field. Attach LOV ENABLE_LIST_LAMP to this set LOV validation to NO. 1. What is 3rd normal form? All items are atomic, all tables have a primary key, every row is determined by its primary key, there are no duplicate rows, every column is dependent on ONLY the primary key. 2. What are cascading triggers? Executing one trigger may cause another trigger to also be executed. 3. What are snapshots? Snapshots are copies of remote data, based upon queries. In their simplest form, they can be thought of as a table created by a command such as: create table t as select * from z; 4. What Oracle package allows you to schedule one-off or recurring jobs in your database? DBMS_JOB 5. What packages has Oracle provided for use by developers? The DBMS_ series of packages, i.e. DBMS_JOB,DBMS_OUTPUT, DBMS_UTILITY, UTL_FILE, UTL_HTTP, UTL_SMTP, UTL_TCP, DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_DDL. 6. What are some methods for transferring a table from one schema to another? Export-Import, Create table as .. Select .., Copy 7. What happens if a tablespace clause is left off a primary key constraint? This results in the index automatically generated being placed in the users' default tablespace, which is usually the same tablespace as where the table is being created which can cause performance problems. 8. Where is most tuning done? 80-90 percent at application level, 10-20 percent at database level 9. What is a mutating table? A mutating table is a table that is in the process of being modified by an UDPATE, DELETE or INSERT statement. For example, if your trigger contains a select statement or an update statement referencing the table it is triggering off of you will receive the error. 10. What is a bind variable and why is it important? A bind variable is a placeholder in a query. The way the Oracle shared pool (a very important shared memory data structure) operates is predicated on developers using bind variables. 11. How are reads and writes handled in Oracle that is different than almost every other database? Reads are not blocked by writes. 12. Why should you care about the NLS_DATE_FORMAT? Because its' value (dd-mon-yy or dd-mon-rr) determines the results of your date arithmetic when you are dealing with years of 99 and 00..nn. 13. What is the purpose of the SUBSTR string function? To return a specified substring from a string. 14. What's the difference between an equijoin and a self-join? An equijoin does an equality test between two fields in two different tables; a self join does the same thing on a copy of the same table. 15. In a Select statement, what is the difference between a & and &&? Both pass in values at runtime, but if the && is used the user will not be bothered with a second prompt for the value.

Page 70 of 259

16. What is Oracle*Alert? Oracle*Alert is licensed as an Application but it functions as an extension of AOL in that it supplements the features of all the Applications. Oracle Alert is an end-user tool, and so individual alerts enjoy support from Oracle at the same level as, for instance, FSG reports in Oracle General Ledger. 17. What is the TRANSLATE function? TRANSLATE is a simple function that does an orderly character-by-character substitution in a string. The format is TRANSLATE (string, if, then). Example: select TRANSLATE (7671234, 234567890,'BCDEFGHIJ') from DUAL; The result would be: GFG1BCD. I have found this useful during some data migrations where special characters needed to be translated. 18. What are PL/SQL Tables (or Arrays)? This is dependent upon your Oracle version. PL/SQL Tables have only one dimension, but after PLSQL 2.3 that dimension could be a record. Their main advantage is that when relatively small tables must be constantly consulted, if they can be put in memory via a PL/SQL table, performance can be enhanced. 19. What's the most important 'Best Practice' guideline you follow? Ask for Help if you find yourself spending more than 30 minutes to solve a problem. I follow this advice when at a client site; when I'm at home, I act like the Duracell bunny and just keep going and going. 20. What's another Best Practice? Make code reviews a regular part of your development process. 21. Describe the PL/SQL Block structure. Declare Begin Exception End 22. Describe a nested PL/SQL Block. Declare Begin Begin End; Begin End; End; 23. What is %TYPE used for? v_min_bal sales.balance%TYPE := 10.00; - the var v_min_bal takes on the Type of sales.balance and the value of 10.00. 24. What is %ROWTYPE used for? Assigns a row to a table. Similar to %TYPE but for a record, not just a field. 25. What is an anonymous block? A stored procedure without a name. 26. Is PL/SQL truly compiled when stored in the database or is it interpreted? PL/SQL on the server is run in much the same fashion as Java is run anywhere. PL/SQL is compiled into PCode and the PCode is interpreted at runtime. 27. What is the purpose of the PL/SQL FETCH command? The FETCH command retrieves values returned by the cursor from the active set into the local variables. 28. What does truncating a table do? It deletes the data from the table. 29. What else may truncating a table do? It can reset the high water mark for a table if the REUSE STORAGE clause is not used. 30. Why is the high water mark important? The high water mark is used in association with each individual table and tells Oracle 1. where to start loading data during a SQL*Loader process 2. how far to scan a table's information when doing a full-table scan. 31. What does the TO_NUMBER function do? It converts VARCHAR2 values to numbers. 32. What is the default length of the CHAR column? 1 33. What is the purpose of a referential integrity constraint? Enforce the rule that a child foreign key must have a valid parent primary key. 34. What is the purpose of the SQL*Plus command GET? Get the contents of a previously saved operating system file into the buffer. 35. What is the order of the stages of the system development cycle? 1. Strategy and analysis 2. Design 3. Build and document 4. Transition 5. Production. 36. In a SELECT statement, which character is used to pass in a value at runtime? The '&' character or the '&&' characters. 37. What is DNS? What does it stand for and why do we care that it exists? Dynamic Name Server is what allows us to type in names instead of IP addresses to get to Web servers, use Telnet, FTO, etc.

Page 71 of 259

38. What are realms? Application security in Oracle Applications is maintained and managed by assigning responsibilities, excluding attributes, and securing attributes to users. Internet Procurement 11i uses a security realm as an additional layer for application security. A security realm is a list of objects (item source or a category) to which a user is granted access. 39. What occurs during the production phase of the system development cycle? Perform normal routine maintenance. 40. A database trigger is fired automatically when what is executed? a DML statement 41. In a PL/SQL block, what needs to be followed with a semicolon? All SQL statements, all PL/SQL statements and the END clause 42. What character do you type to execute an anonymous block? / 43. What data type is used to store large binary objects outside the database? The BFILE data type 44. Which variable type accepts only character strings of a specified length? CHAR 45. Which variable type accepts any length of character up to 32767 bytes? VARCHAR2 46. What operator is used to assign a value to a variable that doesn't have a typical value? := 47. What keyword is used to assign a value to a variable that has a typical value? DEFAULT 48. How frequently are block declared variables initialized? Every time a block is executed 49. With which symbol do you prefix a bind variable when you reference it in PL/SQL? : 50. What are two statements that are true about the INTO clause? 1. You have to specify the same number of variables in the INTO clause as the values returned by the SELECT statement. 2. The data types of the variables specified in the INTO clause need to correspond with the values returned by the SELECT statement. 51. What keyword is used when you populate a host variable from the SQL prompt? The VARIABLE keyword 52. How do you end each SQL statement in a PL/SQL block? With a ; 53. Can you have more than one transaction in a PL/SQL block? Yes 54. What is common among these cursor attributes; SQL%FOUND, SQL%NOTFOUND, SQL%ISOPEN? They are all Boolean attributes. 55. What does it mean when the cursor attribute SQL%FOUND returns the result TRUE? The most recent SQL statement issued affects one or more rows. 56. What are two true statements concerning the index in a FOR loop? 1. You can't reference it outside the loop. 2. You can use an expression to reference its existing value within the loop. 57. How do you begin defining a record type? TYPE emp_record_type IS RECORD 58. Do PL/SQL records have a predefined data type? No. 59. Give an example of the correct syntax to reference a row in a PL/SQL table. Dept_table(15) 60. The primary key of a PL/SQL table must be of what data type? Scalar 61. What is the term used for the rows produced by a query? Active set 62. Name three things that are true about explicit cursors. 1. They are manipulated through specific statements in the block's executable actions. 2. They individually process each row returned by a multi row SELECT statement. 3. They need to be declared and named before they can be used. 63. Name two things true about cursor FOR loops. 1. They process rows in an explicit cursor. 2. They automate the processing as the cursor is automatically opened and the rows fetched for each iteration in the loop, and the cursor is closed when all the rows have been processed. 64. What are four attributes that provide status information about a cursor? 1. %ISOPEN 2. %NOTFOUND 3. %FOUND 4. %ROWCOUNT 65. Describe at least one way explicit cursor attributes are used. You can use the explicit cursor attributes to test the success of each fetch before any further references are made to the cursor. 66. What clause do you use to apply updates and deletes to the row currently being addressed, without having to explicitly reference the ROWID? 67. How long does the Oracle server wait if it cannot acquire the locks on the rows it needs in a SELECT FOR UPDATE? indefinitely 68. Name three things about using cursors with parameters.

Page 72 of 259

1. You can use parameters to pass values to a cursor when it is open. 2. Parameters are used in a query when it executes. 3. In the OPEN statement, each formal parameter in the cursor declaration must have a corresponding real parameter. 69. Name three things true about trapping exceptions 1. When an exception occurs, PL/SQL processes only one handler before leaving the block. 2. If you use the OTHERS clause, it should be placed last of all the exception-handling clauses. 3. Exceptions cannot appear in assignment statements or SQL statements. 70. Describe two aspects about exceptions. 1. Once an Oracle error occurs, the associated exception is raised automatically. 2. You can raise an exception explicitly by issuing the RAISE statement within the block. 71. What exception occurs when the conversion of a character string to number fails? INVALID_NUMBER 72. Name three things about user-defined exceptions. 1. When defining your own exceptions, you need to declare them in the DECLARE section of a PL/SQL block. 2. They are raised explicitly with RAISE statements. 3. You need to reference your declared exception within the corresponding exception-handling routine. 73. What's another Best Practice? Set standards and guidelines for your application before anyone starts writing code. 1. Selection of development tools 2. How SQL is written in PL/SQL code. 3. How the exception handling architecture is designed. 4. Processes for code review and testing. 74. Explain the relationship between a Conceptual Data Model (CDM) and a Physical Data Model (PDM). Most of the objects in the logical model correspond to a related object in the physical model, e.g. the logical model contains entities, attributes, and key groups, which are represented in the physical model as tables, columns, and indexes, respectively. The CDM allows the designer to concentrate solely on defining the objects in the information system and the relationships between them, without having to consider the numerous parameters associated with the physical implementation such as data integrity constraints, data access speed and data storage efficiency. The CDM thus provides a clear and succinct picture of the information system, which is independent of the targeted DBMS. A single CDM may therefore be associated with a number of PDMs targeting different DBMSs. The conceptual level schema, should present to the user a simple, physical implementation-independent clear view of the format of the data sets and their descriptions. A Conceptual Data Model lays the foundation for building shared databases and re-engineering the business. 75. Elaborating on 74, describe conceptual vs logical vs physical designs. Conceptual database design is the process of building a model of the essential part of the enterprise business process and the used information, independent of all physical considerations. Logical database design - The process of constructing a model of information used in an enterprise based on a specific data model, using natural objects of information and natural associations between them. The model of information is independent of a particular implementation and other physical consideration. Physical database design - The process of producing a description of the implementation of the database on secondary storage. It describes the storage structures and access methods used to achieve efficient access to the data. 76. What is a pseudo-column? A pseudo-column is a "column" that yields a value when selected, but which is not an actual column of the table. 77. What are the more common pseudo-columns? sequence.CurrVal, sequence.NextVal, RowID, RowNum, SysDate, UID, User 78. What is the difference between VARCHAR and VARCHAR2? The VARCHAR data type is currently synonymous with the VARCHAR2 data type. It is recommended that you use VARCHAR2 rather than VARCHAR. In a future version of Oracle, VARCHAR might be a separate data type used for variable length character strings compared with different comparison semantics. 79. Give an example of overloaded Built-in functions. date_string := TO_CHAR (SYSDATE, 'MMDDYY'); number_string := TO_CHAR (10000); If overloading was not supported in PL/SQL (TO_CHAR is a function in the STANDARD package), then two different functions would be required to support conversions to character format. 80. What is the difference between call and execute sql*+ commands. The CALL statement is SQL(and only understands SQL types). EXEC is really shorthand for begin/end;. 81. How can I check for duplicates? select count(*), job from emp group by job having count(*) > 0; 4 CLERK 4 SALESMAN 3 MANAGER 2 ANALYST 1 PRESIDENT 82. What is another name for ref cursors? cursor variables 83. What data type column can not be used with INTERSECT? LONG

Page 73 of 259

84. When is the MINUS keyword used? To remove those rows which are retrieved by one SELECT from those retrieved by another SELECT statement. 85. Give an example of the MINUS keyword. List the numbers of all managers who do not hold advanced degrees. SELECT MGRNO FROM DEPT WHERE MGRNO IS NOT NULL MINUS SELECT EMPNO FROM EMP WHERE EDLEVEL >= 18; 86. When is the INTERSECT keyword used? To return only those rows that are the result of two or more SELECT statements. 87. Give an example of the INTERSECT keyword. List the numbers of all managers who do not hold advanced degrees. SELECT MGRNO FROM DEPT WHERE MGRNO IS NOT NULL INTERSECT SELECT EMPNO FROM EMP WHERE EDLEVEL < 18; 88. Write a query to find the duplicate record(s) of column a, b and c in a table of columns a..z. SELECT count(*), a, b, c FROM t GROUP BY a, b, c HAVING COUNT(*) > 1; 89. Give an example of the NOT keyword. SELECT c FROM t WHERE c != 'x'; SELECT c FROM t WHERE NOT c = 'x'; 90. Give an example of the LIKE keyword. SELECT c FROM t WHERE c LIKE '_EU%L'; ie the first character can be any character, the next two must be EU and the last must be L. Any number of chararcters or numbers could be between the U and L. 91. What is SQLCODE? A predefined symbol that contains the Oracle error status of the previously executed PL/SQL statement. If a SQL statement executes without errors, SQLCODE is equal to 0. 92. What is SQLERRM? A PL/SQL symbol that contains the error message associated with SQLCODE. If a SQL statement executes successfully, SQLCODE is equal to 0 and SQLERRM contains the string ORA-0000: normal, successful completion 93. What is ROWNUM? A pseudocolumn that indicates the order of the retrieved row. The ROWNUM for the first returned row is 1, ROWNUM can limit the number of rows that are returned by a query. 94. What are the benefits of using the PLS_INTEGER Datatype in PL/SQL? If you have a whole-number counter, for example in a loop or record counter, consider using a datatype of PLS_INTEGER instead of INTEGER or NUMBER. When declaring an integer variable, PLS_INTEGER is the most efficient numeric datatype because its values require less storage than INTEGER or NUMBER values, which are represented internally as 22-byte Oracle numbers. Also, PLS_INTEGER operations use machine arithmetic, so they are faster than BINARY_INTEGER, INTEGER, or NUMBER operations, which use library arithmetic. Jayanta Sengupta Lowell, Massachusetts 95. Explain the difference between NVL and NVL2. NVL (expr1, expr2); NVL - If expr1 is null then return expr2 else return expr1. NVL2 (expr1, expr2, expr3) NVL2 - If expr1 is not null then the function will return expr2. Otherwise, the function will return expr3. The expr1 can have any datatype and arguments expr2 and expr3 can be of any datatype other than LONG. The datatype of the return value is that of expr2. 96. Describe RTRIM. RTRIM (string [,'set']) RTRIM is the opposite of RPAD and similar to LTRIM. The function removes characters from the right-hand portion of a string. The string passed as the first parameter is returned with all characters contained in the string passed as the second parameter removed from the right of the last character not found in the remove string. The second parameter is optional and defaults to a single space. rtrim('ORACLE UPDATE ') --> 'ORACLE UPDATE' rtrim('ORACLE UPDATE','EDATPU') --> 'ORACLE ' rtrim('ORACLE UPDATE',' EDATPU') --> 'ORACL' 97. Describe UNION and UNION ALL. UNION returns distinct rows selected by both queries while UNION ALL returns all the rows. Therefore, if the table has duplicates, UNION will remove them. If the table has no duplicates, UNION will force a sort and cause performance degradation as compared to UNION ALL. 98. What is 1st normal form? Each cell must be one and only one value, and that value must be atomic: there can be no repeating groups in a table that satisfies first normal form. 99. What is 2nd normal form? Every nonkey column must depend on the entire primary key. 100. What is 3rd normal form? (another explanation than #1) No nonkey column depends on another nonkey column. 101. What is 4th normal form?

Page 74 of 259

Fourth normal form forbids (prohibits, prevents) independent one-to-many relationships between primary key columns and nonkey columns. 102. What is 5th normal form? Fifth normal form breaks tables into the smallest possible pieces in order to eliminate all redundancy within a table. Tables normalized to this extent consist of little more than the primary key. 103. What does pragma mean to Oracle? A pragma is simply a compiler directive, a method to instruct the compiler to perform some compilation option. 104. What is a Latch? A Latch is a low level serialization mechanism that (released as quickly as it is acquired) protects shared data structures. A process acquires and holds the latch as long as the data structure is in use. The basic idea is to prevent concurrent access to shared data structures in the SGA. In case the process dies without releasing the latch, the PMON process will clean up the lock on the data structure and release the latch. If a process is not able to obtain a latch, it must wait for the latch to be freed up by the process holding it. This causes additional spinning (looking for availability at fixed intervals of time) of the process, thereby causing extra load on the CPU. This process will spin until the latch is available. A dba has to monitor the latches for contention and make sure that CPU cycles are not being burnt on process spinning. 105. Does ROLLUP work with multiple columns? The ROLLUP feature can in fact be applied to multiple columns. The result is multiple levels of rollup, as illustrated here: select deptno, job, count(*), grouping(deptno), grouping(job) from emp group by rollup(deptno, job); DEPTNO JOB COUNT(*) GROUPING(DEPTNO) GROUPING(JOB) ---- ---- ---- ---- ---- 10 CLERK 1 0 0 10 MANAGER 1 0 0 10 PRESIDENT 1 0 0 10 3 0 1 20 ANALYST 2 0 0 20 CLERK 2 0 0 20 MANAGER 1 0 0 20 5 0 1 30 CLERK 1 0 0 30 MANAGER 1 0 0 30 SALESMAN 4 0 0 30 6 0 1 14 1 1 As shown in this example, we're able to count the employees by 1) department and job; 2) department; and 3) grand total. 106. What is an inline view? A subquery in the from clause of your main query. 107. Give an example of an inline view and Top-N Query. SELECT ename, job, sal, rownum FROM (SELECT ename, job, sal FROM emp ORDER BY sal) WHERE rownum <= 3; SMITH CLERK 800 1 JAMES CLERK 950 2 ADAMS CLERK 1100 3 108. What SQL*Plus command is useful for determining whether the "N rows selected" message will appear? Feedback 109. What SQL*Plus keyword is used for defining formats for how SQL*Plus displays column information? Set 110. This phrase describes a query that feeds one row of results to a parent query for the purpose of selection when the exact where clause criteria is not known? Single-row subquery. 111. Use of what command requires that you first run the plustrce.sql script? Autotrace 112. The database for an international athletic competition consists of one table, ATHLETES, containing contestant name, age, and represented country. To determine the youngest athlete representing each country, how do you write the code? scott@PO816>SELECT name, country, age FROM athletes WHERE (country, age ) IN ( SELECT country, min(age) FROM athletes GROUP BY country); 113. What is a single-row subquery? The main query expects the subquery to return only one value. 114. What is an inline view? A subquery in a from clause used for defining an intermediate result set to query from. 115. What does AUTOTRACE do? Allows us to see the execution plan of the queries we've executed and the resources they used, without having to use the EXPLAIN PLAN command. 116. What does SQL_TRACE do? Enables logging of all application SQL, performance stats and query plan used. 117. What does TKPROF do? Formats the raw trace files into a readable report. 118. What are the two main index types that Oracle uses? B*Tree and Bitmap 119. When are Bitmap indexes appropriate?

Page 75 of 259

In situations of low cardinality data, i.e. data with few distinct values. 120. What is a top-n query? select * from ( select ename from emp order by sal ) where rownum <= 3; In general it refers to getting the top-n rows from a result set. 121. What is PostgreSQL? PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all SQL constructs, including subselects, transactions, and user-defined types and functions. It is the most advanced open-source database available anywhere. Commercial Support is also available. 122. What are the three main reasons for partitioning a database? 1. To increase availability (derived from the fact that partitions are independent entities). 2. To ease administration burdens (derived from the fact that performing operations on small objects is inherently easier, faster, and less resource intensive than performing the same operation on a large object). 3. To enhance DML and query performance (potential to perform parallel DML). 123. What are the two types of cursors? Implicit (Oracle's) and explicit (yours). 124. Does the order of stored procedures in a package matter? It does if one procedure calls another; if that happens, the calling procedure must be the earlier of the two. 125. How does 9i compare to 8i? Q21: What is the difference between Oracle 7 and Oracle 8? Ans : Difference between Oracle 7 and 8 are as follows: 1. New Table-Partitioning Option The advantages of partitioning include: Reduced Downtime for Scheduled Maintenance Less Downtime Due to Data Failures Improved I/O Performance Disk Striping: Performance versus Availability 2. New index Partitioning Oracle8 provides the same flexibility with table indexes as it does with table partitions. To take advantage of this index flexibility, you go through the same steps used in table partitioning. Again, you do not have to modify existing applications and business processes.

3. Improved Backup and Recovery Mechanisms 1. New Parallel Data-Manipulation-Language Ability 2. New and Improved Networking Features 3. A Better Optimizer 7. Reduced Resource Consumption

Q22: What is the advantage of using Packages over using procedures and funtions? Ans: A Stored packages allow you to encapsulate, or group, related stored procedures, variables, datatypes, etc. in a single named, stored unit in the database. This provides for better organization during the development process. Encapsulation of procedural constructs in a package also makes privilege management easier. Granting the privilege to use a package makes all constructs of the package accessible to the grantee. Using packages rather than standalone stored procedures results in the following improvements:  The entire package is loaded into memory when a procedure within the package is called for the first time. This load is completed in one operation, as opposed to the separate loads required for standalone

Page 76 of 259

procedures. Therefore, when calls to related packaged procedures occur, no disk I/O is necessary to execute the compiled code already in memory.  A package body can be replaced and recompiled without affecting the specification. As a result, objects that reference a packages constructs (always via the specification) never need to be recompiled unless the package specification is also replaced. By using packages, unnecessary recompilations can be minimized, resulting in less impact on overall database performance.

1 Write different type of report triggers? Ans.Before Parameter Form After ParameterForm Before Report Between Pages After Report 2 diff type of reports in report25 Ans.tabular master detail matrix form form letter mailing label 3 diff type of columns in report25 Ans.database columns,formula columns,placeholder column summary columns 4 what is dynmic sql Ans.sql with sql_dbms package 5 what is the maximum length of a variable in pl/sql Ans. 32768 bytes 6 Which of the following is unary operator a.! b. + c. * Ans.a. 7 can you write a while loop that never end Ans. yes 8 number,date 9 select( to_date('06/11/97','mm/dd/yy')- to_date('06/11/67','mm/dd/yy'))/365 from dual; Ans. 30.021918 10 name of at least four predefined oracle exception errors Ans. invalid_number no-data-found too-many-rows invalid-cursor

Page 77 of 259

value-error 11 legal or not legal ? employee_last_name % type; Ans. not legal 12 missing a semicolumn is what type of error a) logical error b)syntax error answer is (a) 13 what is the maximum length of an alert statment a)25 character b 30 character c)40 character answer is (b) 14 which function enables you to find out the time in a time zone by simply passing the date and time of first zone and specifying the second zone,write the syntax of that function? Ans.NEW_TIME(input_date_and-time,time_zone1,time_zone2) 15 16 what is a relation what are tuples and domain in the relation

Ans. the no of rows in a table are tuples and the set of value the attribute may have is called domain

17 what is vsam Ans. virtual storage access method 18 two diff integrity rules are Ans. entity integrity and referential integrity 19 what do you understand by cardinality or arity Ans. the no of tuples in a relation and no of attributes in a relation are called cardinality and arity respective. 20 from the given operation which three are union compitable a)union a,b.c b)difference c)intersection d)Cartesian product write the result Ans. a,b,c select nvl(1,2) from dual Ans. 1 select * from a,b (a has 10 records and b has no records) Ans. no row selected can you use save points other than on-save-points trigger Ans. no

21 22 23

Page 78 of 259

24 25 26 27 28

can you delete a column from a table? Ans. no select nvl(null,2) from dual; Ans. 2 can you use ceil, floor for date Ans. no whether oracle support y2k problems Ans. yes,by using RR format a)11,10,10,10

ceil(10.6),round(10.6),trunc(10.6),floor(10.6) is b)11,11,11,10 c)11,11,10,10 answer is (c) 29 different pseudocolumns are Ans. curval,nextval,rowid,rownum,level

30 Name the column which behave like a table column but is not actullay stored in the table we can not insert ,delete,update their values Ans. Pseudocolumns 31 diff between union and union all Ans. union operator returns only distinct values while union all operator returns all the rows 32 what is optimization Ans. excellent execution path for sql statements 33 which of the function is used to convert a rowid value to varchar2 Ans. ROWIDCHAR 34 diff between rowid and rownum Ans. Rowid returns the row address while rownum returns the no in which oracle select the row from table 35 trigger firing order on item level? Ans. 1)key-next-item 2)when-validate-item

37

which one is block level trigger I.e not true for form level? 1)when-clear-block 2)when-new-block-instance 3) 1,2 both 4) none answer is 4. 38 write the result Ans.select LTRIM('xxxXxxLAST WORD','x') FROM DUAL; XxxLASTWORD 39 Name the triggers which fire automatically when we create the master detail block Ans. on-clear-details

Page 79 of 259

on-check-delete-master on-populate-details 40 how many groups are req. when we create a matrix report Ans. four 41 diff between truncate and delete statement Ans. truncate is DDL and delete is DML 42 what is 2nd normalization form Ans. if all the nonkey attribute depend fully on primary key 43 diff between table level constraints and column level Ans. if constraints are defined on column level then it is column level constraints else table level constraints 44 which is true alter table clause perform following task a)change the name of table b)change the name of column c)drop a column d)decrease the size of column e) none answer is (e) 45 write the syntax for copying the data from one database to another database Ans. COPY [FROM username [/password] [@database_specification]| TO username [/password] [@database_specification]] APPEND|CREATE|INSERT|REPLACE} destination_table [(column, column, column, ...)] USING query 46 what is the main diff between functions and procedure . Ans. functions always return a single value to the caller, while procedures do not return values to the caller. 47 what is diff between unique key and primary key Ans. unique key may have null value while primary key never be null 48 how many exclusive lock are possible on a resource Ans. one 49 named groups of related privileges Ans. roles 50 what is redo log? Ans.the redo log is a set of files that protect altered database data in memory that has not been written to the data files Q51: What are snapshot ? . Ans. ORACLE provides an automatic method for table replication and update called snapshots.Snapshots are read-only copies of a master table located on a remote node. A snapshot can be queried ,but not updated; only the master table can be updated. A snapshot is periodically refreshed to reflect changes made to the master table. Q52: Violated integrity constraint (OWNER.CONSTRAINT) WHY this occurs ? And. When there is master detail relationship between two tables and record is deleted from master table or insert into detail table without inserting the key field in the master table. Q53 :When I create a link between queries, does the link have to be an equi-join And. NO. Q54 :What are the bind parameters ? attribute then relation is in 2nd normal form. constraints

Page 80 of 259

Ans. Bind references are used to replace a single value in SQL or PL/SQL. Specifically, bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH clauses of queries. Binds may not be referenced in the FROM clause. Q55 :What are the name of block which have no base table ? Ans. Control block Q56 :What is a 'Break Group' Ans. A break group is used to create a report in which an identical values in sequential rows is printed only once for its related records. (i.e. A break group divides a query's columns into sets.) Q57: Is there an easy way to have the Odd page numbers appear on the right side of the Report page and the Even Page numbers to appear on the left side of the Report page so when you put the pages together like a book they will appear on the correct side ? Ans. You have to create two fields, one on the right side, one on the left side. In the format trigger of each field, you test if it is an odd or an even page by using SRW.GET_PAGE_NUM. And then, you display or not the field. Q58 :Will the Before Report Trigger be the first trigger fired? It appears so from the order the triggers are listed in the Object Navigator? Ans. No Q59 : Is it possible to upgrade directly from SQL*ReportWriter 1.1 to Reports 2.5 ? Ans. Yes Q60 : Are there any facilities to restart a report that was stopped in the middle of processing for whatever reason? Ans. No Q61 :Is there anyway to programmatically disable the PRINT button in the Previewer ? Ans. Currently this is an enhancement request and is being considered for a future release of the product. Q62 : Is there any way in Reports 2.0 or 2.5 to trap all errors in order to display your own error message, similar to the ON-ERROR and ON-MESSAGE triggers in Forms ? Ans. no Q63 : Is pl/sql support data defination languge Ans. No,but by using sql_dbms package it support the ddl. Q64 :What is name of SQL System Control command Ans. Alter system Q65:lock table is which type of command a)DDL b)DML c)sql transection control command Ans. b)DML Q67 :MONTHS_BETWEEN FUN. RETURN WHICH DATATYPE? a)date b)number c)both Ans. b Q68 :SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') NOW Ans. Q69 :How we write the record in descending order Ans.by using desc Q70 :true or false A table cannot contain more than one LONG column. Ans.true Q71:A table must be in which normalization form Ans.first normal form Q72 :Is there any diff between varchar2 and varchar Ans.no Q73 :Could we multiply or divide the date values Ans.no Q74 :name any charcter operator Ans.concatenation FROM DUAL

Page 81 of 259

Q75: WHAT IS GLB Ans.Returns the greatest lower bound of label. Q76: SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "4-digit year" "4-digit year" FROM DUAL answer is 2017 Q77 :WHY VSIZE USE? Ans.Returns the number of bytes in the internal representation of expr. If expr is null, this function returns null. Q78 :WHY WE USE USERNV Ans. Returns information of VARCHAR2 datatype about the current session. This information can be useful for writing an application-specific audit trail table or for determining the language-specific characters currently used by your session. You cannot use this function in the condition of a CHECK constraint. EXAMPLE: SELECT USERENV('LANGUAGE') "Language" -------------------------AMERICAN_AMERICA.US7ASCII Q79 :WHAT THE USE OF SOUNDEX Ans. Returns a character string containing the phonetic representation of char. This function allows you to compare words that are spelled differently, but sound alike in English. Q80 :IS THERE ANY DIFF BETWEEN OF LIST OF VALUES AND LIST ELEMENTS Ans. :No Q81 :Can YOU replace an LOV's underlying record group with a different record group : Ans. YES BY USING Set_LOV_Property('my_lov',GROUP_NAME,'new_group'); Q82 :How can I change the title of my RUNFORM window ? Ans. Use the following code in you When-New-Form-Instance trigger :Set_Window_Property(FORMS_MDI_WINDOW, TITLE, 'Your Title'); Q83 :How can I dynamically make an entire block query-only at runtime ? Ans.Issue the following : Set_Block_Property('blockname', INSERT_ALLOWED,PROPERTY_OFF); Set_Block_Property('blockname', UPDATE_ALLOWED,PROPERTY_OFF); 84 DATATYPE OF GLOBALS Ans.char Q85 :Is it possible to defer locking of a record until commit time ? Ans.yes Q86 :HOW MANY CODD'S RULE ARE SATISFIED BY ORACLE7.x partially or fully Ans.all the codd's rule are satsfied by oracle 7.x Q87 :WHAT IS THE DIFF BETWEEN PRIMARY KEY AND CANDIDATE KEY Ans. there may be two or more attributes that uniquely identify an instance of an entity set.these attributes or combination of attributes are called candidate key.in such a case we must decide which of the candidate key will be used as primary key.the remaning keys would be considered as alternate key Q88 :WHAT IS THE DIFF BETWEEN RADIO BUTTON AND PUSH BUTTON Ans. a radio button created with radio group, but no group req for creating push button Q89 :What do you understand by metadata? Ans. Description of database is called meta data Q90 :What is third normal form Ans.A relation is said to be in 3rd normal form if there is no functional dependency between non key attributes Q91: What is the minimum value of cache in a sequnce Ans. 2 Q92 :Write the syntax for grant statement Ans.GRANT {object_priv | ALL [PRIVILEGES]} [ (column [, column] ...) ] [, {object_priv | ALL [PRIVILEGES]} [ (column [, column] ...) ] ] ...ON [schema.]object TO {user | role | PUBLIC} [, {user | role | PUBLIC}] ... Q93 :What is the diff between row trigger and statement trigger

Page 82 of 259

Ans. Oracle fires a row trigger once for each row that is affected by the triggering statement and meets the optional trigger constraint defined in the WHEN clause.if you omit this clause, the trigger is a statement trigger. Oracle fires a statement trigger only once when the triggering statement is issued if the optional trigger constraint is met. Q94 : Diff between database trigger and form trigger Ans. Database triggers are defined on a table and stored in the associated database and executed as a result of an insert, update,delete statement being issued against a table.sql*form triggers are fired only when a specific trigger point is executed witin a specific application Q95 :What are control items item Ans. Which have no base table Q96 :Write diff type of library file format Ans. .pll,.plx,.pld Q97 :When creating master detail form which of the master delete property set by default Ans. non-isolated Q98 :What is the default value set for sys date in a form Ans. $$date$$ Q99 :What is the conditon for creating master detail form Ans. Primary key -foreginkey relationship between two bas etable Q100 :What is ballon help Ans.The hint displayed when mouse cursor moves from one push button to another Q101 :In the report 25 type of list of values Ans. Static value,value from a select statement Q102 :Oracle report provides several system parameter two of which are included in the run time parameter formby default what are that Ans. Destination name,destination type Q103 : Which is false a)queries a data model is composed of some or all b)groups c)anchors d)columns Ans: c. Q104 : Write the syntax for creating a trigger Ans. CREATE [OR REPLACE] TRIGGER [schema.]trigger{BEFORE | AFTER} {DELETE | INSERT | UPDATE [OF column [, column] ...]} [OR {DELETE | INSERT | UPDATE [OF column [, column] ...]}] ... ON [schema.]table [ [REFERENCING { OLD [AS] old [NEW [AS] new] | NEW [AS] new [OLD [AS] old] } ] FOR EACH ROW [WHEN (condition)] ] pl/sql_block Q105 :At least how many content canvas view you define for each window in your application. Ans. At least one Q106 : Diff type of locking mode are? Ans. 'Immediate' or 'Delayed'. Q107 : Have a Pre-Record trigger that does: IF ((dynamic-condition-is-true) AND :System.Record_Status = 'NEW') THEN RAISE Form_Trigger_Failure; END IF; what is the result of this--Ans. dynamically prevent the user from entering a new record

Page 83 of 259

Q108 :How can I dynamically make an entire block query-only at runtime ? Ans. Issue the following : Set_Block_Property('blockname', INSERT_ALLOWED,PROPERTY_OFF); Set_Block_Property('blockname', UPDATE_ALLOWED,PROPERTY_OFF); Q109:What exactly does 'Query Hits' and 'Query Options' mean in the context of a block ? Ans. Set_Block_Property(.., QUERY_HITS) lets your ON-COUNT transactional trigger tell Forms how many records the query out the message :"FRM-xxxxx: Query will retrieve nnn record(s)."Getting this property via Get_Block_Property(.., QUERY_HITS) simply returns the number of records that have been retrieved by the query.Get_Block_Property(.., QUERY_OPTIONS) lets your transactional trigger know whether it's supposed to be doing a normal query, a COUNT(*) type query, or a lock record query.

Q110 :What is the difference between the block properties of ARRAY SIZE and RECORDS BUFFERED ? Ans. ARRAY SIZE is the number of records that get fetched each time forms goes to the database. The RECORDS BUFFERED specifies the minimum number of records that should be placed in memory when records are fetched from the database. Even if you specify a low value of 3, the minimum per form is slightly over 300.As more records are brought back from the database (eg records 303-306) they get moved between memory and the file buffer as the user scrolls down. Q111 : Write diff datatypes for a parameter in a form? Ans.Parameters are NUMBER, CHAR, or DATE Q112 : What is the diff between Pre-Query vs. Pre-Select Ans. PRE-QUERY fires just before Forms begins to prepare the SQL statement that will be required to query the appropriate records from the database in response to the query criteria that have been entered into the example record.It is the designers last chance to "deposit" query criteria into the items in the block as if they had been entered into the example record by the operator. PRE-SELECT fires after the PRE-QUERY trigger has fired,and just before the actual, physical construction of the SELECT statement begins. It would typically be used in conjunction with an ON-SELECT trigger in which the designer would be supplanting the normal construction of the SELECT statement with a user exit of his own to construct and prepare the SELECT statement for execution (perhaps against a foreign datasource). Q113 : To store images in the database, you need to read them from the file system in one of the supported standard file formats ,name some of the files? Ans. JFIF,PCX,BMP,TIFF Q114 :How can I determine which user interface I am using at runtime Ans. Issue the builtin Get_Application_Property (USER_INTERFACE).'PICT' Q115 : Will the following query use an index ,given rule based optimization : select distinct city from emp where city not in('new york','boston','dallas') a. Yes b. No Ans. b Q116 : What will the outcome of following command? REVOKE CONNECT FROM MARY a. mary's current session will be disconnected b.mary's account will be dropped c.maty will no longer be able to use the connect privilege d.mary will no longer be able to enable the connect role. category: security And : d. Q117 : Which program is used to verify sql*net v2 connectivity from a window connectivity a. tnsname b.listener b.listener c.orasrv c.orasrv d.tnsping d.tnsping answer is d. Q118 : Which of the following is not a lockmode option for the lock table command a.share update a.share update

Page 84 of 259

b.share row level exclusive c row share d.update Ans: d. Q119 :When you create a new table space ,do the control file increase in size a.yes, b. no Ans b. Q120 : An SCN is a.SOURCE CODE NO b.system contril number c.system change number d.session commit node Ans : C. Q121 : What is the outcoming of following command : a.all succesfull connection to the databases will be recorded audit session b.all unsucessfull connection to the data base are recorded c.all successfull and unsuccesfull connection are recorded d.the command will return an error Ans. c.all successfull and unsuccesfull connection are recorded Q122 :Which data dictionary view records the creation date of table a.D.B.A.-objects b.D.B.A.-tables c.D.B.A.-segments d.D.B.A.-tab-columns Ans: a.D.B.A.-objects Q123 : Place the database creation steps listed below in their proper chronological order: 1.cretae database 2.create tablespace roll_segs.... 3.create rollback segments R_1 table space roll_segs 4.create rollback segments r1 tablespace system 5.alter rollback segment R_1 online Q124 :What is the name of the default user profile? a.default b.user c.connect d.profile Ans: a. Q125 :A large table has all of its records are deleted, and the deletion is commited .to verify that there is no record a.Table was fragmentd into multiple extents.,you perform the following query b.the table have more index on it select count(*) from employee; c.The table has not analyzed since its records had been deleted.But it takes long time to give the result d.The tables highwatermark had not been reset. Ans.d. Q126 :WHICH OF THE FOLLOWING WOULD CAUSE A SHUTDOWN IMMEDIATE TO FAIL? a).a transacton that has just started. b).a user process that is not connected. c).a transection that is in the process of rolling back d).a deadlock between two process. Ans :d. Q127 :Which of the following can you not change after a database has beencreated a.) shared pool size b.)the default no of listener

Page 85 of 259

c.)the no. of control file. d.)the database block size Ans. d. Q128 :Can a database trigger contain a commit. a.yes b.no answer is b. Q129 :Which file does the following listing come from. tcp.db.us.oracle.com=(description=(address_list=(address=(community=tcp.us.oracle.com)(protocol=tcp)(ho st=tcp_server.us.oracle.com)(port=1521)))(connect_data=(sid=oracle7))) a.init.ora b.tnsnames.ora c.config.ora d.listner.ora Ans : b.tnsnames.ora Q130 : Which of the following constraints ,when applied to a table,will automatically create an index? a.foreign key b.check c.unique d.not null Ans: c. Q131 :By default,what is the frquency of commits during an import? a.after each table b.after each 100sec c.after the import complete d.after each user is imported Ans: a. Q132 : What is the default password for the sql*net v2 listner? a.listner b.tnsnames c.oracle d.lsnrctl Ans: a. Q133 :DUAL is a tiny table provide with how many rows and column in it Ans. 1,1 Q134 :SELECT ROUND(99.308,1) FROM DUAL; Ans. 99.3 Q135 :SELECT ROUND(99.308) FROM DUAL; Ans. 99 Q136 :select round(99.308,-1) FROM DUAL; Ans. 100 Q137 :WHAT IS THE DIFF BETWEEN APPEND AND INSERT IN CASE OF SQLLODER? Ans : Append is done if the table have record,but in case of insert the table must be empty. Q138 :HOW MANY DATATYPES CAN BE LOADED USING SQL*LOADER Ans.14 Q139 :$CHMOD 753 MEMO1,EXPLAIN THIS Ans. owner has rwe rights group has re others has we Q140 :To change the ownership which of the commond is used in unix Ans. chown user2 temp Q141 :How to display hidden file in UNIX

Page 86 of 259

Ans. ls -a Q142 : Define entity Ans. entities are distinguishable objects of concern and are modeled using their attributes Q143 : In an E-Rdig what are the meaning of Ans. an entity set is shown in rectangle, the diamond reprent the relationship among the no of entities Q144 :THERE ARE TWO RELATIONS PID name 101 jones 103 smith 104 evan 107 drew 112 smith then result of P INTERSECTION Q IS a. id name 101 jones 103 smith 104 evan 106 bayron 107 drew 112 smith c id name 106 bayron ans b Q145 :HOW TO CONVERT A VALUE OF CHAR DATATYPE TO DATE DATATYPE Ans. TO_DATE(char [, fmt [, 'nlsparams'] ]) Q146 :WHAT IS FUNCTIONAL DEPENDANCY ?given two sets of attributes X AND Y Ans. Y is said to be functionally dependent on X if a given value for each attribute in X detrmines the value of the attribute Y. Q147 :WHAT IS THE Btitle Ans. Set the bottam title for each page of a report. Q148 :Oracle Forms supplies how many triggers? Ans. About 80 triggers Q149 :Name any five form level triggers only Ans. when -timer-expierd when-new-form-instancre when-window-activate when-window-close when-form-navigate Q150 :What is parse option? Ans. Converts the text file format of a module (.FMT, .MMT, .PLD) to a binary format (.FMB, .MMB, .PLL). Q151 :What is control block Ans. which have no base table Q152 :CEIL(4*3*(12-1)+12*9+7*(55-12*4)/11) Ans. 245 Q153 :What is DDBMS ? Ans. Distributed data base management system Q154 :WHAT IS LOGICAL DATAINDEPEDENCY

Page 87 of 259

Ans. The conceptual schema can be changed withot affecting the existing external schema. Q155 :WHAT IS SUPER KEY? Ans. IF WE ADD AN ADDITIONAL ATTRIBUTE TO A PRIMARY KEY THEN THE RESULTING COMBINATION IS AGAIN A PRIMARY KEY.SUCH A KEY IS CALLED SUPER KEY. Q156 :WHAT IS UWA? Ans. IT IS USER WORK AREA Q157 :WHAT ARE VIRTUAL FIELD Ans. UNLIKE A REAL FIELD A VIRTUAL FIELD CANNOT MODIFIED BY USER. e.g age: depend upon date of birth and todays date. Q158 :what is the diff between execute-query and execute-query(no-validate) Q159 :What is deadlock? Ans. A deadlock is a situation that can occur in multi-user systems that causes some number of transactions to be unable to continue work.A deadlock can occur when two or more users are waiting for data locked by each other. It typically happens when each of two or more users are waiting to access a resource that another user has already locked. Q160 :UPDATE emp 1 SET sal = sal*1.1 WHERE empno = 1000; UPDATE emp 2 SET sal = sal*1.1 WHERE empno = 2000; WHAT IS THE RESULT OF TIME POINT2 Ans : deadlock Q161 :WHAT IS BOM IN AN ERP Ans. Bill of material Q162 :WHAT IS THE ORDER OF FIRING THE TRIGGERS IN A FORM Ans. form----->block------->item Q163 :WHAT IS THE use of grep command in UNIX Ans. To search for a pattern in a file. Q164 :Why we use wc -c in UNIX Ans. Counts only the characters in the file. Q165 :ORACLE 6 FOLLOWS HOW MANY CODD'S RULE Ans. Seven Q166 :INPUT DATA 7456123.89 SPECIFIED AS NUMBER(6) STORED AS ? Ans.(not accepted, exceeds precision) Q167 :WHAT IS LGWR? Ans. Log Writer PROCESS Q168 :WHAT IS THE PMON ? Ans. Process Monitor Q169 :WHAT IS VIRTUAL MEMORY Ans. On many operating systems, ORACLE takes advantage of virtual memory.Virtual memory is an operating system feature which offers more apparent memory than is provided by real memory alone and more flexibility in using main memory.Virtual memory simulates memory using a combination of real(main) memory and secondary storage (usually disk space).The operating system accesses virtual memory by making secondary storage look like main memory to application Q170 :SELECT COUNT(DISTINCT(SUBSTR(ROWID,1,8)||SUBSTR(ROWID,15,4)) a.the number of rows in the employee table FROM EMPLOYEE; b.the no of blocks used by employee table WHAT WILL BE THE RESULT OF THE QUERY? c.the no of extent in the employee table d.the no of block allocated to the employee table Ans: b. Q171 :Reload is the option for which of the following utilities a.sqlload b.lsnrctl c.import d.sqldba

Page 88 of 259

Ans: b. Q172 :Which of the following privileges can not be granted to a role a.create session b.unlimited tablespace c.insert any table d.analyze any Ans :b Q173 :Which of the background process periodically coalesces free space in the table a.smon b.pmon c.imon d.fmon Ans :a . Q174 :Which of the foloowing is not apart of create index statment? a.pctfree b.pctused c.initrans d.freelist Ans: b. Q175 : An index corrosponds to a table from which many record are being deleted .to reclaim or reuse a.alter the index to decrese pctused to 20 space used by the deleted index rows,which action would be best? b.alter the index to increase pctused c.alter the index to increse next d.drop and recreate the index Ans:d. Q176 :What is virtual table? Ans. A view is defined using a query, and can thus be thought of as a "stored query" or a "virtual table." Views can be used in most places where a table can be used. Q177 : What is sys. Ans. All base tables and user accessible views of the data dictionary are owned by the ORACLE user SYS. Therefore,no ORACLE user should ever alter any object contained in the SYS schema and the security administrator should keep strict control of this central account Q178 :What is the diff between V$ AND V_$ Ans. The dynamic performance tables are owned by SYS and their name is all begin with V_$. Views are created on these tables, and then synonyms are created for the views. The synonym names begin with V$. Q179 :WHAT IS DATABASE AND DATABASE MANAGEMENT SYSTEM Ans. The integrated collection of related files is called database, dbms is the software system that allow access to data contained in a database. Q180 :DEFINE TWO DISTICT LEVEL OF DATA INDEPENDENCY Ans. logical data independency and physical data independency Q181 :NAMED DIFF TYPES OF RELATIONSHIPS IN THE SETS/ Ans. 1:1 ,1:m ,m:n Q182 :What are weak entity? Ans. ENTITES WHICH ARE THE PART OF AN ENTITES e,.g employee in atble is an entity but dependents of an emp are weak entity Q183 :Name two phase in two phase commit? Ans. prepare phase Commit phase Q184 :The two-phase commit mechanism is only used if a transaction contains a.DML B.DDL C.remote procedure call that references a remote object using its global object name which of the above is false? Ans: b.

Page 89 of 259

Q185 :What is pseudo code? Ans. pseudo code (P code)The PL/SQL compiler generates the pseudocode, or P code,based on the or p code ,based on the parsed code. The PL/SQL engine executes this when the procedure or package is invoked. Q186 :What is RR FORMAT Ans. The RR date format element is similar to the YY date format element,but it provides additional flexibility for storing date values in other centuries. The RR date format element allows you to store twenty-first century dates in the twentieth century by specifying only the last two digits of the year. It will also allow you to store twentieth century dates in the twenty-first century in the same way if necessary. Q187 :IS THERE ANY DIFF BETWEEN DATABASE TABLE AND PL/SQL TABLE?' Ans. PL/SQL tables can have one column and a primary key, neither of which can be named.The column can belong to any scalar type, but the primary key must belong to type BINARY_INTEGER. Q188 :WHAT ARE Lexical Units Ans. A line of PL/SQL text contains groups of characters known as lexical units, Q189 :NAME DIFF SQL COMMANDS? Ans. * Data Definition Language commands * Data Manipulation Language commands * Transaction Control commands * Session Control commands * System Control commands Q190 :Write an experssion for decode? Ans. DECODE( expr, search, result [, search, result] ... [, default] ) 191 SELECT TO_CHAR(17145,'L099G999','NLS_NUMERIC_CHARACTERS = ".," NLS_CURRENCY = "AUD" ') "Char" FROM DUAL write result of it ? Ans.AUD017,145 Q192 :What is radio group? Ans. A radio group is an interface control that displays a fixed number of options that are mutually exclusive.Each option is represented by an individual radio button. Q193 :Write diff between post_form_commit and post_ database_commit Ans :POST-FORMSCOMMIT is the renamed version of POST-COMMIT from V3. It fires as the last trigger which is still part of the current transaction during commit-time processing (ie before the actual 'COMMIT' has been issued).The POST-DATABASE-COMMIT triggers fires just after the 'COMMIT' statement is issued by forms to close the current transaction. Q194 :Write diff alert style? Ans. stop,note,caution Q195 :What is the default value for alert style? Ans. Stop Q196 :What is the default value of menu style in a form Ans. pull_down Q197 :Access key property applied to which type of item type? Ans. :button,radio button,check box Q198 :ON-FETCH IS ITEM LEVEL TRIGGER ALSO TRUE OR FALSE Ans. FALSE Q199 :WRITE SYNTAX FOR GENERATING modules IN THE UNIX MODE ? Ans. Generate Module=<formname> Userid=<userid/password> [Parameters]. Q200 :Source code of UNIX is written in which language? Ans. C Q51: What are snapshot ? . Ans. ORACLE provides an automatic method for table replication and update called snapshots.Snapshots are read-only copies of a master table located on a remote node. A snapshot can be queried ,but not updated; only the master table can be updated. A snapshot is periodically refreshed to reflect changes made to the master table.

Page 90 of 259

Q52: Violated integrity constraint (OWNER.CONSTRAINT) WHY this occurs ? And. When there is master detail relationship between two tables and record is deleted from master table or insert into detail table without inserting the key field in the master table. Q53 :When I create a link between queries, does the link have to be an equi-join And. NO. Q54 :What are the bind parameters ? Ans. Bind references are used to replace a single value in SQL or PL/SQL. Specifically, bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH clauses of queries. Binds may not be referenced in the FROM clause. Q55 :What are the name of block which have no base table ? Ans. Control block Q56 :What is a 'Break Group' Ans. A break group is used to create a report in which an identical values in sequential rows is printed only once for its related records. (i.e. A break group divides a query's columns into sets.) Q57: Is there an easy way to have the Odd page numbers appear on the right side of the Report page and the Even Page numbers to appear on the left side of the Report page so when you put the pages together like a book they will appear on the correct side ? Ans. You have to create two fields, one on the right side, one on the left side. In the format trigger of each field, you test if it is an odd or an even page by using SRW.GET_PAGE_NUM. And then, you display or not the field. Q58 :Will the Before Report Trigger be the first trigger fired? It appears so from the order the triggers are listed in the Object Navigator? Ans. No Q59 : Is it possible to upgrade directly from SQL*ReportWriter 1.1 to Reports 2.5 ? Ans. Yes Q60 : Are there any facilities to restart a report that was stopped in the middle of processing for whatever reason? Ans. No Q61 :Is there anyway to programmatically disable the PRINT button in the Previewer ? Ans. Currently this is an enhancement request and is being considered for a future release of the product. Q62 : Is there any way in Reports 2.0 or 2.5 to trap all errors in order to display your own error message, similar to the ON-ERROR and ON-MESSAGE triggers in Forms ? Ans. no Q63 : Is pl/sql support data defination languge Ans. No,but by using sql_dbms package it support the ddl. Q64 :What is name of SQL System Control command Ans. Alter system Q65:lock table is which type of command a)DDL b)DML c)sql transection control command Ans. b)DML Q67 :MONTHS_BETWEEN FUN. RETURN WHICH DATATYPE? a)date b)number c)both Ans. b Q68 :SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') NOW Ans. Q69 :How we write the record in descending order Ans.by using desc Q70 :true or false A table cannot contain more than one LONG column. Ans.true Q71:A table must be in which normalization form Ans.first normal form Q72 :Is there any diff between varchar2 and varchar FROM DUAL

Page 91 of 259

Ans.no Q73 :Could we multiply or divide the date values Ans.no Q74 :name any charcter operator Ans.concatenation Q75: WHAT IS GLB Ans.Returns the greatest lower bound of label. Q76: SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "4-digit year" "4-digit year" FROM DUAL answer is 2017 Q77 :WHY VSIZE USE? Ans.Returns the number of bytes in the internal representation of expr. If expr is null, this function returns null. Q78 :WHY WE USE USERNV Ans. Returns information of VARCHAR2 datatype about the current session. This information can be useful for writing an application-specific audit trail table or for determining the language-specific characters currently used by your session. You cannot use this function in the condition of a CHECK constraint. EXAMPLE: SELECT USERENV('LANGUAGE') "Language" -------------------------AMERICAN_AMERICA.US7ASCII Q79 :WHAT THE USE OF SOUNDEX Ans. Returns a character string containing the phonetic representation of char. This function allows you to compare words that are spelled differently, but sound alike in English. Q80 :IS THERE ANY DIFF BETWEEN OF LIST OF VALUES AND LIST ELEMENTS Ans. :No Q81 :Can YOU replace an LOV's underlying record group with a different record group : Ans. YES BY USING Set_LOV_Property('my_lov',GROUP_NAME,'new_group'); Q82 :How can I change the title of my RUNFORM window ? Ans. Use the following code in you When-New-Form-Instance trigger :Set_Window_Property(FORMS_MDI_WINDOW, TITLE, 'Your Title'); Q83 :How can I dynamically make an entire block query-only at runtime ? Ans.Issue the following : Set_Block_Property('blockname', INSERT_ALLOWED,PROPERTY_OFF); Set_Block_Property('blockname', UPDATE_ALLOWED,PROPERTY_OFF); 84 DATATYPE OF GLOBALS Ans.char Q85 :Is it possible to defer locking of a record until commit time ? Ans.yes Q86 :HOW MANY CODD'S RULE ARE SATISFIED BY ORACLE7.x partially or fully Ans.all the codd's rule are satsfied by oracle 7.x Q87 :WHAT IS THE DIFF BETWEEN PRIMARY KEY AND CANDIDATE KEY Ans. there may be two or more attributes that uniquely identify an instance of an entity set.these attributes or combination of attributes are called candidate key.in such a case we must decide which of the candidate key will be used as primary key.the remaning keys would be considered as alternate key Q88 :WHAT IS THE DIFF BETWEEN RADIO BUTTON AND PUSH BUTTON Ans. a radio button created with radio group, but no group req for creating push button Q89 :What do you understand by metadata? Ans. Description of database is called meta data Q90 :What is third normal form Ans.A relation is said to be in 3rd normal form if there is no functional dependency between non key attributes Q91: What is the minimum value of cache in a sequnce Ans. 2 Q92 :Write the syntax for grant statement

Page 92 of 259

Ans.GRANT {object_priv | ALL [PRIVILEGES]} [ (column [, column] ...) ] [, {object_priv | ALL [PRIVILEGES]} [ (column [, column] ...) ] ] ...ON [schema.]object TO {user | role | PUBLIC} [, {user | role | PUBLIC}] ... Q93 :What is the diff between row trigger and statement trigger Ans. Oracle fires a row trigger once for each row that is affected by the triggering statement and meets the optional trigger constraint defined in the WHEN clause.if you omit this clause, the trigger is a statement trigger. Oracle fires a statement trigger only once when the triggering statement is issued if the optional trigger constraint is met. Q94 : Diff between database trigger and form trigger Ans. Database triggers are defined on a table and stored in the associated database and executed as a result of an insert, update,delete statement being issued against a table.sql*form triggers are fired only when a specific trigger point is executed witin a specific application Q95 :What are control items item Ans. Which have no base table Q96 :Write diff type of library file format Ans. .pll,.plx,.pld Q97 :When creating master detail form which of the master delete property set by default Ans. non-isolated Q98 :What is the default value set for sys date in a form Ans. $$date$$ Q99 :What is the conditon for creating master detail form Ans. Primary key -foreginkey relationship between two base table Q100 :What is ballon help Ans.The hint displayed when mouse cursor moves from one push button to another Q101 :In the report 25 type of list of values Ans. Static value,value from a select statement Q102 :Oracle report provides several system parameter two of which are included in the run time parameter formby default what are that Ans. Destination name,destination type Q103 : Which is false a)queries a data model is composed of some or all b)groups c)anchors d)columns Ans: c. Q104 : Write the syntax for creating a trigger Ans. CREATE [OR REPLACE] TRIGGER [schema.]trigger{BEFORE | AFTER} {DELETE | INSERT | UPDATE [OF column [, column] ...]} [OR {DELETE | INSERT | UPDATE [OF column [, column] ...]}] ... ON [schema.]table [ [REFERENCING { OLD [AS] old [NEW [AS] new] | NEW [AS] new [OLD [AS] old] } ] FOR EACH ROW [WHEN (condition)] ] pl/sql_block Q105 :At least how many content canvas view you define for each window in your application. Ans. At least one Q106 : Diff type of locking mode are? Ans. 'Immediate' or 'Delayed'. Q107 : Have a Pre-Record trigger that does: IF ((dynamic-condition-is-true) AND :System.Record_Status = 'NEW')

Page 93 of 259

THEN RAISE Form_Trigger_Failure; END IF; what is the result of this--Ans. dynamically prevent the user from entering a new record Q108 :How can I dynamically make an entire block query-only at runtime ? Ans. Issue the following : Set_Block_Property('blockname', INSERT_ALLOWED,PROPERTY_OFF); Set_Block_Property('blockname', UPDATE_ALLOWED,PROPERTY_OFF); Q109:What exactly does 'Query Hits' and 'Query Options' mean in the context of a block ? Ans. Set_Block_Property(.., QUERY_HITS) lets your ON-COUNT transactional trigger tell Forms how many records the query out the message :"FRM-xxxxx: Query will retrieve nnn record(s)."Getting this property via Get_Block_Property(.., QUERY_HITS) simply returns the number of records that have been retrieved by the query.Get_Block_Property(.., QUERY_OPTIONS) lets your transactional trigger know whether it's supposed to be doing a normal query, a COUNT(*) type query, or a lock record query.

Q110 :What is the difference between the block properties of ARRAY SIZE and RECORDS BUFFERED ? Ans. ARRAY SIZE is the number of records that get fetched each time forms goes to the database. The RECORDS BUFFERED specifies the minimum number of records that should be placed in memory when records are fetched from the database. Even if you specify a low value of 3, the minimum per form is slightly over 300.As more records are brought back from the database (eg records 303-306) they get moved between memory and the file buffer as the user scrolls down. Q111 : Write diff datatypes for a parameter in a form? Ans.Parameters are NUMBER, CHAR, or DATE Q112 : What is the diff between Pre-Query vs. Pre-Select Ans. PRE-QUERY fires just before Forms begins to prepare the SQL statement that will be required to query the appropriate records from the database in response to the query criteria that have been entered into the example record.It is the designers last chance to "deposit" query criteria into the items in the block as if they had been entered into the example record by the operator. PRE-SELECT fires after the PRE-QUERY trigger has fired,and just before the actual, physical construction of the SELECT statement begins. It would typically be used in conjunction with an ON-SELECT trigger in which the designer would be supplanting the normal construction of the SELECT statement with a user exit of his own to construct and prepare the SELECT statement for execution (perhaps against a foreign datasource). Q113 : To store images in the database, you need to read them from the file system in one of the supported standard file formats ,name some of the files? Ans. JFIF,PCX,BMP,TIFF Q114 :How can I determine which user interface I am using at runtime Ans. Issue the builtin Get_Application_Property (USER_INTERFACE).'PICT' Q115 : Will the following query use an index ,given rule based optimization : select distinct city from emp where city not in('new york','boston','dallas') a. Yes b. No Ans. b Q116 : What will the outcome of following command? REVOKE CONNECT FROM MARY a. mary's current session will be disconnected b.mary's account will be dropped c.maty will no longer be able to use the connect privilege d.mary will no longer be able to enable the connect role. category: security And : d. Q117 : Which program is used to verify sql*net v2 connectivity from a window connectivity a. tnsname b.listener b.listener c.orasrv c.orasrv d.tnsping

Page 94 of 259

d.tnsping answer is d. Q118 : Which of the following is not a lockmode option for the lock table command a.share update a.share update b.share row level exclusive c row share d.update Ans: d. Q119 :When you create a new table space ,do the control file increase in size a.yes, b. no Ans b. Q120 : An SCN is a.SOURCE CODE NO b.system contril number c.system change number d.session commit node Ans : C. Q121 : What is the outcoming of following command : a.all succesfull connection to the databases will be recorded audit session b.all unsucessfull connection to the data base are recorded c.all successfull and unsuccesfull connection are recorded d.the command will return an error Ans. c.all successfull and unsuccesfull connection are recorded Q122 :Which data dictionary view records the creation date of table a.D.B.A.-objects b.D.B.A.-tables c.D.B.A.-segments d.D.B.A.-tab-columns Ans: a.D.B.A.-objects Q123 : Place the database creation steps listed below in their proper chronological order: 1.cretae database 2.create tablespace roll_segs.... 3.create rollback segments R_1 table space roll_segs 4.create rollback segments r1 tablespace system 5.alter rollback segment R_1 online Q124 :What is the name of the default user profile? a.default b.user c.connect d.profile Ans: a. Q125 :A large table has all of its records are deleted, and the deletion is commited .to verify that there is no record a.Table was fragmentd into multiple extents.,you perform the following query b.the table have more index on it select count(*) from employee; c.The table has not analyzed since its records had been deleted.But it takes long time to give the result d.The tables highwatermark had not been reset. Ans.d. Q126 :WHICH OF THE FOLLOWING WOULD CASUSE A SHUTDOWN IMMEDIATE TO FAIL? a).a transacton that has just started. b).a user process that is not connected. c).a transection that is in the process of rolling back d).a deadlock between two process. Ans :d.

Page 95 of 259

Q127 :Which of the following can you not change after a database has beencreated a.) shared pool size b.)the default no of listener c.)the no. of control file. d.)the database block size Ans. d. Q128 :Can a database trigger contain a commit. a.yes b.no answer is b. Q129 :Which file does the following listing come from. tcp.db.us.oracle.com=(description=(address_list=(address=(community=tcp.us.oracle.com)(protocol=tcp)(ho st=tcp_server.us.oracle.com)(port=1521)))(connect_data=(sid=oracle7))) a.init.ora b.tnsnames.ora c.config.ora d.listner.ora Ans : b.tnsnames.ora Q130 : Which of the following constraints ,when applied to a table,will automatically create an index? a.foreign key b.check c.unique d.not null Ans: c. Q131 :By default,what is the frquency of commits during an import? a.after each table b.after each 100sec c.after the import complete d.after each user is imported Ans: a. Q132 : What is the default password for the sql*net v2 listner? a.listner b.tnsnames c.oracle d.lsnrctl Ans: a. Q133 :DUAL is a tiny table provide with how many rows and column in it Ans. 1,1 Q134 :SELECT ROUND(99.308,1) FROM DUAL; Ans. 99.3 Q135 :SELECT ROUND(99.308) FROM DUAL; Ans. 99 Q136 :select round(99.308,-1) FROM DUAL; Ans. 100 Q137 :WHAT IS THE DIFF BETWEEN APPEND AND INSERT IN CASE OF SQLLODER? Ans : Append is done if the table have record,but in case of insert the table must be empty. Q138 :HOW MANY DATATYPES CAN BE LOADED USING SQL*LOADER Ans.14 Q139 :$CHMOD 753 MEMO1,EXPLAIN THIS Ans. owner has rwe rights group has re others has we

Page 96 of 259

Q140 :To change the ownership which of the commond is used in unix Ans. chown user2 temp Q141 :How to display hidden file in UNIX Ans. ls -a Q142 : Define entity Ans. entities are distinguishable objects of concern and are modeled using their attributes Q143 : In an E-Rdig what are the meaning of Ans. an entity set is shown in rectangle, the diamond reprent the relationship among the no of entities Q144 :THERE ARE TWO RELATIONS PID name 101 jones 103 smith 104 evan 107 drew 112 smith then result of P INTERSECTION Q IS a. id name 101 jones 103 smith 104 evan 106 bayron 107 drew 112 smith c id name 106 bayron ans b Q145 :HOW TO CONVERT A VALUE OF CHAR DATATYPE TO DATE DATATYPE Ans. TO_DATE(char [, fmt [, 'nlsparams'] ]) Q146 :WHAT IS FUNCTIONAL DEPENDANCY ?given two sets of attributes X AND Y Ans. Y is said to be functionally dependent on X if a given value for each attribute in X detrmines the value of the attribute Y. Q147 :WHAT IS THE Btitle Ans. Set the bottam title for each page of a report. Q148 :Oracle Forms supplies how many triggers? Ans. About 80 triggers Q149 :Name any five form level triggers only Ans. when -timer-expierd when-new-form-instancre when-window-activate when-window-close when-form-navigate Q150 :What is parse option? Ans. Converts the text file format of a module (.FMT, .MMT, .PLD) to a binary format (.FMB, .MMB, .PLL). Q151 :What is control block Ans. which have no base table Q152 :CEIL(4*3*(12-1)+12*9+7*(55-12*4)/11) Ans. 245

Page 97 of 259

Q153: What is DDBMS ? Ans. Distributed database management system Q154: WHAT IS LOGICAL DATAINDEPEDENCY Ans. The conceptual schema can be changed withot affecting the existing external schema. Q155: WHAT IS SUPER KEY? Ans. IF WE ADD AN ADDITIONAL ATTRIBUTE TO A PRIMARY KEY THEN THE RESULTING COMBINATION IS AGAIN A PRIMARY KEY.SUCH A KEY IS CALLED SUPER KEY. Q156: WHAT IS UWA? Ans. IT IS USER WORK AREA Q157 :WHAT ARE VIRTUAL FIELD Ans. UNLIKE A REAL FIELD A VIRTUAL FIELD CANNOT MODIFIED BY USER. e.g age: depend upon date of birth and todays date. Q158 :what is the diff between execute-query and execute-query(no-validate) Q159 :What is deadlock? Ans. A deadlock is a situation that can occur in multi-user systems that causes some number of transactions to be unable to continue work. A deadlock can occur when two or more users are waiting for data locked by each other. It typically happens when each of two or more users are waiting to access a resource that another user has already locked. Q160 :UPDATE emp 1 SET sal = sal*1.1 WHERE empno = 1000; UPDATE emp 2 SET sal = sal*1.1 WHERE empno = 2000; WHAT IS THE RESULT OF TIME POINT2 Ans : deadlock Q161 :WHAT IS BOM IN AN ERP Ans. Bill of material Q162 :WHAT IS THE ORDER OF FIRING THE TRIGGERS IN A FORM Ans. form----->block------->item Q163: WHAT IS THE use of grep command in UNIX Ans. To search for a pattern in a file. Q164 :Why we use wc -c in UNIX Ans. Counts only the characters in the file. Q165: ORACLE 6 FOLLOWS HOW MANY CODD'S RULE Ans. Seven Q166: INPUT DATA 7456123.89 SPECIFIED AS NUMBER(6) STORED AS ? Ans.(not accepted, exceeds precision) Q167: WHAT IS LGWR? Ans. Log Writer PROCESS Q168: WHAT IS THE PMON ? Ans. Process Monitor Q169: WHAT IS VIRTUAL MEMORY Ans. On many operating systems, ORACLE takes advantage of virtual memory.Virtual memory is an operating system feature which offers more apparent memory than is provided by real memory alone and more flexibility in using main memory.Virtual memory simulates memory using a combination of real(main) memory and secondary storage (usually disk space).The operating system accesses virtual memory by making secondary storage look like main memory to application Q170: SELECT COUNT(DISTINCT(SUBSTR(ROWID,1,8)|| SUBSTR (ROWID,15,4)) a. The number of rows in the employee table FROM EMPLOYEE; b. He no of blocks used by employee table WHAT WILL BE THE RESULT OF THE QUERY? c. The no of extent in the employee table d. The no of block allocated to the employee table Ans: b. Q171 :Reload is the option for which of the following utilities

Page 98 of 259

a.sqlload b.lsnrctl c.import d.sqldba Ans: b. Q172 :Which of the following privileges can not be granted to a role a.create session b.unlimited tablespace c.insert any table d.analyze any Ans :b Q173 :Which of the background process periodically coalesces free space in the table a.smon b.pmon c.imon d.fmon Ans :a . Q174 :Which of the foloowing is not apart of create index statment? a.pctfree b.pctused c.initrans d.freelist Ans: b. Q175 : An index corresponds to a table from which many record are being deleted .to reclaim or reuse a. Alter the index to decrease pctused to 20 space used by the deleted index rows,which action would be best? b. Alter the index to increase pctused c. Alter the index to increase next d. Drop and recreate the index Ans:d. Q176 :What is virtual table? Ans. A view is defined using a query, and can thus be thought of as a "stored query" or a "virtual table." Views can be used in most places where a table can be used. Q177 : What is sys. Ans. All base tables and user accessible views of the data dictionary are owned by the ORACLE user SYS. Therefore,no ORACLE user should ever alter any object contained in the SYS schema and the security administrator should keep strict control of this central account Q178 :What is the diff between V$ AND V_$ Ans. The dynamic performance tables are owned by SYS and their name is all begin with V_$. Views are created on these tables, and then synonyms are created for the views. The synonym names begin with V$. Q179 :WHAT IS DATABASE AND DATABASE MANAGEMENT SYSTEM Ans. The integrated collection of related files is called database, dbms is the software system that allow access to data contained in a database. Q180 :DEFINE TWO DISTICT LEVEL OF DATA INDEPENDENCY Ans. logical data independency and physical data independency Q181 :NAMED DIFF TYPES OF RELATIONSHIPS IN THE SETS/ Ans. 1:1 ,1:m ,m:n Q182 :What are weak entity? Ans. ENTITES WHICH ARE THE PART OF AN ENTITES e,.g employee in atble is an entity but dependents of an emp are weak entity Q183 :Name two phase in two phase commit? Ans. prepare phase Commit phase Q184 :The two-phase commit mechanism is only used if a transaction contains a.DML B.DDL

Page 99 of 259

C.remote procedure call that references a remote object using its global object name which of the above is false? Ans: b. Q185 :What is pseudo code? Ans. pseudo code (P code)The PL/SQL compiler generates the pseudocode, or P code,based on the or p code ,based on the parsed code. The PL/SQL engine executes this when the procedure or package is invoked. Q186 :What is RR FORMAT Ans. The RR date format element is similar to the YY date format element,but it provides additional flexibility for storing date values in other centuries. The RR date format element allows you to store twenty-first century dates in the twentieth century by specifying only the last two digits of the year. It will also allow you to store twentieth century dates in the twenty-first century in the same way if necessary. Q187 :IS THERE ANY DIFF BETWEEN DATABASE TABLE AND PL/SQL TABLE?' Ans. PL/SQL tables can have one column and a primary key, neither of which can be named.The column can belong to any scalar type, but the primary key must belong to type BINARY_INTEGER. Q188 :WHAT ARE Lexical Units Ans. A line of PL/SQL text contains groups of characters known as lexical units, Q189: NAME DIFF SQL COMMANDS? Ans. * Data Definition Language commands * Data Manipulation Language commands * Transaction Control commands * Session Control commands * System Control commands Q190 :Write an experssion for decode? Ans. DECODE( expr, search, result [, search, result] ... [, default] ) 191 SELECT TO_CHAR(17145,'L099G999','NLS_NUMERIC_CHARACTERS = ".," NLS_CURRENCY = "AUD" ') "Char" FROM DUAL write result of it ? Ans.AUD017,145 Q192 :What is radio group? Ans. A radio group is an interface control that displays a fixed number of options that are mutually exclusive.Each option is represented by an individual radio button. Q193 :Write diff between post_form_commit and post_ database_commit Ans :POST-FORMSCOMMIT is the renamed version of POST-COMMIT from V3. It fires as the last trigger which is still part of the current transaction during commit-time processing (ie before the actual 'COMMIT' has been issued).The POST-DATABASE-COMMIT triggers fires just after the 'COMMIT' statement is issued by forms to close the current transaction. Q194 :Write diff alert style? Ans. stop,note,caution Q195 :What is the default value for alert style? Ans. Stop Q196 :What is the default value of menu style in a form Ans. pull_down Q197 :Access key property applied to which type of item type? Ans. :button,radio button,check box Q198 :ON-FETCH IS ITEM LEVEL TRIGGER ALSO TRUE OR FALSE Ans. FALSE Q199 :WRITE SYNTAX FOR GENERATING modules IN THE UNIX MODE ? Ans. Generate Module = <formname> Userid = <userid/password> [Parameters]. Q200: Source code of UNIX is written in which language? Ans. C

Page 100 of 259

Oracle apps technical document 1) What is ERP? Architecture of apps? A packaged business software system that lets a company automate and integrate the majority of its business processes; share common data and practices across the enterprise; [and] produce and access information in a real-time environment. 2) Tell me some thing about SQL-LOADER. Sql * loader is a bulk loader utility used for moving data from external files into the oracle database. Sql * loader supports various load formats, selective loading, and multi-tables loads. 1) conventional --The conventional path loader essentially loads the data by using standard insert statement. 2) direct -- the direct path loader (direct = true) by possess of logic involved with that, and loads directly in to the oracle data files. EX:My data.csv file 1001, scott tiger,1000,40 1002,gvreddy,2345,50 Load data Infile c:\data\mydata.csv Into table emp Fields terminated by , optionally enclosed by (empno, empname,sal,deptno) >sqlldr scott/tiger@vis control=loader.ctl log= gvlog.log bad=gvbad.bad discard=gvdis.dsc . 3) how do u dump data from pl/sql block to flat files? Using utl_file package, we can dump data from pl/sql block to flat file. PRE-REQUIREMENTS for UTL_FILE is specify the accessible directories for the UTL_FILE function in the initialization file (INIT.ORA) Using the UTL_FILE_DIR parameters. Ex: UTL_FILE_DIR = <Directory name> EX:--remember to update INITSID.ORA, --utl_file_dir = c:\oradata Declare Fp utl_file.file_type; Begin Fp := utl_file.fopen(c:\oradata,tab1.txt,w); Utl_file.putf(fp,%s %s \n text field, 55); Utl_file.fclose(fp); End; 4) What is SET-OF-BOOKS? Collection of Chat of Accounts and Currency and Calendars is called SOB 5) What is the interface?

Page 101 of 259

Interface Table is a table, which is used as medium for transfer of data between two systems. 6) 7) What is invoice? Send you a request for payment What is INBOUND and OUT BOUND? (Different types of interfaces) Inbound Interface: For inbound interfaces, where these products are the destination, interface tables as well as supporting validation, processing, and maintenance programs are provided.

Outbound Interface: For outbound interfaces, where these products are the source, database views are provided and the destination application should provide the validation, processing, and maintenance programs 8) Tell me what r the Base tables in the AR? hz_parties (party_id) (store info about org, groups and people) HZ_PARTIES stores information about parties such as organizations, people, and groups, including the identifying address information for the party. hz_cust_accounts (cust_account_id) HZ_CUST_ACCOUNTS stores information about customer relationships. If a party becomes a customer, information about the customer account is stored in this table. You can establish multiplecustomer relationships with a single party, so each party can have multiple customer account records in this table. hz_cust_acct_sites_all (cust_acct_site_id) HZ_CUST_ACCT_SITES_ALL stores information about customer sites.One customer account can have multiple sites. The address is maintained in HZ_LOCATIONS. hz_cust_site_uses_all (site_use_id) HZ_CUST_SITE_USES_ALL stores information about site uses or business purposes. A single customer site can have multiple site uses, such as bill to or ship to, and each site use is stored as a record in this table. hz_party_sites (party_site_id) HZ_PARTY_SITES stores information about the relationship between Parties and Locations. The same party can have multiple party sites.Physical addresses are stored in HZ_LOCATIONS. hz_locations (location_id) HZ_LOCATIONS stores information about physical locations. hz_Person_Profiles (person_profile_id) HZ_PERSON_PROFILES stores detail information about people. hz_Organization_Profiles (organization_profile_id) HZ_ORGANIZATION_PROFILES stores credit rating, financial statistics, socioeconomic and corporate linkage information for business sites. The primary key for this table is ORGANIZATION_PROFILE_ID.

9)

What r the tables interface tables in the customer interface tables? 1) Ra_customers_interface_all

Page 102 of 259

This table stores customer, address, and business purpose information. You do not have to enter values in this table if you do not want to import customers, addresses, or business purposes. ADDRESS1 through 4 Enter the address for your customer in these four columns. You can enter up to four lines of an address. Validation: If you enter a value in ORIG_SYSTEM_ADDRESS_REF, you must enter a value in ADDRESS1. For multiple rows with the same address reference, insert values in address 14. Destination: HZ_LOCATIONS.ADDRESS1, HZ_LOCATIONS.ADDRESS2, HZ_LOCATIONS.ADDRESS3, HZ_LOCATIONS.ADDRESS4

2) Ra_customer_profile_int_all A customer level profile must exist in A_CUSTOMER_PROFILES_INTERFACE for new customers and each billto business purpose. 3) Ra_contact_phones_int_all This table stores telephone numbers for customers, addresses and contacts as well as contacts for customers and addresses. 4) Ra_customer_banks_int_all This table stores bank information for a customer or for a specific BillTo address, you must enter a bank account for this customer, 5) Ra_cust_paymethod_int_all To import payment methods for customers and billto business purposes, 10) What r the staging tables in the customer interface? Ra_customers_stg Ra_customers_address_stg Ra_customers_point_stg Ra_customers_contact points_stg Ra_customers_relate_stg Ra_customer_error. 11) Tell me some mandatory columns in the customer interface tables? a) Ra_customers_interface_all 1) Orig_system_customer_ref 2) insert_update_flag 3) customer_number 4) customer_status 5)last_updated_by 6) last_updated_date 7)created_by 8) creation_date. b) Ra_customer_profile_int_all 1) customer_profile_class_name c) Ra_contact_phones_int_all

Page 103 of 259

1)orig_system_telephone_ref 2)telephone 3) telephone_type d) Ra_customer_banks_int_all 1) bank_a/c_name 2)bank_a/c_no 3)bank_a/c_currency_code e) Ra_cust_paymethod_int_all 1) payment_method_name 12) Tell me the Navigation for customer interface? Receivables Interface Customers

1. What tables cannot be updated through customer interface? No updates will be allowed to be made through customer interface for Following tables RA_SITE_USES_ALL RA_CUSTOMER_RELATIONSHIPS_ALL RA_CUST_RECEIPT_METHODS AP_BANK_BRANCHES AP_BANK_ACCOUNTS_ALL AP_BANK_ACCOUNT_USES_ALL 2. How to send additional customer and address information through customer interafce Here is where attribute columns are used. * Additional Customer data can be populated in RA_CUSTOMERS_INTERFACE_ALL.customer_attribute1 to 15 This will go into RA_CUSTOMERS.attribute1 to 15 * Additional address information can be populated in RA_CUSTOMERS_INTERFACE_ALL.address_attribute1 to 15 This will go into RA_ADDRESSES_ALL.attribute1 to 15

Page 104 of 259

And so on. 5. What should be the batch size (number of customer records) general guidelines for optimal performance About 10,000 records per bacth is ideal, it is suggested to keep the batch size small. 6. Why does customer interface error out if there is mismatch in address information? Because the code validates against these mismatches. arplscin.sql and arplbcin.sql It validates the address being inserted or updated with respect to the tax location flexfield structure. For each row being inserted or updated in RA_CUSTOMERS_INTERFACE, and that has not already been marked in error, the set_location_ccid function is called to return either an existing ccid for the address entered or to create a new entry in AR_LOCATION_VALUES for this new address. The RA_CUSTOMERS_INTERFACE record is then updated with the value of the ccid returned. 7. How do you send records at customer level profile and address/site level profile? For every customer record in RA_CUSTOMERS_INTERFACE_ALL, insert two records in table RA_CUSTOMER_PROFILES_INT_ALL. (Refer Note: 1070800.6 ) 9. Does Customer Interface import salesperson data? No, Refer Enhancement Bug: 147495 11. Customer Interface process can be used for updating the customer information How does the UPDATE work? Current functionality of Customer Interface is to update all the data. You cannot run Customer Interface to update only changed data. (Refer Bug: 879121 for the intended functinality)

12. What are some of the important fields that Customer Interface does not load? Not all fields in RA_CUSTOMERS are being loaded by the interface. SIC_CODE

Page 105 of 259

GSA_INDICATOR FOB_POINT SALES_CHANNEL_CODE FREIGHT_TERM WAREHOUSE_ID PRICE LIST SHIP_PARTIAL PAYMENT_TERM_ID in RA_SITE_USES.PAYMENT_TERM_ID (Refer Enhancement Request Bug: 245300) 13. New TCA/Customer Model, how to load customer as PERSON or ORGANIZATION through Customer Interface? a) Populate ra_customers_interface_all . person_flag = 'Y' Run Customer Interface process will load this record as PERSON b) Populate ra_customers_interface_all . person_flag = 'N' ( or NULL ) Run Customer Interface process will load this record as ORGANIZATION

13) Tell me what is the procedure to develop an interface? a. b. c. d. e. a. First we will get the Requirement document. We will create control file based on that plot file. Then the control files which loads the data into staging tables. Through pl/sql programs we will mapping and validate the data and then dump into the interface tables. Through the standard programs we will push the data from interface tables to Base tables. customer name : the same customer reference cant have different customer names with in this table HZ_PARTIES.PARTY_NAME b. customer number : must be null if your r using automatic customer numbering, must exit if you are not using automatic customer numbering. This value much be unique with in HZ_PARTIES c. d. customer status : must be A for active or I for inactive HZ_PARTIES_STATUS bank account num or bank account currency code : if the bank a/c already exist do not enter a value 14) What validations u did in the customer interface?

Page 106 of 259

if the bank a/c does not exist you must enter a value e. bank a/c name : it must exist in AP_BANK_ACCOUNTS or if it does not exist values must exist for BANK_A/C_CURRENCY_CODE BANK_A/C_NUM BANK_NAME BANK_BRANCH_NAME Note : every interface table has two error msg 1) 2) Error code. Error msg.

15) How can u call a standard interface program from sql or pl/sql code? FND_REQUEST.SUBMIT_REQUEST (PO,EXECUTABLE NAME,,,,PARAMETERS) 16) APIs FOR CUSTOMER INTERFACE? HZ_CUST_A/C_VZPUB.UPDATE_CUST_A/C HZ_CUST_A/C_VZPUB.CREATE_CUST_A/C FND_PROFILES FND_APPLICATIONS FND_GLOBAL FND-FILE FND_CONCSUB(can submit conc program in host invironment) 17) Tell me some API? FND_FILE.PUTLINE(FND_FILE.LOG) FND_FILE.PUTLINE(FND_FILE.OUTPUT) Is the Program exits, delete conc program and its executables. IF FND_PROGRAM.PROGRAM_EXITS(EMP,APPLICATION_NAME_IN) THEN FND_PROGRAM.DELETE_PROGRAM(EMP,APPLICATION_NAME_IN) FND_PROGRAM.DELETE_EXECUTABLE(EMP,APPLICATION_NAME_IN) END; 18) What are profile options? Is the Functional and Technical behavior of Oracle Applications Package. EX: - I want to assign the user3 responsibility to p4 printer then System Administrator Profile System (FND_PROFILE_OPTIONS) 19) Oracle E-Business suite? Oracle apps + analytical components software. (Oracle discover) (Oracle sales analyzer) (Oracle financial analyzer) (Oracle marketing analyzer) 24) What is multi org? Legal entity has more than one operating unit is called as multi org a) Business group --- Human resources information is secured by

Page 107 of 259

Business group b) Legal entity. --- inter-company and fiscal/tax reporting. Security responsibility operating unit. c) Operating unit --- secures AR, OE, AP, PA and PO Information. d) Organizations --- is a specialize unit of work at particular locations

25) What are the User PARAMETERS in the Reports? P_CONC_REQUEST_ID P_FLEX_VALUE 26) FND USER EXITS:FND SRWINIT FND SRWEXIT FND FLEXSQL sets your profile option values, multiple organizations and allows Oracle Application ensures that all the memory allocated for AOL user exits have been freed up properly. these user exits allow you to use flex fields in your reports Object Library user exits to detect that they have been called by an Oracle Reports program. FND FLEXIDVAL are used to display flex field information like prompt, value etc FND FORMAT_CURRENCY is used to print currency in various formats by using formula column 26) PL/SQL stored procedure parameters? or what are the two parameters that are mandatory for pl/sql type concurrent program? Procedure/function (ERRBUF OUT RETCODE OUT .) ERRBUF :Used to write the error message to log or request file. RETCODE :- Populate log request file with program submission details info. 27) What is Value Set? --The value set is a collection (or) container of values. --When ever the value set associated with any report parameters. It provides list of values to the end user to accept one of the values as report parameter value. -- If the list of values needed to be dynamic and ever changing and define a table based values set.

27) What r the validation types? 1) None 3) Dependent 3) Table 4) Special 5) Pair -------- validation is minimal. ------input is checked against a subset of values based on a prior value. ----- input is checked against values in an application table ------values set uses a flex field itself. ------ two flex fields together specify a range of valid values. of values; translated values can be used. 2) Independent ------input must exist on previously defined list of values

6) Translatable independent ----- input must exist on previously defined list

Page 108 of 259

7) Translatable dependent ------- input is checked against a subset of values based on a prior values; translated value can be used. 28) Form development process? a) open template form b) Save as <your form>.fmb c) Change the form module name as form name. d) Delete the default blocks, window, and canvas e) Create a window. f) Assign the window property class to window g) Create a canvas (subclass info) h) Assign canvas property class to the canvas I) assign the window to the canvas and canvas to the window j) Create a data block k) Modify the form level properties. (sub class item Text item) l) Modify the app_cusom package. In the program unit. m) Modify the pre-form trigger (form level) n) Modify the module level properties ((console window, First navigation p) Save and compile the form. Place the .fmx in the server directory. Q) Register in the AOL APPLICATION FORM APPLICATION FUNCTION APPLICATION MENU 29) How do u customize the Reports? a. Identify the Short name of the standard report in which module we have to customize Ex: - if u want to customize in the AR module path is Appl top\ar\11.5.0\reports\US\ .rdf b. Open the .rdf file in Report builder and change the name of the module. Open the data module and modify the query (what is client requirements) assign the columns to the attributes. d. e. Go to report wizard and select, what r the newly created columns. Then Compile it. Then u will get a .rep file in the specified module. If it is not in the specified directory then we have to put in the server directory.

c.

f. g.

Then Register in the AOL Concurrent executable. Concurrent program. go to system administrator SecurityResponsibilityrequest

h) Add and assign a concurrent program to a request group 30) Registering parametric report? Any applications will have two parameters, 1) from-period 2) to-period

Page 109 of 259

a) Go to object navigator and create the parameters. User parameters from_no, to_no (data type char and width 30) b) Open the report layout and write the query(we have to reg the table in AOL) Select empno,ename,from g_emp where empno between :from_no and to_no c) Compile and put the .RDP file in the server directory. d) Registering in AOL. Concurrent executable Concurrent program then go to PARAMETERS e) Go to Application validation set. then go to EDIT INTO After entering the VALUE SETS (1) And TOKENS (2) f) Go to Administrations Sequrity responsibility Request h) Add and assign a concurrent program to a request group 31) Tell me some report names and their table names in GL, AP, AR, and PO? 1) ra_customer_trx_all customer_trx_id trx_number (invoice no, debit memo no, credit memo no) cust_trx_type_id 2) ra_customer_lines_all (details of invoice) cutomer_trx_id 3) ar_payment_schdules_all check_id This table stores all transactions except adjustments and miscellaneous cash receipts. Oracle Receivables updates this table when activity occurs against an invoice, debit memo, chargeback, credit memo, on account credit, or receipt. 4) ra_cust_trx_types_all cust_trx_type_id (invoice types)

5) ra_batches_all Batch_id This table stores information about each receipt batch that you create in Oracle Receivables. Each row includes information about a specific batch such as batch source, status, batch type, control count, and control amount 6) ra_receivable_application_all 7) ra_adjustments_all This table stores information about your invoice adjustments. Each row includes general information about the adjustment you are making such as activity name, amount, accounting information, reason, and type of adjustment. You need one row for each adjustment you are making to an invoice.

8) ra_cash_receiots_all Cash_receipt_id This table stores one record for each receipt that you enter. Oracle Receivables creates records concurrently in the AR_CASH_RECEIPT_HISTORY_ALL, AR_PAYMENT_SCHEDULES_ALL, and AR_RECEIVABLE_APPLICATIONS tables for invoicerelated receipts. 1) ap_invoice_all

Page 110 of 259

invoice_amount, base_amount, payment_status_flag(y fully paid nunpaid p partially paid) 2) ap_invoice_payments_all invoice_id, 3) ap_invoice_distibutions_All amount, base_amount, dist_code_combination_id, line_type_lookup_code 4) ap_payment_schdules payment_status_flag( ) 5) ap_payment_dustributions_all 6) ap_checks_all check_id, AP_CHECKS_ALL stores information about payments issued to suppliers or refunds received from suppliers. You need one row for each payment you issue to a supplier or refund received from a supplier. Your Oracle Payables application uses this information to record payments you make to suppliers or refunds you receive from suppliers. 7) 8) ap_accounting_events_all

ap_bank_accounts_all AP_BANK_ACCOUNTS_ALL contains information about your bank accounts. You need one row for each bank account you define. Each bank account must be affiliated with one bank branch. When you initiate an automatic payment batch, enter a manual check, or create a Quick payment, you can select a bank account that you define in this table. 9) ap_bank_accounts_uses_all AP_BANK_ACCOUNT_USES_ALL stores information for the internal and external bank accounts you define in Oracle Payables and Oracle Receivables applications. 1) 2) 3) 4) 5) 6) po_vendors_all po_vendors_sites_all po_headers_all po_header_id po_lines_all po_line_id po_line_locations_All po_distributions_all po_distribution_id,

Gl_code_combinations GL_CODE_COMBINATIONS stores valid account combinations for each Accounting Flexfield structure within your Oracle General Ledger application. Associated with each account are certain codes and flags, including whether the account is enabled, whether detail posting or detail budgeting is allowed, and others. 2) 3) Gl_je_batches. GL_JE_BATCHES stores journal entry batches.

1)

Gl_je_headers GL_JE_HEADERS stores journal entries. There is a onetomany relationship between journal entry batches and journal entries. Each row in this table includes the associated batch ID, the journal entry name and description, and other information about the journal entry. This table corresponds to the Journals window of the Enter Journals form. STATUS is U for unposted, P for posted. Other statuses indicate that an error condition was found. A complete list is below. Gl_je_lines. GL_JE_LINES stores the journal entry lines that you enter in the Enter Journals form. There is a onetomany relationship between journal entries and journal entry lines. Each row in this table stores the associated journal entry header ID, the line number, the associated code combination ID, and the debits or credits associated with the journal line. STATUS is U for unposted or P for posted 4)

Page 111 of 259

5) Gl_set of books GL_SETS_OF_BOOKS stores information about the sets of books you define in your Oracle General Ledger application. Each row includes the set of books name, description, functional currency, and other information. This table corresponds to the Set of Books form. Gl_periods GL_PERIODS stores information about the accounting periods you define using the Accounting Calendar form. Each row includes the start date and end date of the period, the period type, the fiscal year, the period number, and other information. There is a onetomany relationship between a row in the GL_PERIOD_SETS table and rows in this table. 1) OPEN-DEBIT MEMO REPORT? This report shows all the open-debit memo transactions, based on customer number and dates. Columns :- type, customer_no, trx_no, amt_due, remaining. Parameter :- type, customer, from_date, to_date. 2) GENERATING POSITIVE PAY FILE FOR BANK REPORT? Basically this report generates a flat file of all the payments in order to send in to the bank. 3) UPDATE POSITIVEPAY CHECKS REPORT? This report which updates the data into the (AP) account payables system from the plot file, the file which is sent by bank 4) UPDATE POSITIVEPAY OUT STANDING CHECKS? This report which shows the out standing checks 5) CUSTOMER PAYMENT DETAILS REPORT? Which shows each customer original amount, amount pay and due amount based on transaction type (books, pens) 6)

Transaction types in AR Credit memo transaction types Invoice, debit memo, and charge back transaction types Commitment transaction types Q) HOW DO YOU RECTIFY THE ERRORS IN INTERFACE TABLES? Depending on the naming convention used, errors appear in either alphabetical order or by error code number. 31) How do u identity its name of report? System administrator concurrent program define System administrator concurrent program executable 32) Who informations? 1) Created by 2) Creation date 3) Last _updated by 4) last_update_date 5) last_update_value 33) FLEX FIELDS? Used to capture the additional business information. DFF Additional Captured in attribute prefixed columns KFF Unique Info, Mandatory Segment prefixed

Page 112 of 259

Not reported on standard reports To provide expansion space on your form With the help of []. [] Represents descriptive Flex field. FLEX FILED : DESCRIPTIVE : REGIGSTER

Is reported on standard reports Used for entering and displaying key information For example Oracle General uses a key Flex field called Accounting Flex field to uniquely identifies a general account. FLEX FILED : KEY : REGIGSTER

Oracle Applications KEY FLEX FIELDS 1) GL :- ACCOUNTING 2) AR :- SALES TAX LOCATION, TERRITORY, 3) AP :- BANK DETAILS, COST ALLOCATION, PEOPLE GROUP Oracle Applications DESCRIPTIVE FLEX FIELDS (Partial) 1) 2) GL :- daily rates AR :- credit history, information

3) PA :- bank branch, payment terms, site address, 34) What are the requests groups? a) Single request: - this allows you to submit an individual request. b) Request set 35) Sys Admin Module? a) Define Custom Users, b) Define Login Users, c) Register oracle DB users, d) Define Concurrent Programs, e) Register Concurrent Executables, f) Setting Profile Option Values, g) Define Request Types. 36) AOL? a) Registering tables. b) Registering views c) Registering db sequences d) Registering profile options e) Registering lookups and lookup codes f) Registering forms g) Registering Form and Non-Form functions i) registering Menus and sub-menus. j) Registering DFF and KFF. k) Libraries 37) What r the type Models in the system parameters of the report? 1) Bit map 2) Character mode 38) .What is SRW Package? (Sql Report Writer) The Report builder Built in package know as SRW Package This package extends reports ,Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exist, to format width of the columns, to page break the column, to set the colors Ex: SRW.DO_SQL, Its like DDL command, we can create table, views , etc., SRW.SET_FIELD_NUM SRW. SET_FILED_CHAR SRW. SET FILED _DATE 37) Difference between Bind and Lexical parameters? : - this allows you to submit a pre-defined set of requests.

Page 113 of 259

BIND VARIABLE : A bind variable is a variable that you declare in a host environment. Bind variables can be used to pass run-time values, either number or character, into or out of one or more PL/SQL programs. The PL/SQL programs use bind variables as they would use any other variable. You can reference variables declared in the host or calling environment in PL/SQL statements, unless the statement is in a procedure, function, or package. This includes host language variables declared in precompiler programs, screen fields in Oracle Developer Forms applications, and iSQL*Plus bind variables. Creating Bind Variables To declare a bind variable in the iSQL*Plus environment, use the command VARIABLE. For example, you declare a variable of type NUMBER and VARCHAR2 as follows: VARIABLE return_code NUMBER VARIABLE return_msg -- are used to replace a single value in sql, pl/sql -- bind variable may be used to replace expressions in select, where, group, order by, having, connect by, start with cause of queries. -- bind reference may not be referenced in FROM clause (or) in place of reserved words or clauses. LEXICAL REFERENCE: -- you can use lexical reference to replace the clauses appearing AFTER select, from, group by, having, connect by, start with. -- you cant make lexical reference in a pl/sql statmetns. 38) Matrix Report: Simple, Group above, Nested Simple Matrix Report : 4 groups 1.Cross Product Group 2. Row and Column Group 3. Cell Group 4. Cell column is the source of a cross product summary that becomes the cell content. Frames: 1.Repeating frame for rows(down direction) 2.Repeating frame for columns(Across ) 3.Matrix object the intersection of the two repeating frames 39) what is Flex mode and Confine mode? Confine mode On: child objects cannot be moved outside their enclosing parent objects. Off: child objects can be moved outside their enclosing parent objects. Flex mode: On: parent borders "stretch" when child objects are moved against them. Off: parent borders remain fixed when child objects are moved against them.

40) What is Place holder Columns? A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object. You can set the value of a placeholder column is in a Before Report trigger. Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved. 23) What is Formula Column? A formula column performs a user-defined computation on another column(s) data, including placeholder columns. 24) What is Summary columns? A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.

Page 114 of 259

50) What is cursor? A Cursor is a pointer, which works on active set, I.e. which points to only one row at a time in the context areas ACTIVE SET. A cursor is a construct of pl/sql, used to process multiple rows using a pl/sql block. 28) Types of cursors? 1) Implicit: declared for all DML and pl/sql statements. By default it selects one row only. 2) Explicit: Declared and named by the programmer. Use explicit cursor to individually process each row returned by a Multiple statements, is called ACTIVE SET. Allows the programmer to manually control explicit cursor in the Pl/sql block a) declare: create a named sql area b) Open: identify the active set. c) Fetch: load the current row in to variables. d) Close: release the active set. CURSOR ATTRIBUTES a) %is open: evaluates to true if the cursor is open. b) %not found: evaluates to true if the most recent fetch does not return a row c) %found: evaluates to true if the most recent fetch returns a row. d) %row count: evaluates to the total number of rows returned to far. Example for cursor: 1) Declare Vno emp.empno%type; Vname emp.ename %type; Cursor emp_cursor is Select empno,ename From emp; Begin Open cursor; For I in 1..10 loop Fetch emp_cursor into vno,vname; Dbms_output.putline(to_char(vno) || ||vname); End if; E nd; 2) Begin Open emp_cursor; Loop Fetch when emp_cursor % rowcount >10 or Emp_curor % not found; Bdms_output_put_line(to_char(vno)|| || vname); End loop; Close emp_cursor; End; CURSOR FOR LOOP A) cursor for loop is a short cut to process explicit cursors B) it has higher performance C) cursor for loop requires only the declaration of the cursor, remaining things like opening, fetching and close are automatically take by the cursor for loop Example: 1) Declare Cursor emp_cursor is Select empno,ename From emp; Begin

Page 115 of 259

For emp_record in emp_cursor loop Dbms_output.putline(emp_record.empno); Dbms_output.putline(emp_record.ename) End loop End;

Can we create a cursor without declaring it? Yes by using cursor for loop using subqueries. BEGIN FOR emp_record IN ( SELECT empno, ename FROM emp) LOOP -- implicit open and implicit fetch occur IF emp_record.empno = 7839 THEN ... END LOOP; -- implicit close occurs END; a) for update clause: 1) use explicit locking to deny access for the duration of a transaction 2) lock the rows before update or delete Ex : select . From. For update[ of column ref] [no_wait] b) where current of clause? 1) use cursor to update or delete the current row Where current of < column ref> 29) Attribute data types? 1) %type 2) %row type. 30) Exception Handilings? Is a mechanism provided by pl/sql to detect runtime errors and process them with out halting the program abnormally 1) pre-defined 2) user-defined. PRE-DEFINED: 1) cursor_already_open--------attempted to open an already open cursor. 2) Dup_val_on_index --------attempted to insert a duplicate values. 3) Invalid_cursor -------- illegal cursor operation occurred. 4) Invalid_number -------- conversion of character string to number fails. 5) Login_denied ---------loging on to oracle with an invalid user name and password. 6) program_error -------- pl/sql has an internal problem. 7) storage_error -------- pl/sql ran out of memory or memory is corrupted. 8) to_many_row ---------single row select returned more than one row. 9) value_error -------- arithmetic,conversion,truncation or size constraint error occurred. 10) zero_devided -------- attempted to divided by zero. USER-DEFINED: Declare : name the exception Raise : explicitly raise the exception by using the raise statements Reference: exception handing section.

Page 116 of 259

The Raise_Application_Error_Procedure: You can use this procedure to issue user-defined error messages from stored sub programs. You can report errors to your applications and avoid returning unhandled exceptions. Raise_Application_Error(error_number,message[,{true/false}] Error number between -20000 to -20999 pragma exception_init? It tells the compiler to associate an exception with an oracle error. To get an error message of a specific oracle error. Ex: pragma exception_init(exception name, oracle error number) Example for Exceptions? 1) Check the record is exist or not? Declare E emp% rowtype Begin e.empno := &empno; select * into e from emp where empno =e.empno; Dbms_output.putline(empno || e.empno); Exception When no_data_found then Dbms_output.putline(e.empno ||doest exist); End; 2) User defined exceptions? Define p_dept_desc =gvreddy Define p_dept_number =1236 Declare E_invalid_dept exception; Begin Update departments Set dept_name=&p_dept_desc Where dept_id =&p_dept_number; If sql% not found then Raise e_invalid_departments; End if; Commit; Exception When e_invalid_departments then Dbms_output.putline(no such dept); End; 52) what is REF Cursor? To execute a multi-row query, oracle opens an unnamed work area that stores processing information, to access the information, an explicit, which names the work area or, a cursor variable, which points to the work area. where as a cursor always refers to the same query work area, a cursor variable can refer to a different work areas, cursor variable area like c or pascal pointers, which hold the memory location(address) of some object instead of the object itself. So, declaring a cursor variable creates a pointers, not an object. 32) Can u define exceptions twice in same block? No 33) Can you have two functions with the same name in a pl/sql block? Yes 34) Can you have two stored functions with in the same name? Yes 35) Can function be overload?

Page 117 of 259

Yes What is the maximum number of statements that can be specified in a trigger statement? One. 32) Stored procedure? Stored procedure is a sequence of statements that perform specific function. 36) 53) What is procedure? ------------is a named pl/sql block to perform a specific task. A procedure may have DML statements. It may or may not return a value. Procedure can return more than one value.

Example for procedure

1)

To accept the year as a parameter and list emp belong to the year? Create or replace Procedure empy(y number) is Cursor emp_cursor is Select * from emp where to_char(hiredate,yyyy)=y; Emp_record emp%rowtype; Begin For emp_record in emp_cursor loop Print (emp_record.empno); Print (emp_record.ename); Print (emp_record.sal); End loop; End;

Output : var empx number; Begin :empx := 1234; End; Exec empy(:empx); Print empy; 54) What is function? ---- is a named pl/sql block to perform a specific task, is mainly used for calculation purpose. ---- A function is called as part of an exception. ---- Every function should return a value Example for function Create or replace Function get_sal(p_id in emp.emp_no% type) Return number Is v_sal emp.sal%type :=0; Begin Select salary into v_salary From emp Where emp_no = p_id; Return v_salary End get_sal; End; Output : var g_sal number; Exec :g_sal := get_sal(99);

Page 118 of 259

Print g_salary; 9.Can functions be overloaded ? Yes. 10.Can 2 functions have same name & input parameters but differ only by return datatype No. 55) What is the package? ---- Group logically related pl/sql types, items and subprograms. 1) 2) package specification package body

Advantages of a package: Modularity Easier Application Design Information Hiding Overloading

You cannot overload: Two subprograms if their formal parameters differ only in name or parameter mode. (datatype and their total number is same). Two subprograms if their formal parameters differ only in datatype and the different datatypes are in the same family (number and decimal belong to the same family) Two subprograms if their formal parameters differ only in subtype and the different subtypes are based on types in the same family (VARCHAR and STRING are subtypes of VARCHAR2) Two functions that differ only in return type, even if the types are in different families. 56) What is FORWARD DECLARATION in Packages? PL/SQL allows for a special subprogram declaration called a forward declaration. It consists of the subprogram specification in the package body terminated by a semicolon. You can use forward declarations to do the following: Define subprograms in logical or alphabetical order. Define mutually recursive subprograms.(both calling each other). Group subprograms in a package Example of forward Declaration: CREATE OR REPLACE PACKAGE BODY forward_pack IS PROCEDURE calc_rating(. . .); -- forward declaration PROCEDURE award_bonus(. . .) IS -- subprograms defined BEGIN -- in alphabetical order calc_rating(. . .); ... END; PROCEDURE calc_rating(. . .) IS BEGIN ... END;

Page 119 of 259

END forward_pack;

56) What are triggers? ---- triggers are similar to procedures, in that they are the named pl/sql blocks with declarative, executable and exception-handling sections, how ever a procedure is executed explicitly from another block via a procedure call, which can also pass arguments. ---- A trigger is executed implicitly when ever a particular event task places. And is nothing but a event. ---- The triggering event is a DML (insert, update, delete) operations on a data base table ----- fires whenever a data event(such as DML) or system event(such as login or shutdown) occurs on a schema or database Trigger timing : 1) before 2) after 3) instead of ( this is used for views) Triggering events : 1) insert 2)update 3) delete Trigger type : 1) statement level 2) row level. Firing sequence of database triggers 1) 2) 3) 4) Ex: 1) Create or replace trigger secure_emp Before Insert on emp Begin If (to_char(sysdate,dy) in(sat,sun)) or To_char(sysdate,hh24:mi) Not between 08:00 and 18:00) Then raise_application_error(-20500,u can insert in the office timings) End if; End; Ex :- 2) write a program to all transitions with name smith? Create or replace Trigger trigger_name Before insert or update or delete On emp For each row When (old.ename =smith or New.ename =smith) Begin before statement trigger before row trigger after row trigger after statement trigger

Page 120 of 259

Raise_application_error(-20003,smith); End; 57) Difference between triggers and procedures? Defined with create trigger The data dictionary contains source code in the user_triggers. Implicitly invoked Commit, save point and rollback are not allowed(TCL) Defined with create procedure Data dictionary contains source code in user_source Explicitly invoked Those are allowed

58) LOCKS? -- Is to reduce concurrency 1) share lock ---it allows the other users for only reading not to insert or update or delete. 2) exclusive lock --- only one user can have the privileges of insert or update and delete of particular object --- others can only read. 3) update lock ----multiple user can read, update delete Lock levels : 1) table level 2) table space 3) data base level. 58) What is template? a) The TEMPLATE form is the required starting point for all development of new Forms. b) The TEMPLATE form includes platformindependent attachments of several Libraries. APPSCORE :- It contains package and procedures that are required of all forms to support the MENUS ,TOOLBARS. APPSDAYPK :- It contains packages that control the oracle applications CALENDER FEATURES. FNDSQF :- it contains packages and procedures for MESSAGE DICTONARY, FLEX FIELDS, PROFILES AND CONCURRENT PROCESSING. CUSTOM :- it allows extension of oracle applications forms with out modification of oracle application code, you can use the custom library for customization such as zoom ( such as moving to another form and querying up specific records) 59) What are ad-hoc reports? Ans.: Ad-hoc Report is made to meet one-time reporting needs. Concerned with or formed for a particular purpose. For example, ad hoc tax codes or an ad hoc database query 60) What is responsibility? Is collection of menus, request security groups and data groups Menus: collection of forms is nothing but menus Request security groups: collection of programs. Data groups: is a group of modules to be made accessible by the user through Responsibility System adminsecuritydefine

Page 121 of 259

Securityuserdefine 61) What are different execution methods of executabls?

FlexRpt FlexSql Host Oracle Reports PL/SQL Stored Procedure SQL*Loader SQL*Plus SQL*Report Spawned Immediate

The execution file is wrnitten using the FlexReport API. The execution file is written using the FlexSql API. The execution file is a host script. The execution file is an Oracle Reports file. The execution file is a stored procedure. The execution file is a SQL script. The execution file is a SQL*Plus script. The execution file is a SQL*Report script. The execution file is a C or Pro*C program. The execution file is a program written to run as a subroutine of the concurrent manager. We recommend against defining new immediate concurrent programs, and suggest you use either a PL/SQL Stored Procedure or a Spawned C Program instead.

Composite Datatypes : PL/SQL TABLES PL/SQL RECORDS Nested TABLE VARRAY What is the sequence of functions group by,having,orderby in a select statements ? Select.. Group by Having Orderby.. Difference between User and Super User? User : login user or front end user Super user : it has full access of particular module What is an Oracle instance? Overview of an Oracle Instance Every running Oracle database is associated with an Oracle instance. When a database is started on a database server (regardless of the type of computer), Oracle allocates a memory area called the System Global Area (SGA) and starts one or more Oracle processes. This combination of the SGA and the Oracle processes is called an Oracle instance. The memory and processes of an instance manage the associated databases data efficiently and serve the one or multiple users of the database. The Instance and the Database After starting an instance, Oracle associates the instance with the specified database. This is called mounting the database. The database is then ready to be opened, which makes it accessible to authorized users.

Page 122 of 259

Multiple instances can execute concurrently on the same computer, each accessing its own physical database. In clustered and massively parallel systems (MPP), the Oracle Parallel Server allows multiple instances to mount a single database. Only the database administrator can start up an instance and open the database. If a database is open, the database administrator can shut down the database so that it is closed. When a database is closed, users cannot access the information that it contains. Security for database startup and shutdown is controlled via connections to Oracle with administrator privileges. Normal users do not have control over the current status of an Oracle database. Q: What is a view? A view is a tailored presentation of the data contained in one or more tables (or other views). Unlike a table, a view is not allocated any storage space, nor does a view actually contain data; rather, a view is defined by a query that extracts or derives data from the tables the view references. These tables are called base tables. Views present a different representation of the data that resides within the base tables. Views are very powerful because they allow you to tailor the presentation of data to different types of users. Views are often used to: provide an additional level of table security by restricting access to a predetermined set of rows and/or columns of a table hide data complexity simplify commands for the user present the data in a different perspective from that of the base table isolate applications from changes in definitions of base tables express a query that cannot be expressed without using a view Q:What is referential integrity? Rules governing the relationships between primary keys and foreign keys of tables within a relational database that determine data consistency. Referential integrity requires that the value of every foreign key in every table be matched by the value of a primary key in another table.

Name the data dictionary that stores user-defined constraints? USER_CONSTRAINTS What is a collection of privileges? user_tab_privs_made user_tab_privs_recd Snapshot: A snapshot is a read-only copy of a table or a subset of a table. What is a cursor? cursor is a private sql work area used to perform manipulations on data using pl\sql. adv: 1.mainly used for multiple row manipulations and locking columns. note: data which is populated into the cursor is known as active dataset. cursors are of two types 1.implicit 2.explicit implicit attributes or properties for implicit cursor 1.sql%is open:attribute returns a boolean value stating wether the cursor is open or closed. 2.sql % found: returns boolean value stating whether the record is found in the cursor. 3.sql%notfound : returns a boolean value stating whether the record is not found in the cursor 4.sql %rowcount :returns a pneumeric value stating no.of rows executed in the cursor.

Page 123 of 259

explicit cursorsretrives multiple rows. ************ adv: users can perform locks on th data in the cursor attributes 1.% is open 2.% found 3.% not found 4.% rowcount Note: DATA which is populated in the cursor is known as active data set. WE CAN WRITE TWO CURSORS IN ONE PROGRAM WE CAN WRITE A CURSOR SPECIFYING PARAMETERS CURSOR WITH UPDATE CLAUSE IS USED TO PERFORM LOCKS ON DATA. Name the data dictionary that stores user-defined Stored procedures? ans :- user_objects

Question:Why Use Sql* Loader in Oracle Database? Answer: The Sql Loader module of the oracle database Management System loads data into an existing ORACLE table from an external files.It is available locally only on CMS and PCs with oracle version 5. Throughout this documentation the CAR database described in Referance A is used for illustration. There are several methods others than using SQL *Loader of inserting data into a table. 1. The Sql insert command may be used from the SQL * Plus module, for Example : insert into CAR values() where the values to be inserted into a row of the table are listed inside the parentheses. Dates and Characters data must be Surrounded by single quotes; items are seperated by commas.

2. Sql*Forms allows you to add rows interactively using forms. The forms may contain default values and checks for invalid data. 3. ODL loads the table from a control file and separate fixed format data file. ODL is available on all versions of ORACLE . SQL * Loader is much more flexible than ODL and will eventually supersede it on all systems.

We can execute a function in sql query select functionname(paramaters) from dual; Suppose i am created a function add which returns the addition of two numbers then select add(3,4) from dual; 7 ODBC stands for open database connectivity trigger is a stored procedure which auotomatically fired on a table whenever any dml operation is affected in the table. we can create ddl trigger,database trigger(logon,logoff,startup,startoff),audit triggers pseudo column the column which does not exist in a table ex;rownum,rowid,level etc Normalization is the techinque of designing the database with the least redundancy and duplicacy of data. Types of Normalization: 1 NF 2 NF 3 NF BCNF 5 NF 6NF : Impossible to achieve this level of normalization what is a synonym ?

Page 124 of 259

Ans. A synonym is an alternative name for tables,views,procedures and other database objects generally when we have more than one schema and we wish to access an object of a different schema then we create synonyms for that object in the schema where we wish to access the object. Syntax: create synonym synonym-name for schemaname.object-name what is an exception ? Exception is an event that causes suspension of normal program execution. In oracle there are serveral types of exceptions 1) Pre-defined exceptions like NO_DATA_FOUND,TOO_MANY_ROWS 2) User-defined exceptions which would validate the business logic 3) unnamed system exceptions which are raised due to errors in the application code .. you can name these exceptions using PRAGMA EXCEPTION_INIT 4)Unnamed programmer-defined exceptions. Exceptions that are defined and raised in the server by the programmer. In this case, the programmer provides both an error number (between -20000 and -20999) and an error message, and raises that exception with a call to RAISE_APPLICATION_ERROR. for all the exceptions raised oracle fills in sqleerm and sqlcode variable which provide the error message and error code for the exception raised. What are pseudo-columns in SQL? Provide examples? A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. Examples: CURRVAL,NEXTVAL,ROWID,LEVEL what is a schema ? A schema is a oracle database user account. How do I eliminate duplicate rows in an Oracle database? SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL> delete duplicate_values_field_name dv from table_name ta where rowid < (select min(rowid) from table_name tb where ta.dv=tb.dv); How do you view version information in Oracle? SQL> select banner from $version;

1. What is a Cartesian product? What causes it? Expected answer: A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each table involved in the join. It is causes by specifying a table in the FROM clause without joining it to another table. 2. What is an advantage to using a stored procedure as opposed to passing an SQL query from an application. Expected answer: A stored procedure is pre-loaded in memory for faster execution. It allows the DBMS control of permissions for security purposes. It also eliminates the need to recompile components when minor changes occur to the database. 3. What is the difference of a LEFT JOIN and an INNER JOIN statement? Expected answer: A LEFT JOIN will take ALL values from the first declared table and matching values from the second

Page 125 of 259

declared table based on the column the join has been declared on. An INNER JOIN will take only matching values from both tables PL/SQL Questions: 1. Describe the difference between a procedure, function and anonymous pl/sql block. Expected answer : Candidate should mention use of DECLARE statement, a function must return a value while a procedure doesn?t have to.

2. What is a mutating table error and how can you get around it? Expected answer: This happens with triggers. It occurs because the trigger is trying to update a row it is currently using. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other. 3. Describe the use of %ROWTYPE and %TYPE in PL/SQL Expected answer: %ROWTYPE allows you to associate a variable with an entire table row. The %TYPE associates a variable with a single column type. 4. What packages (if any) has Oracle provided for use by developers? Expected answer: Oracle provides the DBMS_ series of packages. There are many which developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL, UTL_FILE. If they can mention a few of these and describe how they used them, even better. If they include the SQL routines provided by Oracle, great, but not really what was asked. 5. Describe the use of PL/SQL tables Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries or calculations. In Oracle 8 they will be able to be of the %ROWTYPE designation, or RECORD. 6. When is a declare statement needed ? The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone, non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used. 7. In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in the exit when statement? Why? Level: Intermediate Expected answer: OPEN then FETCH then LOOP followed by the exit when. If not specified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL. 8. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers? Level: Intermediate

Page 126 of 259

Expected answer: SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception. 9. How can you find within a PL/SQL block, if a cursor is open? Level: Low Expected answer: Use the %ISOPEN cursor status variable. 10. How can you generate debugging output from PL/SQL? Level:Intermediate to high Expected answer: Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. The new package UTL_FILE can also be used. 11. What are the types of triggers? Level:Intermediate to high Expected Answer: There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key words: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT etc. DBA: 1. Give one method for transferring a table from one schema to another: Level:Intermediate Expected Answer: There are several possible methods, export-import, CREATE TABLE... AS SELECT, or COPY. 2. What is the purpose of the IMPORT option IGNORE? What is it?s default setting? Level: Low Expected Answer: The IMPORT IGNORE option tells import to ignore "already exists" errors. If it is not specified the tables that already exist will be skipped. If it is specified, the error is ignored and the tables data will be inserted. The default value is N. 3. You have a rollback segment in a version 7.2 database that has expanded beyond optimal, how can it be restored to optimal?

Page 127 of 259

Level: Low Expected answer: Use the ALTER TABLESPACE ..... SHRINK command. 4. If the DEFAULT and TEMPORARY tablespace clauses are left out of a CREATE USER command what happens? Is this bad or good? Why? Level: Low Expected answer: The user is assigned the SYSTEM tablespace as a default and temporary tablespace. This is bad because it causes user objects and temporary segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper table placement (only data dictionary objects and the system rollback segment should be in SYSTEM). 5. What are some of the Oracle provided packages that DBAs should be aware of? Level: Intermediate to High Expected answer: Oracle provides a number of packages in the form of the DBMS_ packages owned by the SYS user. The packages used by DBAs may include: DBMS_SHARED_POOL, DBMS_UTILITY, DBMS_SQL, DBMS_DDL, DBMS_SESSION, DBMS_OUTPUT and DBMS_SNAPSHOT. They may also try to answer with the UTL*.SQL or CAT*.SQL series of SQL procedures. These can be viewed as extra credit but aren?t part of the answer. 6. What happens if the constraint name is left out of a constraint clause? Level: Low Expected answer: The Oracle system will use the default name of SYS_Cxxxx where xxxx is a system generated number. This is bad since it makes tracking which table the constraint belongs to or what the constraint does harder. 7. What happens if a tablespace clause is left off of a primary key constraint clause? Level: Low Expected answer: This results in the index that is automatically generated being placed in then users default tablespace. Since this will usually be the same tablespace as the table is being created in, this can cause serious performance problems. 8. What is the proper method for disabling and re-enabling a primary key constraint? Level: Intermediate Expected answer: You use the ALTER TABLE command for both. However, for the enable clause you must specify the USING INDEX and TABLESPACE clause for primary keys. 9. What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause? Level: Intermediate Expected answer: The index is created in the user?s default tablespace and all sizing information is lost. Oracle doesn?t store this information as a part of the constraint definition, but only as part of the index definition, when the constraint was disabled the index was dropped and the information is gone.

Page 128 of 259

10. (On UNIX) When should more than one DB writer process be used? How many should be used? Level: High Expected answer: If the UNIX system being used is capable of asynchronous IO then only one is required, if the system is not capable of asynchronous IO then up to twice the number of disks used by Oracle number of DB writers should be specified by use of the db_writers initialization parameter. 11. You are using hot backup without being in archivelog mode, can you recover in the event of a failure? Why or why not? Level: High Expected answer: You can?t use hot backup without being in archivelog mode. So no, you couldn?t recover. 12. What causes the "snapshot too old" error? How can this be prevented or mitigated? Level: Intermediate Expected answer: This is caused by large or long running transactions that have either wrapped onto their own rollback space or have had another transaction write on part of their rollback space. This can be prevented or mitigated by breaking the transaction into a set of smaller transactions or increasing the size of the rollback segments and their extents. 13. How can you tell if a database object is invalid? Level: Low Expected answer: By checking the status column of the DBA_, ALL_ or USER_OBJECTS views, depending upon whether you own or only have permission on the view or are using a DBA account. 14. A user is getting an ORA-00942 error yet you know you have granted them permission on the table, what else should you check? Level: Low Expected answer: You need to check that the user has specified the full name of the object (select empid from scott.emp; instead of select empid from emp;) or has a synonym that points to the object (create synonym emp for scott.emp;) 15. A developer is trying to create a view and the database won?t let him. He has the "DEVELOPER" role which has the "CREATE VIEW" system privilege and SELECT grants on the tables he is using, what is the problem? Level: Intermediate Expected answer: You need to verify the developer has direct grants on all tables used in the view. You can?t create a stored object with grants given through views. 16. If you have an example table, what is the best way to get sizing data for the production table implementation? Level: Intermediate

Page 129 of 259

Expected answer: The best way is to analyze the table and then use the data provided in the DBA_TABLES view to get the average row length and other pertinent data for the calculation. The quick and dirty way is to look at the number of blocks the table is actually using and ratio the number of rows in the table to its number of blocks against the number of expected rows. 17. How can you find out how many users are currently logged into the database? How can you find their operating system id? Level: high Expected answer: There are several ways. One is to look at the v$session or v$process views. Another way is to check the current_logins parameter in the v$sysstat view. Another if you are on UNIX is to do a "ps -ef| grep oracle|wc -l? command, but this only works against a single instance installation. 18. A user selects from a sequence and gets back two values, his select is: SELECT pk_seq.nextval FROM dual; What is the problem? Level: Intermediate Expected answer: Somehow two values have been inserted into the dual table. This table is a single row, single column table that should only have one value in it. 19. How can you determine if an index needs to be dropped and rebuilt? Level: Intermediate Expected answer: Run the ANALYZE INDEX command on the index to validate its structure and then calculate the ratio of LF_BLK_LEN/LF_BLK_LEN+BR_BLK_LEN and if it isn?t near 1.0 (i.e. greater than 0.7 or so) then the index should be rebuilt. Or if the ratio BR_BLK_LEN/ LF_BLK_LEN+BR_BLK_LEN is nearing 0.3. SQL/ SQLPlus 1. How can variables be passed to a SQL routine? Level: Low Expected answer: By use of the & symbol. For passing in variables the numbers 1-8 can be used (&1, &2,...,&8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific variable, place the ampersanded variable in the code itself: "select * from dba_tables where owner=&owner_name;" . Use of double ampersands tells SQLPLUS to resubstitute the value for each subsequent use of the variable, a single ampersand will cause a reprompt for the value unless an ACCEPT statement is used to get the value from the user. 2. You want to include a carriage return/linefeed in your output from a SQL script, how can you do this? Level: Intermediate to high

Page 130 of 259

Expected answer: The best method is to use the CHR() function (CHR(10) is a return/linefeed) and the concatenation function "||". Another method, although it is hard to document and isn?t always portable is to use the return/linefeed as a part of a quoted string. 3. How can you call a PL/SQL procedure from SQL? Level: Intermediate Expected answer: By use of the EXECUTE (short form EXEC) command. 4. How do you execute a host operating system command from within SQL? Level: Low Expected answer: By use of the exclamation point "!" (in UNIX and some other OS) or the HOST (HO) command. 5. You want to use SQL to build SQL, what is this called and give an example Level: Intermediate to high Expected answer: This is called dynamic SQL. An example would be: set lines 90 pages 0 termout off feedback off verify off spool drop_all.sql select ?drop user ?||username||? cascade;? from dba_users where username not in ("SYS?,?SYSTEM?); spool off Essentially you are looking to see that they know to include a command (in this case DROP USER...CASCADE;) and that you need to concatenate using the ?||? the values selected from the database. 6. What SQLPlus command is used to format output from a select? Level: low Expected answer: This is best done with the COLUMN command. 7. You want to group the following set of select returns, what can you group on? Max(sum_of_cost), min(sum_of_cost), count(item_no), item_no Level: Intermediate Expected answer: The only column that can be grouped on is the "item_no" column, the rest have aggregate functions associated with them. 8. What special Oracle feature allows you to specify how the cost based system treats a SQL statement? Level: Intermediate to high

Page 131 of 259

Expected answer: The COST based system allows the use of HINTs to control the optimizer path selection. If they can give some example hints such as FIRST ROWS, ALL ROWS, USING INDEX, STAR, even better. 9. You want to determine the location of identical rows in a table before attempting to place a unique index on the table, how can this be done? Level: High Expected answer: Oracle tables always have one guaranteed unique column, the rowid column. If you use a min/max function against your rowid and then select against the proposed primary key you can squeeze out the rowids of the duplicate rows pretty quick. For example: select rowid from emp e where e.rowid > (select min(x.rowid) from emp x where x.emp_no = e.emp_no); In the situation where multiple columns make up the proposed key, they must all be used in the where clause. 10. What is a Cartesian product? Level: Low Expected answer: A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each table involved in the join. 11. You are joining a local and a remote table, the network manager complains about the traffic involved, how can you reduce the network traffic? Level: High Expected answer: Push the processing of the remote data to the remote instance by using a view to preselect the information for the join. This will result in only the data required for the join being sent across. 12. What is the default ordering of an ORDER BY clause in a SELECT statement? Level: Low Expected answer: Ascending 13. What is tkprof and how is it used? Level: Intermediate to high Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output.

Page 132 of 259

14. What is explain plan and how is it used? Level: Intermediate to high Expected answer: The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must have an explain_table generated in the user you are running the explain plan for. This is created using the utlxplan.sql script. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. The explain_plan table is then queried to see the execution plan of the statement. Explain plans can also be run using tkprof. 15. How do you set the number of lines on a page of output? The width? Level: Low Expected answer: The SET command in SQLPLUS is used to control the number of lines generated per page and the width of those lines, for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines long with a line width of 80 characters. The PAGESIZE and LINESIZE options can be shortened to PAGES and LINES. 16. How do you prevent output from coming to the screen? Level: Low Expected answer: The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off screen output. This option can be shortened to TERM. 17. How do you prevent Oracle from giving you informational messages during and after a SQL statement execution? Level: Low Expected answer: The SET options FEEDBACK and VERIFY can be set to OFF. 18. How do you generate file output from SQL? Level: Low Expected answer: By use of the SPOOL command Tuning Questions: 1. A tablespace has a table with 30 extents in it. Is this bad? Why or why not. Level: Intermediate Expected answer: Multiple extents in and of themselves aren?t bad. However if you also have chained rows this can hurt performance. 2. How do you set up tablespaces during an Oracle installation? Level: Low Expected answer: You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.

Page 133 of 259

3. You see multiple fragments in the SYSTEM tablespace, what should you check first? Level: Low Expected answer: Ensure that users don?t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view. 4. What are some indications that you need to increase the SHARED_POOL_SIZE parameter? Level: Intermediate Expected answer: Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same. 5. What is the general guideline for sizing db_block_size and db_multi_block_read for an application that does many full table scans? Level: High Expected answer: Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a multiple of 64. 6. What is the fastest query method for a table? Level: Intermediate Expected answer: Fetch by rowid 7. Explain the use of TKPROF? What initialization parameter should be turned on to get full TKPROF output? Level: High Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output. 8. When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad -How do you correct it? Level: Intermediate Expected answer: If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter. 9. When should you increase copy latches? What parameters control copy latches? Level: high Expected answer: When you get excessive contention for the copy latches as shown by the "redo copy" latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system.

Page 134 of 259

10. Where can you get a list of all initialization parameters for your instance? How about an indication if they are default settings or have been changed? Level: Low Expected answer: You can look in the init.ora file for an indication of manually set parameters. For all parameters, their value and whether or not the current value is the default value, look in the v$parameter view. 11. Describe hit ratio as it pertains to the database buffers. What is the difference between instantaneous and cumulative hit ratio and which should be used for tuning? Level: Intermediate Expected answer: The hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks. A value greater than 8090% is good, less could indicate problems. If you simply take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over. 12. Discuss row chaining, how does it happen? How can you reduce it? How do you correct it? Level: high Expected answer: Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won?t fit in the remaining block space. This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by export and import of the effected table. 13. When looking at the estat events report you see that you are getting busy buffer waits. Is this bad? How can you find what is causing it? Level: high Expected answer: Buffer busy waits could indicate contention in redo, rollback or data blocks. You need to check the v$waitstat view to see what areas are causing the problem. The value of the "count" column tells where the problem is, the "class" column tells you with what. UNDO is rollback segments, DATA is data base buffers. 14. If you see contention for library caches how can you fix it? Level: Intermediate Expected answer: Increase the size of the shared pool. 15. If you see statistics that deal with "undo" what are they really talking about? Level: Intermediate Expected answer: Rollback segments and associated structures. 16. If a tablespace has a default pctincrease of zero what will this cause (in relationship to the smon process)?

Page 135 of 259

Level: High Expected answer: The SMON process won?t automatically coalesce its free space fragments. 17. If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7.1,7.2 and 7.3 only) Level: High Expected answer: In Oracle 7.0 to 7.2 The use of the 'alter session set events 'immediate trace name coalesce level ts#';? command is the easiest way to defragment contiguous free space fragmentation. The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ?alter tablespace coalesce;? is best. If the free space isn?t contiguous then export, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space. 18. How can you tell if a tablespace has excessive fragmentation? Level: Intermediate If a select against the dba_free_space table shows that the count of a tablespaces extents is greater than the count of its data files, then it is fragmented. 19. You see the following on a status report: redo log space requests 23 redo log space wait time 0 Is this something to worry about? What if redo log space wait time is high? How can you fix this? Level: Intermediate Expected answer: Since the wait time is zero, no. If the wait time was high it might indicate a need for more or larger redo logs. 20. What can cause a high value for recursive calls? How can this be fixed? Level: High Expected answer: A high value for recursive calls is cause by improper cursor usage, excessive dynamic space management actions, and or excessive statement re-parses. You need to determine the cause and correct it By either relinking applications to hold cursors, use proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse. 21. If you see a pin hit ratio of less than 0.8 in the estat library cache report is this a problem? If so, how do you fix it? Level: Intermediate Expected answer: This indicate that the shared pool may be too small. Increase the shared pool size. 22. If you see the value for reloads is high in the estat library cache report is this a matter for concern? Level: Intermediate

Page 136 of 259

Expected answer: Yes, you should strive for zero reloads if possible. If you see excessive reloads then increase the size of the shared pool. 23. You look at the dba_rollback_segs view and see that there is a large number of shrinks and they are of relatively small size, is this a problem? How can it be fixed if it is a problem? Level: High Expected answer: A large number of small shrinks indicates a need to increase the size of the rollback segment extents. Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the size of the extents and adjust optimal accordingly. 24. You look at the dba_rollback_segs view and see that you have a large number of wraps is this a problem? Level: High Expected answer: A large number of wraps indicates that your extent size for your rollback segments are probably too small. Increase the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to get the information on transaction size. 25. In a system with an average of 40 concurrent users you get the following from a query on rollback extents: ROLLBACK CUR EXTENTS --------------------- -------------------------R01 11 R02 8 R03 12 R04 9 SYSTEM 4 You have room for each to grow by 20 more extents each. Is there a problem? Should you take any action? Level: Intermediate Expected answer: No there is not a problem. You have 40 extents showing and an average of 40 concurrent users. Since there is plenty of room to grow no action is needed. 26. You see multiple extents in the temporary tablespace. Is this a problem? Level: Intermediate Expected answer: As long as they are all the same size this isn?t a problem. In fact, it can even improve performance since Oracle won?t have to create a new extent when a user needs one. Installation/Configuration

Page 137 of 259

1. Define OFA. Level: Low Expected answer: OFA stands for Optimal Flexible Architecture. It is a method of placing directories and files in an Oracle system so that you get the maximum flexibility for future tuning and file placement. 2. How do you set up your tablespace on installation? Level: Low Expected answer: The answer here should show an understanding of separation of redo and rollback, data and indexes and isolation os SYSTEM tables from other tables. An example would be to specify that at least 7 disks should be used for an Oracle installation so that you can place SYSTEM tablespace on one, redo logs on two (mirrored redo logs) the TEMPORARY tablespace on another, ROLLBACK tablespace on another and still have two for DATA and INDEXES. They should indicate how they will handle archive logs and exports as well. As long as they have a logical plan for combining or further separation more or less disks can be specified. 3. What should be done prior to installing Oracle (for the OS and the disks)? Level: Low Expected Answer: adjust kernel parameters or OS tuning parameters in accordance with installation guide. Be sure enough contiguous disk space is available. 4. You have installed Oracle and you are now setting up the actual instance. You have been waiting an hour for the initialization script to finish, what should you check first to determine if there is a problem? Level: Intermediate to high Expected Answer: Check to make sure that the archiver isn?t stuck. If archive logging is turned on during install a large number of logs will be created. This can fill up your archive log destination causing Oracle to stop to wait for more space. 5. When configuring SQLNET on the server what files must be set up? Level: Intermediate Expected answer: INITIALIZATION file, TNSNAMES.ORA file, SQLNET.ORA file 6. When configuring SQLNET on the client what files need to be set up? Level: Intermediate Expected answer: SQLNET.ORA, TNSNAMES.ORA 7. What must be installed with ODBC on the client in order for it to work with Oracle? Level: Intermediate Expected answer: SQLNET and PROTOCOL (for example: TCPIP adapter) layers of the transport programs.

Page 138 of 259

8. You have just started a new instance with a large SGA on a busy existing server. Performance is terrible, what should you check for? Level: Intermediate Expected answer: The first thing to check with a large SGA is that it isn?t being swapped out. 9. What OS user should be used for the first part of an Oracle installation (on UNIX)? Level: low Expected answer: You must use root first. 10. When should the default values for Oracle initialization parameters be used as is? Level: Low Expected answer: Never 11. How many control files should you have? Where should they be located? Level: Low Expected answer: At least 2 on separate disk spindles. Be sure they say on separate disks, not just file systems. 12. How many redo logs should you have and how should they be configured for maximum recoverability? Level: Intermediate Expected answer: You should have at least three groups of two redo logs with the two logs each on a separate disk spindle (mirrored by Oracle). The redo logs should not be on raw devices on UNIX if it can be avoided. 13. You have a simple application with no "hot" tables (i.e. uniform IO and access requirements). How many disks should you have assuming standard layout for SYSTEM, USER, TEMP and ROLLBACK tablespaces? Expected answer: At least 7, see disk configuration answer above. Data Modeler: 1. Describe third normal form? Level: Low Expected answer: Something like: In third normal form all attributes in an entity are related to the primary key and only to the primary key 2. Is the following statement true or false: "All relational databases must be in third normal form" Why or why not?

Page 139 of 259

Level: Intermediate Expected answer: False. While 3NF is good for logical design most databases, if they have more than just a few tables, will not perform well using full 3NF. Usually some entities will be denormalized in the logical to physical transfer process. 3. What is an ERD? Level: Low Expected answer: An ERD is an Entity-Relationship-Diagram. It is used to show the entities and relationships for a database logical model. 4. Why are recursive relationships bad? How do you resolve them? Level: Intermediate A recursive relationship (one where a table relates to itself) is bad when it is a hard relationship (i.e. neither side is a "may" both are "must") as this can result in it not being possible to put in a top or perhaps a bottom of the table (for example in the EMPLOYEE table you couldn?t put in the PRESIDENT of the company because he has no boss, or the junior janitor because he has no subordinates). These type of relationships are usually resolved by adding a small intersection entity. 5. What does a hard one-to-one relationship mean (one where the relationship on both ends is "must")? Level: Low to intermediate Expected answer: This means the two entities should probably be made into one entity. 6. How should a many-to-many relationship be handled? Level: Intermediate Expected answer: By adding an intersection entity table 7. What is an artificial (derived) primary key? When should an artificial (or derived) primary key be used? Level: Intermediate Expected answer: A derived key comes from a sequence. Usually it is used when a concatenated key becomes too cumbersome to use as a foreign key. 8. When should you consider denormalization? Level: Intermediate Expected answer: Whenever performance analysis indicates it would be beneficial to do so without compromising data integrity. UNIX: 1. How can you determine the space left in a file system? Level: Low

Page 140 of 259

Expected answer: There are several commands to do this: du, df, or bdf 2. How can you determine the number of SQLNET users logged in to the UNIX system? Level: Intermediate Expected answer: SQLNET users will show up with a process unique name that begins with oracle, if you do a ps -ef|grep oracle|wc -l you can get a count of the number of users. 3. What command is used to type files to the screen? Level: Low Expected answer: cat, more, pg 4. What command is used to remove a file? Level: Low Expected answer: rm 5. Can you remove an open file under UNIX? Level: Low Expected answer: yes 6. How do you create a decision tree in a shell script? Level: intermediate Expected answer: depending on shell, usually a case-esac or an if-endif or fi structure 7. What is the purpose of the grep command? Level: Low Expected answer: grep is a string search command that parses the specified string from the specified file or files 8. The system has a program that always includes the word nocomp in its name, how can you determine the number of processes that are using this program? Level: intermediate Expected answer: ps -ef|grep *nocomp*|wc -l 9. What is an inode? Level: Intermediate Expected answer: an inode is a file status indicator. It is stored in both disk and memory and tracts file status. There is one inode for each file on the system.

Page 141 of 259

10. The system administrator tells you that the system hasn?t been rebooted in 6 months, should he be proud of this? Level: High Expected answer: Maybe. Some UNIX systems don?t clean up well after themselves. Inode problems and dead user processes can accumulate causing possible performance and corruption problems. Most UNIX systems should have a scheduled periodic reboot so file systems can be checked and cleaned and dead or zombie processes cleared out. 11. What is redirection and how is it used? Level: Intermediate Expected answer: redirection is the process by which input or output to or from a process is redirected to another process. This can be done using the pipe symbol "|", the greater than symbol ">" or the "tee" command. This is one of the strengths of UNIX allowing the output from one command to be redirected directly into the input of another command. 12. How can you find dead processes? Level: Intermediate Expected answer: ps -ef|grep zombie -- or -- who -d depending on the system. 13. How can you find all the processes on your system? Level: Low Expected answer: Use the ps command 14. How can you find your id on a system? Level: Low Expected answer: Use the "who am i" command. 15. What is the finger command? Level: Low Expected answer: The finger command uses data in the passwd file to give information on system users. 16. What is the easiest method to create a file on UNIX? Level: Low Expected answer: Use the touch command 17. What does >> do? Level: Intermediate

Page 142 of 259

Expected answer: The ">>" redirection symbol appends the output from the command specified into the file specified. The file must already have been created. 18. If you aren?t sure what command does a particular UNIX function what is the best way to determine the command? Expected answer: The UNIX man -k command will search the man pages for the value specified. Review the results from the command to find the command of interest. Oracle Troubleshooting: 1. How can you determine if an Oracle instance is up from the operating system level? Level: Low Expected answer: There are several base Oracle processes that will be running on multi-user operating systems, these will be smon, pmon, dbwr and lgwr. Any answer that has them using their operating system process showing feature to check for these is acceptable. For example, on UNIX a ps -ef|grep dbwr will show what instances are up. 2. Users from the PC clients are getting messages indicating : Level: Low ORA-06114: (Cnct err, can't get err txt. See Servr Msgs & Codes Manual) What could the problem be? Expected answer: The instance name is probably incorrect in their connection string. 3. Users from the PC clients are getting the following error stack: Level: Low ERROR: ORA-01034: ORACLE not available ORA-07318: smsget: open error when opening sgadef.dbf file. HP-UX Error: 2: No such file or directory What is the probable cause? Expected answer: The Oracle instance is shutdown that they are trying to access, restart the instance. 4. How can you determine if the SQLNET process is running for SQLNET V1? How about V2? Level: Low Expected answer: For SQLNET V1 check for the existence of the orasrv process. You can use the command "tcpctl status" to get a full status of the V1 TCPIP server, other protocols have similar command formats. For SQLNET V2 check for the presence of the LISTENER process(s) or you can issue the command "lsnrctl status". 5. What file will give you Oracle instance status information? Where is it located?

Page 143 of 259

Level: Low Expected answer: The alert.ora log. It is located in the directory specified by the background_dump_dest parameter in the v$parameter table. 6. Users aren?t being allowed on the system. The following message is received: Level: Intermediate ORA-00257 archiver is stuck. Connect internal only, until freed What is the problem? Expected answer: The archive destination is probably full, backup the archive logs and remove them and the archiver will re-start. 7. Where would you look to find out if a redo log was corrupted assuming you are using Oracle mirrored redo logs? Level: Intermediate Expected answer: There is no message that comes to the SQLDBA or SRVMGR programs during startup in this situation, you must check the alert.log file for this information. 8. You attempt to add a datafile and get: Level: Intermediate ORA-01118: cannot add anymore datafiles: limit of 40 exceeded What is the problem and how can you fix it? Expected answer: When the database was created the db_files parameter in the initialization file was set to 40. You can shutdown and reset this to a higher value, up to the value of MAX_DATAFILES as specified at database creation. If the MAX_DATAFILES is set to low, you will have to rebuild the control file to increase it before proceeding. 9. You look at your fragmentation report and see that smon hasn?t coalesced any of you tablespaces, even though you know several have large chunks of contiguous free extents. What is the problem? Level: High Expected answer: Check the dba_tablespaces view for the value of pct_increase for the tablespaces. If pct_increase is zero, smon will not coalesce their free space. 10. Your users get the following error: Level: Intermediate ORA-00055 maximum number of DML locks exceeded What is the problem and how do you fix it?

Page 144 of 259

Expected answer: The number of DML Locks is set by the initialization parameter DML_LOCKS. If this value is set to low (which it is by default) you will get this error. Increase the value of DML_LOCKS. If you are sure that this is just a temporary problem, you can have them wait and then try again later and the error should clear. 11. You get a call from you backup DBA while you are on vacation. He has corrupted all of the control files while playing with the ALTER DATABASE BACKUP CONTROLFILE command. What do you do? Level: High Expected answer: As long as all datafiles are safe and he was successful with the BACKUP controlfile command you can do the following: CONNECT INTERNAL STARTUP MOUNT (Take any read-only tablespaces offline before next step ALTER DATABASE DATAFILE .... OFFLINE;) RECOVER DATABASE USING BACKUP CONTROLFILE ALTER DATABASE OPEN RESETLOGS; (bring read-only tablespaces back online) Shutdown and backup the system, then restart If they have a recent output file from the ALTER DATABASE BACKUP CONTROL FILE TO TRACE; command, they can use that to recover as well. If no backup of the control file is available then the following will be required: CONNECT INTERNAL STARTUP NOMOUNT CREATE CONTROL FILE .....; However, they will need to know all of the datafiles, logfiles, and settings for MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES for the database to use the command.

DATABASE PACKAGES & THEIR USAGE

Page 145 of 259

Package Name Calendar

Description Provides calendar maintenance functions.

DBMS_ALERT

Provides support for the asynchronous notification of database events.

DBMS_APPLICATION_INFO

Lets you register an application name with the database for auditing or performance tracking purposes.

DBMS_AQ

Lets you add a message (of a predefined object type) onto a queue or to dequeue a message.

DBMS_AQADM

Lets you perform administrative functions on a queue or queue table for messages of a predefined object type.

DBMS_DDL

Provides access to some SQL DDL statements from stored procedures, and provides special administration operations not available as DDLs.

DBMS_DEBUG

A PL/SQL API to the PL/SQL debugger layer, Probe, in the Oracle server.

DBMS_DEFER

Provides the user interface to a replicated transactional deferred remote procedure call facility. Requires the Distributed Option.

DBMS_DEFER_QUERY

Permits querying the deferred remote procedure calls (RPC) queue data that is not exposed through views. Requires the Distributed Option.

DMBS_DEFER_SYS

Provides the system administrator interface to a replicated transactional deferred remote procedure call facility. Requires the Distributed Option.

DBMS_DESCRIBE

Describes the arguments of a stored procedure with full name translation and security checking.

DBMS_DISTRIBUTED_TRUST_ ADMIN

Maintains the Trusted Database List, which is used to determine if a privileged database link from a particular server can be accepted.

DBMS_HS

Lets you create and modify objects in the Heterogeneous Services dictionary.

DBMS_HS_PASSTHROUGH

Lets you use Heterogeneous Services to send pass-through SQL statements to non-Oracle systems.

Page 146 of 259

1. What is SQL and where does it come from? Structured Query Language (SQL) is a language that provides an interface to relational database systems. SQL was developed by IBM in the 1970s for use in System R, and is a de facto standard, as well as an ISO and ANSI standard. SQL is often pronounced SEQUEL. In common usage SQL also encompasses DML (Data Manipulation Language), for INSERTs, UPDATEs, DELETEs and DDL (Data Definition Language), used for creating and modifying tables and other database structures. The development of SQL is governed by standards. A major revision to the SQL standard was completed in 1992, called SQL2. SQL3 support object extensions and will be (partially?) implemented in Oracle8. 2. What are the difference between DDL, DML and DCL commands? DDL is Data Definition Language statements. Some examples:

CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary GRANT - gives user's access privileges to database REVOKE - withdraw access privileges given with the GRANT command

DML is Data Manipulation Language statements. Some examples:

SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates existing data within a table DELETE - deletes all records from a table, the space for the records remain CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency

DCL is Data Control Language statements. Some examples:

COMMIT - save work done SAVEPOINT - identify a point in a transaction to which you can later roll back ROLLBACK - restore database to original since the last COMMIT SET TRANSACTION - Change transaction options like what rollback segment to use

3. How does one escape special characters when building SQL queries? The LIKE keyword allows for string searches. The '_' wild card character is used to match exactly one character, '%' is used to match zero or more occurrences of any characters. These characters can be escaped in SQL. Example: SELECT name FROM emp WHERE id LIKE '%\_%' ESCAPE '\';

Page 147 of 259

Use two quotes for every one displayed. Example: SELECT 'Franks''s Oracle site' FROM DUAL; SELECT 'A ''quoted'' word.' FROM DUAL; SELECT 'A ''''double quoted'''' word.' FROM DUAL; 4. How does one eliminate duplicates rows from a table? Choose one of the following queries to identify or remove duplicate rows from a table leaving unique records in the table: Method 1: SQL> DELETE FROM table_name A WHERE ROWID > ( 2 3 SELECT min(rowid) FROM table_name B WHERE A.key_values = B.key_values);

Method 2: SQL> create table table_name2 as select distinct * from table_name1; SQL> drop table_name1; SQL> rename table_name2 to table_name1; Method 3: (thanks to Kenneth R Vanluvanee) SQL> Delete from my_table where rowid not in( SQL> SQL> select max(rowid) from my_table group by my_column_name );

Method 4: (thanks to Dennis Gurnick) SQL> delete from my_table t1 SQL> where exists (select 'x' from my_table t2 SQL> SQL> SQL> where t2.key_value1 = t1.key_value1 and t2.key_value2 = t1.key_value2 and t2.rowid > t1.rowid);

Note: If you create an index on the joined fields in the inner loop, you, for all intents purposes, eliminate N^2 operations (no need to loop through the entire table on each pass by a record). This will speed-up th Note 2: If you are comparing NOT-NULL columns, use the NVL function. Remember that NULL is not equal to NULL. This should not be a problem as all key columns should be NOT NULL. 5. How can I generate primary key values for my table? Create your table with a NOT NULL column (say SEQNO). This column can now be populated with unique values: SQL> UPDATE table_name SET seqno = ROWNUM;

Page 148 of 259

or use a sequences generator: SQL> SQL> CREATE SEQUENCE sequence_name UPDATE table_name SET START seqno WITH = 1 INCREMENT BY 1; sequence_name.NEXTVAL;

Finally, create a unique index on this column. 6. How can I get the time difference between two date columns Look at this example query: select floor(((date1-date2)*24*60*60)/3600) || ' HOURS ' || floor((((date1-date2)*24*60*60) floor(((date1-date2)*24*60*60)/3600)*3600)/60) || ' MINUTES ' || round((((date1-date2)*24*60*60) floor(((date1-date2)*24*60*60)/3600)*3600 (floor((((date1-date2)*24*60*60) floor(((date1-date2)*24*60*60)/3600)*3600)/60)*60))) || ' SECS ' time_difference from ... 7. How does one add a day/hour/minute/second to a date value? The SYSDATE pseudo-column shows the current system date and time. Adding 1 to SYSDATE will advance the date by 1 day. Use fractions to add hours, minutes or seconds to the date. Look at these examples: SQL> select sysdate, sysdate+1/24, sysdate +1/1440, sysdate + 1/86400 from dual;

SYSDATE

SYSDATE+1/24

SYSDATE+1/1440

SYSDATE+1/86400

-------------------- -------------------- -------------------- -------------------03-Jul-2002 08:32:12 03-Jul-2002 09:32:12 03-Jul-2002 08:33:12 03-Jul-2002 08:32:13 The following format is frequently used with Oracle Replication: select sysdate NOW, sysdate+30/(24*60*60) NOW_PLUS_30_SECS from dual;

NOW

NOW_PLUS_30_SECS

-------------------- -------------------03-JUL-2002 16:47:23 03-JUL-2002 16:47:53 8. How does one count different data values in a column? select dept, sum( decode(sex,'M',1,0)) MALE,

Page 149 of 259

sum( decode(sex,'F',1,0)) FEMALE, count(decode(sex,'M',1,'F',1)) TOTAL from my_emp_table group by dept; 9. How does one count/sum RANGES of data values in a column? A value x will be between values y and z if GREATEST(x, y) = LEAST(x, z). Look at this example: select f2, sum(decode(greatest(f1,59), least(f1,100), 1, 0)) "Range 60-100", sum(decode(greatest(f1,30), least(f1, 59), 1, 0)) "Range 30-59", sum(decode(greatest(f1, 0), least(f1, 29), 1, 0)) "Range 00-29" from my_table group by f2; For equal size ranges it might be easier to calculate it with DECODE(TRUNC(value/range), 0, rate_0, 1, rate_1, ...). Eg. select ename "Name", sal "Salary", decode( trunc(f2/1000, 0), 0, 0.0, 1, 0.1, 2, 0.2, 3, 0.31) "Tax rate" from my_table; 10. Can one retrieve only the Nth row from a table? this solution to select the Nth row from a table: SELECT f1 FROM t1 WHERE rowid = ( SELECT rowid FROM t1 WHERE rownum <= 10 MINUS SELECT rowid FROM t1 WHERE rownum < 10); Alternatively... SELECT * FROM emp WHERE rownum=1 AND rowid NOT IN (SELECT rowid FROM emp WHERE rownum < 10); Please note, there is no explicit row order in a relational database. However, this query is quite fun and may even help in the odd situation. 11. Can one retrieve only rows X to Y from a table?

Page 150 of 259

To display rows 5 to 7, construct a query like this: SELECT * FROM tableX WHERE rowid in ( SELECT rowid FROM tableX WHERE rownum <= 7 MINUS SELECT rowid FROM tableX WHERE rownum < 5); Please note, there is no explicit row order in a relational database. However, this query is quite fun and may even help in the odd situation. 12. How does one select EVERY Nth row from a table? One can easily select all even, odd, or Nth rows from a table using SQL queries like this: Method 1: Using a subquery SELECT * FROM emp WHERE (ROWID,0) IN (SELECT ROWID, MOD(ROWNUM,4) FROM emp); Method 2: Use dynamic views (available from Oracle7.2): SELECT * FROM ( SELECT rownum rn, empno, ename FROM emp ) temp WHERE MOD(temp.ROWNUM,4) = 0; Please note, there is no explicit row order in a relational database. However, these queries are quite fun and may even help in the odd situation. 13. How does one select the TOP N rows from a table? Form Oracle8i one can have an inner-query with an ORDER BY clause. Look at this example: SELECT * FROM (SELECT * FROM my_table ORDER BY col_name_1 DESC) WHERE ROWNUM < 10; Use this workaround with prior releases: SELECT * FROM my_table a

Page 151 of 259

WHERE 10 >= (SELECT COUNT(DISTINCT maxcol) FROM my_table b WHERE b.maxcol >= a.maxcol) ORDER BY maxcol DESC; 14. How does one code a tree-structured query? Tree-structured queries are definitely non-relational (enough to kill Codd and make him roll in his grave). Also, this feature is not often found in other database offerings. The SCOTT/TIGER database schema contains a table EMP with a self-referencing relation (EMPNO and MGR columns). This table is perfect for tesing and demonstrating tree-structured queries as the MGR column contains the employee number of the "current" employee's boss. The LEVEL pseudo-column is an indication of how deep in the tree one is. Oracle can handle queries with a depth of up to 255 levels. Look at this example: select LEVEL, EMPNO, ENAME, MGR from EMP connect by prior EMPNO = MGR start with MGR is NULL; One can produce an indented report by using the level number to substring or lpad() a series of spaces, and concatenate that to the string. Look at this example: select lpad(' ', LEVEL * 2) || ENAME ........ One uses the "start with" clause to specify the start of the tree. More than one record can match the starting condition. One disadvantage of having a "connect by prior" clause is that you cannot perform a join to other tables. The "connect by prior" clause is rarely implemented in the other database offerings. Trying to do this programmatically is difficult as one has to do the top level query first, then, for each of the records open a cursor to look for child nodes. One way of working around this is to use PL/SQL, open the driving cursor with the "connect by prior" statement, and the select matching records from other tables on a row-by-row basis, inserting the results into a temporary table for later retrieval. 15. How does one code a matrix report in SQL? Look at this example query with sample output: SELECT * FROM (SELECT job, sum(decode(deptno,10,sal)) DEPT10, sum(decode(deptno,20,sal)) DEPT20, sum(decode(deptno,30,sal)) DEPT30, sum(decode(deptno,40,sal)) DEPT40 FROM scott.emp GROUP BY job)

Page 152 of 259

ORDER BY 1;

JOB

DEPT10

DEPT20

DEPT30

DEPT40

--------- ---------- ---------- ---------- ---------ANALYST CLERK MANAGER PRESIDENT SALESMAN 1300 2450 5000 5600 6000 1900 2975 950 2850

16. How does one implement IF-THEN-ELSE in a select statement? The Oracle decode function acts like a procedural statement inside an SQL statement to return different values or columns based on the values of other columns in the select statement. Some examples: select decode(sex, 'M', 'Male', 'F', 'Female', 'Unknown') from employees;

select a, b, decode( abs(a-b), a-b, 'a > b', 0, 'a = b', 'a < b') from tableX;

select decode( GREATEST(A,B), A, 'A is greater than B', 'B is greater than A')... Note: The decode function is not ANSI SQL and is rarely implemented in other RDBMS offerings. It is one of the good things about Oracle, but use it sparingly if portability is required. From Oracle 8i one can also use CASE statements in SQL. Look at this example: SELECT ename, CASE WHEN sal>1000 THEN 'Over paid' ELSE 'Under paid' END FROM emp; 17. How can one dump/ examine the exact content of a database column? SELECT DUMP(col1) FROM tab1 WHERE cond1 = val1;

Page 153 of 259

DUMP(COL1) ------------------------------------Typ=96 Len=4: 65,66,67,32 For this example the type is 96, indicating CHAR, and the last byte in the column is 32, which is the ASCII code for a space. This tells us that this column is blank-padded. 18. Can one drop a column from a table? From Oracle8i one can DROP a column from a table. Look at this sample script, demonstrating the ALTER TABLE table_name DROP COLUMN column_name; command. Other workarounds: 1. SQL> update t1 set column_to_drop = NULL; SQL> rename t1 to t1_base; SQL> create view t1 as select <specific columns> from t1_base;

2. SQL> create table t2 as select <specific columns> from t1; SQL> drop table t1; SQL> rename t2 to t1; 19. Can one rename a column in a table? No, this is listed as Enhancement Request 163519. Some workarounds: 1. -- Use a view with correct column names... rename t1 to t1_base; create view t1 <column list with new name> as select * from t1_base;

2. -- Recreate the table with correct column names... create table t2 <column list with new name> as select * from t1; drop table t1; rename t2 to t1;

3. -- Add a column with a new name and drop an old column... alter table t1 add ( newcolame datatype ); update t1 set newcolname=oldcolname; alter table t1 drop column oldcolname; 20. How can I change my Oracle password?

Page 154 of 259

Issue the following SQL command: ALTER USER <username> IDENTIFIED BY <new_password> / From Oracle8 you can just type "password" from SQL*Plus, or if you need to change another user's password, type "password user_name". 21. How does one find the next value of a sequence? Perform an "ALTER SEQUENCE ... NOCACHE" to unload the unused cached sequence numbers from the Oracle library cache. This way, no cached numbers will be lost. If you then select from the USER_SEQUENCES dictionary view, you will see the correct high water mark value that would be returned for the next NEXTVALL call. Afterwards, perform an "ALTER SEQUENCE ... CACHE" to restore caching. You can use the above technique to prevent sequence number loss before a SHUTDOWN ABORT, or any other operation that would cause gaps in sequence values.

22. Workaround for snapshots on tables with LONG columns You can use the SQL*Plus COPY command instead of snapshots if you need to copy LONG and LONG RAW variables from one location to another. Eg: COPY TO SCOTT/TIGER@REMOTE CREATE IMAGE_TABLE USING SELECT IMAGE_NO, IMAGE FROM IMAGES; Note: If you run Oracle8, convert your LONGs to LOBs, as it can be replicated. -

23. What is SQL? SQL, Structured Query Language, is a database query language that was adopted as an industry standard in 1986.

24. What is SQL3? Among other enhancements, SQL3 supports objects. SQL3 probably won't be complete until 1998; however, Illustra already implements many SQL3 features. More information about SQL3 is available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3.

25. What are the SQL reserved words? I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3. SQL3 words are not set in stone, but you'd do well to avoid them. From sql1992.txt:

AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH, COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF, EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY, NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS, PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF, REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE, ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR, SQLEXCEPTION, SQLWARNING,

Page 155 of 259

STRUCTURE, TEST, THERE, TRIGGER, TYPE, UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT

From sql1992.txt (Annex E):

ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN, BIT, BIT_LENGTH, BOTH, CASCADE, CASCADED, CASE, CAST, CATALOG, CHAR_LENGTH, CHARACTER_LENGTH, COALESCE, COLLATE, COLLATION, COLUMN, CONNECT, CONNECTION, CONSTRAINT, CONSTRAINTS, CONVERT, CORRESPONDING, CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, DATE, DAY, DEALLOCATE, DEFERRABLE, DEFERRED, DESCRIBE, DESCRIPTOR, DIAGNOSTICS, DISCONNECT, DOMAIN, DROP, ELSE, END-EXEC, EXCEPT, EXCEPTION, EXECUTE, EXTERNAL, EXTRACT, FALSE, FIRST, FULL, GET, GLOBAL, HOUR, IDENTITY, IMMEDIATE, INITIALLY, INNER, INPUT, INSENSITIVE, INTERSECT, INTERVAL, ISOLATION, JOIN, LAST, LEADING, LEFT, LEVEL, LOCAL, LOWER, MATCH, MINUTE, MONTH, NAMES, NATIONAL, NATURAL, NCHAR, NEXT, NO, NULLIF, OCTET_LENGTH, ONLY, OUTER, OUTPUT, OVERLAPS, PAD, PARTIAL, POSITION, PREPARE, PRESERVE, PRIOR, READ, RELATIVE, RESTRICT, REVOKE, RIGHT, ROWS, SCROLL, SECOND, SESSION, SESSION_USER, SIZE, SPACE, SQLSTATE, SUBSTRING, SYSTEM_USER, TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE, TRAILING, TRANSACTION, TRANSLATE, TRANSLATION, TRIM, TRUE, UNKNOWN, UPPER, USAGE, USING, VALUE, VARCHAR, VARYING, WHEN, WRITE, YEAR, ZONE

From sql3part2.txt (Annex E)

ACTION, ACTOR, AFTER, ALIAS, ASYNC, ATTRIBUTES, BEFORE, BOOLEAN, BREADTH, COMPLETION, CURRENT_PATH, CYCLE, DATA, DEPTH, DESTROY, DICTIONARY, EACH, ELEMENT, ELSEIF, EQUALS, FACTOR, GENERAL, HOLD, IGNORE, INSTEAD, LESS, LIMIT, LIST, MODIFY, NEW, NEW_TABLE, NO, NONE, OFF, OID, OLD, OLD_TABLE, OPERATION, OPERATOR, OPERATORS, PARAMETERS, PATH, PENDANT, POSTFIX, PREFIX, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REFERENCING, REPLACE, ROLE, ROUTINE, ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SESSION, SIMILAR, SPACE, SQLEXCEPTION, SQLWARNING, START, STATE, STRUCTURE, SYMBOL, TERM, TEST, THERE, TRIGGER, TYPE, UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WITHOUT

sql3part4.txt (ANNEX E): CALL, DO, ELSEIF, EXCEPTION, IF, LEAVE, LOOP, OTHERS, RESIGNAL, RETURN, RETURNS, SIGNAL, TUPLE, WHILE

Page 156 of 259

SQL FAQ: How To's

26. How do you tell what other database objects exist? Information about databases, users, and objects in a database are stored in the Illustra system catalogs. Illustra provides DBA functions that make querying the system catalogs easier; for example, ml_dbase() lists all databases on an Illustra server: * select * from ml_dbase(); -----------------------------------------------------------|database_dba |database_name|database_path|database_release| -----------------------------------------------------------|jolly |miro |jolly |jiangwu |jta |pbrown |jolly |jolly |2.0.9 |template1 | |2.0.9 | | |

|template1 |testsaif |jiangwu |jta |jta |pbrown

|testsaif

|2.0.9 |2.0.9 | |2.0.9

|jiangwu |2.0.9 |pbrown

-----------------------------------------------------------6 rows selected The following error means the dba functions have not been installed: * select * from ml_dbase(); XP0038:Cannot find a function named 'ml_dbase' taking no arguments As the owner of a database, you can install the functions like this: % cd $MI_HOME/examples/dba_funcs % make MI_DATABASE=your_dbname all The Illustra system adminstrator can install these functions in the template1 database so a database will automatically get them at the time it is created. The DBA functions are fully documented in Chapter 6 of the Illustra System Administrator's Guide. Here is the summary list from that reference: ml_aggs([owner]) ml_cstat(object_name) ml_dbase([dba]) ml_dbase_dr(dbname) ml_finfo([owner [,language]]) ml_fsrc(func_name) ml_priv([grantee]) ml_process([user_name]) information about aggregates column statistics for object current databases dump times and logging status information about functions source of sql functions privileges server processes

Page 157 of 259

ml_rules(owner [, table_name]) ml_stat_procs(pid) ml_tables([owner [,kind]]) ml_tcols(object_name) ml_tindex(table_name) ml_tstat(object_name) ml_typecols(type_name) ml_types() ml_user()

information about rules

lock status for process tables, views and indices column information for object indices for table statistics for objects column information for type user-defined types user information

27. How do you extract just the month from an abstime? substring extracts just a portion of a string: * return('now'::abstime) as Now; ------------------------------------|Now |

------------------------------------|Mon Apr 18 09:06:10.490753 1994 PDT| ------------------------------------one row selected

* return substring('now'::abstime::text from 5 for 3) as Month; --------------|Month --------------|Apr | |

--------------one row selected For more examples, see section 3.5.7.2 in the Illustra User's Guide.

28. How do you remove duplicate entries from a table? Table foo has duplicate entries for Donald Duck: * select * from foo; ----------------------------|first_name |last_name ----------------------------|Donald |Duck | |

Page 158 of 259

|Mighty |Donald

|Mouse |Duck

| |

----------------------------3 rows selected This note describes two approaches for removing the duplicates: 1. 2. Using a temporary table to remove duplicates. Using oid to remove duplicates.

1. Using a temporary table to remove duplicates. The steps for this method are:

1.
2.

select distinct into a temporary table. * create table foo2 as select distinct first_name, last_name from foo;

3. Doublecheck the results. 4. * select * from foo2; 5. ----------------------------6. |first_name |last_name | 7. ----------------------------8. |Donald |Duck | 9. |Mighty |Mouse | 10. ----------------------------11. 2 rows selected

12. Drop the first table. 13. * drop table foo;

14. Rename the temporary table to the original table. 15. * alter table foo2 rename to foo; Don't forget to recreate any indexes and permissions that were on the original table. 2. Using oid to remove duplicates. This method describes how to remove duplicate entries from a table by using the oid. Syntax is for Illustra Version 2. Here is the original state of table foo that has duplicate entries for Donald Duck: * select oid, * from foo; ------------------------------------------|oid |first_name |last_name |

-------------------------------------------

Page 159 of 259

|202f.2001 |202f.2002 |202f.2003

|Donald |Mighty |Donald

|Duck |Mouse |Duck

| | |

------------------------------------------3 rows selected The goal is to leave the row with the lowest oid in place (202f.2001 in this example) and to delete all rows with an oid higher than this one (202f.2003 in this example). The steps are to: 1. Find all rows that have an oid greater than the min oid. 2. * select f1.oid, f1.first_name, f1.last_name 3. from foo f1 4. where f1.oid::text > 5. (select min(f2.oid::text) 6. from foo f2 7. where f1.first_name=f2.first_name 8. and f1.last_name=f2.last_name); 9. ------------------------------------------10. |oid |first_name |last_name | 11. ------------------------------------------12. |202f.2003 |Donald |Duck | 13. ------------------------------------------14. one row selected

15. Delete all rows that have an oid greater than the min oid. Change the select query to actually delete the duplicate row. Do this inside a transaction; and don't commit the change unless the results look correct. 16. * begin transaction; 17. * delete from foo f1 18. where f1.oid::text > 19. (select min(f2.oid::text) 20. from foo f2 21. where f1.first_name=f2.first_name 22. and f1.last_name=f2.last_name); 23. one row deleted 24. 25. + select * from foo; 26. ----------------------------27. |first_name |last_name | 28. ----------------------------29. |Donald |Duck | 30. |Mighty |Mouse | 31. ----------------------------32. 2 rows selected 33. 34. + end transaction;

29. How does running vacuum make queries run faster? The query optimizer uses statistics gathered on a table to determine the fastest way to execute a query. You can look at some of this information with the ml_cstat() and ml_tstat() functions. If statistics get out of date, for example if the distribution of values in a column changes dramatically, the optimizer might choose a slower way to execute the query. The vacuum command invoked with the statistics modifier updates statistics. Creating an index automatically updates the statistics for the column(s) being indexed.

Page 160 of 259

30. How can I tell what indices a table has? The ml_tindex() function lists all indices on a table; for example, the following query list all indices on the tables system catalog: * select * from ml_tindex('tables'); --------------------------------------------------------|table_name |index_name |archived |keys |

--------------------------------------------------------|tables |tables |tables |tablenameind |f |tableidind |f |tabletypeind |f | Column 19 | | Column -2 | | Column 17 |

--------------------------------------------------------3 rows selected

31. How can I tell which index Illustra is using? Call the trace function with the 'Planner.1' argument. For more information, see Appendix E of the Illustra User's Guide. 32. Can I tell Illustra which index to use? You can provide hints to the Illustra optimizer, including which index to use, with the using clause. For more information, see Appendix E of the Illustra User's Guide.

SQL FAQ: JOINS

I get too many rows when I join two tables. I don't get enough rows when I join two tables. Doing joins with Illustra ref().

Cartesian Products When you join tables, make sure that the number of join predicates in the search condition is one less than the number of tables in the from list. Otherwise, you will get many more rows returned than you probably intended. For example, table english and spanish look like this: * select * from english; ----------------------------|tag |name | * select * from spanish; ----------------------------|tag |name |

----------------------------|1 |2 |3 |one |two |three | | |

----------------------------|2 |3 |4 |dos |tres |cuatro | | |

-----------------------------

-----------------------------

Page 161 of 259

3 rows selected

3 rows selected

If you select from both tables without joining them in the where clause, you get a cartesian product, every possible combination of both: * select * from english, spanish; --------------------------------------------------------|tag |name |tag |name |

--------------------------------------------------------|2 |3 |4 |2 |3 |4 |2 |3 |4 |dos |tres |cuatro |dos |tres |cuatro |dos |tres |cuatro |1 |1 |1 |2 |2 |2 |3 |3 |3 |one |one |one |two |two |two |three |three |three | | | | | | | | |

--------------------------------------------------------9 rows selected Most likely, this is not what you had in mind. Since there are two tables in the from_list, one join predicated is needed: * select * from english, spanish where english.tag = spanish.tag; --------------------------------------------------------|tag |name |tag |name |

--------------------------------------------------------|2 |3 |dos |tres |2 |3 |two |three | |

--------------------------------------------------------2 rows selected

Inner and Outer Joins A join between two tables does not include any rows from either table that have no matching rows in the other. This is called an inner join and frequently causes confusion since fewer rows are returned than the user expects. For example, tables english and spanish look like this: * select * from english; ----------------------------|tag |name | * select * from spanish; ----------------------------|tag |name |

Page 162 of 259

----------------------------|1 |2 |3 |one |two |three | | |

----------------------------|2 |3 |4 |dos |tres |cuatro | | |

----------------------------3 rows selected

----------------------------3 rows selected

When you join these two tables, you get only the two rows that have the same tag: * select e.name, e.tag, s.name from english e, spanish s where e.tag = s.tag; ------------------------------------------|name |tag |name |

------------------------------------------|two |three |2 |3 |dos |tres | |

------------------------------------------2 rows selected Row one in table english and row cuatro in table spanish fall into the outer joins: Joins +--------------+ left outer ---> | one | 1 |

+--------------+

+--> | two | 2 : dos | inner join | | | : |

+--> | three | 3 : tres | +--------|- - -+ | 4 |

cuatro| <--- right outer

+--------------+ You can select outer join rows by using not exists. This query fetches the row in english that is not in spanish (the left outer join): * select e.name as English, e.tag, '--no row --' as Spanish from where english e not exists (select * from spanish s where e.tag=s.tag); -------------------------------------------

Page 163 of 259

|English

|tag

|Spanish

------------------------------------------|one |1 |--no row -- |

------------------------------------------one row selected This query fetches the row in spanish that is not in english (the right outer join): * select '--no entry--' as English, s.tag, s.name as Spanish from where spanish s not exists (select * from english e where e.tag=s.tag); ------------------------------------------|English |tag |Spanish |

------------------------------------------|--no entry-- |4 |cuatro |

------------------------------------------one row selected You can string all statements together with union: * select e.name::text as English, e.tag, s.name::text as Spanish from where union select from where e.name::text, e.tag, '--no entry--'::text english e not exists (select * from spanish s where e.tag=s.tag) union select from where '--no entry--'::text, s.tag, s.name::text spanish s not exists (select * from english e where e.tag=s.tag) order by 2; english e, spanish s e.tag = s.tag

-------------------------------------------

Page 164 of 259

|English

|tag

|Spanish

------------------------------------------|one |two |three |1 |2 |3 |--no entry-- | |dos |tres |cuatro | | |

|--no entry-- |4

------------------------------------------4 rows selected If you think this is a lot of trouble to retrieve outer join data, there's another way to handle known joins in Illustra that will factor in outer join data. Keep reading.

Solving Outer Joins in Illustra with ref() Confusion with outer joins was described above. This section looks at another way to resolve outer join confusions in Illustra by using ref(). We start by creating the two tables like this and inserting data: create table spanish of new type spanish_t (name varchar(20), tag integer);

create table english of new type english_t (name varchar(20), tag integer, sname ref(spanish_t));

insert into english (name, tag) values ('one', insert into english (name, tag) values ('two',

1); 2);

insert into english (name, tag) values ('three', 3);

insert into spanish (name, tag) values ('dos',

2);

insert into spanish (name, tag) values ('tres', 3); insert into spanish (name, tag) values ('cuatro', 4); Next we update the reference in english: * update english set sname = (select unique ref(s1) from spanish s1 where english.tag = s1.tag); 3 rows updated

Page 165 of 259

* select * from english; ------------------------------------------|name |tag |sname |

------------------------------------------|one |two |three |1 |2 |3 |NULL |202d.2001 |202d.2002 | | |

------------------------------------------3 rows selected Notice that the select from english returned the oid reference to spanish. You can dereference that oid as follows: * select name as english, tag, deref(sname).name as spanish from english; ------------------------------------------|english |tag |spanish |

------------------------------------------|one |two |three |1 |2 |3 |NULL |dos |tres | | |

------------------------------------------3 rows selected We can also take it the opposite way by updating the spanish_t type and spanish table as follows: * alter type spanish_t add column ename ref(english_t);

* update spanish set ename = (select unique ref(e1) from english e1 where spanish.tag = e1.tag); 3 rows updated

* select name as spanish, tag, deref(ename).name as english from spanish; ------------------------------------------|spanish |tag |english |

------------------------------------------|dos |tres |2 |3 |two |three | |

Page 166 of 259

|cuatro

|4

|NULL

------------------------------------------3 rows selected Finally, we can use union to select from both: * select name as english, tag, deref(sname).name as spanish from english union select deref(ename).name as english, tag, name as spanish from spanish order by 2; ------------------------------------------|english |tag |spanish |

------------------------------------------|one |two |three |NULL |1 |2 |3 |4 |NULL |dos |tres |cuatro | | | |

------------------------------------------4 rows selected Realize that if new rows are inserted into either table, the reference must be set in the tables that references it.

Oracle PL/SQL FAQ 33. What is PL/SQL and what is it used for? PL/SQL is Oracle's Procedural Language extension to SQL. PL/SQL's language syntax, structure and data types are similar to that of ADA. The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance). PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database. 34. Should one use PL/SQL or Java to code procedures and triggers? Internally the Oracle database supports two procedural languages, namely PL/SQL and Java. This leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in favour of Java?". Many Oracle applications are based on PL/SQL and it would be difficult of Oracle to ever desupport PL/SQL. In fact, all indications are that PL/SQL still has a bright future ahead of it. Many enhancements are still being made to PL/SQL. For example, Oracle 9iDB supports native compilation of Pl/SQL code to binaries. PL/SQL and Java appeal to different people in different job roles. The following table briefly describes the difference between these two language environments: PL/SQL: Data centric and tightly integrated into the database Proprietary to Oracle and difficult to port to other database systems

Page 167 of 259

Data manipulation is slightly faster in PL/SQL than in Java Easier to use than Java (depending on your background) Java: Open standard, not proprietary to Oracle Incurs some data conversion overhead between the Database and Java type systems Java is more difficult to use (depending on your background)

35. How can one see if somebody modified any code? Code for stored procedures, functions and packages is stored in the Oracle Data Dictionary. One can detect code changes by looking at the LAST_DDL_TIME column in the USER_OBJECTS dictionary view. Example: SELECT OBJECT_NAME, TO_CHAR(CREATED, 'DD-Mon-RR HH24:MI') CREATE_TIME,

TO_CHAR(LAST_DDL_TIME, 'DD-Mon-RR HH24:MI') MOD_TIME, STATUS FROM USER_OBJECTS WHERE LAST_DDL_TIME > '&CHECK_FROM_DATE'; 36. How can one search PL/SQL code for a string/ key value? The following query is handy if you want to know where a certain table, field or expression is referenced in your PL/SQL source code. SELECT TYPE, NAME, LINE FROM USER_SOURCE WHERE UPPER(TEXT) LIKE '%&KEYWORD%'; 37. How can one keep a history of PL/SQL code changes? One can build a history of PL/SQL code changes by setting up an AFTER CREATE schema (or database) level trigger (available from Oracle 8.1.7). This way one can easily revert to previous code should someone make any catastrophic changes. Look at this example: CREATE TABLE SOURCE_HIST -- Create history table

AS SELECT SYSDATE CHANGE_DATE, USER_SOURCE.* FROM USER_SOURCE WHERE 1=2;

CREATE OR REPLACE TRIGGER change_hist -- Store code in hist table AFTER CREATE ON SCOTT.SCHEMA -- Change SCOTT to your schema name DECLARE BEGIN if DICTIONARY_OBJ_TYPE in ('PROCEDURE', 'FUNCTION',

Page 168 of 259

'PACKAGE', 'PACKAGE BODY', 'TYPE') then -- Store old code in SOURCE_HIST table INSERT INTO SOURCE_HIST SELECT sysdate, user_source.* FROM USER_SOURCE WHERE TYPE = DICTIONARY_OBJ_TYPE AND NAME = DICTIONARY_OBJ_NAME; end if; EXCEPTION WHEN OTHERS THEN raise_application_error(-20000, SQLERRM); END; / show errors 38. How can I protect my PL/SQL source code? PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code. This is done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than the original). This way you can distribute software without having to worry about exposing your proprietary algorithms and methods. SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no "decode" command available. The syntax is: wrap iname=myscript.sql oname=xxxx.plb

39. Can one print to the screen from PL/SQL? One can use the DBMS_OUTPUT package to write information to an output buffer. This buffer can be displayed on the screen from SQL*Plus if you issue the SET SERVEROUTPUT ON; command. For example: set serveroutput on begin dbms_output.put_line('Look Ma, I can print from PL/SQL!!!'); end; / DBMS_OUTPUT is useful for debugging PL/SQL programs. However, if you print too much, the output buffer will overflow. In that case, set the buffer size to a larger value, eg.: set serveroutput on size 200000 If you forget to set serveroutput on type SET SERVEROUTPUT ON once you remember, and then EXEC NULL;. If you haven't cleared the DBMS_OUTPUT buffer with the disable or enable procedure, SQL*Plus will display the entire contents of the buffer when it executes this dummy PL/SQL block.

Page 169 of 259

40. Can one read/write files from PL/SQL? Included in Oracle 7.3 is an UTL_FILE package that can read and write operating system files. The directory you intend writing to has to be in your INIT.ORA file (see UTL_FILE_DIR=... parameter). Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command. Copy this example to get started: DECLARE fileHandler UTL_FILE.FILE_TYPE; BEGIN fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'w'); UTL_FILE.PUTF(fileHandler, 'Look ma, I''m writing to a file!!!\n'); UTL_FILE.FCLOSE(fileHandler); EXCEPTION WHEN utl_file.invalid_path THEN raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.'); END; / 41. Can one call DDL statements from PL/SQL? One can call DDL statements like CREATE, DROP, TRUNCATE, etc. from PL/SQL by using the "EXECUTE IMMEDATE" statement. Users running Oracle versions below 8i can look at the DBMS_SQL package (see FAQ about Dynamic SQL). begin EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)'; end; NOTE: The DDL statement in quotes should not be terminated with a semicolon. 42. Can one use dynamic SQL statements from PL/SQL? Starting from Oracle8i one can use the "EXECUTE IMMEDIATE" statement to execute dynamic SQL and PL/SQL statements (statements created at run-time). Look at these examples. Note that statements are NOT terminated by semicolons: EXECUTE IMMEDIATE 'CREATE TABLE x (a NUMBER)';

-- Using bind variables... sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)'; EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;

Page 170 of 259

-- Returning a cursor... sql_stmt := 'SELECT * FROM emp WHERE empno = :id'; EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id; One can also use the older DBMS_SQL package (V2.1 and above) to execute dynamic statements. Look at these examples: CREATE OR REPLACE PROCEDURE DYNSQL AS cur integer; rc integer; BEGIN cur := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(cur, 'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE); rc := DBMS_SQL.EXECUTE(cur); DBMS_SQL.CLOSE_CURSOR(cur); END; / More complex DBMS_SQL example using bind variables: CREATE OR REPLACE PROCEDURE DEPARTMENTS(NO IN DEPT.DEPTNO%TYPE) AS v_cursor integer; v_dname char(20); v_rows integer; BEGIN v_cursor := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(v_cursor, 'select dname from dept where deptno > :x', DBMS_SQL.V7); DBMS_SQL.BIND_VARIABLE(v_cursor, ':x', no); DBMS_SQL.DEFINE_COLUMN_CHAR(v_cursor, 1, v_dname, 20); v_rows := DBMS_SQL.EXECUTE(v_cursor); loop if DBMS_SQL.FETCH_ROWS(v_cursor) = 0 then exit; end if; DBMS_SQL.COLUMN_VALUE_CHAR(v_cursor, 1, v_dname); DBMS_OUTPUT.PUT_LINE('Deptartment name: '||v_dname); end loop;

Page 171 of 259

DBMS_SQL.CLOSE_CURSOR(v_cursor); EXCEPTION when others then DBMS_SQL.CLOSE_CURSOR(v_cursor); raise_application_error(-20000, 'Unknown Exception Raised: '||sqlcode||' '||sqlerrm); END; / 43. What is the difference between %TYPE and %ROWTYPE? The %TYPE and %ROWTYPE constructs provide data independence, reduces maintenance costs, and allows programs to adapt as the database changes to meet new business needs. %ROWTYPE is used to declare a record with the same types as found in the specified database table, view or cursor. Example: DECLARE v_EmpRecord emp%ROWTYPE; %TYPE is used to declare a field with the same type as that of a specified table's column. Example: DECLARE v_EmpNo emp.empno%TYPE; 44. What is the result of comparing NULL with NULL? NULL is neither equal to NULL, nor it is not equal to NULL. Any comparison to NULL is evaluated to NULL. Look at this code example to convince yourself. declare a number := NULL; b number := NULL; begin if a=b then dbms_output.put_line('True, NULL = NULL'); elsif a<>b then dbms_output.put_line('False, NULL <> NULL'); else dbms_output.put_line('Undefined NULL is neither = nor <> to NULL'); end if;

Page 172 of 259

end; 45. How does one get the value of a sequence into a PL/SQL variable? As you might know, one cannot use sequences directly from PL/SQL. Oracle (for some silly reason) prohibits this: i := sq_sequence.NEXTVAL; However, one can use embedded SQL statements to obtain sequence values: select sq_sequence.NEXTVAL into :i from dual; 46. Can one execute an operating system command from PL/SQL? There is no direct way to execute operating system commands from PL/SQL in Oracle7. However, one can write an external program (using one of the precompiler languages, OCI or Perl with Oracle access modules) to act as a listener on a database pipe (SYS.DBMS_PIPE). Your PL/SQL program then put requests to run commands in the pipe, the listener picks it up and run the requests. Results are passed back on a different database pipe. For an Pro*C example, see chapter 8 of the Oracle Application Developers Guide. In Oracle8 one can call external 3GL code in a dynamically linked library (DLL or shared object). One just write a library in C/ C++ to do whatever is required. Defining this C/C++ function to PL/SQL makes it executable. Look at this External Procedure example. 47. How does one loop through tables in PL/SQL? Look at the following nested loop code example. DECLARE CURSOR dept_cur IS SELECT deptno FROM dept ORDER BY deptno; -- Employee cursor all employees for a dept number CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE) IS SELECT ename FROM emp WHERE deptno = v_dept_no; BEGIN FOR dept_rec IN dept_cur LOOP dbms_output.put_line('Employees in Department '||TO_CHAR(dept_rec.deptno)); FOR emp_rec in emp_cur(dept_rec.deptno) LOOP dbms_output.put_line('...Employee is '||emp_rec.ename); END LOOP;

Page 173 of 259

END LOOP; END; / 48. How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy? Contrary to popular believe, one should COMMIT less frequently within a PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. The higher the frequency of commit, the sooner the extents in the rollback segments will be cleared for new transactions, causing ORA-1555 errors. To fix this problem one can easily rewrite code like this: FOR records IN my_cursor LOOP ...do some stuff... COMMIT; END LOOP; ... to ... FOR records IN my_cursor LOOP ...do some stuff... i := i+1; IF mod(i, 10000) THEN COMMIT; END IF; END LOOP; If you still get ORA-1555 errors, contact your DBA to increase the rollback segments. NOTE: Although fetching across COMMITs work with Oracle, is not supported by the ANSI standard. 49. I can SELECT from SQL*Plus but not from PL/SQL. What is wrong? PL/SQL respect object privileges given directly to the user, but does not observe privileges given through roles. The consequence is that a SQL statement can work in SQL*Plus, but will give an error in PL/SQL. Choose one of the following solutions: -- Commit every 10000 records

Grant direct access on the tables to your user. Do not use roles! GRANT select ON scott.emp TO my_user; Define your procedures with invoker rights (Oracle 8i and higher); Move all the tables to one user/schema.

50. What is a mutating and constraining table? "Mutating" means "changing". A mutating table is a table that is currently being modified by an update, delete, or insert statement. When a trigger tries to reference a table that is in state of flux (being changed), it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state.

Page 174 of 259

Another way this error can occur is if the trigger has statements to change the primary, foreign or unique key columns of the table off which it fires. If you must have triggers on tables that have referential constraints, the workaround is to enforce the referential integrity through triggers as well. There are several restrictions in Oracle regarding triggers:

A row-level trigger cannot query or modify a mutating table. (Of course, NEW and OLD still can be accessed by the trigger) . A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete.

51. Can one pass an object/table as an argument to a remote procedure? The only way the same object type can be referenced between two databases is via a database link. Note that it is not enough to just use the same type definitions. Look at this example: -- Database A: receives a PL/SQL table from database B CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL.VARCHAR2S) IS BEGIN -- do something with TabX from database B null; END; /

-- Database B: sends a PL/SQL table to database A CREATE OR REPLACE PROCEDURE pcalling IS TabX DBMS_SQL.VARCHAR2S@DBLINK2; BEGIN pcalled@DBLINK2(TabX); END; / 52. Is it better to put code in triggers or procedures? What is the difference? In earlier releases of Oracle it was better to put as much code as possible in procedures rather than triggers. At that stage procedures executed faster than triggers as triggers had to be re-compiled every time before executed (unless cached). In more recent releases both triggers and procedures are compiled when created (stored p-code) and one can add as much code as one likes in either procedures or triggers. 53. Is there a PL/SQL Engine in SQL*Plus? No. Unlike Oracle Forms, SQL*Plus does not have an embedded PL/SQL engine. Thus, all your PL/SQL code is sent directly to the database engine for execution. This makes it much more efficient as SQL statements are not stripped off and sent to the database individually.

Oracle SQL*Loader FAQ 54. What is SQL*Loader and what is it used for?

Page 175 of 259

SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database. Its syntax is similar to that of the DB2 Load utility, but comes with more options. SQL*Loader supports various load formats, selective loading, and multi-table loads. 55. Can one load variable and fix length data records? Yes, look at the following control file examples. In the first we will load delimited data (variable length): LOAD DATA INFILE * INTO TABLE load_delimited_data FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS ( data1, data2 ) BEGINDATA 11111,AAAAAAAAAA 22222,"A,B,C,D," If you need to load positional data (fixed length), look at the following control file example: LOAD DATA INFILE * INTO TABLE load_positional_data ( data1 POSITION(1:5), data2 POSITION(6:15) ) BEGINDATA 11111AAAAAAAAAA 22222BBBBBBBBBB 56. Can one skip header records load while loading? Use the "SKIP n" keyword, where n = number of logical rows to skip. Look at this example: LOAD DATA INFILE * INTO TABLE load_positional_data SKIP 5 ( data1 POSITION(1:5), data2 POSITION(6:15) )

Page 176 of 259

BEGINDATA 11111AAAAAAAAAA 22222BBBBBBBBBB 57. Can one modify data as it loads into the database? Data can be modified as it loads into the Oracle Database. Note that this only applies for the conventional load path and not for direct path loads. LOAD DATA INFILE * INTO TABLE modified_data ( rec_no region time_loaded data1 data2 data3 ) BEGINDATA 11111AAAAAAAAAA991201 22222BBBBBBBBBB990112 LOAD DATA INFILE 'mail_orders.txt' BADFILE 'bad_orders.txt' APPEND INTO TABLE mailing_list FIELDS TERMINATED BY "," ( addr, city, state, zipcode, mailing_addr "decode(:mailing_addr, null, :addr, :mailing_addr)", mailing_city "decode(:mailing_city, null, :city, :mailing_city)", mailing_state ) "my_db_sequence.nextval", CONSTANT '31', "to_char(SYSDATE, 'HH24:MI')",

POSITION(1:5) ":data1/100", POSITION(6:15) "upper(:data2)", POSITION(16:22)"to_date(:data3, 'YYMMDD')"

Page 177 of 259

58. Can one load data into multiple tables at once? Look at the following control file: LOAD DATA INFILE * REPLACE INTO TABLE emp WHEN empno != ' ' ( empno POSITION(1:4) INTEGER EXTERNAL, ename POSITION(6:15) CHAR, deptno POSITION(17:18) CHAR, mgr ) INTO TABLE proj WHEN projno != ' ' ( projno POSITION(25:27) INTEGER EXTERNAL, empno POSITION(1:4) INTEGER EXTERNAL ) 59. Can one selectively load only the records that one need? Look at this example, (01) is the first character, (30:37) are characters 30 to 37: LOAD DATA INFILE 'mydata.dat' BADFILE 'mydata.bad' DISCARDFILE 'mydata.dis' APPEND INTO TABLE my_selective_table WHEN (01) <> 'H' and (01) <> 'T' and (30:37) = '19991217' ( region service_key call_b_no ) 60. Can one skip certain columns while loading data? One cannot use POSTION(x:y) with delimited data. Luckily, from Oracle 8i one can specify FILLER columns. FILLER columns are used to skip columns/fields in the load file, ignoring fields that one does not want. Look at this example: LOAD DATA TRUNCATE INTO TABLE T1 CONSTANT '31', POSITION(01:11) INTEGER EXTERNAL, POSITION(12:29) CHAR POSITION(20:23) INTEGER EXTERNAL

Page 178 of 259

FIELDS TERMINATED BY ',' ( field1, field2 FILLER, field3 ) 61. How does one load multi-line records? One can create one logical record from multiple physical records using one of the following two clauses:

CONCATENATE: - use when SQL*Loader should combine the same number of physical records together to form one logical record. CONTINUEIF - use if a condition indicates that multiple records should be treated as one. Eg. by having a '#' character in column 1.

62. How can get SQL*Loader to COMMIT only at the end of the load file? One cannot, but by setting the ROWS= parameter to a large value, committing can be reduced. Make sure you have big rollback segments ready when you use a high value for ROWS=.

63. What is SQL*Plus and where does it come from? SQL*Plus is a command line SQL and PL/SQL language interface and reporting tool that ships with the Oracle Database Client and Server. It can be used interactively or driven from scripts. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database. SQL*Plus's predecessor was called UFI (User Friendly Interface). UFI was included in the first releases of Oracle, its interface was extremely primitive and anything but user friendly. 64. What are the basic SQL*Plus commands? The following SQL*Plus commands are available: ACCEPT Get input from the user DEFINE Declare a variable (short: DEF) DESCRIBE Lists the attributes of tables and other objects (short: DESC) EDIT Places you in an editor so you can edit a SQL command (short: ED) EXIT or QUIT Disconnect from the database and terminate SQL*Plus GET Retrieves a SQL file and places it into the SQL buffer HOST Issue an operating system command (short: !) LIST Displays the last command executed/ command in the SQL buffer (short: L) PROMPT Display a text string on the screen. Eg prompt Hello World!!! RUN List and Run the command stored in the SQL buffer (short: /) Saves command in the SQL buffer to a file. Eg "save x" will create a script file called SAVE x.sql SET Modify the SQL*Plus environment eg. SET PAGESIZE 23 SHOW Show environment settings (short: SHO). Eg SHOW ALL, SHO PAGESIZE etc. SPOOL Send output to a file. Eg "spool x" will save STDOUT to a file called x.lst START Run a SQL script file (short: @)

Page 179 of 259

65. What is AFIEDT.BUF? AFIEDT.BUF is the SQL*Plus default edit save file. When you issue the command "ed" or "edit" without arguments, the last SQL or PL/SQL command will be saved to a file called AFIEDT.BUF and opened in the default editor. In the prehistoric days when SQL*Plus was called UFI, the file name was "ufiedt.buf", short for UFI editing buffer. When new features were added to UFI, it was the initially named Advanced UFI and the filename was changed to "aufiedt.buf" and then to "afiedt.buf". They presumably needed to keep the name short for compatibility with some of the odd operating systems that Oracle supported in those days. The name "Advanced UFI" was never used officially, as the name was changed to SQL*Plus before this version was released. You can overwrite the default edit save file name like this: SET EDITFILE "afiedt.buf" 65. What is the difference between @ and @@? The @ (at symbol) is equivalent to the START command and is used to run SQL*Plus command scripts. A single @ symbol runs the script in your current directory, or one specified with a full or relative path, or one that is found in you SQLPATH or ORACLE_PATH. @@ will start a sqlplus script that is in the same directory as the script that called it (relative to the directory of the current script). This is normally used for nested command files. 66. What is the difference between & and &&? "&" is used to create a temporary substitution variable and will prompt you for a value every time it is referenced. "&&" is used to create a permanent substitution variable as with the DEFINE command and the OLD_VALUE or NEW_VALUE clauses of a COLUMN statement. Once you have entered a value it will use that value every time the variable is referenced. Eg: SQL> SELECT * FROM TAB WHERE TNAME LIKE '%&TABLE_NAME.%'; 67. How can one disable SQL*Plus formatting? Issue the following SET commands to disable all SQL*Plus formatting: SET ECHO OFF SET NEWPAGE 0 SET SPACE 0 SET PAGESIZE 0 SET FEEDBACK OFF SET HEADING OFF SET TRIMSPOOL ON

Page 180 of 259

These settings can also be entered on one line, eg.: SET ECHO OFF NEWPAGE 0 SPACE 0 PAGESIZE 0 FEED OFF HEAD OFF TRIMSPOOL ON 68. Can one send operating system parameters to SQL*Plus? One can pass operating system variables to sqlplus using this syntax: sqlplus username/password @cmdfile.sql var1 var2 var3 Parameter var1 will be mapped to SQL*Plus variable &1, var2 to &2, etc. Look at this example: sqlplus scott/tiger @x.sql '"test parameter"' dual

Where x.sql consists of:

select '&1' from &2; exit 5; 69. Can one copy tables with LONG columns from one database to another? About the fastest way of copying data between databases and schemas are by using the SQL*Plus COPY statement. Look at this example: COPY FROM SCOTT/TIGER@LOCAL_DB TO SCOTT/TIGER@REMOTE_DB CREATE IMAGE_TABLE USING SELECT IMAGE_NO, IMAGE FROM IMAGES; -

70. What is a mutating table error and how can you get around it? This happens with triggers. It occurs because the trigger is trying to update a row it is currently using. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other. 71. What packages (if any) has Oracle provided for use by developers? Oracle provides the DBMS_ series of packages. There are many which developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL, UTL_FILE. If they can mention a few of these and describe how they used them, even better. If they include the SQL routines provided by Oracle, great, but not really what was asked. 72. Describe the use of PL/SQL tables Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries or calculations. In Oracle 8 they will be able to be of the %ROWTYPE designation, or RECORD. 73. When is a declare statement needed ?

Page 181 of 259

The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone, non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used. 74. In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in the exit when statement? Why? OPEN then FETCH then LOOP followed by the exit when. If not specified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL. 75. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers? SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception. 76. How can you find within a PL/SQL block, if a cursor is open? Use the %ISOPEN cursor status variable. 77. How can you generate debugging output from PL/SQL? Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. The new package UTL_FILE can also be used. 78. What are the types of triggers? There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key words: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT etc. 79. How can variables be passed to a SQL routine? By use of the & symbol. For passing in variables the numbers 1-8 can be used (&1, &2,...,&8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific variable, place the ampersanded variable in the code itself: select * from dba_tables where owner=&owner_name; . Use of double ampersands tells SQLPLUS to resubstitute the value for each subsequent use of the variable, a single ampersand will cause a reprompt for the value unless an ACCEPT statement is used to get the value from the user. 80. You want to include a carriage return/linefeed in your output from a SQL script, how can you do this? The best method is to use the CHR() function (CHR(10) is a return/linefeed) and the concatenation function ||. Another method, although it is hard to document and isnt always portable is to use the return/linefeed as a part of a quoted string. 81. How can you call a PL/SQL procedure from SQL? By use of the EXECUTE (short form EXEC) command. 82. How do you execute a host operating system command from within SQL? By use of the exclamation point ! (in UNIX and some other OS) or the HOST (HO) command. 83. You want to use SQL to build SQL, what is this called and give an example This is called dynamic SQL. An example would be: set lines 90 pages 0 termout off feedback off verify off spool drop_all.sql

Page 182 of 259

select drop user ||username|| cascade; from dba_users where username not in (SYS,SYSTEM); spool off Essentially you are looking to see that they know to include a command (in this case DROP USER...CASCADE;) and that you need to concatenate using the || the values selected from the database. 84. What SQLPlus command is used to format output from a select? This is best done with the COLUMN command. 85. You want to group the following set of select returns, what can you group on? Max(sum_of_cost), min(sum_of_cost), count(item_no), item_no Expected answer: The only column that can be grouped on is the item_no column, the rest have aggregate functions associated with them. 86. What special Oracle feature allows you to specify how the cost based system treats a SQL statement? The COST based system allows the use of HINTs to control the optimizer path selection. If they can give some example hints such as FIRST ROWS, ALL ROWS, USING INDEX, STAR, even better. 87. You want to determine the location of identical rows in a table before attempting to place a unique index on the table, how can this be done? Oracle tables always have one guaranteed unique column, the rowid column. If you use a min/max function against your rowid and then select against the proposed primary key you can squeeze out the rowids of the duplicate rows pretty quick. For example: select rowid from emp e where e.rowid > (select min(x.rowid) from emp x where x.emp_no = e.emp_no); In the situation where multiple columns make up the proposed key, they must all be used in the where clause. 88. What is a Cartesian product? A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each table involved in the join. 89. You are joining a local and a remote table, the network manager complains about the traffic involved, how can you reduce the network traffic? Push the processing of the remote data to the remote instance by using a view to pre-select the information for the join. This will result in only the data required for the join being sent across. 90. What is the default ordering of an ORDER BY clause in a SELECT statement? Expected answer: Ascending 91. What is explain plan and how is it used? The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must have an explain_table generated in the user you are running the explain plan for. This is created using the utlxplan.sql script. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. The explain_plan table is then queried to see the execution plan of the statement. Explain plans can also be run using tkprof. 92. How do you set the number of lines on a page of output? The width? The SET command in SQLPLUS is used to control the number of lines generated per page and the width of those lines, for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines long with a line width of 80 characters. The PAGESIZE and LINESIZE options can be shortened to PAGES and LINES.

Page 183 of 259

93. How do you prevent output from coming to the screen? The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off screen output. This option can be shortened to TERM. 94. How do you prevent Oracle from giving you informational messages during and after a SQL statement execution? The SET options FEEDBACK and VERIFY can be set to OFF. 95. How do you generate file output from SQL? Expected answer: By use of the SPOOL command 96. What are Background processes in Oracle and what are they. There are basically 9 Processes but in a general system we need to mention the first five background processes. They do the house keeping activities for the Oracle and are common in any system. The various background processes in oracle are a) Data Base Writer (DBWR): Data Base Writer Writes Modified blocks from Database buffer cache to Data Files. This is required since the data is not written whenever a transaction is committed.

b) LogWriter (LGWR): LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transactions commit and log buffer fills, LGWR writes log entries into a online redo log file.

c) System Monitor (SMON): The System Monitor performs instance recovery at instance startup. This is useful for recovery from system failure

d) Process Monitor (PMON): The Process Monitor performs process recovery when user Process fails. Pmon Clears and Frees resources that process was using.

e) Checkpoint (CKPT): At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the most recent checkpoint f) Archieves (ARCH) :: The Archiver copies online redo log files to archival storal when they are busy. g) Recoveror (RECO) :: The Recoveror is used to resolve the distributed transaction in network h) Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture i) Lckn ::

Page 184 of 259

We can have upto 10 lock processes for inter instance locking in parallel sql. 97. How many types of Sql Statements are there in Oracle There are basically 6 types of sql statments. They are a) Data Defination Language(DDL) : The DDL statments define and maintain objects and drop objects.

b) Data Manipulation Language(DML) : The DML statments manipulate database data. c) Transaction Control Statements: Manage change by DML c) Session Control Used to control the properties of current session enabling and disabling roles and changing .e.g :: Alter Statements, Set Role

d) System Control Statements Change Properties of Oracle Instance .e.g:: Alter System e) Embedded Sql Incorporate DDL,DML and T.C.S in Programming Language.e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close 98. What is a Transaction in Oracle A transaction is a Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statment and ends when it is explicitly commited or rolled back. 99. Key Words Used in Oracle The Key words that are used in Oracle are: a. Committing A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements. b. Rollback A transaction that retracts any of the changes resulting from SQL statements in Transaction. c. SavePoint For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transaction into smaller points. Rolling Forward :: Process of applying redo log during recovery is called rolling forward. Cursor A cursor is a handle (name or a pointer) for the memory associated with a specific statement. A cursor is basically an area allocated by Oracle for executing the Sql Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explicit cursor for a multi row query. System Global Area(SGA) ::

d. e.

f.

Page 185 of 259

The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance.It consists of Database Buffer Cache and Redo log Buffer. g. h. i. j. k. Program Global Area (PGA) :: The PGA is a memory buffer that contains data and control information for server process. Database Buffer Cache :: Database Buffer of SGA stores the most recently used blocks of database data. The set of database buffers in an instance is called Database Buffer Cache. Redo log Buffer Redo log Buffer of SGA stores all the redo log entries. Redo Log Files Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes. Process A Process is a 'thread of control' or mechansim in Operating System that executes series of steps.

100. What are Procedure, functions and Packages Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks. Procedures do not Return values while Functions return one One Value Packages Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents

101. What are Database Triggers and Stored Procedures Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in, update to, or delete from table. Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. e.g. operations insert, update ,delete 3 before ,after 3*2.A total of 6 combinations At statement level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12. Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards.

Stored Procedures Stored Procedures are Procedures that are stored in Compiled form in the database. The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format. 102. How many Integrity Rules are there and what are they There are Three Integrity Rules. They are as follows :: a) Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null. b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced.When there is data in Child Tables the Master tables cannot be deleted. c) Business Integrity Rules ::

Page 186 of 259

The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules. 103. What are the Various Master and Detail Relation ships. The various Master and Detail Relationship are a) NonIsolated :: The Master cannot be deleted when a child is exisiting b) Isolated :: The Master can be deleted when the child is exisiting c) Cascading :: The child gets deleted when the Master is deleted. 104. What are the Various Block Coordination Properties The various Block Coordination Properties are a) Immediate Default Setting. The Detail records are shown when the Master Record are shown. b) Deferred with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the detail block. c) Deferred with No Auto Query The operator must navigate to the detail block and explicitly execute a query 105. What are the Different Optimisation Techniques The Various Optimization techniques are a) Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes b) Optimizer_hint :: set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS'); Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept where (Deptno > 25) c) Optimize_Sql :: By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT statement. All other SQL statements reuse the cursor. f45run module = my_firstform userid = scott/tiger optimize_Tp = No 106. How do u implement the If statement in the Select Statement We can implement the if statement in the select statement by using the Decode statement.e.g select DECODE (EMP_CAT,'1','First','2','Second'Null); Here the Null is the else statement where null is done . 107.How many types of Exceptions are there There are 2 types of exceptions. They are a) System Exceptions e.g. When no_data_found, When too_many_rows b) User Defined Exceptions e.g. My_exception exception When My_exception then 108. How do you use the same lov for 2 columns We can use the same lov for 2 columns by passing the return values in global values and using the global values in the code

109. How many minimum groups are required for a matrix report The minimum number of groups in matrix report are 4 110. What is the difference between static and dynamic lov The static lov contains the predetermined values while the dynamic lov contains values that come at run time

Page 187 of 259

111. What are snap shots and views Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated

112. What are the OOPS concepts in Oracle. Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects 113. What is the difference between candidate key, unique key and primary key Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table. 114. What is concurrency Cuncurrency is allowing simultaneous access of same data by different users. Locks useful for accesing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert,update or delete is being done.This lock should not be applied when we do only select from the row. b) Share lock We can do the table as Share_Lock as many share_locks can be put on the same resource. 115. Previleges and Grants Privileges are the right to execute a particulare type of SQL statements. e.g :: Right to Connect, Right to create, Right to resource Grants are given to the objects so that the object might be accessed accordingly.The grant has to be given by the owner of the object. 116. Table Space,Data Files,Parameter File, Control Files Table Space :: The table space is useful for storing the data in the database. When a database is created two table spaces are created. a) System Table space :: This data file stores all the tables related to the system and dba tables b) User Table space This data file stores all the user related tables We should have seperate table spaces for storing the tables and indexes so that the access is fast. Data Files Every Oracle Data Base has one or more physical data files. They store the data for the database. Every data file is associated with only one database. Once the Data file is created the size cannot change. To increase the size of the database to store more data we have to add data file. Parameter Files

Page 188 of 259

Parameter file is needed to start an instance. A parameter file contains the list of instance configuration parameters e.g.:: db_block_buffers = 500 db_name = ORA7 db_domain = u.s.acme lang Control Files Control files record the physical structure of the data files and redo log files They contain the Db name, name and location of dbs, data files ,redo log files and time stamp. 117. Physical Storage of the Data The finest level of granularity of the data base are the data blocks. Data Block One Data Block correspond to specific number of physical database space Extent Extent is the number of specific number of contigious data blocks. Segments Set of Extents allocated for Extents. There are three types of Segments Data Segment Non Clustered Table has data segment data of every table is stored in cluster data segment Index Segment Each Index has index segment that stores data Roll Back Segment Temporarily store 'undo' information 118. What are the Pct Free and Pct Used Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg.:: Pctfree 20, Pctused 40 119. What is Row Chaining The data of a row in a table may not be able to fit the same data block. Data for row is stored in a chain of data blocks . 120. What is a 2 Phase Commit Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply 121. What is the difference between deleting and truncating of tables Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved. 122. What are mutating tables When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select. 123. What are Codd Rules Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules.

Page 189 of 259

124. What is Normalisation Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normalisation rules. a) 1 Normal Form A table is said to be in 1st Normal Form when the attributes are atomic b) 2 Normal Form A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key

c) 3rd Normal Form A table is said to be third Normal form when it is not dependant transitively 125. What is the Difference between a post query and a pre query A post query will fire for every row that is fetched but the pre query will fire only once. 126. Deleting the Duplicate rows in the table We can delete the duplicate rows in the table by using the Rowid 127. Can U disable database trigger? How? Yes. With respect to table ALTER TABLE TABLE [ DISABLE all_trigger ] 128. What is pseudo columns ? Name them? A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns: * CURRVAL * NEXTVAL * LEVEL * ROWID * ROWNUM 129. How many columns can table have? The number of columns in a table can range from 1 to 254. 130. Is space acquired in blocks or extents ? In extents . 131. what is clustered index? In an indexed cluster, rows are stored together based on their cluster key values . Can not applied for HASH. 132. what are the data types supported By oracle (INTERNAL)? Varchar2, Number, Char, MLSLABEL. 133. What are attributes of cursor? %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT 134. Can you use select in FROM clause of SQL select ? Yes. 135. Where do u decalare Global Variable in Package? Ans: Package Specification

136. Can u create procedure or function without declaring it in Package specs?

Page 190 of 259

Ans: YES, It is called private procedure.

137. what is private function and public functions in package? Ans: If the function is declared in Package Specification then it is called Public Function. Public function can be called outside of Package. If the function is not declared in Package Specification then it is called Private Function. Private function can not be called outside of Package.

138. how do u call private functions in package? Ans: pack spcs p1... func f1(); -- Public function func f2(); -- Public function end;

pack body p1... func f1(){}; -- public func f2(){}; -- public func f3(){}; -- Private func f4(){}; -- Private end; to call private call it in public function and public fun can be called from outside.

139. create a syquence, open a new session and execute first statement as select sequence. currval from dual; what will happene? Ans:It will give an error. First time we have to fire next val & then only we can use currval.

140. I have t1 table in scott .. and same i have scott1 schema with same name... i grant select on scott1.t1 to scott, now i create a synonym for scott1.t1, what happenes when it is created. will it give runtime error or error while creating synonym? Ans: This will give an error, Same name can not be used

141. How many types of Triggers... (24)

142. tell me diff between .. 7.x, 8, 8i, 9i ( undo tablespace) Ans: 9i New Features-------------1. Rollback Segment is being replaced by Undo Tablespace. (We can use either) 2. Flashback Query - It is used to retrack wrongly committed transaction

Page 191 of 259

3. Online Table Creation (e.g. Create table as select * from ....... will generate updated table) 4. List Partition - Table can be partitioned on a list 5. Buffer catche size is now dynamic (upto 4 different sizes can be specified for buffers)

143. what is view? Ans: View is a virtual table (or logical container of data), which does not physically store data.

144. Why instade of trigger is created? Ans: To Insert/Update/Delete record from base table for any view operation

145. Are views updatable? Ans: Yes (Only if the view is based on one table, but it is NOT if more than one tables)

146. types of tuning? Ans: Application Tuning, Database Tuning, Memory Tuning, O/S Tuning

147. locking mode property of block(Immediate/Automatic/Delayed)

Automatic (default):- Identical to Immediate if the datasource is an Oracle database. For other datasources, Form Builder determines the available locking facilities and behaves as much like Immediate as possible.

Immediate:- Form Builder locks the corresponding row as soon as the end user presses a key to enter or edit the value in a text item.

Delayed:- Form Builder locks the row only while it posts the transaction to the database, not while the end user is editing the record. Form Builder prevents the commit action from processing if values of the fields in the block have changed when the user causes a commit action.

148. What is Function Over loading?

Page 192 of 259

Function Overloading means we can use the same procedure name more than one time in a package but the no of parameters should be different or their data type should be different.

149. How can we return a value in procedures?

By using in, out parameters we can return the values in procedures

150. What are the features of OOPS used in PL/SQL ? Ans: Inheritance Reusability Abstract Datatype Method Overloading 151. Can we use label for anonymous PL/SQL block? Ans: Yes, use it in <<label name>> structure 152. What are the exceptions in PL/SQL Block? Ans: CURSOR_ALREADY_OPEN, DUP_VAL_ON_INDEX, INVALID_CURSOR, INVALID_NUMBER, NO_DATA_FOUND, PROGRAM_ERROR, VALUE_ERROR, ZERO_DIVIDE 153. What are the types of Variable binding? Ans: Two types of binding Early Binding (at compile time) Late Binding (Runtime) 154. What are the user defined data types ? Ans: 1. Structured Types Object Types Collection Types Varray Nested Tables REFS (To object Types) 155. How can we know that proc has passed a value ? Ans: We can check it using IN or OUT or INOUT parameter. 156. What is the difference between REF Cursor & PL/SQL Table. Ans: REF Cursor is like Pointer whereas PL/SQL Table is like ARRAY. REF Cursor can pass to a procedure/function as a parameter directly whereas in PL/SQL table one record has to be passed each time. 157. What Is a Collection? A collection is an ordered group of elements, all of the same type (for example, the grades for a class of students). Each element has a unique subscript that determines its position in the collection. PL/SQL offers two collection types. Items of type TABLE are either index-by tables (Version 2 PL/SQL tables) or nested tables (which extend the functionality of index-by tables). Items of type VARRAY are varrays (short for variable-size arrays). Collections work like the arrays found in most third-generation programming languages. However, collections can have only one dimension and must be indexed by integers. You can define collection types in a package, then use them programmatically in your applications. Also, you can pass collections as parameters. So, you can use them to move columns of data into and out of database tables or between client-side applications and stored subprograms. In addition, collections can store instances of an object type and (except for index-by tables) can be attributes of an object type.

Page 193 of 259

Oracle Forms 4.5/ 5.0/ 6.0/ 6i and 9i FAQ 1. What is Oracle Forms and what is it used for? Oracle Forms is a 4GL Rapid Application Development (RAD) environment. Forms Builder is used to create applications to enter, access, change, or delete data from Oracle (and other) databases. The Forms Runtime environment is required to execute compiled Forms modules. Forms can also be deployed across the Web using the Oracle Internet Application Server (iAS) Forms Services. Oracle Forms is part of the Oracle Internet Developer Suite (iDS). It was previously called SQL*Forms. 2. Can an Forms FMX be moved from one operating system to another? FMX files are operating system dependent. On the other hand, FMB's are not. So, you have to regenerate them when ever you change the operating system or the Forms version. 3. How does one iterate through items and records in a specified block? One can use NEXT_FIELD to iterate (loop) through items in a specific block and NEXT_RECORD to iterate through records in a block. Code example: OriPos := TO_NUMBER(:System.Trigger_Record); First_Record; LOOP -- do processing IF (:System.Last_Record = 'TRUE') THEN Go_Record(OriPos); EXIT; ELSE Next_Record; END IF; END LOOP 4. Can on bypass the Oracle login screen? The first thing that the user sees when using runform is the Oracle logon prompt asking them for their username, password, and database to connect to. You can bypass this screen or customise it by displaying your own logon screen. Eg: ON-LOGIN

declare uname varchar2(10); pass varchar2(10);

Page 194 of 259

begin uname := 'username'; pass :='password'; logon(uname, pass||'@connect_database'); end; 5. Can one Maximize/ Minimize a Window in Forms? On MS-Windows, Forms run inside a Windows Multiple-Document Interface (MDI) window. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. Examples: set_window_property(FORMS_MDI_WINDOW,WINDOW_STATE, MINIMIZE); set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15); set_window_property('my_window_name', WINDOW_STATE, MAXIMIZE); 6. How does one suppress or customize error messages in Forms? One can either set the message level using the system variable SYSTEM.MESSAGE_LEVEL or trap the errors using the ON-ERROR or ON-MESSAGE triggers. 7. Can one issue DDL statements from Forms? DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure. A statement like CREATE TABLE X (A DATE); will result in error: Encountered the symbol "CREATE" which is a reserved word. However, you can use the FORMS_DDL built-in to execute DDL statements. Eg: FORMS_DDL('CREATE TABLE X (A DATE)'); FORMS_DDL can also be used to create dynamic SQL statements at runtime. The FORMS_SUCCESS built-in can be used to determine if the last executed built-in was successful. 8. Can one execute dynamic SQL from Forms? Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. Eg: FORMS_DDL('INSERT INTO X VALUES (' || col_list || ')'); Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism. 9. Forms won't allow me to use restricted built-in's. What should I do? How to get around the "can't use a restricted built-in in built-in XXX" message: 1. Create a TIMER at the point where you want the navigation to occur.

Page 195 of 259

Eg. create_timer('TIMER_X', 5, NO_REPEAT); 2. Code a WHEN-TIMER-EXPIRED trigger to handle the navigation DECLARE tm_name VARCHAR2(20); BEGIN tm_name := Get_Application_Property(TIMER_NAME); IF tm_name = 'TIMER_X' THEN Go_Item('ITEM_X'); END IF; END; Dirty but effective (didn't Oracle promise to fix this feature?). 10. Can one change the mouse pointer in Forms? The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow one to change the mouse pointer. The following cursor styles are supported: DEFAULT, BUSY, HELP, INSERTION and CROSSHAIR. Eg: SET_APPLICATION_PROPERTY(CURSOR_STYLE, BUSY); 11. Why doesn't my messages show on the screen? Regardless of whether you call the MESSAGE() built-in with ACKNOWLEDGE, NO_ACKNOWLEDGE, or with no mode specification at all, your message may or may not be displayed. This is because messages are displayed asynchronously. To display messages immediately, use the SYNCHRONIZE build-in: message('...'); synchronize; This can also be used to execute a query while the user is looking at the results of a previous query. 12. What happened to SQL*Menu? From Forms V4.5, SQL*Menu is fully integrated into Oracle Forms. Application menus can be added to your application by creating Menu Modules (*.MMB) and generate it to Menu Module Executables (*.MMX). 13. How does one create a custom toolbar? Create a new block, let's name it "TOOLBAR" and a canvas named "C_TOOLBAR" (for ilustration purposes). Put some iconic buttons on your canvas. Use the following properties for these buttons: Enabled: True Navigable: False Mouse Navigate: False Now set the "Canvas Type" in the canvas property palette to "Horizontal Toolbar" and the "Form Horizontal Toolbar Canvas" in the module property palette to your canvas name (C_TOOLBAR in our case). 14. How does one compile MS Help files? The Microsoft Help Compiler does not ship with Designer/2000 or Developer/2000, but you can download it from here:

Page 196 of 259

Help Compiler - FTP Sites Note: Designer/2000 includes a Help Generator that can generate source files for the Help Compiler. 15. How can I read/write OS Files from Forms? OS files can be read/written from Forms using the TEXT_IO package in Forms. The TEXT_IO package has a datatype FILE_HANDLE. It also has procedures FCLOSE, GET_LINE, NEW_LINE, PUT, PUT_LINE & PUTF and a function FOPEN. Example: DECLARE file1 TEXT_IO.FILE_TYPE; file2 TEXT_IO.FILE_TYPE; str VARCHAR2(80);

BEGIN= file1 := TEXT_IO.FOPEN( 'input.txt','r' ); file2 := TEXT_IO.FOPEN( 'output.txt', 'w' ); TEXT_IO.GET_LINE( file1, str ); TEXT_IO.PUT_LINE( file2, str ); TEXT_IO.FCLOSE( file1 ); TEXT_IO.FCLOSE( file2 ); END; 16. How can I generate all my forms in a batch? Look at this DOS Batch file example: @echo off @echo. +---------------------------------------------------------@echo. | FMXGNALL.BAT @echo. +---------------------------------------------------------@echo. | @echo. | Create runtime FMXs from source FMBs @echo. | Will convert ALL of the fmbs in the current direcotry @echo. | Usage : FMXALL.BAT username/password@connect string @echo. | @echo. +---------------------------------------------------------@echo. @echo. Username/Password@connect_string = %1 @echo.

IF %1 == "" GOTO END

Page 197 of 259

@echo Removing old FMX files del *.fmx

@echo Creating the new FMX files rem Change f45gen32 to f45gen if in 16 bit environment. FOR %%F in (*.fmb) DO start /w f45gen32 userid=%1 batch=y module=%%F

@echo. @echo Done!!! Remember to move the FMX files into your runtime directory. @echo.

:END 17. How does one get a form to run on Unix? You need to design your form on your workstation. FTP or copy the Forms's FMB file to the Unix box. If you generate for a terminal environment (character based), the syntax is: f45gen USERID=userid/passwd@db_name MODULE_TYPE=FORM MODULE=module_name If you want to generate a Library file, replace FORM with LIBRARY. Use f45genm to generate your form in a Motif environment. Use the "f45run" command to run your form. Why do terminal users hate Forms? Most Unix, MVS and VMS users do not like Forms 4.5/ 5.0/ 6.0 for a couple of reasons:

You need to design on a PC and frequently get compatibility problems (font scaling, etc); Forms 4.5 is no improvement for Forms 3.0 terminal users at all, rather it is a step backwards; Forms 4.5 uses too much memory and executables are about 400% larger than for its 3.0 counter part; The largest Oracle Forms customers still runs on Forms V3.0 and will rather throw out Oracle than to convert to Forms 4.5.

I think Oracle should bring SQL*Forms v3.0 back for terminal users. They could rename the product to Oracle Forms for Terminals, or something.

Oracle Forms and Reports Services FAQ 1. What is Forms and Reports Services?

Page 198 of 259

Oracle Forms and Reports Services is a component of the Oracle Internet Application Server (9iAS) that enables programmers to deploy Oracle Forms and Oracle Reports across the Web. Forms and Reports services as previously known as WebForms and WebReports. Some people also refer to it as the Forms and Reports Server. With Oracle's Forms and Reports Services one can web-enable existing Oracle Developer (Forms and Reports) applications without changing any application code. WebForms consist of a Forms client (downloadable Java applet) and FormsServer (Java NCA Cartridge). WebForms can be centrally deployed and managed and provides a nice thin client implementation. 2. What Web Servers can be used with the Forms and Reports Services? The Oracle HTTP Server (Apache Web server) is installed with the Forms and Reports Services. However, any web server that supports CGI (Common Gateway Interfaces) can be used. 3. How does one start and stop the Forms and Reports Services? Please note that the Forms Services will be running directly after installing the product. Use the following command to start and stop the Forms Services: $ORACLE_HOME/6iserver/forms60_server start $ORACLE_HOME/6iserver/forms60_server stop Test if the Forms server is running by navigating to the following URL: http://host_name:port/dev60html/runform.htm. Change host_name and port to the server where you HTTP server is running. the 4. How does one deploy a Form on the Web? Follow these steps to deploy a Form on the Web: 1. 2. 3. Copy or FTP the Form's FMB file to the server where the Forms Services are running. Re-compile the Form to a FMX Etc...

Forms 4.5 Questions 1) which system variables can be set by users? 1) SYSTEM.MESSAGE_LEVEL SYSTEM.DATE_THRESHOLD SYSTEM.EFFECTIVE_DATE SYSTEM.SUPPRESS_WORKING

2) Can you store objects in library? 2) Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. 3) Is forms 4.5 object oriented tool and why? 3) Yes, partially. 1) PROPERTY CLASS - inheritance property 2) OVERLOADING : procedures and functions. 4) Can you issue DDL in forms? 4) Yes, but you have to use FORMS_DDL.

Page 199 of 259

Any string expression up to 32K:

a literal an expression or a variable representing the text of a block of dynamically created PL/SQL code a DML statement or a DDL statement

Restrictions: The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. 5) What is SECURE property? 5) Hides characters that the operator types into the text item. This setting is typically used for password protection. 6) What are the types of triggers and how the sequence of firing in text item 6) Triggers can be classified as Key Triggers, Mouse Triggers, Navigational Triggers. Key Triggers: Key Triggers are fired as a result of Key action. e.g :: Key-next-field, Key-up, Key-Down Mouse Triggers: Mouse Triggers are fired as a result of the mouse navigation. e.g. When-mouse-button-pressed, when-mouse-doubleclicked, etc Navigational Triggers: These Triggers are fired as a result of Navigation. E.g : Pre-text-item, Post-Text-item. We also have event triggers like when new-form-instance and when-new-block-instance. We cannot call restricted procedures like go_to(my_block.first_item) in the Navigational triggers But can use them in the Key-next-item. The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event. The sequence of firing in a text item are as follows :: a) pre - text b) when new item c) key-next d) when validate e) post text 7) Can you store pictures in database? How? 7) Yes, in long Raw datatype or BLOB datatype. 8) What are property classes ? Can property classes have trigger? 8) Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly. By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class. Yes . All type of triggers . 9) If you have property class attached to an item and you have same trigger written for the item * Which will fire first? 9) Item level trigger fires, If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger. 10) What are record groups? * Can record groups created at run-time? 10) A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined. A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. Record group column names cannot exceed

Page 200 of 259

30 characters. Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable. TYPES OF RECORD GROUP: Query Record Group A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group. Non-query Record Group A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime. Static Record Group A static record group is not associated with a query; rather, you define its Structure and row values at design time, and they remain fixed at runtime. 11) What are ALERT? 11) An ALERT is a modal window that displays a message notifying operator of some application condition. 12) Can a button have icon and label at the same time? 12) -NO

13) What is mouse navigate property of button? 13) When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse. 14) What is FORMS_MDI_WINDOW? 14) Forms run inside the MDI application window. This property is useful for calling a form from another one. 15) What are timers? When, when-timer-expired does not fire? 15) The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing. 16) Can object group have a block? 16) Yes, object group can have block as well as program units. 17) How many types of canvases are there? 17) There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effects. 18) What are user-exits? 18) It invokes 3GL programs. 19) Can you pass values to-and-fro from foreign function? how? 19) Yes, You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function. After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface. 20) What is IAPXTB structure? 20) The entries of Pro*C and user exits and the form which simulate the Pro*c or user_exit are stored in IAPXTB table in d/b.

Page 201 of 259

21) Can you call WIN-SDK thruo' user exits? 21) YES. 22) Does, user exits support DLL on MS-WINDOWS? 22) YES. 23) What is path setting for DLL? 23) Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL. If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL. 24) How is mapping of name of DLL and function done? 24) The DLL can be created using the Visual C++ / Visual Basic Tools and then the DLL is put in the path that is defined the registry. 25) What is pre-compiler? 25) It is similar to C pre-compiler directives. 26) Can you connect to non - oracle data source ? How? 26) Yes. 27) What are key-mode and locking mode properties? level? 27) Key Mode: Specifies how oracle forms uniquely identifies rows in the database. This is property includes for application that will run against NON-ORACLE data sources. Key setting unique (default.) updateable n-updateable. Locking mode: Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form. a) immediate b) delayed 28) What are savepoint mode and cursor mode properties ? level? 28) Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily for applications that will run against non-ORACLE data sources. For applications that will run against ORACLE, use the default setting. Cursor mode - define cursor state across transaction Open/close. 29) Can you replace default form processing? How? 30) What is transactional trigger property? 30) Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage as transactional block.(NON-ORACLE datasource) default - FALSE. 31) What is OLE automation? 31) OLE automation allows an OLE server application to expose a set of commands and functions that can be invoked from an OLE container application. OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE) 34) What does invoke built-in do? 34) This procedure invokes a method. Syntax: PROCEDURE OLE2.INVOKE (object obj_type, method VARCHAR2, list list_type:= 0); Parameters: Object Is an OLE2 Automation Object. Method Is a method (procedure) of the OLE2 object.

Page 202 of 259

List Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function. 36) What is call form stack? 36) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack. 37) Can u port applications across the platforms? how? 37) Yes we can port applications across platforms. Consider the form developed in a windows system. The form would be generated in unix system by using f45gen my_form.fmb scott/tiger GUI 1) What is a visual attribute? 1) Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface. 2) Diff. between VAT and Property Class? imp 2) Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties. You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically. When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored. 3) Which trigger related to mouse? 3) When-Mouse-Click When-Mouse-DoubleClick When-Mouse-Down When-Mouse-Enter When-Mouse-Leave When-Mouse-Move When-Mouse-Up 4) What is Current record attribute property? 4) Specifies the named visual attribute used when an item is part of the current record. Current Record Attribute is frequently used at the block level to display the current row in a multi-record If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus changes. 5) Can u change VAT at run time? 5) Yes. You can programmatically change an object's named visual attribute setting to change the font, color, and pattern of the object at runtime. 6) Can u set default font in forms? 6) Yes. Change windows registry(regedit). Set form45_font to the desired font. 7) Can u have OLE objects in forms? 7) Yes. 8) Can u have VBX and OCX controls in forms? 8) Yes. 9) What r the types of windows (Window style)? 9) Specifies whether the window is a Document window or a Dialog window. 10) What is OLE Activation style property? 10) Specifies the event that will activate the OLE containing item. 11) Can u change the mouse pointer? How? 11) Yes, Specifies the mouse cursor style. Use this property to dynamically change the shape of the cursor.

Page 203 of 259

Reports 2.5 13) How many types of columns are there and what are they 5) Formula columns: For doing mathematical calculations and returning one value Summary Columns: For doing summary calculations such as summations etc. Place holder Columns: These columns are useful for storing the value in a variable 6) Can u have more than one layout in report 14) It is possible to have more than one layout in a report by using the additional layout option in the layout editor. 3) Can u run the report with out a parameter form 15) Yes it is possible to run the report without parameter form by setting the PARAM value to Null 4) What is the lock option in reports layout 16) By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields. 17) What is Flex 5) Flex is the property of moving the related fields together by setting the flex property on 18) What are the minimum number of groups required for a matrix report 8) The minimum of groups required for a matrix report are 4 7. I switched the page size to 11x8.5, but the printer still prints in portrait. Even though you set the page size in the report properties, there is a another variable in the system parameters section under the data model in the object navigator called orientation. This sets the printer orientation. Oracle starts by setting it to "default" which means that no matter how you set the page size, the user's default printer setup will be used. You can also set it to either "Landscape" or "Portrait" to force the printer orientation no matter what the user has set as default. These sorts of picky, minor details are the ones which are invariably forgotten when you are designing your report and are the reason I created our two report templates, reptmp_p and reptmp_l (portrait and landscape). For anyone who wants a consistent look in their reports I strongly recommend building a similar pair to save yourself an ulcer, unless you actually like starting from scratch every time!?! 8. I moved this field into that repeating frame, but I'm still getting a "frequency below it's group" error. Moving fields around does not change what enclosing object is considered it's parent group. Oracle carefully remembers what repeating frame a field was originally placed in and assigns that as it's parent. If you then reference a column further down the line of the query structure it will return that error. If you are not exactly sure which repeating frame a field belongs to, try dragging it out of all of them. Whichever frame will not allow it to escape is it's parent. To change a field's parent, first click on the lock button on the speed button bar. It should now look like an unlocked padlock. Now all of the fields on the layout can be repositioned regardless of their original parent items. When you are satisfied with the repositioning click the lock button again to lock the layout. Oracle will parse the layout and assumes that any item fully enclosed in a repeating frame is a child object of that frame. This can be confirmed again by trying to drag an object out of it's parent. (Cntrl - Z or edit..undo will put it back where it came from) Sometimes, for unknown and mysterious reasons, this method does not work. The alternative in this case is to highlight the field (or fields), cut it (cntrl-x), and then paste it into the desired frame. The paste does not initially set it into the right frame, but if you drag and drop it there before clicking on any other objects, and then click on something else, Oracle will usually figure what your intent was and assign the object(s) as a child of that frame. This is my preferred method of changing a field's parent as it works much more consistently then the unlock/lock method. One note though, if you are reassigning a group of fields, make sure the frame you are going to move them into is large enough to accept the whole group at once before

Page 204 of 259

you do the cut/paste. If you do the paste and then try to grow the frame to fit, you will have to cut and paste again. Once you de-select an object that has just been pasted, Oracle will assign it as a child of whatever it is in at the time. If this technique also fails, you are probably going to have to delete and then recreate the objects within the desired frame. If the object has triggers attached, save yourself some typing by creating the new object in the right frame, copying over the trigger code, and then deleting the old object 9. I must put a repeating frame around these fields. How do I do this easily? Well congratulations, you have just discovered one of the main reasons why good planning goes a long way. Oracle looks at the layout as a sort of layered inheritance model such that anything created on top of and completely inside another object is by definition a child of that object. Creation order is there for critical to the layout process. This means that placing a repeating frame on top of a field but larger than that field fails the ownership criteria. At best, if the new frame is fully enclosed within the same higher level frame as the field then the two will be considered sibling children of the higher level frame. From this point you have two options. First, you can place the new repeating frame in the correct place and then use the techniques shown above in the "I moved this field but am still getting a frequency error" to reassign the fields into the new frame. There is also a second choice (which can also be used as a solution to the above). Go ahead and draw the new frame around the fields you want to have placed in it. Now if you try to click on one of the fields you will not be able to as they are fully covered by the new frame. Now go to the "Arrange" menu. You will find the options Send to back, bring to front, move forwards, move backwards. These are used to alter an object position in the Reports layer ordering. You use the "send backwards" option to move the frame backwards until all of the fields have popped to the front and are now enclosed in it. Oracle reassigns the new repeating frame as each object's parent as they pop to the front. Note that you can only move an object back and forth amongst it's siblings. You cannot set it back below it's parent, nor in front of it's children. This means that once an object has popped to the front and had a reassignment of parent, you cannot move it back using these tools. 10. Why does part of a row sometimes get shifted to the next page, but not all of it? This is due to the way the scan works when Oracle is parsing the layout. If the tops of all the fields in a row are aligned and the fields are all of the same height and font, they should all stay together. I suspect, however, that Reports bases it's decision on the printed size rather than the field size you define to determine which objects are too large and must be shifted to the next page. This means that even if you set two fields top-aligned with the same height and font but one of them is bolded, the bolded field could get shifted to the next page due to it's bigger footprint. The solution is to put the whole row into a regular frame which is page protected. 11. What exactly does the "Print Condition" do? The print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame. As an example, assume we have created a field inside a repeating frame with Print Condition Object set to 'anchoring object', and Print Condition Type set to 'All But First'. On every instance of that repeating frame which is printed entirely within a single page, our object will not print. However, if an instance of that frame spans more than one page then our object will print on the second and every subsequent page that this instance of the repeating frame spans.

Page 205 of 259

For most objects you will not have to play with this print condition setting as the default setting is pretty good at determining what pages to print on, even though it only chooses between 'first' and 'last'. Only such things as heading objects you want reprinted on multiple pages are normally candidates for fooling around with this setting. How do I create a truly dynamic 'where' condition which the user can input on the parameter form for my select statement? While setting a simple parameter for use in defining the select statement, such as a date, bill_period_id etc. is simple, there are times when you may wish to allow a user to add any "where" statement they wish. However, if you create a varchar user variable and try to reference it as an SQL condition ( e.g. Select * from account where :usercondition) you will get an error. The secret is that the variable must be initialized to a valid SQL condition before the Data Model will accept it. This is done in the "Initial Value" spot on the variable's properties form. The usual default is "1 = 1" which simply means all rows meeting whatever other conditions are included in the select statement will pass this condition if the user does not change it in the parameter form. 12. How do I change a user parameter at runtime from a layout object trigger? Quite simply, you can't. Once the Before Report trigger has fired, Reports locks down the user parameters until the report is finished. Oh, I know you can put a statement into a layout trigger at design time and the compiler will accept it, but the moment you run the report you will get a nasty error and the report will die. Why they couldn't catch those problems at compile time I have no idea, except that it probably uses the same PL/SQL compiler as Forms which uses that same syntax for the perfectly acceptable function of changing field values. That being said, there is valid technique to mimic having a user variable which can be changed over the course of the report execution. What you have to do is create a PL/SQL package that contains a variable as well as the functions to read and write to that variable. Since variables inside a package are both local to that package and persistent over the duration of the run, you use this to save and change your variable value. I know that this seems like overkill, but it is the most efficient way of handling an issue that is very rarely encountered. As you can probably guess, this technique is a last resort to finding an SQL work around if one exists. 13. How do I set the initial values of parameters for the parameter form at runtime? This is what the Before Form trigger is primarily used for. Even if you have used a select statement to create a lookup list for the parameter, this statement is fully parsed before the parameter form is opened. Simply setting the parameter to a given value in the Before Form trigger will select that option as the default value displayed to the user. For example, assume you have a parameter called p_input_date which is intended to hold an invoice date. The following example will select the most recent invoice date as the default, and note that it properly handles exceptions to ensure that the report does not arbitrarily die if this default setting fails. Note also that like all report triggers, it must return a true or false value. function BeforePForm return boolean is begin select max(bill_period_end_date + 1) into :p_input_date from billing_period where bill_period_end_date <= (select trunc(sysdate) from dual); return (TRUE); exception when others then :p_input_date := null; 1.

Page 206 of 259

return true; end; 14. Why can't I highlight a bunch of fields and change all their format masks or print conditions at once? You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once. 15. How do I change the printed value of a field at runtime? Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value. That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure. The syntax is SRW.Set_Field_char(0,) and the output of the object that the current trigger is attached to will be replaced by . There are also SRW.set_fileld_num, and SRW.set_field_date for numeric or date fields. While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totals. Record group types There are three types of record groups: query record groups, non-query record groups, and static record groups. Query record group A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement. The records in a query record group are the rows retrieved by the query associated with that record group. Query record groups can be created and modified at design time or at runtime. Non-query record group A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime. Non-query record groups can be created and modified only at runtime. Static record group A static record group is not associated with a query; instead, you define its structure and row values at design time, and they remain fixed at runtime. Static record groups can be created and modified only at design time. You do not specify the record group type explicitly. The type is implied by when the record group is created (at design time or at runtime) and by how the group is defined. Table Type nodes Table types appear within the Types node in the Object Navigator. A table type node represents a type created by the SQL statement, CREATE TYPE AS TABLE. The table type is displayed in the Object Navigator as: table-type-name (TABLE OF table-subtype-name) The table type node is not expandable if the subtype is a built-in type. If the subtype is an object type or REF object, the attributes of the object appear as subnodes. The following SQL statements create the object type emp_typ and the table type emp_tbl. CREATE TYPE emp_typ AS OBJECT (ename VARCHAR2(30), esalary NUMBER(5,2), MEMBER PROCEDURE raise(amount NUMBER), MEMBER FUNCTION get_salary RETURN NUMBER, MAP MEMBER FUNCTION compare RETURN NUMBER); CREATE TYPE emp_tbl AS TABLE OF emp_typ;

Page 207 of 259

Oracle8 is an object-relational database management system, which means you can define additional kinds of data-specifying both the data and the ways of operating on it-and use these types within the relational model. There are two categories of user-defined datatypes: object types and collection types. User-defined datatypes use the built-in datatypes (such as CHAR, VARCHAR2, and NUMBER) and other user-defined datatypes as the building blocks for datatypes that model the structure and behavior of data in applications. An object type serves as a template for objects. An object type specifies the elements (or attributes) that make up a structured data unit like a purchase order. Some attributes, such as the list of line items, may be other structured data units. An object type also specifies the operations (or methods) you can perform on the data unit, such as determining the total value of a purchase order. Collection types describe data units that are made up of an indefinite number of elements, all of the same datatype. The collection types are varying array types and table types. A varying array type specifies a data unit called VARRAY, which is an ordered set of data elements all of the same datatype. The number of elements in a VARRAY (or its size) is variable. However, you must specify a maximum size when you declare the varying array type. A table type specifies a data unit called a nested table, which is an unordered set of data elements all of the same datatype. A nested table has a single column, and the type of that column is a built-in type or an object type. Matrix reports A matrix (crosstab) report contains one row of labels, one column of labels, and information in a grid format that is related to the row and column labels. A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database. To create a matrix report, you need at least four groups: one group must be a cross-product group, two of the groups must be within the cross-product group to furnish the "labels," and at least one group must provide the information to fill the cells. The groups can belong to a single query or to multiple queries.

What are the Delimiters we are using in the SQL* Loader? Delimiters are used to separate the column values in control file. In SQL * Loader we commonly using delimiters is camas. Bookmark Go to End Frequently Asked Questions (FAQ) Oracle Payables Invoice Processing Release 10.7, 11.0 and 11.5(11i) The information in this document has been reviewed and is current as of 22-Nov-2002. Instructions for the reader: This FAQ document identifies the most frequently reported how-to questions relating to the Oracle Payables Invoice Processing. The articles below do not include bugs/patches or troubleshooting as these are addressed in great detail in the notes referenced at the bottom of this document. FAQ Summary 1. iSupplier Invoices: How do I use iSupplier Portal Invoice Entry?

2. 3. 4. 5. 6. 7.

Match/Hold: How do I remove a Final Matching hold so that I can pay the invoice? Match: What do the codes in the Final Match flag mean and what does Final Match do? Invoice Type: What is a "Mixed" invoice and how do I enter one? Tax: How do I create a Withholding Tax Invoice? Interest: How do I create Interest Invoices? Match: How to Match Invoices to Purchase Orders?

Page 208 of 259

8.

9. 10. Supplier Import: Is it possible to import suppliers from my legacy system into Oracle Payables? 11. Requester: In 11i, what is the "Requestor" field used for on the Invoice Workbench? 12. Setup: What articles, white papers, or manuals should I read for more information on Expense 13. 14.
Report Import (Invoice Import in 10.7 and 11.0)? Keywords: What are the MetaLink keywords I should use when searching for Invoice Processing Issues? Patches: List of One-Off Patch available for Invoice Processing

New Features: What new Invoice Processing features have been introduced since 11i was released? Approval/Validation: What happened to the Invoice Approval option after applying 11i.AP.I?

FAQ Details The Invoice document is used to bill the Buyer for services and/or products delivered by the Seller. Credit is the means by which we are able to obtain immediate benefit of goods or services upon the promise of payment at a future date.

Credit memo: When you want to adjust an invoice, document issued by the vendor to record an adjustment against an invoice. Description The supplier presents to the customer for the ordered or delivered, received or consumed goods or services a detailed invoice. The customer disputes the invoice and works with supplier to resolve issue. If any discrepancy is found, the customer shall start the process to treat incorrect invoices. Once Supplier and Customer agree upon the nature of the dispute, Supplier issues a credit memo to correct the problem. Buyer receives credit memo, reconciles with order and contract information and issues payment. Negative = Credit Positive = Debit

Verify its correctness.

o o o o o

Note the reason for the credit if it is not clear on the credit memo itself Indicate the account and center where the credit should be applied. Forward all credits to Accounts Payable immediately so that the credit can be applied to your cost center and deducted from the next payment to the vendor. DO NOT HOLD CREDITS IN THE DEPARTMENT FOR ANY REASON. Accounts Payable will apply the credit against any open invoices in the system. Make a copy for your records.

Debit memo: Negative amount invoice created by us and sent to supplier to notifying him about the credit we are recording. AP is divided in to 2 workbenches. Invoice workbench Payable workbench We usually enter supplier invoice either in Invoice workbench or quick invoice window. Invoice workbench: Contains: Invoice Batch window Invoice window

Page 209 of 259

Distribution window Other associated windows When to use: Incase of complex invoices or invoices that requires online validation. When an invoice requires immediate action. Quick invoice window: Used for quick high volume invoice entry for invoices that dont requires extensive validation. After entry just import into payable system, validation and defaulting will occur during import. For more see page 342 of Oracle payables.pdf Invoice distribution: It allocates total invoice allowance to various expense or asset accounts. Expanse Reports: Invoice Creation: Invoice Distributions: Account: Company have different COA so follow that hierarchy for each set of item. Accounting Date: Date when we are planning to post it to GL ie. GL Date. Payments: Record: Manual payments (checks,wire) which are made out of OP and they will be recorded in Op and update the invoice for which you have paid. Computer Generated: Combined:

Page 210 of 259

Payment: Lookup: It is a predefined values used as a LOV. In some fields we select a value from a predefined set of values, In some cases we have defined them in the setup windows such as supplier name,payment terms or tax codes. Other predefined set of values are Lookup codes. Lookup Category Lookup type ex. Invoice type Allowed values are called Lookup names. Ex. Standard, Debit memo, Credit ,memo, Prepayment. For a lookup type we can define upto 250 Lookup names. Navigation: SetupLookups For more details see Developers Guide pg. 58. Distribution Sets: It is a predefined set of distribution for a repeated or a same set of distribution form a supplier. We can either link it to supplier site or we can link it to the invoice. There are 2 types of distribution sets. Full Distribution Sets: We will define % amount of the invoice to each distribution line and sum of all lines must be either 0 or 100. We can enter ve % values. Skeleton Distribution Sets: Leave the % field as 0 so that at the time of invoice creation you ca enter amount in different distribution lines. For more details see Developers Guide pg. 63. Purchase document: Use Bank window to define internal bank branch from which you disburse payments. For each bank account we can define payment document for check, EFT, EDI or wire transfer and other payment methods.

Q1. iSupplier Invoices: How do I use iSupplier Portal Invoice Entry? A: iSupplier Invoice entry is a new feature released with one-off patch 2234922, Procurement Family Pack H and Financials Family Pack C (same as 11i.AP.J). Using this new feature your suppliers can enter their invoices on-line directly into AP through the iSupplier module. For a complete overview of this new feature including implementation steps and usage instructions, please refer to the 11i Payables User Guide (pages 4-171 through 4-174) available via Metalink. This users guide is current as of Family Pack C (11i.AP.J) and contains installation instructions for all new features released in 11i. [top] Q2. Match/Hold: How do I remove a Final Matching hold so that I can pay the invoice? A:This hold is in effect because the invoice was matched to a PO line that has a status of Final Closed. There is no way to manually remove the hold; the system must remove the hold. There are two workarounds for this situation: Workaround #1: You need to reverse the distribution line that has the final match hold. You can then create a new PO line, and match to that line. Workaround #2: You can manually create a distribution line on the invoice that is not matched to the PO, but is charged to the correct GL account. For More information on Final Match Holds see Note 1026090.6. [top] Q3. Match:What do the codes in the Final Match flag mean and what does Final Match do?

Page 211 of 259

A:After you match an invoice to a Purchase Order, you can look at the AP_INVOICE_DISTRIBUTIONS_ALL table and observe different codes in the FINAL_MATCH FLAG column. The FINAL_MATCH_FLAG has the following QuickCodes: N No The PO shipment line has not been matched. Y Yes The PO shipment line has been matched, AND one of the invoices for this PO has been final matched. When a PO is final matched to an invoice, all other invoices for that PO are updated, too. So you cannot tell from this flag, which invoice was final matched. D Done The PO shipment line is closed. You cannot invoice this distribution line. Note: When you match an invoice to a PO, nothing special happens. But when you final match an invoice to a PO, that means you can never match another invoice to that PO. The PO lines that have been matched are closed. [top] Q4. Invoice Type: What is a "Mixed" Invoice and how do I enter one? A:Mixed Invoices are invoices or credit/debit memos for which you can perform both positive and negative matching to purchase orders and to other invoices. For example, you can enter an invoice for -$100 with Invoice Type Mixed. You can match to an invoice for $-200, and match to a purchase order for $100. To enter a Mixed invoice: 1. Enter the invoice or credit/debit memo in the Invoices Summary, and enter Mixed as the invoice Type. You can enter either a positive or negative invoice amount. 2. Match to purchase orders, and/or invoices. [top] Q5. How do I create a Withholding Tax invoice? A:After you apply withholding tax to an invoice, you can optionally create invoices to remit withheld tax to the tax authority. Payables can automatically create withholding tax invoices, or you can perform this task manually. If you chose to automatically create withholding tax invoices, you must choose whether to do this during Approval or during payment processing. Indicate this choice in the Withholding Tax region of the Payables Options window. See: Withholding Tax Payables Options. If you choose to create withholding tax invoice manually, create an invoice for each Withholding Tax type invoice distribution on an invoice. Create the invoice for the tax authority supplier and site assigned to the Withholding Tax type tax name and for the amount of the Withholding Tax type invoice distribution. Please see Note 198307.1 and the 11i Payables User Guide (pages 10-26 through 10-55), for more information on Withholding Tax invoice creation. [top] Q6. Interest: How do I create Interest Invoices? A:Chapter 10 of the 11i Payables User Guide discusses setting up and using Interest Invoices. Also see Note 198308.1 for more information on creating Interest Invoices including coverage of the following Interest Invoice sub-topics: 1) Setting steps that must be completed 2) Minimum Interest amounts 3) Expense GL Account to be charged for interest expense 4) Liability GL Account to be charged for interest expense 5) Automatic Interest 6) Invoice Due Date calculations 7) Interest amount calculations [top] Q7. Match: How do I Match Invoices to Purchase Orders?

Page 212 of 259

A: Note 198535.1 provides detailed instructions for matching purchase orders to Invoices. This content is presented in the form of a white paper in PDF format. The 11i Payables User Guide (pages 4-68 through 4-82) also provides a thorough overview of the Invoice Matching process. [top] Q8. New Features: What new Invoice Processing features have been introduced since 11i was released? A: For a complete description of new features released in Mini-Packs "A" through "I" please review Note 166537.1. Beginning with 11i.AP.J and continuing with Family Packs C+, Payables will deliver new feature descriptions in the "About" document for each Mini/Family Pack. Please see the 11i.AP.J About document for more details. AP support strongly recommends that you install the corresponding documentation patch for Mini/Family Packs that you apply. These documentation patches contain the most up to date OnLine Help files with instructions on how to use or implement the new functionality introduced by the patch. Note: 11i.AP.J was the last Payables Mini-Pack for 11i. After Mini-Pack J, Payables will deliver all 11i consolidated patches in Family Packs. 11i.AP.J will contain the same code release as Financials Family Pack C. New Invoice Processing Features by Mini/Family Pack: AP.J / Family Pack C: Interest Expense Proration, Enhanced Matching Controls for Finally Closed Purchase Orders, Payment Batch Enhancements, Invoice Approval Workflow Enhancements, iSupplier Portal Invoices. AP.I: View Currency Details, Primary Pay Site, Invoice Approval Workflow AP.E: Negative Supplier Balance Report, Employee Update Program AP.A: Automatic Creation of Debit Memo from RTS, Input Tax Groups [top] Q9. Approval/Validation: What happened to the Invoice Approval option after applying 11i.AP.I? A: In Mini-pack I, Payables is adding a new workflow named Invoice Approval Workflow that asks approvers to review invoice details, and confirm online whether the invoice is accurate and should be paid. The Payables Approval program has been renamed to prevent confusion with the new workflow and to more accurately reflect its function. For a complete list of the renamed programs see Note: 179837.1. [top] Q10. Supplier Import: Is it possible to import suppliers from my legacy system into Oracle Payables? A: This functionality does not currently exist however enhancement an enhancement request has been logged. Please follow bug 94383 for up to date status on this request. [top] Q11. Requestor: In 11i, what is the "Requestor" field used for on the Invoice Workbench? A: This field represents the person who requested the goods or services that are on the invoice. If you use Invoice Approval Workflow, then you can define rules that use this value to generate a hierarchical list of approvers for the invoice. [top] Q12. Setup: What articles, white papers, or manuals should I read for more information on Invoice Processing? A: Please see the Metalink Note 207154.1 for the most current version of the 11i Payables Users Guide. [top] Q13. What are the MetaLink keywords I should use when searching for Invoice Processing Issues on MetaLink? A: PAYABLES; APXINWKB; INVOICE [top]

Page 213 of 259

Q14. Patches: List off One-Off Patch available for Invoice Processing A: A listing of the most frequently requested one-off patches for Invoice processing can be found in Note 202259.1. [top] IMPORTANT: If you did not find the information you were searching for, please review the following Payables Invoice Processing information: Payables Invoice Processing Current Issues Payables Invoice Processing One-Off Patches Payables Invoice Processing Setup and Usage Instructions Payables Invoice Processing Frequently Asked Questions (FAQ's) Payables Invoice Processing Troubleshooting Guide Copyright 2002 Oracle Corporation. All rights reserved. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Oracle Corporation does not warrant that this document is error-free, nor does it provide any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the prior written permission of Oracle Corporation. . Bookmark Go to End Patches Guide Oracle Payables Payables Open Interface and Expense Report Import (formerly Invoice Import) Versions 10.7, 11.0 and 11.5(11i) The information in this document has been reviewed and is current as of 26-Nov-2002

Instructions for the reader: This Patches Guide provides information for one-off patches, which may or may not be included in recent Mini-Packs or Family Packs. Click on the patch number to view specific details about the patch. Before application of the patches listed in this document, please be sure you have reviewed the information provided in the Payables Critical Patch Note. Patch list Summary APXXTR: Expense Report Import (Invoice Import in 10.7 and 11.0) For more information click on the patch number listed below 1) Patch 2385900 11i Import fails with APP-SQLAP-10916: APIDBI/1:ORA-01458:invalid length inside variable character string. ONE-OFF FOR BASE BUG 2385900. 2) Patch 2222486 11i Import errors with Signal 11 when Prepayment is applied to expense report. ONE-OFF FOR BASE BUG 2222486. 3) Patch 2277148 11i Import fails with APP-SQLAP-10916: apiisp/01:ORA-1458:invalid length inside variable character string. ONE-OFF FOR BASE BUG 2277148. 4) Patch 1858968 11i Imported Expense Reports Created with site of Office Instead of Home. ONE-OFF FOR BASE BUG 1858968. 5) Patch 2199740 11i Import Fails with APP-SQLAP-10916: APIICB/1:ORA 01722:Invalid Number. ONEOFF FOR BASE BUG 1960350. 6) Patch 2606164 11i Expense Report Import truncates invoice amount in the Payment Schedules for expense reports. ONE-OFF FOR BASE BUG 2606164. 7) Patch 1135567 10.7 Import Allows Invoices to be imported into closed period. ONE-OFF FOR BASE BUG 1135567. 8) Patch 2425909 11i Import fails with Signal 11 after applying patch 2244869. ONE-OFF FOR BASE BUG 2425909.

Page 214 of 259

9) Patch 2478471 11i Import fails with APP-SQLAP-10916: apiicv/5:ORA-01426: numeric overflow. ONEOFF FOR BASE BUG 2478471. APXIIMPT: Open Interface Import 1) Patch 2227273 11i Open Interface Import report shows duplicate invoices with the same invoice number. ONE-OFF FOR BASE BUG 2204291. 2) Patch 2361634 11i APXIIMPT report truncates report header information. ONE-OFF FOR BASE BUG 2303767. 3) Patch 2017593 11i APXIIMPT does not reject invoices matched to POs with wrong PO lines. ONE-OFF FOR BASE BUG 1927155. 4) Patch 2538037 11i Open Interface gives IPV line on invs uploaded w/o unit. ONE-OFF FOR BASE BUG 2531058. 5) Patch 2442692 11i Invoices not imported even if the dist code concat is valid. ONE-OFF FOR BASE BUG 2429210. Patch Details APXXTR: Expense Report Import (Invoice Import in 10.7 and 11.0) 1) 2385900 Import fails with APP-SQLAP-10916: APIDBI/1:ORA-01458: invalid length inside variable character string Download Patch 2385900 Problems fixed by this patch: Import fails with: Getting invoice id Validating holds Inserting invoice records APP-SQLAP-10916: apidbi/1:ORA-01458: invalid length inside variable character string Cleaning allocated memory See Alert 201119.1 for more details on this bug Files fixed and version: apidib.lpc 115.10.1156.5 Prerequisite Patch Level: 11i.AP.I Fixed in Mini-Pack or Family Pack:N/A [top] 2) 2222486 Import Errors with Signal 11 Download Patch 2222486 Problems fixed by this patch When a prepayment is applied to an expense report and the expense report is imported, the import program fails with signal 11 error.This is bug 2021385 Prerequisite Patch Level: 11i.AP.F Fixed in Mini-Pack or Family Pack:11i.AP.I [top] 3) 2277148 Import fails with APP-SQLAP-10916: apiisp/01:ORA-01458: invalid length inside variable character string Download Patch 2277148 Problems fixed by this patch After applying 11i.AP.H, the following errors were reported:Import fails with APP-SQLAP-10916: apiisp/01:ORA-1458: invalid length inside variable character string. Program was terminated by signal 11. Files fixed and version: apiisp.lpc 115.11 Prerequisite Patch Level: 11i.AP.H Fixed in Mini-Pack or Family Pack: N/A [top] 4) 1858968 Imported Expense Reports Created with site of Office instead of Home Download Patch 1858968 Problems fixed by this patch: Imported Expense Reports Created with site of Office Instead of Home.More information can be found in Note 156780.1 Files fixed and version: apxgii.lpc 115.16 Prerequisite Patch Level: 11i.AP.E Fixed in Mini-Pack or Family Pack: 11i.AP.G [top] 5) 2199740 Import Fails with APP-SQLAP-10916: APIICB/1:ORA 01722: Invalid Number Download Patch 2199740 Problems fixed by this patch: Payables Invoice Import fails with the error APP-SQLAP-10916: APIICB/1:ORA 01722: Invalid Number. Files fixed and version: apiicb.lpc 115.8 Prerequisite Patch Level:N/A Fixed in Mini-Pack or Family Pack:11i.AP.I [top] 6) 2606164 Expense Report Import truncates invoice amount in the Payment Schedules for expense reports

Page 215 of 259

Download Patch 2606164 Problems fixed by this patch: Expense report import program was removing the decimal points of payment currency invoice amount. e.g. If the invoice amount is 9.99 and the invoice currency and payment currencies are same, then it was calculating the payment currency invoice amount as 9 instead of 9.99. Files fixed and version: apidbi.lpc-115.17 Prerequisite Patch Level: There are no Prereq patches included or required for/with this patch Fixed in Mini-Pack or Family Pack: 11i.FIN_PF.D (Not yet released) [top] 7) 1135567 Import Allows Invoices to be imported into closed period Download Patch 1135567 Problems fixed by this patch: Import Allows Invoices to be imported into closed period Files fixed and version: N/A Prerequisite Patch Level: 10.7.AP.N Fixed in Mini-Pack or Family Pack: 10.7.AP.U (11.0 bug fix is included in 11.0.AP.D) [top] 8) 2425909 Import fails with Signal 11 after applying patch 2244869 Download Patch 2425909 Problems fixed by this patch: Import provides correct matching files Files fixed and version: N/A Prerequisite Patch Level: Patch must be applied over patchset 11i.AP.G and oneoffs 2222486, 2244869 and 2214599. Fixed in Mini-Pack or Family Pack: N/A [top] 9) 2478471 Import fails with APP-SQLAP-10916: apiicv/5:ORA-01426: numeric overflow Download Patch 2478471 Problems fixed by this patch: The Expense Report Import creates new vendors with numeric overflow without errors. Files fixed and version: N/A Prerequisite Patch Level: 11i AP.J Fixed in Mini-Pack or Family Pack: 11i.FIN_PF.D (Family Pack D) and higher [top] APXIIMPT: Open Interface Import 1) 2227273 Open Interface Import report shows duplicate invoices with the same invoice number Download Patch 2227273 Problems fixed by this patch: Open Interface Import report shows duplicate invoices with the same invoice number. Files fixed and version: APXIIMPT.rdf 115.118 Prerequisite Patch Level: 11i.AP.F Fixed in Mini-Pack or Family Pack: 11i.AP.I [top] 2) 2361634 APXIIMPT report truncates report header information Download Patch 2361634 Problems fixed by this patch: Open Interface Import Truncating Report Header Information. Files fixed and version: APXIIMPT.rdf 115.120 Prerequisite Patch Level: 11i.AP.G Fixed in Mini-Pack or Family Pack:11i.AP.J [top] 3) 2017593 APXIIMPT does not reject invoices matched to POs with wrong PO lines Download Patch 2017593 Problems fixed by this patch: APXIIMPT does not reject invoices matched to POs with wrong PO lines Files fixed and version: apiimptb.pls Prerequisite Patch Level: No Mini-Pack pre-requisite however must apply one-off 1952655 Fixed in Mini-Pack or Family Pack: 11i.AP.G [top] 4)2538037 Open Interface gives IPV line on invs uploaded w/o unit Download Patch 2538037 Problems fixed by this patch: If the line and quantity invoiced is provided in the Open Interface Form withhout any unit price then the Payables Open Interface imports the invoice will null unit price resulting in creation of IPV Lines when the Invoice is accounted. Files fixed and version: apiimptb.pls 115.7.1157.8

Page 216 of 259

Prerequisite Patch Level: 11i.AP.G Fixed in Mini-Pack or Family Pack: 11i.FIN_PF.D [top] 5)2442692 Invoices not imported even if the dist code concat is valid Download Patch 2442692 Problems fixed by this patch: Invoices are getting rejected when the Dynamic Insertion is ON even if the Dist Code Concatenated is valid. Files fixed and version: apiimptb.pls 115.7.115.7 Prerequisite Patch Level: 11i.AP.G Fixed in Mini-Pack or Family Pack: 11I.FIN_PF.D [top]

IMPORTANT:If you did not find the information you were searching for, please review the following Payables Import documents Payables Invoice Import Current Issues Payables Invoice Import One-Off Patches Payables Invoice Import Setup and Usage Instructions Payables Expense Report Import Troubleshooting Guide Payables Open Interface Import Troubleshooting Guide Payables Expense Report Import Frequently Asked Questions (FAQs) Payables Open Interface Import Frequently Asked Questions (FAQs) Copyright 2002 Oracle Corporation. All rights reserved. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Oracle Corporation does not warrant that this document is error-free, nor does it provide any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the prior written permission of Oracle Corporation.. . Bookmark BookmarkGo to End Troubleshooting Guide Oracle Payables Payables Transfer to GL (Posting) Versions 10.7, 11.0, 11.5 (11i) The information in this document has been reviewed and is current as of 25-Nov-2002. Go to End

Instructions for the reader: This Troubleshooting document identifies the most frequently reported setup and usage problems/errors relating to Payables Transfer to General Ledger. The articles below do not include bugs/patches or FAQ's, as these are addressed in great detail in the notes referenced at the bottom of this document. Troubleshooting Summary 15. Script: Diagnostic Script that identifies transactions that are not transferred to GL (Release 11.5).

16. Script: Diagnostic Script that identifies problems with the transfer to GL process for one transaction
or and entire Payables Transfer to GL run (Release 11.5).

17. Script: Diagnostic Script that identifies problems posting a transaction (Release 10.7 and 11.0).

Page 217 of 259

18. Script: Diagnostice Script that provides table level details of invoices and payments. 19. Prob: There are payments and/or invoices that are not posting to GL, and you believe they should
post.

20. Prob: Payables Transfer to GL was successful, but the Journal Import is not importing the data into
GL

21. Error: UNDIST error on some payments when using Automatic Offsets (Release 10.7 and 11.0). 22. Prob: RATE exception when running Payables Transfer to GL. 23. Prob: PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD)
to GL (Release 10.7 and 11.0).

24. Error: Payables Transfer to GL errors with APP-10962 APJEL/35 ORA-1458 (Release 10.7 and
11.0).

25. Prob: Payables Transfer to GL program / Accounts Payable Journal Entry Audit Report shows No
data found (Release 10.7 and 11.0).

26. Prob: Payables Transfer to General Ledger Report shows No Data Exists (Release 11i) 27. Prob: The Journal Import process fails when kicked off by the Payables Transfer to GL process
(Release 10.7 and 11.0).

28. Error: Closing the AP Accounting Period errors with APP-SQLAP-10741 (Release 11.5). 29. Error: Payables Transfer to General Ledger Report lists some of the transactions as "Accounting
entries have accounting entry creation errors" (Release 115).

30. Error: Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.tmp creation for
FND_FILE failed ORA-06512 (Release 11.5).

31. Prob: What articles, white papers, or manuals should I read for more information on Payables
Transfer to GL?

32. Prob: What are the MetaLink keywords I should use when searching for Payables Transfer to GL
on MetaLink?

33. Prob: The problems and solutions listed in this guide do not answer my question.
Note: Create Accounting issues are listed separately in Note 131225.1 Troubleshooting Details 1. Script: Diagnostic Script that helps to identify transactions that are not transferred to GL for Release 11.5. Sol: The Closing script is available for download in Note 180165.1. This script lists any transactions that are not accounted or transferred to GL in an html file in portrait format. [top] 2. Script: Diagnostic Script that identifies problems with the Transfer to GL process for one transaction or an entire Payables Transfer to GL run for Release 11.5. Sol: The Posting Diagnostic script is available for download in Note 185935.1. This script lists any problems when running the Payables Transfer to GL process in an html file in portrait format. [top] 3. Script: Diagnostic Script that identifies problems posting a transaction for Release 10.7 and 11.0. Sol: The scripts found in Note 105929.1 help identify problems when posting a transaction. [top] 4. Script: Diagnostice Script that provides table level details of invoices and payments. Sol: Please download and run the APLIST script from Note 148388.1 to see detailed data information on an invoice or payment. [top]

Page 218 of 259

5. Prob: There are payments and/or invoices that are not posting to GL and you believe they should post. Sol: Ensure invoices are ready to post. An invoice must be approved and/or have no posting holds in order to be selected for posting. To ensure that your invoices are ready to post, you should run autoapproval and review the hold reports. Invoice Hold Report - displays all held invoices. Posting Hold Report - only displays invoices with holds that prevent posting. Matching Hold Report - only displays invoices with matching holds. Ensure payments are made. You must insure that all your payment batches have been completed (either confirmed or canceled). A period will not close if there are payment batches in a status other than confirmed or canceled. If an invoice is approved but will not pay, you should insure that the invoice is due to be paid and that the payment schedule is not on hold. [top] 6. Prob: Payables Transfer to GL was successful, but the Journal Import is not importing the data into GL Sol: Examine AP Reports for Exceptions and Correct. Transactions that were selected but encountered some exception are not inserted into the GL_INTERFACE table nor are they updated to Posted. (Exceptions can be an inactive accounting flexfield value, a GL_DATE in an un-opened GL period, exchange rate missing, etc.) After the process is complete, the AP Journal reports are generated to display the results of the posting selection. These reports are very important and should be saved. They are generated directly from the posting process and can not be rerun at a later date. Accounts Payable Journal Entry Audit Report This report lists the details of the accounting transactions that have been inserted into the GL_INTERFACE table. It displays the AP transaction, its corresponding debits and credits, the GL accounts affected, and more. Accounts Payable Journal Entry Exception Report This report displays the transactions that encountered an exception during the posting process. Each transaction includes an exception code that explains why it was prevented from posting. All transactions appearing on this report will require some change in order to be selected for posting the next time you run the AP transfer process. [top] 7. Error: In Release 10.7 or 11.0, you are using Automatic Offsets, and you get an "undist" error on some of the payments. Sol: Navigate to Payments -> Invalid GL Accounts. Query in this form to show the accounts that are causing the "undist" error. You can correct the invalid accounts in this form. [top] 8. Prob: You get a RATE exception when running Payables Transfer to GL. Sol: Populate the Daily Rates table for the exchange date, run Autorate, if needed, and rerun the Payables Transfer to General Ledger program. [top] 9. Prob: You get a PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL in Release 10.7 and 11.0. Sol: Please see Note 94351.1 [top] 10. Error: In Release 10.7 and 11.0, Payables Transfer to General Ledger process errors with APP10962 APJEL/35 ORA-1458 value larger than specified precision allows for this column. Sol: Please review Note 96119.1

Page 219 of 259

[top] 11. Prob: In Release 10.7 and 11.0, Payables Transfer to GL program shows 'No data found'. Sol: Please review Note 1067036.6 and Note 1012060.7 [top] 12. Prob: In Release11.5, the Payables Transfer to General Ledger Report shows No Data Exists. Sol: Please review Note 188354.1 [top] 13. Prob: In Release 10.7 and 11.0, the Journal Import process fails when kicked off by the Payables Transfer to GL process. Sol: Please review Note 107272.1 [top] 14. Prob: Closing the AP Accounting Period in Release 11.5 errors with APP-SQLAP-10741: This period cannot be closed because there are accounting entries that have not been transferred to GL. Sol: Please review Note 174638.1 [top] 15. Error: In Release 11.5, Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors". Sol: There is a problem with the accounting for your transactions. Please either review Payables Accounting Process Report, which is created when the Payables Accounting Process is run, or the run the Payables Accounting Entries Report to determine which transactions are accounted incorrectly. For additional help troubleshooting accounting problems, please review Note 131225.1 [top] top 16. Error: In Release 11.5, Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.tmp creation for FND_FILE failed ORA-06512. Sol: Please review Note 141706.1 [top] 17. What articles, white papers, or manuals should I read for more information on Payables Transfer to GL? Sol: Please review the Transfer to GL (Posting) Setup and Usage Guide for a complete list of available documents. [top] 18. Prob: What are the MetaLink keywords I should use when searching for Payables transfer to GL on MetaLink? Sol: APPPST, APGLTRANS, APXGLTRN, POST, POSTING, GLLEZL, GENERAL LEDGER, GL [top] 19. Prob: The problems and solutions listed in this guide do not answer my question. Sol: If the Troubleshooting list for Payables Transfer to GL does not answer your question, please click here to log an iTar.

Page 220 of 259

[top] IMPORTANT: If you did not find the information you were searching for, please review the following Payables Transfer to GL (Posting) documents Payables Transfer to GL (Posting) Current Issues Payables Transfer to GL (Posting) One-Off Patches Payables Transfer to GL (Posting) Setup and Usage Instructions Payables Transfer to GL (Posting) Troubleshooting Guide Payables Transfer to GL (Posting) Frequently Asked Questions (FAQs) 10.7 and 11.0 Payables Transfer to GL (Posting) Frequently Asked Questions (FAQ's) 11i Oracle Payables One-Off Patch Directory http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=177591.1 http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=177591.1Copyright 2002 Oracle Corporation. All rights reserved. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Oracle Corporation does not warrant that this document is error-free, nor does it provide any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the prior written permission of Oracle Corporation. .. Bookmark Go to End BookmarkGo to End Troubleshooting Guide Oracle Payables Payables Transfer to GL (Posting) Versions 10.7, 11.0, 11.5 (11i) The information in this document has been reviewed and is current as of 25-Nov-2002.

Instructions for the reader: This Troubleshooting document identifies the most frequently reported setup and usage problems/errors relating to Payables Transfer to General Ledger. The articles below do not include bugs/patches or FAQ's, as these are addressed in great detail in the notes referenced at the bottom of this document. Troubleshooting Summary 34. Script: Diagnostic Script that identifies transactions that are not transferred to GL (Release 11.5).

35. Script: Diagnostic Script that identifies problems with the transfer to GL process for one transaction
or and entire Payables Transfer to GL run (Release 11.5).

36. Script: Diagnostic Script that identifies problems posting a transaction (Release 10.7 and 11.0). 37. Script: Diagnostice Script that provides table level details of invoices and payments. 38. Prob: There are payments and/or invoices that are not posting to GL, and you believe they should
post.

39. Prob: Payables Transfer to GL was successful, but the Journal Import is not importing the data into
GL

40. Error: UNDIST error on some payments when using Automatic Offsets (Release 10.7 and 11.0). 41. Prob: RATE exception when running Payables Transfer to GL. 42. Prob: PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD)
to GL (Release 10.7 and 11.0).

43. Error: Payables Transfer to GL errors with APP-10962 APJEL/35 ORA-1458 (Release 10.7 and
11.0).

Page 221 of 259

44. Prob: Payables Transfer to GL program / Accounts Payable Journal Entry Audit Report shows No
data found (Release 10.7 and 11.0).

45. Prob: Payables Transfer to General Ledger Report shows No Data Exists (Release 11i) 46. Prob: The Journal Import process fails when kicked off by the Payables Transfer to GL process
(Release 10.7 and 11.0).

47. Error: Closing the AP Accounting Period errors with APP-SQLAP-10741 (Release 11.5). 48. Error: Payables Transfer to General Ledger Report lists some of the transactions as "Accounting
entries have accounting entry creation errors" (Release 115).

49. Error: Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.tmp creation for
FND_FILE failed ORA-06512 (Release 11.5).

50. Prob: What articles, white papers, or manuals should I read for more information on Payables
Transfer to GL?

51. Prob: What are the MetaLink keywords I should use when searching for Payables Transfer to GL
on MetaLink?

52. Prob: The problems and solutions listed in this guide do not answer my question.
Note: Create Accounting issues are listed separately in Note 131225.1 Troubleshooting Details 1. Script: Diagnostic Script that helps to identify transactions that are not transferred to GL for Release 11.5. Sol: The Closing script is available for download in Note 180165.1. This script lists any transactions that are not accounted or transferred to GL in an html file in portrait format. [top] 2. Script: Diagnostic Script that identifies problems with the Transfer to GL process for one transaction or an entire Payables Transfer to GL run for Release 11.5. Sol: The Posting Diagnostic script is available for download in Note 185935.1. This script lists any problems when running the Payables Transfer to GL process in an html file in portrait format. [top] 3. Script: Diagnostic Script that identifies problems posting a transaction for Release 10.7 and 11.0. Sol: The scripts found in Note 105929.1 help identify problems when posting a transaction. [top] 4. Script: Diagnostice Script that provides table level details of invoices and payments. Sol: Please download and run the APLIST script from Note 148388.1 to see detailed data information on an invoice or payment. [top] 5. Prob: There are payments and/or invoices that are not posting to GL and you believe they should post. Sol: Ensure invoices are ready to post. An invoice must be approved and/or have no posting holds in order to be selected for posting. To ensure that your invoices are ready to post, you should run autoapproval and review the hold reports. Invoice Hold Report - displays all held invoices. Posting Hold Report - only displays invoices with holds that prevent posting. Matching Hold Report - only displays invoices with matching holds. Ensure payments are made. You must insure that all your payment batches have been completed (either confirmed or canceled). A period will not close if there are payment batches in a status other than confirmed or canceled. If an invoice is approved but will not pay, you should insure that the invoice is due to be paid and that the payment schedule is not on hold.

Page 222 of 259

[top] 6. Prob: Payables Transfer to GL was successful, but the Journal Import is not importing the data into GL Sol: Examine AP Reports for Exceptions and Correct. Transactions that were selected but encountered some exception are not inserted into the GL_INTERFACE table nor are they updated to Posted. (Exceptions can be an inactive accounting flexfield value, a GL_DATE in an un-opened GL period, exchange rate missing, etc.) After the process is complete, the AP Journal reports are generated to display the results of the posting selection. These reports are very important and should be saved. They are generated directly from the posting process and can not be rerun at a later date. Accounts Payable Journal Entry Audit Report This report lists the details of the accounting transactions that have been inserted into the GL_INTERFACE table. It displays the AP transaction, its corresponding debits and credits, the GL accounts affected, and more. Accounts Payable Journal Entry Exception Report This report displays the transactions that encountered an exception during the posting process. Each transaction includes an exception code that explains why it was prevented from posting. All transactions appearing on this report will require some change in order to be selected for posting the next time you run the AP transfer process. [top] 7. Error: In Release 10.7 or 11.0, you are using Automatic Offsets, and you get an "undist" error on some of the payments. Sol: Navigate to Payments -> Invalid GL Accounts. Query in this form to show the accounts that are causing the "undist" error. You can correct the invalid accounts in this form. [top] 8. Prob: You get a RATE exception when running Payables Transfer to GL. Sol: Populate the Daily Rates table for the exchange date, run Autorate, if needed, and rerun the Payables Transfer to General Ledger program. [top] 9. Prob: You get a PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL in Release 10.7 and 11.0. Sol: Please see Note 94351.1 [top] 10. Error: In Release 10.7 and 11.0, Payables Transfer to General Ledger process errors with APP10962 APJEL/35 ORA-1458 value larger than specified precision allows for this column. Sol: Please review Note 96119.1 [top] 11. Prob: In Release 10.7 and 11.0, Payables Transfer to GL program shows 'No data found'. Sol: Please review Note 1067036.6 and Note 1012060.7 [top] 12. Prob: In Release11.5, the Payables Transfer to General Ledger Report shows No Data Exists. Sol: Please review Note 188354.1 [top]

Page 223 of 259

13. Prob: In Release 10.7 and 11.0, the Journal Import process fails when kicked off by the Payables Transfer to GL process. Sol: Please review Note 107272.1 [top] 14. Prob: Closing the AP Accounting Period in Release 11.5 errors with APP-SQLAP-10741: This period cannot be closed because there are accounting entries that have not been transferred to GL. Sol: Please review Note 174638.1 [top] 15. Error: In Release 11.5, Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors". Sol: There is a problem with the accounting for your transactions. Please either review Payables Accounting Process Report, which is created when the Payables Accounting Process is run, or the run the Payables Accounting Entries Report to determine which transactions are accounted incorrectly. For additional help troubleshooting accounting problems, please review Note 131225.1 [top] top 16. Error: In Release 11.5, Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.tmp creation for FND_FILE failed ORA-06512. Sol: Please review Note 141706.1 [top] 17. What articles, white papers, or manuals should I read for more information on Payables Transfer to GL? Sol: Please review the Transfer to GL (Posting) Setup and Usage Guide for a complete list of available documents. [top] 18. Prob: What are the MetaLink keywords I should use when searching for Payables transfer to GL on MetaLink? Sol: APPPST, APGLTRANS, APXGLTRN, POST, POSTING, GLLEZL, GENERAL LEDGER, GL [top] 19. Prob: The problems and solutions listed in this guide do not answer my question. Sol: If the Troubleshooting list for Payables Transfer to GL does not answer your question, please click here to log an iTar. [top] IMPORTANT: If you did not find the information you were searching for, please review the following Payables Transfer to GL (Posting) documents Payables Transfer to GL (Posting) Current Issues Payables Transfer to GL (Posting) One-Off Patches Payables Transfer to GL (Posting) Setup and Usage Instructions Payables Transfer to GL (Posting) Troubleshooting Guide Payables Transfer to GL (Posting) Frequently Asked Questions (FAQs) 10.7 and 11.0 Payables Transfer to GL (Posting) Frequently Asked Questions (FAQ's) 11i Oracle Payables One-Off Patch Directory http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=177591.1 http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=177591.1Copyright 2002 Oracle

Page 224 of 259

Corporation. All rights reserved. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Oracle Corporation does not warrant that this document is error-free, nor does it provide any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the prior written permission of Oracle Corporation. .. Bookmark Go to End Current Issues Oracle Payables Trial Balance Version 10.7, 11.0 and 11.5 (11i) The information in this document has been reviewed and is current as of 21-Jun-2002. Instructions for the reader: This Current Issues Guide provides a list of recently uncovered issues. These are typically issues arising from recent Mini-Packs/Family Packs or new features. The issues may or may not be fixed. This document also includes the most frequently encountered bugs that do not currently have one-off patches available. Current Issues Summary 53. ALERT: Pre-Upgrade Data Issue that will impact AP Trial Balance in R11i

54. One-Off patches available for Payable Trial Balance (APXTRBAL and APXTRB) 55. 10.7 and 11.0 Trial Balance Does Not Match GL 56. 11i Trial Balance Does Not Match GL 57. 11i Trial Balance Fails after applying AP.H
Current Issues Details 1. ALERT: Pre-Upgrade Data Issue That Will Impact AP Trial Balance in R11i (Note 157917.1) Summary: During the upgrade to R11i, the accounting entries for existing payments are built using, in part, the Payments Distribution tables. When certain fields are NULL, the accounting upgrade script will not pick up those records. This causes all related invoice records to appear as UNPAID on the Accounts Payable Trial Balance Report (APXTRBAL). [top] 2. One-Off patches available for Payables Trial Balance (APXTRBAL and APXTRB) (Note 200363.1) Summary: This note provides a listing of current one-off patches that are available for Trial Balance issues. The note lists the release effected (10.7, 11.0 or 11i), the pre-requisite patches required, a description of the problem and contains links to download the patch. [top] 3. 10.7 and 11.0 Trial Balance Does Not Match GL (Note 1021413.6) Summary: In release 10.7 and 11.0 the AP Trial Balance report occasionally displays incorrect balances. This can be due to numerous causes including duplicate invoices, duplicate payments, zero dollar invoices, voided payment/invoice, canceled invoice, etc.. This note contains instructions on how to rebuild the trial balance tables to resolve out of balance issues. [top] 4. 11i Trial Balance Does Not Match GL Summary: Customers that have upgraded to 11i have reported a variety of problems with the Trial Balance not tying GL. The following notes provide possible fixes for these issues: Note 180167.1 Diagnostic Script for trial balance that often identifies the root cause of out of balance issues. Note 189322.1 Invoices from merged vendors are duplicated in Trial Balance

Page 225 of 259

Note 187118.1 Trial Balance shows upgraded paid invoices Note 197446.1 Upgraded fully paid invoices with pre-payment applications incorrectly showing on trial balance The following Trial Balance notes are unpublished. If you think you are experiencing one of these issues you should log an iTAR, reference the note number listed below in your TAR and upload the results of the aplist11i.sql script. These notes cant be published externally as they contain data fix scripts. Note:166693.1 Upgraded invoices that had been voided and reissued on same day showing on trial balance. Note:197629.1 Foreign currency invoices show balance of $0.01 after upgrade. Note: 198412.1 The Liability Account CCID for the payment and the invoice in ap_ae_lines_all are different. [top] 5. 11i Trial Balance (APXTRBAL) fails after applying AP.H (Note 200022.1) Summary: The Trial Balance report released with AP.H and higher fails with REP-1419: 'beforereport': PL/SQL program aborted (Error in GET_AP_AX_TRIAL_BAL_DATA). This occurs when the report is run on an 8.1.6 version of the database (error caused a hint in the select statement). [top] IMPORTANT: If you did not find the information you were searching for, please review the following Payables Trial Balance information: Payables Trial Balance Interim Patches [Note:200363.1] Payables Trial Balance Setup and Usage Instructions [Note:200512.1] Payables Trial Balance Frequently Asked Questions (FAQ's) [Note:106740.1] Payables Trial Balance Troubleshooting Guide [Note:106744.1] Copyright 2003 Oracle Corporation. All rights reserved. Oracle is a registered trademark of Oracle Corporation. Various product and service names referenced herein may be trademarks of Oracle Corporation. All other product and service names mentioned may be trademarks of their respective owners. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Oracle Corporation does not warrant that this document is error-free, nor does it provide any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the prior written permission of Oracle Corporation. . Bookmark Fixed font Go to End Doc ID: Note:1068665.6 Subject: Invoice Entry Batch Form Does Not Return All The Invoices For The Batch Type: PROBLEM Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 13-APR-1999 Last Revision Date: 24-SEP-2001 Problem Description ------------------- You are in Payables and are trying to retrieve all of the invoices for an invoice batch. You are familiar with the invoice batch and know that not all of the invoices have been returned. The Invoice Payables Option has been set to use Batch Control. The GL Date Basis has been defined as System Date. Navigation Path: Invoices -> Entry -> Invoices -> Query Invoice Batches -> press the Invoices button -> some invoice records are missing However, all of the invoices are displayed if you inquire on the invoice batch via Invoices -> Inquiry -> Invoice Batches. Soultion Description --------------------You will need to open the AP Accounting Period for the period(s) associated with the invoices which were not displayed in the invoice batch. Use the navigation path below to open the AP Accounting Period: (N)Setup -> Calendar -> Accounting -> AP Accounting Period -> set the period to Open or Future Open The AP Accounting Period may not be set to OPEN for the missing invoices. .

Page 226 of 259

-------------------------------------------------------------------------------Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.

Bookmark Fixed font Go to End Doc ID: Note:112803.1 Subject: Intercompany Invoicing: Troubleshooting Type: BULLETIN Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 16-JUN-2000 Last Revision Date: 13-DEC-2000 PURPOSE This document is intended to help users successfully troubleshoot problems when creating intercompany invoices. SCOPE & APPLICATION This document is intended to supplement the documentation provided with the application. Intercompany Invoicing Troubleshooting the Interfaces To actually set up and test intercompany invoicing features, you will need to run a sales order fully through its cycle and then follow the steps for generating the intercompany AR and AP invoices. This can become tricky during integration testing, when both setups and raw data are in a state of flux. Listed below are common issues that you may want to consider when troubleshooting records in the interface tables. From OE into INV interface tables (running OE's Inventory Interface program) 1. FlexBuilder or the Account Generator is looking to a source (order type, item, organization) for the COGS account, but the account has not yet been assigned to its source. 2. One of the segments of the COGS account has been disabled in GL, and is no longer available. 3. COGS segments exist on the source and are valid, but the desired code combination is no longer valid. 4. Item Status is changed to prevent transactions in Inventory. 5. Item control information is missing (lot, serial, revision). From INV interface tables into INV (running the Inventory manager) 1. OE features are set up to allow shipment even without onhand quantities, but Inventory features do not allow negative inventory. 2. Subinventory and/or locator are wrong. 3. Item/subinventory restriction is changed while the record is in the interface. 4. Inventory period is not yet open. Between OE and INV for return processing (running OE's RMA Interface program) 1. Depending on the order cycle requirements, the RMA interface (if not already scheduled with automatic resubmission) may need to be run twice: once for the return information to be communicated to Inventory, and once for the item's acceptance in Inventory to be communicate back to OE. If this is not done, then the order line cycle status will show as being interfaced, but not yet accepted. 2. OE: Source Code is not set; should be ORDER ENTRY. 3. Inspection is required and was not performed. 4. Same COGS issues as with the original sales order. From OE into AR interface tables (running OE's Receivables Interface program) 1. Order is on hold. 2. Order line is on hold. 3. Receivables Interface is not running. 4. Invoice Source is not set up correctly (OE Import Standard or Intercompany). It will not even show in the list of values when you run the Receivables interface program. From AR interface tables into AR (running AR's AutoInvoice programs) 1. AutoAccounting is looking to a source (item, salesrep, transaction type ) for the necessary accounts, but the account is not yet assigned to its source. 2. The account segments or the resulting code combination are not valid. 3. Salesperson's accounts or territory are incorrect. 4. The tax code or tax authority has not been set up yet. 5. The appropriate Remittance Address assignment does not exist, corresponding to your invoice's bill-to address requirements. Into AR interface tables (running INV's Create Intercompany AR Invoices program) 1. Ensure that the Transaction Manager is running before you run "Create Intercompany AR Invoices". One user found that while they were able to complete this program and produce a record in the AR interface tables, they could not import the record (using AR's AutoInvoice Import) into AR. With the manager down, a record had been created in INV's pending transactions interface. By clearing the record from the pending transactions interface, they could successfully import into AR. 2. TIP: The ID of the record in the "Create Intercompany AR Invoices" request log equals the material transaction ID (helpful for researching issues). Into AP interface tables (running INV's Create Intercompany AP Invoices program) 1. Payment Term in AP does not exist or does not match the spelling/case of the payment term in AR on the intercompany AR invoice. 2. Same issue for the Tax Name in AP / Tax Code in AR. 3. Missing or invalid supplier accounts. 4. Missing or invalid freight accounts. 5. Inconsistent profile option settings amongst multiorg responsibilities (especially INV: Intercompany Currency Conversion - the conversion type of the intercompany invoice. Cannot be 'User'.)

Page 227 of 259

. -------------------------------------------------------------------------------Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.

Bookmark Fixed font Go to End Doc ID: Note:1020292.102 Subject: INVOICES IMPORTED INTO CLOSED PERIOD Type: PROBLEM Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 18-NOV-1999 Last Revision Date: 10-FEB-2000 Problem Description: ==================== You find that you could import invoices from legacy system into an AP period which is already closed, but the corresponding GL period is still open. You have entered an open period date as GL date in the Parameter while importing the invoices, and expected this date to be GL date in the AP invoice,after importing. However, the result was the closed period date in the GL date column of the AP invoices imported (Invoices/Entry/Invoices). GL Date for the closed period will cause problem in AP transfer process to GL. Navigation Path: ---------------- (N)->Other->Requests->Run. Solution Description: ===================== Workaround: Import invoices on timely basis: Make sure GL dates in importing invoices are falling into Open AP period. Permanent Solutions for Rel. 10.7 and 11: ----------------------------------------- Option A. --------- 1. Apply patches,999563(available for both Rel. 10.7 and 11). 2. Also, additional patch 1040780--"May" need. After applying patch 999563, if getting ORA-01830 error, after populating expenditure_item_date field of the ap_expense_report_lines_all table, then apply patch 1040780. (Currently, only avaible for Rel. 10.7. For rel.11, you need to request for one-off patch. Per developer, Rel. 11 patch was not made, since nobody asked for it ) Option B. --------- Apply Recent Patchset, Currently "U" (Rel. 10.7). Apply Recent Patchset, Currently "D" (Rel. 11) and one-off patch 1040780. See Option A.2 above for 1040780. [BUG:999563] is included in both patchsets [BUG:1040780] is included in "U" only. Solution Explanation: ===================== Per original patch 892224 (replaced by patch 999563), the fix solves the problem by ensuring that the GL date at the distribution level rolls forward to the first day of the next open period, if the weekend/accounting date for the source entity lies in a closed period. To achieve this end, code has been commented out in the apicdl.lpc file. . -------------------------------------------------------------------------------Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use. Bookmark Go to End

goal: How To Enter Invoices After Receipt Accrual-Period End Report Is Run fact: Oracle Payables 11 fact: Oracle Purchasing 11

fix: Note Role: ==========

Page 228 of 259

1- AP Period has been closed. 2- Receipt Accrual - Period End report has been completed Steps to enter Invoices / Payments: 1. Close the AP Period for which the report Receipts Accrual - Period End needs to be run. 2. Run the report Receipts Accrual - Period End from PO Responsibility 3. Swith to AP Responsibility 4. Open (re-open) the period that was closed in Step 1 5. Enter the invoices and if required, corresponding payments. 6. After completing the approvals, DO NOT run the online Create Accounting 7. Submit the request Payables Accounting Process 8. After successful completion of the aforesaid report, submit the request Payables Transfer to General Ledger with Submit Journal Import to NO 9. Run the "Journal Import" from GL Responsibility and post the entries. 9. Close the AP period Cautions: Oracle does not recommend to re-open the AP periods after the Receipts Accrual - Period End report is completed. If an invoice is created for the same item already accrued in General Ledger through Receipts Accrual - Period End report, a double charge for the expense and a double accrual of liability is created. . Bookmark Go to End

Can a user send payments or invoices to AP and AR in any currency that has been activated in the reporting currencies table?

Yes, a user can handle payments in Euro, and can change the currency before sending invoices to AP or AR. It is also possible to convert a lease contract from NCU's to Euro. Because the conversion is made at the time the currency is changed prior to being sent to AP/AR and then stored, you are able to send payments in one currency for a certain time period, and then switch to another currency at a later time.

. Oracle Payables Technical Forum

Displayed below are the messages of the selected thread. Thread Status: Active From: Sam Paper 12-Aug-99 03:57 Subject: AP Invoices/AP Payments AP Invoices/AP Payments

Page 229 of 259

Hi, All! 1. I?m trying to convert historical AP invoices into Oracle (Apps. 11.03). Is there?s any way I can bring them over (by utilizing AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE tables) with the status of been paid and closed? 2. Is there?s a safe (and not time consuming) programmatic way to load historical AP payments. Thanks in advance Sam

-------------------------------------------------------------------------------From: Oracle, Carol Erickson 12-Aug-99 04:55 Subject: Re : AP Invoices/AP Payments You can import historical invoices into AP, but they cannot be imported as paid and posted. What you can do once they are imported, though, is to create a payment batch that selects these historical invoices and pays to a "dummy" bank. There is no need to print checks. Then they will be marked paid. To post, run "AP Transfer to GL", and AP will mark the invoices and payments as posted. Assuming the information is already in GL, there in no need to run Journal Import to get them to GL. Simply delete the posting batch. Make sure that these historical invoices are the only ones selected for the posting, though.

-------------------------------------------------------------------------------From: Filip Sillis 13-Aug-99 09:35 Subject: Re : AP Invoices/AP Payments You can upload them with a 'fictive' payment group and select the whole payment group afterwards for payment. This doesn't work for partial payments and should be tested first - I have no experience with it. We are about to do the same exercise-so thanks for letting me know if you succeedded or took another way. Regards Filip Sillis PriceWaterhouseCoopers - Brussels - Belgium filip.sillis@be.pwcglobal.com

-------------------------------------------------------------------------------From: Mohammad Tauseef 04-Dec-99 12:40

Page 230 of 259

Subject: Re : AP Invoices/AP Payments Hi, I'm in the same boat as you people. Have you found any solution to the problem yet?

-------------------------------------------------------------------------------From: Oracle, Philip Merlano 14-Dec-99 02:16 Subject: Re : Re : AP Invoices/AP Payments Read response by Carol Erickson for proposed solution.

-------------------------------------------------------------------------------Bookmark Go to End

v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Frequently Asked Questions Oracle Payables Trial Balance 10.7, 11.0 and 11.5 (11i) The information in this document has been reviewed and is current as of 21-Jun-2002 1. Q: What formula should I use to balance AP to GL? 2. Q: How is the as-of-date used in the "Accounts Payable Trial Balance" report? 3. Q: What articles, white papers, or manuals should I read for more information on Trial Balance? 4. Q: What are the MetaLink keywords I should use when searching for Trial Balance on MetaLink? 5. Q. How is the 11i Trial Balance Different from 10.7 and 11.0? 1. Q: What formula should I use to balance AP to GL? A: Use the following as an example of how to balance: "Accounts Payable Trial Balance" as of March 31 + "Posted Invoice Register" for the period between April 1 and April 30 - "Posted Payment Register" for the period between April 1 and April 30 = "Accounts Payable Trial Balance" as of April 30 Reconciling AP to GL is accomplished with the use of the following reports. "Posted Invoice Register" "Posted Payment Register" "Accounts Payable Trial Balance" (current and last period) These reports ensure that your Trial Balance accurately reflects your accounts payable liability by matching the Posted invoices and payments with the AP liability account. Additional Information on Reconciling AP to GL: Note 160267.1 How to Reconcile Between Accounts Payable and General Ledger Note 175057.1 AP Does Not Tie to GL- Checking the Interface Tables [top] 2. Q: How is the as-of-date used in the "Accounts Payable Trial Balance" report? A: The as-of-date is used to determine which invoices and payments should be included on the report. Any invoices or payments with an accounting date AFTER the entered as-of-date will not be displayed on this report.

Page 231 of 259

[top] 3. Q: What articles, white papers, or manuals should I read for more information on Trial Balance? A: Please see the Trial Balance Setup and Usage Guide for a complete list of available documents. [top] 4. Q: What are the keywords I should use when searching for Trial Balance on MetaLink? A: Use the ORA and APP error codes that appear in the log file, if relevant. For 10.7 and 11.0: Trial Balance, APXRTB For 11.5 (11i): Trial Balance, APXTRBAL [top] 5. Q: How is the 11i Trial Balance Different from 10.7 and 11.0 ? A: The Accounts Payable Trial Balance is actually a new report but since the name is the same it is included in the changed reports section. The new accounting model made it necessary to rewrite the trial balance report. All of the enhancements that had been outstanding against the report were reviewed and incorporated into the new report. For example, there is now an option to run the report for a single supplier. There is also an option to run the report for a single liability account. For More information and a list of reports changed in 11i see AP News Vol. 20. [top] IMPORTANT: If you did not find the information you were searching for, please review the following Payables Trial Balance documents Payables Trial Balance Current Issues Payables Trial Balance One-Off Patches Payables Trial Balance Setup and Usage Instructions Payables Trial Balance Troubleshooting Guide Payables Trial Balance Frequently Asked Questions (FAQs) . Bookmark Fixed font Go to End Doc ID: Note:1078501.6 Subject: Unable To Transfer Paid Supplier Invoices Type: PROBLEM Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 23-OCT-1999 Last Revision Date: 07-JAN-2002 Problem Description ------------------- In Grants Management Sytem, unable to transfer paid and posted(to GL) Supplier Invoices against POETA and also to adjust it from Project Expenditure Inquiry/ Special menu for split, recalculate burden costs. Gives the following error messages: PA_INV_AUTO_OFFSETS_PAID "You cannot make adjustments to this expenditure item because the supplier invoice associated with this item has been paid and the automatic offset method is used to adjust it". Steps involved: 1) Create an invoice from Payables Manager GUI. 2) Approve the Invoice. 3) Pay the Invoice from Accounts Payable(AP). 4) Interface the invoice to General Ledger(GL) from AP. 5) From GMS, run the PRC:Interface Supplier Invoice from Payables. 6) From Expenditure Inquiry/Actuals screen bring up the expenditure item and try to perform a Transfer/Split/Recalculate Burden Cost. It gives the following error: PA_INV_AUTO_OFFSETS_PAID. Solution Description ------------------- You need to have the following setup in Payables -> Setup -> Options -> Payables. Set auto offset method to None and choose Invoice from the drop down box and check the Allow Adjustments on Paid Invoices check box. Besides this you need to apply an AP one-off server side patch 887905. This patch is included in AP patchset T but Grants patchset 1.1D allows up to Q level for AP. 887905 can be applied on top of AP patchset Q(when grants is installed) which will fix the problem of adjusting a paid supplier invoice. *** Warnings: Before applying the patch take a back up of the database. .

Page 232 of 259

-------------------------------------------------------------------------------Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use. Bookmark Go to End

goal: How to Delete Invoices from AP Tables and Reimport fact: Oracle Payables 10.7.16.1 fact: APXIIMPT - Payables Open Interface Import

fix: Per Oracle payables user guide 10.7 page 4-116 Payables Invoice Import Program Payables will not import an invoice or expense report more than once. If invoices are cancelled, the same invoice numbers cannot be used again...the invoice numbers will all ready exist for the vendors and cannot be used. Two (2) options: 1. Cleanest way to fix issue is to adjust the invoices in the ap module. Since the invoices are not posted, any changes needed can be made to invoices in AP module. OR 2. Delete each invoice (Delete the invoice by quering up the invoice and then hitting the red X in the tool bar. Then hit save to save the deletion) After all the invoices are deleted from the interface table, then delete the information from the interface tables (using sql plus) and then reload the data and re-import. Option 1. is the cleanest option and the option recommended by Oracle support. . 8. 8.i Suppliers There is more than one account for the same supplier, which one do I choose? Check the supplier site addresses and choose the supplier whose site address matches your invoice address. If none of them match your invoice then ask DP section to create a new site. If all the supplier accounts have the same site addresses then choose the Supplier with the lowest number. We are in the process of merging all the multiple accounts into one. 8.ii I cannot find a supplier or an employee on the database Please send details of the supplier or employee to DP section. Minimum details required are as follows: Name and full address

Page 233 of 259

9. 9.i

If an individual please confirm if the person is an employee or not Standard forms for full supplier set-up can be obtained from DP section.

Batch Headers How to print batch headers Select the batch header you want to print by clicking on Query, and Find. Then enter the batch number you require and click on the Find button The system brings up the batch details Confirm that you have the right folder open ie UCL BATCH HEADER Click on the Action menu and then click Print A copy of the batch header would be printed on your printer

9.ii

Can I adjust or delete batch header details? You can add invoices to a batch at any time You can change the invoice type on the batch header after entering invoices against a batch and the new invoice type will default onto new invoices entered after the change. Changing the batch header does not affect invoices entered before the change You can delete an invoice from a batch at any time before the invoice has been approved. See 5.i You cannot delete an invoice batch that contains invoices. If you want to delete an invoice batch, you must delete the invoices in the batch first. See 5.i

10. 10.i

Grant related Invoice Distributions I am unable to post an expense claim to a grant Please check that you have used the standard invoice type and not expense report type. If you have used the wrong invoice type then you would have to delete the invoice and re-enter the invoice. See 5.i I am unable to enter a grant distribution against a 6P expenditure type because the system is requesting for a valid quantity Please enter the expenditure amount in the quantity field.

10.ii

10.iii

I wish to enter a distribution against a grant code but the system is requesting for an expenditure Item date In this case you are trying to enter an expense against a completed grant. Please confirm the completion date of the grant and enter a date on or before the grant completion date. You can confirm the date as follows: Select the grant field Click on the picklist button on the toolbar or press CTRL+F11 Enter the grant code and click the Find button The system would then bring up brief details about the grant. Scroll to the right to view the grant completion date.

10.iv

I have entered my distributions against grant codes and the system generated account codes are different from the grant codes that I entered? The grants were set-up to map to control accounts in the general ledger. The account codes for these control accounts are different from the grant codes that you have entered. See further details on COA Philosophy document on the NewFis website

Page 234 of 259

11. 11.i

VAT Distributions How do I confirm that the VAT amount is correct before the first level approval process is run? After entering all your distribution lines, Select Special on the menu options at the top of the window. Choose Generate VAT distributions. The system then comes up with a note indicating that VAT is being calculated, click OK on the box and wait for the system to complete the process by bringing up the VAT lines and updating the distribution total. Check that your Invoice total agree with the distribution total, if not then make the necessary changes as described in section 4.ii below.

11.ii

System calculated VAT amount does not agree with the invoice VAT amount due to rounding differences or insignificant arithmetical errors on Supplier invoices Manually change the system calculated VAT amount on the VAT distribution line to agree with the invoice VAT amount.

11.iii

12. 12.i

Most of our expenses are VAT recoverable, and I am not sure of the VAT codes to use Recoverability is now defined at the account code level. The code to enter is the one that corresponds with the VAT rate on your invoice. Please find further details on the VAT overview document on the Newfis website. Adjusting and deleting invoices and invoice distributions How do I delete an invoice if I have made an error? If invoice is unapproved (first level approval has not been done) Ensure that you are on the invoices window and the cursor is on the invoice line that you wish to delete Click on the red X button on your toolbar Click OK on the delete message box. Once the deletion is completed save your work.

12.i.i

12.i.ii

If invoice is approved ie after 1st or secondary level approval An approved Invoice cannot be deleted because funds have already been committed against the invoice during the approval process. However, the system would allow you to cancel the invoice.

12.ii

How do I cancel an invoice that has been approved? Navigate to the invoices window Select the invoice to be cancelled. Please note that if you wish to re-enter the invoice it is advised that you add A to the number of the invoice to be cancelled and then re-enter the invoice with the number as written on the Supplier invoice. This is necessary because the system would not allow you to enter the same number twice for the same supplier. On your invoices screen, click on the Actions..1 button and this brings up the Actions wndow. On the Actions window click on the Cancel Invoice check box Click OK and click OK to the messages that come up during the cancellation process. Once the process have been completed save your work

12.iii

I have entered an expense claim with the wrong invoice type, how do I correct this error Delete the invoice and re-enter it with the standard invoice type.

12.iv

I How can I amend input errors on my distribution window Before approval

Page 235 of 259

Purchase order matched distributions cannot be adjusted but can be reversed and the correcting entries entered on a new distribution line. Distribution details that are not generated from purchase orders can be changed or deleted before the first level approval stage. Follow the procedure for adjusting invoices and remember to save your work . After first Level Approval

Distributions cannot be amended or deleted once they have been approved. The system would only allow you to reverse the entries by clicking on the Reverse 1 button. 12.v 13. 13.i Please see the invoice adjustment chart at the end of this document. Invoice Approval After running the batch approval process, how do I confirm that all the invoices in the batch have been approved? The batch approval process normally takes a few minutes to run. The time it takes depend on the number of entries in the batch and how busy the system is. Please wait a few minutes before checking that all the invoices in your batch have been approved. After waiting for a few minutes you may open the invoices window of the batch and click on Query, then Run. This refreshes the screen and you may then check if your invoices have been approved by reviewing the holds placed on them. Another alternative is to view your requests by carrying out the following: iv. Click on the help menu and select View My Request and the Find request window comes up. v. Click on the Find button and this takes you to the Requests window. vi. On the Requests window click on the refresh data button and the system would bring up all your outstanding requests and show the status of your requests ie whether it is pending, running or completed. If not completed click refresh again after a few minutes and click again until completed. If you process large volumes of batches then it is advisable to print the Invoice on Hold report once or twice a day instead of checking batches individually. See page 45 of your AP training documentation for guidance on how to print reports. I have approved my invoices but don't know where they have gone for secondary approval? Invoices are automatically available for all authorised signatories in your Department once the First Level approval is carried out. You do not need to send them to anyone for approval. 13.iii An invoice was not approved in my batch of 10 invoices. Does this stop the rest from being processed further? No General advice It is advisable that you print out or review the Invoice on Hold Report at the end of every day to ensure that all your invoices were successfully entered. You may approve more than one batch at a time. To do this Navigate to the Invoice batches window Press the SHIFT key and then click on the invoice batches that you wish to approve. The batches would become highlighted in blue and the Approve button would indicate the number of batches that you have highlighted Lift your finger off the shift key and then click on the approve button

13.ii

14. 14.i 14.ii

Page 236 of 259

14.iii

The system would ask you to confirm the number of batches to be approved. Click OK

The on screen 'help' is very useful and provides the following information: Window help: topics relating to the window you are working on Keyboard help : A list of keyboard shortcuts View My Request : Confirm the status of your requests About this Record: Details of who created a record and when it was created

Page 237 of 259

Page 238 of 259

Questions For Oracle Payables 1. 2. What are the types of Invoices , what is prepayment & steps to apply it to an Invoice ? What are the Distribution Type while entering the Invoice?

3. What's the difference between the "Payables Open Interface Import" Program and the "Payables Invoice Import" program? 4.What is Debit Memo & Credit Memo in Payables? 5. What is Proxima Payment Terms? 6. What will accrue in Payables? 7. What is Tolerance? 8. What is Aging Periods? 9. What is a Payable Document? 10. What are the tables associated with Invoice? 11. Which interface tables are used for Invoice Import , give the important columns? 12. What is 2 way , 3 way and 4 way matching? 13. How you will transfer payables to general ledger? 14. You created a set of book , where you will attach this SOB in AP? 15. What is use of AP Accounting Periods? 16. What is Interest Invoice and how it can be created? 17. What is a Hold? Explain the types of Hold 18. How many key flexfields are there in Payables? 19. Explain the set up used for Automatic or Manual Supplier Numbering. 20. Can you hold the partial payment if yes then how? 21. Can you cancel the invoice? If yes, explain.

1)

when you create a table as create table xyz as select * from abc- what all are copied from the table xyz?

Page 239 of 259

a) b) c) d) Ans : d

All constraints Only primary keys Only foreign keys Only not null constraints

2)what is maximum length of a table name? a) b) c) d) 15 30 50 255

Ans :b 3)what is maximum size of VARCHAR2 data type a) 255 bytes b) 2000 bytes c) 4000 bytes d) None of above Ans : c 4) When a table is dropped , what happens to the view defined on that table? a) b) c) d) Ans : c 5) what is range of user defined errors in PL/SQL a) < -20000 b) 20000 to any number c) 20000 to 20999 d) None of these View is automatically dropped View is not dropped View becomes invalid None of above

Ans : c 6) which data dictionary view has source code of stored procedures a) USER_PROCEDURES b) USER_SOURCE c) USER_OBJECTS d) None Ans : b 7) How can we use DDL in forms a) b) c) d) Cannot be used in forms Through FORMS_DDL Through form triggers None of above

Ans : b

Page 240 of 259

8)

which is the built in used for sending Operating system commands from forms a) spool b) host c) command d) cannot be done in forms

Ans : b

9)

show_lov returns a) b) c) d) number varchar2 boolean none

Ans : c 10) show_alert returns a) number b) varchar2 c) boolean d) None of above Ans : a 11) How many scroll bars can a block have a) b) c) d) One two four any number

Ans : a 12) which built_in can be used for setting title of forms a) b) c) d) set_form_property set_window_property set_canvas_property set_block_property

Ans : b [[[ 13) what is datatype of Global variables a) b) c) d) Ans :b 14) why is data parameter used in forms a) to pass data from forms to forms b) to pass data from forms to reports c) both a & b d) None number character both a & b None

Page 241 of 259

Ans : b Oracle Interview Questions and Answers : SQL 1. To see current user name Sql> show user; 2. Change SQL prompt name SQL> set sqlprompt Manimara > Manimara > Manimara > 3. Switch to DOS prompt SQL> host 4. How do I eliminate the duplicate rows ? SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.dv=tb.dv); Example. Table Emp Empno Ename 101 Scott 102 Jiyo 103 Millor 104 Jiyo 105 Smith delete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename); The output like, Empno Ename 101 Scott 102 Millor 103 Jiyo 104 Smith 5. How do I display row number with records? To achive this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp; Output: 1 Scott 2 Millor 3 Jiyo 4 Smith 6. Display the records between two range select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start); Enter value for upto: 10 Enter value for Start: 7 ROWNUM EMPNO ENAME --------- --------- ---------1 7782 CLARK 2 7788 SCOTT 3 7839 KING 4 7844 TURNER 7. I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text Not Applicable want to display, instead of blank space. How do I write the query? SQL> select nvl(to_char(comm.),'NA') from emp; Output : NVL(TO_CHAR(COMM),'NA') ----------------------NA 300

Page 242 of 259

500 NA 1400 NA NA 8. Oracle cursor : Implicit & Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements. PL/SQL construct to identify each and every work are used, is called as Cursor. For SQL queries returning a single row, PL/SQL declares all implicit cursors. For queries that returning more than one row, the cursor needs to be explicitly declared. 9. Explicit Cursor attributes There are four cursor attributes used in Oracle cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN 10. Implicit Cursor attributes Same as explicit cursor but prefixed by the word SQL SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements. : 2. All are Boolean attributes. 11. Find out nth highest salary from emp table SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); Enter value for n: 2 SAL --------3700 12. To view installed Oracle version information SQL> select banner from v$version; 13. Display the number value in Words SQL> select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; the output like, SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP')) --------- ----------------------------------------------------800 eight hundred 1600 one thousand six hundred 1250 one thousand two hundred fifty If you want to add some text like, Rs. Three Thousand only. SQL> select sal "Salary ", (' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.')) "Sal in Words" from emp / Salary Sal in Words ------- -----------------------------------------------------800 Rs. Eight Hundred only. 1600 Rs. One Thousand Six Hundred only. 1250 Rs. One Thousand Two Hundred Fifty only. 14. Display Odd/ Even number of records Odd number of records: select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp); 1 3 5 Even number of records: select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp) 2 4 6 15. Which date function returns number value? months_between

Page 243 of 259

16. Any three PL/SQL Exceptions? Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others 17. What are PL/SQL Cursor Exceptions? Cursor_Already_Open, Invalid_Cursor 18. Other way to replace query result null value with a text SQL> Set NULL N/A to reset SQL> Set NULL 19. What are the more common pseudo-columns? SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM 20. What is the output of SIGN function? 1 for positive value, 0 for Zero, -1 for Negative value. 21. What is the maximum number of triggers, can apply to a single table? 12 triggers.

Oracle Reports 6i 1.How many types of Columns are there in Reports6i? Answer : Three There are three types of Columns. Formula Column, summary column, placeholder column. 2.can you have more than one layout in One Report? A YES Answer : It is possible to have more than one layout in one Report by using additional layout option in Layout Editor. 3.can you run Report without Parameter Form? Answer :- YES Yes it is possible to run the report without parameter form by setting the PARAM value to Null 4.What are the minimum number of groups required for a matrix report? Answer : 4 The minimum of groups required for a matrix report are 4 5. Which of the following Option is valid for Panel/Print Order Property? in Report Builder? Answer : Across Down/Down Across 6. What is default Unit of Measurement in Report? Answer : Inch Default Unit of measurement is Inch. 7. How many types of Parameters are available in Reports? Answer : Two There are two types of Parameters available in Reports One is System Parameter and another is User Parameter. 8. What is the purpose of PlaceHolder Column in Report? Answer : A column for which you set the datatype and value in PL/SQL that you define. 9. What is the purpose of Summary Column in Reports? Answer : A performs a computation on another column's data. 10. What is the purpose of Formula Columns? Answer : A column performs a user-defined computation on another column(s) data, including placeholder columns.

Page 244 of 259

11. Which of the following Procedures displays message number and text that you specify? Answer : SRW.MESSAGE This procedure displays a message with the message number and text that you specify. The message is displayed in the format below. After the message is raised and you accept it, the report execution will continue.

12. What are bind variables? Ans:-Variable that are used to replace a single value in SQL or PL/SQL, such as a character string, number, or date. Specifically, bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH clauses of queries. Bind references may not be referenced in FROM clauses or in place of reserved words or clauses. 13. Can lexical reference be made in PL/SQL statement? Answer : No 14. Following of which trigger will fire first? A. Between Pages B. After Parameter Form C. Before Parameter Form D. Before Reprort Answer : C 15. Is there a way to change the same format mask in a lot of fields in one step? A. Yes Answer : A Select all the Items and change the format mask for all the item once. 1. Execution methods? Ans. a. Host b. Immediate c. Java Stored Procedure d. Java Concurrent Program e. Multi Language Function f. Oracle Reports g. PL/SQL Stored Procedure h. Request Set Stage Function i. Spawned j. SQL*Loader k. SQL*Plus 2. What is TCA (Trading Community Architecture)? Ans. Oracle Trading Community Architecture (TCA) is a data model that allows you to manage complex information about the parties, or customers, who belong to your commercial community, including organizations, locations, and the network of hierarchical relationships among them. This information is maintained in the TCA Registry, which is the single source of trading community information for Oracle EBusiness Suite applications. 3. Difference between Application Developer and System Administrator? Ans. Role of Technical Consultant: a. Designing New Forms, Programs and Reports b. Forms and Reports customization c. Developing Interfaces d. Developing PL/SQL stored procedures e. Workflow automations Role of System Administrator: a. Define Logon Users b. Define New/Custom Responsibility c. Define Data Groups

Page 245 of 259

d. Define Concurrent Managers e. Define Printers f. Test Network Preferences g. Define/Add new Modules Role of an Apps DBA: a. Installing of Application b. Upgradation c. Migration d. Patches e. Routing maintenance of QA f. Cloning of OA 4. What are Flexfields? Ans. A Flexfield is a customizable field that opens in a window from a regular Oracle Applications window. Defining flexfields enables you to tailor Oracle Applications to your own business needs. By using flexfields, you can: (a) Structure certain identifiers required by oracle applications according to your own business environment. (b) Collect and display additional information for your business as needed. Key Flexfields: You use key flexfields to define your own structure for many of the identifiers required by Oracle Applications. Profile Flexfields:Open Key Window (FND_ID_FLEXS) Descriptive Flexfield: You use descriptive flexfields to gather additional information about your business entities beyong the information required by Oracle Applications. Profile Flexfields: Open Descr Window (FND_DESCRIPTIVE_FLEXS) 5. Report registration process? Ans. 1. Create the report using the report builder. 2. Place the report definition file in the module specific reports directory. 3. Create an executable for the report definition file. 4. Create a concurrent program to that executable. 5. Associate the concurrent program to a request group. 6. User exits in Reports? Ans. USER EXITS are used in Oracle APPS to access user profile values and perform proper calculation. Ex. of Other AOL User exits available in Reports are given below. FND SRWINIT - This is a User Exit which sets your profile option values and allows Oracle AOL user exits to detect that they have been called by oracle repots. Can be used in BEFORE-REPORT Trigger. FND_SRWEXIT - This user exit ensures that all the memory allocated for AOL user exits has been freed up properly. Can be used in AFTER- REPORT Trigger FND FORMAT_CURRENCY To format the currency amount dynamically depending upon the precision of the actual currency value, standard precision, users profile values and location (country) of the site.

FND FLEXSQL - This user exits allows you to use Flex fields in Reports FND FLEXIDVAL - This user exits allows you to use Flex fields in Reports 7. Request Set and Where do you define it ? Ans. Request sets allow you to submit multiple requests together using multiple execution path. A request set is a collection of reports and /or programs that are grouped together. A stage is a component of a request set used to group requests within the set. All of the requests in a given stage are executed in parallel. Advantages of stages are the ability to execute several requests in parallel and then move sequentially to the next stage. Responsibility: System Administrator

Page 246 of 259

Nav: Concurrent -> Set 7(A). Define Request Group? Ans. A request security group is the collection of requests, request sets, and concurrent programs that a user, operating under a given responsibility, can select from the Submit Requests window. 8. Registration of PL/SQL with parameters? Ans. 1. Create the procedure in the module specific schema. 2. Create a public synonym for that procedure in the Apps schema. 3. Create the executable for that procedure. 4. Create a concurrent program. 5. Attach the concurrent program to that procedure. Note: There are two mandatory parameters 1. Errbuf 2. Retcode. Any parameter which are to be passed should be succeeded with these two parameters and have to be registered. When calling the procedure, these two parameters are not mentioned. 9. How many groups in Matrix Report? Ans. The minimum of groups required for a matrix report are 4. 10. Lexical Parameters and Bind Parameters? Ans. Lexical references are placeholders for text that you embed in a SELECT statement. You can use lexical references to replace the clauses appearing after SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH. You create a lexical reference by entering an ampersand (&) followed immediately by the column or parameter name. Bind references (or bind variables) are used to replace a single value in SQL or PL/SQL, such as a character string, number, or date. Specifically, bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH clauses of queries. Bind references may not be referenced in FROM clauses or in place of reserved words or clauses. You create a bind reference by entering a colon (:) followed immediately by the column or parameter name. 11. Value Sets? Ans. Oracle Application Object Library uses values, value sets and validation tables as important components of key flexfields, descriptive flexfields, FlexBuilder, and Standard Request Submission. When you first define your flexfields, you choose how many segments you want to use and what order you want them to appear. You also choose how you want to validate each of your segments. The decisions you make affect how you define your value sets and your values. You define your value sets first, either before or while you define your flexfield segment structures. You typically define your individual values only after your flexfield has been completely defined (and frozen and compiled). Depending on what type of value set you use, you may not need to predefine individual values at all before you can use your flexfield. You can share value sets among segments in different flexfields, segments in different structures of the same flexfield, and even segments within the same flexfield structure. You can share value sets across key and descriptive flexfields. You can also use value sets for report parameters for your reports that use the Standard Report Submission feature. Navigation Path: Login Application Developer -> Application -> Validation -> Set 11(A). Value Validation Types? Ans. 1. Dependant 2. Independent 3. None 4. Pair 5. Special 6. Table 7. Translate Independent 8. Translate Dependent

Page 247 of 259

11(B). How to define a value set depending on other value set? Ans. Navigation Path: Login -> AOL -> Application -> Validation -> Set Select the validation type as Dependant and click on Edit Information button. In Dependant value set information screen mention the Independent value set name. 12. Incompatibility in report registration and Run Alone? Ans. Identify programs that should not run simultaneously with your concurrent program because they might interfere with its execution. You can specify your program as being incompatible with itself. Application: Although the default for this field is the application of your concurrent program, you can enter any valid application name. Name: The program name and application you specify must uniquely identify a concurrent program. Your list displays the user-friendly name of the program, the short name, and the description of the program. Scope: Enter Set or Program Only to specify whether your concurrent program is incompatible with this program and all its child requests (Set) or only with this program (Program Only). Run Alone: Indicate whether your program should run alone relative to all other programs in the same logical database. If the execution of your program interferes with the execution of all other programs in the same logical database (in other words, if your program is incompatible with all programs in its logical database, including itself), it should run alone. 13. AR-Invoices (Class)? Ans. 1. Chargeback 2. Credit Memo 3. Debit Memo 4. Deposit 5. Guarantee 14. AP-Invoice types? Ans. 1. Standard 2. Credit Memo 3. Debit Memo 4. Expense Report 5. PO Default 6. Prepayment 7. Quick match 8. Withholding Tax 9. Mixed 15. Customer Interface? Ans. Use Customer Interface to import and validate current or historical customer information from other systems into Receivables. Once customer information is imported into Oracle Receivables, you can use Customer Interface to import additional data for that customer (such as additional contacts or addresses) and to update existing information. You can also manually update and enter new information using the Customer windows. The following diagram shows how customer information is imported into the Oracle Receivables tables.

Page 248 of 259

16. Multi Org? Ans. Business Group Legal Entity Operating Units Inventory Organizations Manufacturing Modules Financial Modules

(each one own Set of Books) (Post to a Set of Books)

(Order Entry, Purchasing, MRP etc.)

17. What are Profiles? Ans. A user profile is a set of changeable options that affect the way your application looks and behaves. As System Administrator, you control how Oracle Applications operate by setting user profile options to the values you want. You can set user profile options at four different levels: site, application, responsibility, and user. Your settings affect users as soon as they sign on or change responsibility. Navigation Path: Login System Administrator -> Profile -> System Examples: Signon Password Hard to Guess Signon Password Length Set of Books Name Flexfields: Autoskip 18. Employee Details?

Page 249 of 259

Ans. Enter employee records. Either your Human Resources department enters employee information in the People window (if HRMS is installed), or the appropriate department enters employee information in the Enter Person window. To ensure that Payables can create a supplier record during Invoice Import, the following are requirements for each employee record: the employee name is unique reimbursement address for either Home or Office exists address lines 1-3 for the home address do not exceed 35 characters City/State/Country does not exceed 25 characters Zip Code for the home address does not exceed 20 characters 19. What is the Multi Org and what is it used for? Ans. Multi Org or Multiple Organizations Architecture allows multiple operating units and their relationships to be defined within a single installation of Oracle Applications. This keeps each operating unit's transaction data separate and secure. Use the following query to determine if Muli Org is intalled: select multi_org_flag from fnd_product_groups; 20. AR Invoice Tables? Ans. When you enter an invoice either through the Transaction window or through the AutoInvoice program, Receivables uses the following tables to store your invoice information: RA_CUSTOMER_TRX RA_CUSTOMER_TRX_LINES RA_CUST_TRX_LINE_GL_DIST AR_PAYMENT_SCHEDULES 21. Bitmap Report? Ans. Bitmapped reports are output as PostScript files. The PostScript file is a set of instructions telling the printer exactly what to print and how to print it. To get a landscape report, the Post Script file must be generated as landscape. If you want a landscape bitmapped report, specify this either in the Reports Designer or in the execution options of your concurrent program. When printing bitmapped reports, a print style is still needed to determine the printer driver used. To avoid confusion, create a special print style for bitmapped reports and make that the required style for all bitmapped reports in the Define Concurrent Programs form. 22. Difference between character and bitmap report? Ans. Bitmap vs. Character-Mode Report Design Here is an example to help explain how Oracle Reports are designed and printed in both the bitmap and character-mode environments. Assume you wish to print "Cc" where "C" is a different font and a larger point size than "c" and is in boldface type (where "c" is not). In Oracle Reports Designer, bitmap mode, you can make "C" bold and in a different font and point size than "c". This is because you are generating postscript output. Postscript is a universal printer language and any postscript printer is able to interpret your different design instructions. In Oracle Reports Designer, character mode, the APPLICATIONS STANDARDS REQUIRE the report to be designed in ONE FONT/ ONE CHARACTER SIZE. Character mode reports generate ASCII output. In ASCII you cannot dynamically change the font and character size. The standard is in effect so a report prints as identically as possible from both conventional and postscript printers. Bitmap vs. Character-Mode Report Printing These sequences contrast the two printing environments. In postscript, "C" can be in a different font and point size than "c". Both or either could also be bold, for example. In ASCII, "C" must be in the same font and character size as "c". Both or either could also be bold, for example.

Page 250 of 259

23. What is difference between .rdf and .rep? Ans. Report definition file <report name>.rdf Report runfile <report name>.rep 24. Module related Flex fields? Ans. General Ledger Assets Receivables Key Flexfields Accounting Flex field Asset Category Flexfield Sales Tax Location Territory Flex field Descriptive Flex fields Daily Rates Bonus Rates Credit History Information

25. Difference between Global segments and Context-Sensitive segments? Ans. Gobal Segments: Global segments are segments that appear regardless of context. Columns used for global segments cannot hold an context-sensitive segments. Context-Sensitive segments: Context-Sensitive segments occur depending on the context. 26. Data conversion Vendor data effected tables? Ans. 1. PO_VENDORS 2. PO_VENDOR_SITES_ALL 3. PO_VENDOR_CONTACTS 27. Data conversion Customer data effected tables? Ans. 1. RA_CUSTOMERS_INTERFACE_ALL 2. RA_CUSTOMER_PROFILES_INT_ALL 28. AP Invoice conversion data effected tables? Ans. 1. AP_INVOICES_INTERFACE 2. AP_INVOICE_LINES_INTERFACE 29. Report Triggers? Ans. 1. BEFORE PARAMETER FORM 2. AFTER PARAMETER FORM 3. BEFORE REPORT 4. BETWEEN PAGES 5. AFTER REPORT The order of events when a report is executed is as follows: 1 2 3 4 5 6 7 8 Before Parameter Form trigger is fired. Runtime Parameter Form appears (if not suppressed). After Parameter Form trigger is fired (unless the user cancels from the Runtime Parameter Form). Report is "compiled." Queries are parsed. Before Report trigger is fired. SET TRANSACTION READONLY is executed (if specified via the READONLY argument or setting). The report is executed and the Between Pages trigger fires for each page except the last one. (Note that data can be fetched at any time while the report is being formatted.) COMMITs can occur during this time due to any of the following--user exit with DDL, SRW.DO_SQL with DDL, or if ONFAILURE=COMMIT, and the report fails. COMMIT is executed (if READONLY is specified) to end the transaction. After Report trigger is fired. COMMIT/ROLLBACK/NOACTION is executed based on what was specified via the ONSUCCESS argument or setting.

9 10 11

Page 251 of 259

30. Define Alerts in Apps? Ans. Oracle Alerts are used to monitor unusual or critical activity within a designated database. The flexibility of ALERTS allows a database administrator the ability to monitor activities from tablespace sizing to activities associated with particular applications (i.e. AP, GL, FA). Alerts can be created to monitor a process in the database and to notify a specific individual of the status of the process. There are 2 types of alerts: Event Alerts and Periodic Alerts a) EVENT ALERTS are triggered when an event or change is made to a table in the database. b) PERIODIC ALERTS are activated on a scheduled basis to monitor database activities or changes. 31. Steps to Create a Bit Map Report? Ans. 1.Build the query 2.Draw the layout 3. Close the Layout Editor window. Under Data Model, open up the 'System Parameters' 4.Right Click on 'MODE' and select 'Properties' Enter 'BITMAP' as the 'Initial Value' and click OK. Save the report - call it 'first.rdf'. 5. Copy the report file in the appropriate directory. 6. Set the FORMAT to POSTSCRIPT and style as A4. in the concurrent program. 32. What is Token and used for? Ans. Token in Concurrent Program creation : For a parameter in an Oracle Reports program, the keyword or parameter appears here. The value is case insensitive. For other types of programs, you can skip this field. Procedure: Defines an error token and substitutes it with a value. Calls to TOKEN( ) and RAISE( ) raise predefined errors for Oracle Workflow that are stored in the WF_RESOURCES table. The error messages contain tokens that need to be replaced with relevant values when the error message is raised. This is an alternative to raising PL/SQL standard exceptions or custom-defined exceptions. Syntax procedure TOKEN (token_name in varchar2, token_value in varchar2); 33. Difference between function and procedure? Ans. Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit of solve a specific problem or perform set of related tasks. Procedures do not return values which functions return one One Value. Packages: Packages provide a method of encapsulating and storing related procedures, functions, variables and other package contents. 34. Form registration setps? Ans. 1. 2. 3. 4. 5. 6. 7. Create the form using the form builder. Generate the executable code (.fmx) Place the .fmb file in AU_TOP forms directory Place the .fmx file in Module specific top forms directory. Register the form with AOL Associate a form function for the form Attach the form function to a menu

Page 252 of 259

35. Interface Tables details? Ans. 1. General Ledger :

2. Account Receivables:

3. Account Payables:

4. Purchasing:

GL_INTERFACE GL_INTERFACE_CONTROL GL_INTERFACE_HISTORY GL_BUDGET_INTERFACE GL_DAILY_RATES_INTERFACE AR_PAYMENTS_INTERFACE_ALL AR_TAX_INTERFACE HZ_PARTY_INTERFACE HZ_PARTY_INTERFACE_ERRORS RA_CUSTOMER_INTERFACE_ALL RA_INTERFACE_DISTRIBUTIONS_ALL RA_INTERFACE_ERROR_ALL RA_INTERFACE_LINES_ALL RA_INTERFACEA_SALESCREDITS_ALL AP_INTERFACE_CONTROL AP_INTERFACE_REJECTION AP_INVOICES_INTERFACE AP_INVOICE_LINES_INTERFACE PO_DISTRIBUTIONS_INTERFACE PO_HEADER_INTERFACE PO_LINES_INTERFACE PO_INTERFACE_ERROR PO_REQUISITIONS_INTERFACE_ALL

36. Explain Tkprof? Ans. TKProf converts the raw trace files into a more readable format SYNTAX: TKProf tracefile outputfile [sort=option][explain=username/password] Ex. TKProf a12345.trc mytrace.out explain scott/tiger Tracefile The name of the trace statistics file, which is found in the user_dump_dest directory (Normally $ORACLE_HOME/rdbms/log) Outputfile The name of the output file Sort= [option1,option2,.] sorts the SQL statements in the output file

Explain=username/password instructs the TKProf to run explai on the SQL statement in order to explain the access path. This is essential for performance investigation Sys=no TKProf skips recursive SQL and statements run as the SYS user. Used rarely. 37. Adhoc Report? Ans. You can define ad hoc financial reports as necessary to meet special reporting needs. An ad hoc report is one you define at the time you run financial reports. You do not assign a name to an ad hoc report. Instead, General Ledger automatically names ad hoc reports as follows: FSG-AD HOC-<Sequence Generated Number>. Suggestion: We recommend that you delete ad hoc reports periodically to improve system performance. Prerequisite : 1. Define a row set. 2. Define a column set. To define and run an ad hoc financial report: 1. Navigate to the Run Financial Reports window. 2. Choose the Define Ad Hoc Report button. 3. Enter a name for your report Title. If this field is empty, the report title will default to the Row Set Description. If Row Set Description is empty, the report title will default to Row Set Name. 4. Enter the Row Set and Column Set to use for the report. 5. Enter any additional report information, including Budget, Encumbrance, and Currency control values. 6. Choose OK to return to the Run Financial Reports window. 38. Call_Form, Open_Form and New_Form Definitions? Ans.

Page 253 of 259

CALL_FORM: Runs an indicated form while keeping the parent form active. Form Builder runs the called form with the same Runform preferences as the parent form. When the called form is exited Form Builder processing resumes in the calling form at the point from which you initiated the call to CALL_FORM. OPEN_FORM: Opens the indicated form. Use OPEN_FORM to create multiple-form applications, that is, applications that open more than one form at the same time. NEW_FORM: Exits the current form and enters the indicated form. The calling form is terminated as the parent form. If the calling form had been called by a higher form, Form Builder keeps the higher call active and treats it as a call to the new form. Form Builder releases memory (such as database cursors) that the terminated form was using. Form Builder runs the new form with the same Runform options as the parent form. If the parent form was a called form, Form Builder runs the new form with the same options as the parent form. 39. Form and Non-Form function? Ans. Form (Form Function): A form function (form) invokes an Oracle Forms form. Form functions have the unique property that you may navigate to them using the Navigate window. Subfunction (Non-Form Function): A non-form function (subfunction) is a securable subset of a form's functionality: in other words, a function executed from within a form. Statement Printing AR Source files : ARXGSP internally calling ARXSGPO AR_STATEMENT_HEADERS AR_STATEMENT_LINE_CLUSTERS AR_ADJUSTMENT

Tables Effected: TEMP_ARSHR TEMP_ARSLC TEMP_ADJ HZ_CUST_ACCOUNTS HZ_PARTIES HZ_LOCATIONS HZ_CUST_ACCT_SITES HZ_PARTY_SITES FND_TERRITORIES Lookup Tables: AR_LOOKUPS AR_PAYMENT_SCHEDULES

Style Group Above Groups Header Level Call FND_CLIENT_INFO in Before Report Trigger Landscape 66 / 80 - Height / Width AR Invoice Printing Source File : RAXINV_SEL Tables: AR_INVOICE_HEADERS_V AR_INVOICE_LINES_V AR_TAX_LINES_V Call FND_CLIENT_INFO in Before Report Trigger FND_CLIENT_INFO.SET_ORG_CONTEXT(81); Purchase Order Report Source File : POXPRPOP 1) On Plane paper

Page 254 of 259

2) 3) 4)

Logo on Top Left Move Address to center Border for some fields

Tables: PO_HEADERS_PRINT PO_LINES_PRINT Lookup Objects: PO_LINE_LOCATIONS_PRINT PO_VENDOR_CONTACTS PO_DISTRIBUTIONS_ALL HR_EMPLOYEES HR_LOCATIONS Check Printing Source: APXPBFEL 1) 2) 3) Company Logo No Check number Stationary 8.5 X 11

Positive Pay Source : APXPOPAY Statement for bank Date 1-10 MM/DD/YY Left Check Numbers 11 22 Number Right Amount 23 30 Number 9,2 Left Description 31 70 Alpha Number Left

General Report Modifications a. Pre printed stationary b. Portrait format c. Header level changes d. Line level changes e. Decode usage f. Zero 0 suppressing g. Plan paper - logo and address and borders Report definition FLEX MODE Layout Editor mode that automatically resizes or shrinks parent objects when child objects are moved or resized, and adjusts the positions of other layout objects that might otherwise be affected by the repositioning or resizing of the objects. CONFINE MODE Layout editor mode that prevents child objects from being moved or resized on or outside their parent objects. ANCHORA Layout object used to fix a spot on one object to a spot on another object, ensuring the position of the first object in relation to the second object. ANONYMOUS BLOCK A PL/SQL program unit that has no name and does not require the explicit presence of the BEGIN and END keywords to enclose the executable statements. Since they are unnamed, anonymous blocks cannot be referenced by other program units.

Page 255 of 259

BOILERPLATE := Text and/or graphics that appear in a report every time it is run. In some products this is called "constant" text or graphics. CURSOR:= 1. A small icon representing the position of the mouse. The shape of the cursor varies, depending on the selected tool. 2. An internal pointer to data retrieved by a query. A cursor points only to one row of data at a time; however, you can use built-in subprograms to move the cursor to any row in the data set. DATABASE TRIGGER:= A stored PL/SQL block that is implicitly executed when a triggering INSERT, UPDATE, or DELETE statement is issued against the associated table in the database. See also: debug trigger. FOREIGN KEY := A value or column in one table that refers to a primary key in another table. FORMET TRIGGER :=A PL/SQL function that allows you to dynamically change the formatting attributes of an object. FORMULA COLUMN := A user-created column that gets its data from a PL/SQL function or expression, a user exit, a SQL statement, or any combination of these. FRAME = In Graphics Builder, the part of a chart template that defines the basic structure of a chart, but does not determine the way the data is plotted. 2. In Report Builder, a layout object used to enclose other layout objects and control the formatting, frequency, and positioning of several objects simultaneously. FUNCTION = A PL/SQL subprogram that performs a specified sequence of actions, and then returns a value. Can reside and execute on the client and the database server. GLOBAL VARIABLE = A logical container that exists across an application. When an application uses a global variable, the application maintains the variable until the application is exited, or until another object explicitly removes it. GROUP FILTER A PL/SQL function that restricts the data fetched by a group. INDEX = An optional structure associated with a table that is used by Oracle Server to locate rows of the table quickly, and (optionally) to guarantee that every row is unique. INSERT MODE = A mode in which each character you enter is inserted at the cursor, pushing the following characters to the right. The opposite of replace mode. LAXICAL REFERENCE = A reference to a parameter used to represent a string of text in a SQL SELECT statement. For a lexical reference, you must precede the parameter name with an ampersand (&). LOCAL VARIABLE = A PL/SQL variable declared only within the scope of the current program unit. NULL VALUE = The absence of a value. PACKAGE FUNCTION = A PL/SQL function provided with the software that can be referenced anywhere within a program unit. PACKAGE = A method of encapsulating and storing related procedures, functions, variables, and other package constructs together as a unit in the database or on the client. While packages provide the database administrator or application developer organizational benefits, they also offer increased functionality and database performance. The software provides several built-in packages which contain PL/SQL constructs that can be referenced by client-side program units (e.g., TEXT_IO package). Several packages are also supplied with the Oracle database server for referencing by stored program units (e.g., DBMS_OUTPUT package).

Page 256 of 259

PACKAGE BODY = Includes the actual implementation of the package, which may include private subprograms and datatypes. The body is optional if the package consists only of declarations. PACKAGE SPECIFICATION = Includes the actual implementation of the package, which may include private subprograms and datatypes. The body is optional if the package consists only of declarations. PARAMETER = 1. A PL/SQL construct used to pass information to a subprogram. For example, in the subprogram call MYPROC (x),x is a parameter. 2. In Forms Developer, parameters are used to pass information between components such as Form Builder and Graphics Builder. 3. A variable you can change at runtime. PLOT TYPE = The type of element used to plot a field on a chart, such as bar, line, or symbol. PL/SQL = Oracle's proprietary extension to the SQL language. Adds procedural and other constructs to SQL that make it suitable for writing applications. PRIEVIEVE = The interface with which you view and scroll through report output online. PRIMARY KEY = A column in a database table whose members consist of unique values that can be used to identify a row in a table. PROCEDURE = A PL/SQL subprogram that performs a specified sequence of actions. . Can reside and execute on the client and the database server. PROGRAM UNIT = A PL/SQL code structure that can be independently recognized and processed by the PL/SQL compiler. Anonymous blocks, subprogram specifications and bodies (procedures and functions), and package specifications and bodies are types of program units. Program units can reside and execute on the client and the database server. See also: stored program unit. PROJECT NAVIGATOR = The window containing a hierarchical list of project items for the current session. The list appears in outline form, and enables the user to accomplish several tasks such as creating, editing, renaming, and deleting objects. Although only one is visible at any time, the user can choose from two different schema by which to organize the objects. PROPERTY = A characteristic of an object that determines the behavior or appearance of that object. PROPERTY CLASS = A named object that contains a list of properties and their settings used to globally control the appearance and functionality of objects based on that class. RDBMS = Acronym for Relational Database Management System. A database that allows the definition of data structures, storage and retrieval operations, and integrity constraints. In such a database, data and relations between them are organized in tables. RECORD = One row fetched by a SQL SELECT statement. RECORD GROUP = An internal data structure object with a column/row framework, that belong to the form module in which they are defined. RELATIONAL OPERATOR = A symbol used in search criteria to indicate a comparison between two values, such as the equal sign in "WHERE DEPTNO = 10." Rows in which the comparison results in "true" are returned in the result (fetched), while rows in which the comparison returns "false" are rejected from the result.

Page 257 of 259

REPEATING FRAME = A layout object used to display rows of data that are fetched for a group. REPLACE MODE A mode in which each character you type replaces the current character at the cursor. The opposite of insert mode. SCHEMA = A collection of related database objects, usually grouped by database userid. Schema objects includes tables, views, sequences, stored program units, synonyms, indexes, clusters, and database links. SELECTOR = (Oracle Express) A set of tools that you use to choose the dimension values to include, for instance, in a report, table, graph, or dimension list box. For example, you can use the Selector to choose the top 10 cities based on Sales or those cities whose Sales exceeded Quota by 15 percent. The Selector also allows you to sort dimension values and to create and retrieve saved selections. SQL = A standard interface for storing and retrieving information in a relational database. SQL is an acronym for Structured Query Language. SQL SCRIPT A file containing SQL statements that you can run to perform database administration quickly and easily. Several SQL scripts are shipped with Oracle products.

SQL STATEMENT = A SQL instruction to Oracle. A SELECT statement is one type of SQL statement.

SUMMARY COLUMN = A column, with a type of summary, which computes subtotals, grand totals, running totals, and other summaries of the data in a report, using one of the packaged summary functions provided by Report Builder. SYNTEX VARIABLE = One of the variables that are provided with Reports Developer (e.g., &Logical Page, DESTYPE). TABLE = A named collection of related information, stored in a relational database or server, in a twodimensional grid that is made up of rows and columns. TABLE TYPE = A named collection of related information, stored in a relational database or server, in a twodimensional grid that is made up of rows and columns. TRIGGER = A PL/SQL procedure that is executed, or "fired," upon a specific event. USER EXIT = A way in which to pass control (and possibly arguments) from Forms Developer to another Oracle product or 3GL, and then return control (and possibly arguments) back to Forms Developer. USER DEFINED ACTION = A custom action defined by a Project Builder user. Such actions may apply to any single file type, or to all file types. See also: action, pre-defined action. VARIABLE = A named object that can be assigned a value and whose assigned value may change over time. VISUAL ATTRIBUTE = A named object that can be assigned a value and whose assigned value may change over time. SYSTEM ADMINISTRATION 1.Which of the following is not associated with a responsibility? A. Menu B. Request group C. Data group D. Password expiration Answer: D 2.What do you need to do to allow a different user to see your output file? A. The user must log on as a system administrator.

Page 258 of 259

B. C. D. Answer: C

The user must have the View My Requests form in system administrator mode. The user must be logged on with the same responsibility as the user that generated the output file, and the profile option Concurrent: Report Access Level value must be set to Responsibility. The user must be logged on as the same responsibility as the one that generated the output file and profile option Concurrent: Report Access Level value is User.

3.When will a request group become a request security group? A. When the request group is assigned to a responsibility B. When the request group is specified for the Submit Request form C. When the request group is defined with request sets D. When the request group is defined with stage functions Answer: A 4.How can you customize the SRS process? A. Change the form title B. Restrict it by request group C Eliminate the Submit Another Request dialog window D. All of the above Answer: D 5.Which is not a component of a request set? A. Stage B. Group C. Request D. Parameter Answer: B 6.Which of the following operations cannot be performed with the internal concurrent manager? A. Restart B. Verify C. Deactivate D. Terminate Answer: A 7.Which one of the following will be the correct outcome with two include rules in a combined rule? A. Program will be included if the program is in one of the include rules B. Program will be included if the program is in both of the include rules C. Program will be included if the program is run by one of the two Oracle IDs in the include rules D. None of the above Answer: B 8.When will the number of actual processes be less than the number of target processes? A. When the concurrent manager is down B. When the concurrent manager is coming up C. When there are not enough requests D. All of the above Answer: D 9.Which of the following is not a component of parallel concurrent processing? A. Internal monitor B. Transaction manager C. Primary node D. Secondary node Answer: B 10.Which of the following is the overriding level for profile option values? A. Site B. Application C. Responsibility

Page 259 of 259

D. User Answer: D 11.Which of the following is the correct sequence for setting up database change audits? A. Audit installations, audit tables, audit groups, audit trail update tables request B. Audit installation, audit groups, audit tables, audit trail update tables request C. Audit trail update tables request, audit installation, audit groups, audit tables D. Audit groups, audit tables, audit trail update tables request, Audit Installation Answer: B 12.Which of the following is not a document sequence type? A. Category B. Automatic C. Gapless D. Manual Answer: A 13.Which of the following determines the subdirectory for an executable? A. Application name B. Execution method C. Subroutine D. Execution filename Answer: B 14.For what is the Token field used? A. Default value B. Profile option value C. Oracle Reports parameter D. Value set Answer: C 15.How are output files associated with various printer components? A. Through the printer type of the selected printer and the selected print style B. Through the selected print style and the selected printer driver C. Through the selected printer type and the selected print style D. Through the printer type of the selected printer and the selected Answer: A

You might also like