Page 1 of 259What 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 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 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. 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. . 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. document issued by the vendor to record an adjustment against an invoice.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 . The customer disputes the invoice and works with supplier to resolve issue. Negative = Credit Positive = Debit Verify its correctness. received or consumed goods or services a detailed invoice. 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. DO NOT HOLD CREDITS IN THE DEPARTMENT FOR ANY REASON. . reconciles with order and contract information and issues payment. If any discrepancy is found. Buyer receives credit memo. the customer shall start the process to treat incorrect invoices. e tc . Accounts Payable will apply the credit against any open invoices in the system. AP is divided in to 2 workbenches. 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. 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 ? Y 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. Invoice workbench Payable workbench We usually enter supplier invoice either in Invoice workbench or quick invoice window. Supplier issues a credit memo to correct the problem. e m a il. Once Supplier and Customer agree upon the nature of the dispute. Description The supplier presents to the customer for the ordered or delivered. wire) which are made out of OP and they will be recorded in Op and update the invoice for which you have paid. Credit . Computer Generated: Combined: Payment: Lookup: It is a predefined values used as a LOV. We can either link it to supplier site or we can link it to the invoice. Invoice type Allowed values are called Lookup names. There are 2 types of distribution sets. • When an invoice requires immediate action. In some fields we select a value from a predefined set of values. Accounting Date: Date when we are planning to post it to GL ie. Expanse Reports: Invoice Creation: Invoice Distributions: Account: Company have different COA so follow that hierarchy for each set of item. Other predefined set of values are Lookup codes. For a lookup type we can define upto 250 Lookup names. Lookup Category Lookup type ex. In some cases we have defined them in the setup windows such as supplier name. . After entry just import into payable system. validation and defaulting will occur during import. GL Date.payment terms or tax codes. Quick invoice window: • Used for quick high volume invoice entry for invoices that don’t requires extensive validation.pdf Invoice distribution: It allocates total invoice allowance to various expense or asset accounts. Debit memo.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. 58. Payments: Record: Manual payments(checks. For more see page 342 of Oracle payables. For more details see Developer’s Guide pg.memo. Navigation: SetupLookups For more details see Developer’s Guide pg. We can enter –ve % values. Ex. Distribution Sets: It is a predefined set of distribution for a repeated or a same set of distribution form a supplier. 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. Skeleton Distribution Sets: Leave the % field as 0 so that at the time of invoice creation you ca enter amount in different distribution lines. 63. Prepayment. Standard. How do I display row number with records? To achive this use rownum pseudocolumn with query. ename from emp where rowid in (select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start).ename = b. 0)). How do I write the query? SQL> select nvl(to_char(comm. Switch to DOS prompt SQL> host 4. if commission is null then the text “Not Applicable” want to display. For each bank account we can define payment document for check. . Oracle Interview Questions and Answers : SQL 1. empno. EDI or wire transfer and other payment methods. Display the records between two range select rownum. Change SQL prompt name SQL> set sqlprompt “Manimara > “ Manimara > Manimara > 3. Example. Enter value for upto: 10 Enter value for Start: 7 ROWNUM EMPNO ENAME --------. Output: 1 Scott 2 Millor 3 Jiyo 4 Smith 6.ename). The output like. To see current user name Sql> show user. I know the nvl function only allows the same data type(ie. or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta. EFT. Empno Ename 101 Scott 102 Millor 103 Jiyo 104 Smith 5. 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). 2. like SQL> SQL> select rownum. number or char or date Nvl(comm.dv). ename from emp.dv=tb.---------1 7782 CLARK 2 7788 SCOTT 3 7839 KING 4 7844 TURNER 7.). 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. instead of blank space.Page 10 of 259 Purchase document: Use Bank window to define internal bank branch from which you disburse payments.'NA') from emp.--------. Implicit Cursor attributes Same as explicit cursor but prefixed by the word SQL SQL%Found.')) "Sal in Words" from emp / Salary Sal in Words ------.'j'). Oracle cursor : Implicit & Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements. cursor_name%ISOPEN 10. Here SQL%ISOPEN is false.'JSP')) --------. 'Jsp'))|| ' only. cursor_name%NOTFOUND. For SQL queries returning a single row. (to_char(to_date(sal. the cursor needs to be explicitly declared. Display the number value in Words SQL> select sal. '|| (to_char(to_date(sal.2) from emp). mod(rownum. Find out nth highest salary from emp table SELECT DISTINCT (a. the output like.sal)) FROM EMP B WHERE a. because oracle automatically closed the implicit cursor after executing SQL statements. 13.1) in (select rowid. : 2. SQL> select sal "Salary ". Eight Hundred only. 11. 'jsp')) from emp. PL/SQL declares all implicit cursors. SAL (TO_CHAR(TO_DATE(SAL.0) in (select rowid. cursor_name%ROWCOUNT. mod(rownum. 1600 Rs.'J').2) from emp) 2 . SQL%NOTFOUND. (' Rs. Explicit Cursor attributes There are four cursor attributes used in Oracle cursor_name%Found. 9.----------------------------------------------------800 eight hundred 1600 one thousand six hundred 1250 one thousand two hundred fifty If you want to add some text like.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.'NA') ----------------------NA 300 500 NA 1400 NA NA 8. To view installed Oracle version information SQL> select banner from v$version.-----------------------------------------------------800 Rs. 14. SQL%ISOPEN Tips : 1. One Thousand Two Hundred Fifty only. Three Thousand only. is called as Cursor.sal<=b. 1250 Rs. 1 3 5 Even number of records: select * from emp where (rowid. Display Odd/ Even number of records Odd number of records: select * from emp where (rowid.sal). PL/SQL construct to identify each and every work are used.Page 11 of 259 Output : NVL(TO_CHAR(COMM). One Thousand Six Hundred only. SQL%ROWCOUNT. All are Boolean attributes. Rs. For queries that returning more than one row. Enter value for n: 2 SAL --------3700 12.'j'). What is PL/SQL ? PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration. What are PL/SQL Cursor Exceptions? Cursor_Already_Open. Invalid_Cursor 18. LONG. ROWNUM 20. What are the components of a PL/SQL Block ? Declarative part. 4. The advantages are : I. 21. -1 for Negative value. UID.Page 12 of 259 4 6 15. Others 17. conditional branching. NEXTVAL. What are the more common pseudo-columns? SYSDATE. 2. 0 for Zero. the data type of a variable changes accordingly. % ROWTYPE provides the record type that represents a entire row of a table or view or columns selected in the cursor. Need not know about variable's data type ii. Datatypes PL/SQL 5. 7. ROWID. Anonymous blocks or nested blocks can be used in PL/SQL. 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. BOOLEAN. CURVAL. No_Data_Found. Other way to replace query result null value with a text SQL> Set NULL ‘N/A’ to reset SQL> Set NULL ‘’ 19. 3. PL/SQL Basiscs of PL/SQL 1. What is the basic structure of PL/SQL ? PL/SQL uses block structure as its basic structure. 6. What are the components of a PL/SQL block ? A set of related declarations and procedural statements is called block. Any three PL/SQL Exceptions? Too_many_rows. If the database definition of a column in a table changes. USER . Which date function returns number value? months_between 16. Value_Error. VARCHAR2. What are the datatypes a available in PL/SQL ? Some scalar data types such as NUMBER. What is the maximum number of triggers. DATE. Executable part and Execption part. can apply to a single table? 12 triggers. What is the output of SIGN function? 1 for positive value. Some composite data types such as RECORD & TABLE. Zero_Error. CHAR. What is difference between % ROWTYPE and TYPE RECORD ? . loop Fetch C1 into eno. What is a cursor ? Why Cursor is required ? Cursor is a named private SQL area from where information can be accessed. PL/SQL uses Implict Cursors for queries. END LOOP. What is a cursor for loop ? Cursor for loop implicitly declares %ROWTYPE as loop index. Cursors are required to process rows individually for queries returning multiple rows. Implict Cursor and Explicit Cursor. CLOSE cursor name. Begin open C1. True if rows are fetched. e_rec c1 %ROWTYPE. eg. which are modelled as (but not the same as) database tables. e_rec emp% ROWTYPE cursor c1 is select empno. FETCH cursor name INTO or Record types.empno% type. Explain the two type of Cursors ? There are two types of cursors. % FOUND .g. They can be declared and used. What will happen after commit statement ? Cursor C1 is Select empno. 14.to check whether cursor has fetched any row.ename. User defined cursors are called Explicit Cursors. % NOT FOUND . E. Cursors 9. Exit When . TYPE rec RECORD is to be used whenever query returns columns of different table or views and variables. 13. These attributes are proceded with SQL for Implict Cursors and with Cursor name for Explict Cursors. PL/SQL tables use a primary PL/SQL tables can have one column and a primary key. fetches rows of values from active set into fields in the record and closes when all the records have been processed.Page 13 of 259 % ROWTYPE is to be used whenever query returns a entire row of a table or view. 11. 12.ename emp ename %type ). ename from emp. FOR emp_rec IN C1 LOOP salary_total := salary_total +emp_rec sal.deptno from emp. TYPE r_emp is RECORD (eno emp. True if no rows are fetched. OPEN cursor name. 8. What is PL/SQL table ? Objects of type TABLE are called "PL/SQL tables".to check whether cursor is open or not % ROWCOUNT .opens a cursor. What are the PL/SQL Statements used in cursor processing ? DECLARE CURSOR cursor name.to check whether cursor has fetched any row. 10.number of rows fetched/updated/deleted. What are the cursor attributes used in PL/SQL ? %ISOPEN . If FOR EACH ROW clause is specified. 19. If WHEN clause is specified. o. then the trigger for each Row affected by the statement. Implement complex security authorizations.k. end.k.k. o. Maintain replicate tables. does not get closed even after COMMIT/ROLLBACK. 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. o. 21. How many types of database triggers can be specified on a table ? What are they ? Insert Update Delete Before Row o.k.k. o.Page 14 of 259 C1 %notfound.k. Write the order of precedence for validation of a column in a table ? I.column_name values only available. For triggers related to DELETE only OLD. After Statement o.. I & ii. the trigger fires according to the retruned boolean value. FOR UPDATE gets closed after COMMIT/ROLLBACK.k.column_name values only available. end loop. o. if you use COMMIT of ROLLBACK in a trigger.k.k. 17.column_name values only available. The cursor having query as SELECT .. o. As triggers are defined for each table.. o. done using Integarity Constraints.column_name.. ii. 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. 20. For triggers related to UPDATE only OLD. .column_name NEW. 15..k. Before Statement o. 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. What are two virtual tables available during database trigger execution ? The table columns are referred as OLD. it affects logical transaction processing. Enforce complex business rules Derive column values automatically. Log events transparently.column_name and NEW. For triggers related to INSERT only NEW. done using Database triggers. The cursor having query as SELECT.----commit. Usages are Audit data modificateions. o. Database Triggers 16.k. Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ? It is not possible. After Row o.k. 18. IN-OUT parameters. What are advantages fo Stored Procedures / Extensibility. What is an Exception ? What are types of Exception ? Exception is the error handling part of PL/SQL block. Where the Pre_defined_exceptions are stored ? In the standard package. SQLERRM returns the relevant error message of the SQLCODE. What is Pragma EXECPTION_INIT ? Explain the usage ? The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. Procedures. Maintainability and one time compilation. What are the two parts of a procedure ? . 31. 27. To get an error message of a specific oracle error. What are the return values of functions SQLCODE and SQLERRM ? SQLCODE returns the latest code of the error that has occured. e. Functions & Packages . What is a stored procedure ? A stored procedure is a sequence of statements that perform specific function. oracle error number) 24.g. Some of Predefined execptions are. 26. 28. A PROCEDURE may return one or more values through parameters or may not return at all. What is difference between a PROCEDURE & FUNCTION ? A FUNCTION is alway returns a value using the return statement. 30.OUT.Modularity. Reusability. The types are Predefined and user_defined. 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.Page 15 of 259 Exception : 22. 23. 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. PRAGMA EXCEPTION_INIT (exception name. What are the modes of parameters that can be passed to a procedure ? IN. 29. . sal := calculate_sal ('a822').g. Exception. 33.. Give the structure of the procedure ? PROCEDURE name (parameter list. Give the structure of the function ? FUNCTION name (argument list . A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures. varying number of parameters is called overloading of procedures.) Return datatype is local variable declarations Begin executable statements Exception execution handlers End. The advantages of packages are Modularity. 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. procedure is called as a PL/SQL statement calculate_bonus ('A822').Page 16 of 259 Procedure Specification and Procedure Body. What is Overloading of procedures ? The Same procedure name is repeated with parameters of different datatypes and parameters in different positions.What are two parts of package ? The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Hiding. 37. 32. Easier Applicaton Design.. Package Body contains actual procedures and local declaration of the procedures and cursor declarations.. 38.. Explain how procedures and functions are called in a PL/SQL block ? Function is called as part of an expression. 35. Information. e.. Package Specification contains declarations that are global to the packages and local to the schema. DBMS_OUTPUT put_line 36. reusability and Better Performance. 34.. exception handlers end. What is a package ? What are the advantages of packages ? Package is a database object that groups logically related procedures..) is local variable declarations BEGIN Executable statements. .. END. BEGIN PACKAGE NAME. No text Item displayed in the list item. 18. 13. EXECUTE PACKAGE NAME. 16. an application program such a PRC *C. 20. How packaged procedures and functions are called from the following? a.0 12. Operators cannot navigate to a display item or edit the value it contains. PRO* COBOL c. User can select one out of n number of options. END EXEC. A function can not be called. Name the tables where characteristics of Package.Page 17 of 259 39. variable := PACKAGE NAME. What is a visual attribute? Visual Attributes are the font.PROCEDURE NAME (parameters) variable := PACKAGE NAME.What triggers are associated with the radio group? Only when-radio-changed trigger associated with radio group Visual Attributes. What is a list item? It is a list of text elements.PROCEDURE if the procedures does not have any out/in-out parameters. 40. User_Source and User_error. What is a radio Group? Radio groups display a fixed no of options that are mutually Exclusive . Tlist. what is a display item? Display items are similar to text items but store only fetched or assigned values.FUNCTION NAME (arguments). PACKAGE NAME. color and pattern characteristics of objects that operators see and intract with in our application. Stored procedure or anonymous block b. What are the display styles of list items? Poplist.FUNCTION NAME (arguments). procedure and functions are stored ? User_objects. No element in the list is highlighted. SQL *PLUS a. c. can you change the default value of the radio button group at run time? No.PROCEDURE NAME (parameters). 15. What are the types of visual attribute settings? . 14. 19. EXEC SQL EXECUTE b. FORMS4. 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. Page 0? Page . operators can see only those items that have been assiged to a specific canvas. get_window_property. 22. What are the types of canvas-views? Content View. when-window-closed. The content of the window ie. must be displayed in a specfic window. Give the equivalent term in forms 4. Can a root window be made modal? No.0 for the following. when-window-resized 26. move_window.Canvas-view null. 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. Page. can be thought of as an empty frame. What are the differrent types of windows? Root window. What is a window? A window. in term.Page 18 of 259 Custom Visual attributes Default visual attributes Named Visual attributes. 23.0? When-window-activated. Each canvas. and so on. set_window_property. hide_window. radio groups. What is the content view and stacked view? . The frame provides a way to intract with the window.) and boilerplate objects that operators see and interact with as they run your form.Canvas-View Page 0 . Window 21. what is displayed inside the frame is determined by the canvas View or canvas-views displayed in the window at run-time. List the buil-in routine for controlling window during run-time? Find_window. Stacked View. and resize the window. resize_window. 24. 30. At run-time. 28. move. including the ability to scroll. show_View 25. when-window-deactivated. check boxes. List the windows event triggers available in Forms 4. 29. byitself . secondary window. 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 . Caution.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. Yes. 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 are the display styles of an alert? Stop. What is an Alert? An alert is a modal window that displays a message notifies the operator of some application condition 33. What is the built-in function used for finding the alert? Find_alert Editors 38. Can you change the alert messages at run-time? If yes. note 34. What built-in is used for showing the alert during run-time? Show_alert. Can you attach an alert to a field? No 35.0? Default editor User_defined editors system editors. 39. Set_alert_property. give the name of th built-in to chage the alert messages at run-time. 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 editors availables in forms 4. 36. 37. A mutating table is a table that is currently being modified by an update. Q)What is the result of comparing NULL with NULL? NULL is neither equal to NULL. . nor it is not equal to NULL. it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state. There are several restrictions in Oracle regarding triggers: • • • A row-level trigger cannot query or modify a mutating table. delete. BEGIN pcalled@DBLINK2(TabX).Database A: receives a PL/SQL table from database B CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL. Etc.do something with TabX from database B null. END. 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. When a trigger tries to reference a table that is in state of flux (being changed). view or cursor. Normally. Any comparison to NULL is evaluated to NULL. NEW and OLD still can be accessed by the trigger) . (Of course. A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete. Look at this example: -.VARCHAR2S@DBLINK2. the workaround is to enforce the referential integrity through triggers as well. Note that it is not enough to just use "similar" type definitions. Oracle users are like database users for any database server such as MySQL. or insert statement. If you must have triggers on tables that have referential constraints. one user is sufficient to full-fill the requirements of a standard web application. Another way this error can occur is if the trigger has statements to change the primary. 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.VARCHAR2S) IS BEGIN -. Look at this code example to convince yourself. foreign or unique key columns of the table off which it fires. Additional users and their rights over your tablespace can be created and modified from the end-user control panel. %TYPE is used to declare a field with the same type as that of a specified table's column.Page 20 of 259 data. / -. Q)What is a mutating and constraining table? "Mutating" means "changing".Database B: sends a PL/SQL table to database A CREATE OR REPLACE PROCEDURE pcalling IS TabX DBMS_SQL. See the Section 1. or database trigger executes in its own transaction space. Autonomous Transactions (Oracle8i) Autonomous transactions execute within a block of code as separate transactions from the outer (main) transaction. Changes committed in an autonomous transaction are visible to other transactions as well. See the Section 1. object method. / what is Pragmas ? The PRAGMA keyword is used to give instructions to the compiler.unix. Changes can be committed or rolled back in an autonomous transaction without committing or rolling back the main transaction.org.14. Changes committed in an autonomous transaction are visible to the main transaction. "Packages" section for more information on this pragma.8. Session id can be find from following qry select * from v$session where machine like 'IPDOMAINK\ERPNEW_USER%' .htm Kill session: ALTER SYSTEM KILL SESSION ‘session id’. "Database Interaction and Cursors " section for more information on this pragma. The purity level is the degree to which a program does not read/write database tables and/or package variables. top-level anonymous PL/SQL block. even though they occur after the start of the main transaction. The RDBMS suspends the main transaction while the autonomous transaction executes: For more info see http://www. AUTONOMOUS_TRANSACTION (Oracle8i ) Tells the compiler that the function. procedure. 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. RESTRICT_REFERENCES Tells the compiler the purity level of a packaged program.15.10. See the Section 1. 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.Page 21 of 259 END.ua/orelly/oracle/langpkt/ch01_08. "Exception Handling " section for more information on this pragma. SERIALLY_REUSABLE Tells the runtime engine that package data should not persist between references. See the Section 1. "Calling PL/SQL Functions in SQL" section for more information on this pragma. .Page 22 of 259 How to create dynamic LOV in a form? Show_lov(lov_name). here it is . Global Naming Oracle enforces the requirement that the database. truncate can not be rolled back . truncate cluster cluster_name.. well the remote DBA changed all passwords. The object does not need to exist at the time of its creation.. the database link is down. One early morning your management staff complains about missing sales data.iinet. not as a guaranteed method of security. However.. sorry. Truncate: A statement like delete from tablename deletes all records in the table. that someone could guess your code). This code can then be used to quickly and easily locate the event with a database search.. 'format-string') For ER-Diagram: http://members. Synonyms can't be used in a drop and truncate statements. In order to free the space as well.ora for Database SOL3 # ### Global Naming ### ------------# Enforce that a dblink has same name as the DB it connects to . though unlikely. What's happen .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.net. 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.au/~lonsdale/docs/erd.4) # Parameter file initSOL3. Synonym : A synonym (synonym-name) is an alias for an object (such as a table). This feature should be viewed as a way to keep your event out of normal search results. truncate table table_name. nobody changed the calculation procedure during the night . trunc (date) trunc (date. The lookup code serves another purpose as well. which must be ready for the daily trend analysis. Troubleshooting Database Links Each Oracle DBA knowns this story of course .ora. When an event is marked as private it will not come up in any database query except for the lookup code search. Read the following article and you have less annoyance with database links.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.. This means that the event cannot be found by anyone who doesn't have the correct code (It is possible. Why . remote DB is 'SOL1' (Oracle 7. but it does not free any space.6). but not every Oracle user is a DBA. This is only one of the famous database link trobleshooting stories. use truncate.. The code. If this is tried.. Example: Local DB is 'SOL3' (Oracle 8...3. The truncate statement is not the same as the <trunc.html> statement.1. it results in a ORA-00942: table or view does not exist. With this DB-Link. # # TNSNAMES. Test the database link as user jones/lion from SOL3.world = (DESCRIPTION = (ADDRESS = (COMMUNITY = tcp. The connect string must be defined in the Net8 configuration file TNSNAMES. we have the disaster with our missing sales data . Well this is the so called connect_string (or net_connect_string in Oracle8i).world CONNECT TO scott IDENTIFIED BY tiger using 'SOL1'.Page 23 of 259 global_names = TRUE # Parameter file initSOL1. 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.ORA for SOL3 ############################### # SOL1.ora for Database SOL1 # ### Global database name is db_name. you (jones/lion) can connect to the remote database SOL1 as user scott/tiger.WORLD' for our local database SOL3. poor management. $ sqlplus jones/lion@SOL3 SQL> CREATE DATABASE LINK sol1. External references Oracle allows three kinds of external references to DB-links.. You may ask. Now connect to the local database database SOL3 as a user. now you understand our short story at the beginning of this article. SQL> SELECT * FROM emp@SOL1. This user must exist on the remote database SOL1.ORA.... GLOBAL_NAME ----------SOL1.world) (PROTOCOL = TCP) (Host = saturn) (Port = 1521)) (CONNECT_DATA = (SID = SOL1) (GLOBAL_NAME = SOL1.WORLD We found the database link name 'SOL1.db_domain ### ----------------------------------------db_name = SOL1 db_domain = world Our database link points from the local database SOL3 to the remote database SOL1. which are resolved as follows: .world) (SERVER = DEDICATED))) Well. Therefore we need the global database name for SOL1.. This string has nothing common with the DB-Link name. using 'SOL1' means ?.WORLD.. if you don't use Oracle Names. what's this strange 'SOL1' in . but very often the same name is used. who has the privilege to create a database link and create the following named database link to SOL1. If the DBA on SOL1 changes scott's password to snake. or trigger) that initiates a database link. The AUTHENTICATED clause specifies the username and password (JONES/LION) on the target instance (SOL1).Page 24 of 259 o Named Link: The username specified in the link is used. For more information on invoker-rights functions click here CREATE DATABASE LINK sol1. If the database link is used directly.show_emp. 1. The username and password are used only for authentication. Be very careful with PUBLIC database links. For example. How many payment methods can be assigned to a customer? a. procedure. The specified username and password (JONES/LION) must be a valid username and password on the remote instance (SOL1).world CONNECT TO scott IDENTIFIED BY tiger AUTHENTICATED BY jones IDENTIFIED BY lion USING 'sol1'. Besides these often used DB-Links. the invoker's authorization ID is used to connect as a remote user. 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. and user JONES calls procedure SCOTT. If you omit the CONNECT TO clause.show_emp. or package (new in Oracle8i). When executing a stored object (such as a procedure. However. and not the username that called the object. You specify the username and password used to connect to the remote database (this database link is sometimes called fixed user database link). you can create a database link as PUBLIC. This clause authenticates the user to the remote server and is required for security. CURRENT_USER is the username that owns the stored object. CREATE DATABASE LINK sol1. the current user is SCOTT. then CURRENT_USER is JONES and the procedure executes with JONES's privileges.world USING 'sol1'.world CONNECT TO scott IDENTIFIED BY tiger USING 'sol1'. o Anonymous Link: The session username is used. view.world CONNECT TO CURRENT_USER USING 'sol1'. if the database link appears inside procedure SCOTT. CREATE DATABASE LINK sol1. that is. 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). b. if the privileged database link appears inside procedure SCOTT. Example SQL> CREATE SHARED PUBLIC DATABASE LINK sol1. One Two . We suggest. o Privileged Link: The username of the invoker is used. For example. not from within a stored object. they may open a door for everybody to a remote database. and user JONES calls procedure SCOTT. The current user must be a 'global' user with a valid account on the remote database for the link to succeed. This DB-Link is available only with the multi-threaded server configuration. if the stored object is an invoker-rights function.show_emp (created by SCOTT). No other operations are performed on behalf of this user. then the current user is the same as the connected user. NOT TO USE public database links without Authentication.show_emp (an invoker-rights procedure created by SCOTT). b. Transaction Type Customer Payment terms Amount . d. b. Name the two Invoicing Rules in Oracle Receivables Assuming a payment term ‘IMMEDIATE’ is attached to a Transaction Type. None of the above 9. c. Invoice Lines Description Transaction Type Miscellaneous Receipt Description Invoice Item Code 7. Line Transaction Flexfield Link-to Transaction Flexfield Reference Transaction Flexfield None of the above 10. 5. b. d. Eight Unlimited What are the two types of commitments in Oracle Receivables? While entering Invoices manually. Automatically apply receipts to invoices Automatically apply commitments to invoices Automatically apply credit memos to invoices All of the above 8. c. Which of the following information is not required when the user is importing Credit memos? a. Yes No 6. Which is of the following is a mandatory descriptive Flexfield to be defined before importing simple invoices through Auto Invoice? a. c. 2. Can the user import invoices with user defined code combinations without using auto accounting? a. Ship to Address of the customer is mandatory.Page 25 of 259 c. b. In which of the following field. b. d. d. What are the valid values for the column LINE_TYPE in the interface table? 12. c. the system will a. d. b. c. d. Auto Cash Rule Sets are defined to a. Yes No 13. a. True False 4. Name the interface tables used for Auto Invoice Lines and Distributions 11. Standard Memo Lines appear as List of values a. 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. can we raise an Invoice with Payment term ’30 Days’ for the transaction type? a. 3. b. b. If a value in a Profile class is changed. The three steps in Auto Lockbox in sequence are a. 7. Assign a status of ‘Unidentified’ Assign a status of ‘Unapplied’ Ignore the receipt Apply to the oldest invoice 20. Answers: 1. d. d. b.FREIGHT & CHARGES C B AR_PAYMENTS_INTERFACE_ALL Statement of Account Covering Letter Invoice Covering Letter Reminder Letters Receipt Covering Letters . Lockbox transmission formats are normal copied into a. 3. True False 15. Name the interface table used for Auto Lockbox. d. 6.Page 26 of 259 14. Post QuickCash Post QuickCash. Lockbox is defined for a a. Validation. d. Miscellaneous Receipts can be imported into Oracle Receivables using Auto Lockbox c. 12. d. 9. c. 16. b. c. b. c. 10. 5. Import. Dunning Letters are a. Validation. c. the system will a. Assuming a transaction number is not assigned to a receipt in the transmission file and Auto Cash rules are not used. 14. d. Validation Any of the above 17.TAX. Bank Bank Branch Bank Account None of the above 18. 11. b. 13. c. 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. 2. Import. 8. 4. 15. b. Post QuickCash Import. $AR_TOP/sql $AR_TOP/out $AR_TOP/reports $AR_TOP/bin 19. Developer /2000(Form 4. 19. c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup. 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. 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 . 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.This is required since the data is not written whenever a transaction is commited.They do the house keeping activities for the Oracle and are common in any system. Oracle uses an implicit cursor statement for Single row query and Uses Explicit cursor for a multi row query.C. b) Data Manipulation Language(DML) :: The DML statments manipulate database data.There are basically 9 Processes but in a general system we need to mention the first five background processes. e) CheckPoint(CKPT) :: At Specified times.This is useful for recovery from system failure d)Process Monitor(PMON) :: The Process Monitor peforms process recovery when user Process fails. 1) This is one of the most frequently asked question. 17.Set Role e) System Control Statements :: Change Properties of Oracle Instance . c) SavePoint :: For long transactions that contain many SQL statements. d) Rolling Forward :: Process of applying redo log during recovery is called rolling forward. Savepoints can be used to divide a transaction into smaller points. A cursor is basically an area allocated by Oracle for executing the Sql Statement. 2) How many types of Sql Statements are there in Oracle 2) There are basically 6 types of sql statments.5 and Reports 2. Open.Page 27 of 259 16. intermediate markers or savepoints are declared. B C D B C Important Questions in Oracle.g:: Alter System f) Embedded Sql :: Incorporate DDL. b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. b) Rollback :: A transaction that retracts any of the changes resulting from SQL statements in Transaction. They are a) Data Defination Language(DDL) :: The DDL statments define and maintain objects and drop objects. . As transaction commits and log buffer fills. Redo Log data is generated in redo log buffer of SGA. e) Cursor :: A cursor is a handle ( name or a pointer) for the memory associated with a specific statement. a transaction begins with first executable statment and ends when it is explicitly commited or rolled back.Fetch.e.g :: Alter Statements.L in Programming Language.5) Oracle 1) What are the Back ground processes in Oracle and what are they.DML and T. 18.g:: Using the Sql Statements in languages such as 'C'. According to ANSI. LGWR writes log entries into online redo log file. Pmon Clears and Frees resources that process was using. 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. 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. 20. 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.e.e. 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. They are basically used for backup when a database crashes. 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. h) Redo log Buffer :: Redo log Buffer of SGA stores all the redo log entries. Procedures do not Return values while Functions return one One Value Packages :: Packages Provide a method of encapsulating and storing related procedures. 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 . Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards. c) Business Integrity Rules :: The Third Integrity rule is about the complex business processes which cannot be implemented by the above 2 rules. 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.update .delete 3 before . 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. g) Program Global Area (PGA):: The PGA is a memory buffer that contains data and control information for server process. 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.g:: operations insert. 8) What are the Various Master and Detail Relation ships. 5) What are Procedure.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. 7) How many Integrity Rules are there and what are they 7) There are Three Integrity Rules. It consists of Database Buffer Cache and Redo log Buffer. b) Deffered with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the detail block. j) Process :: A Process is a 'thread of control' or mechanism in Operating System that executes series of steps. When there is data in Child Tables the Master tables cannot be deleted. functions. 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. The set of database buffers in an instance is called Database Buffer Cache. update to. 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. Stored Procedures :: Stored Procedures are Procedures that are stored in Compiled form in the database. 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. 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. g) Database Buffer Cache :: Database Buffer of SGA stores the most recently used blocks of database data. e.The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed. 12)How many types of Exceptions are there 12) There are 2 types of exceptions. When too_many_rows b) User Defined Exceptions e.g. They are a) System Exceptions e.Page 29 of 259 b) Optimizer_hint :: set_item_property('DeptBlock'.'FIRST_ROWS'). b) Share lock .g.Rowid from dept where (Deptno > 25) c) Optimize_Sql :: By setting the Optimize_Sql = No. 20)What is concurrency 20) Cuncurrency is allowing simultaneous access of same data by different users. 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. Select /*+ First_Rows */ Deptno. Locks useful for accesing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert. Oracle Forms assigns seperate cursor only for each query SELECT statement.'2'. All other SQL statements reuse the cursor. Oracle Forms assigns a single cursor for all SQL statements. 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.'Second'Null). The best example is the Property Classes. Here the Null is the else statement where null is done . Views are built using the columns from one or more tables. 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.OPTIMIZER_HINT.This lock should not be applied when we do only select from the row. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects.Loc. When no_data_found.update or delete is being done. 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. The Single Table View can be updated but the view with multi table cannot be updated 18) What are the OOPS concepts in Oracle.Dname. Unique key is also useful for identifying the distinct rows in the table.g select DECODE (EMP_CAT.'1'.'First'. 18) Oracle does implement the OOPS concepts. Data for row is stored in a chain of data blocks . 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. 21) Previleges and Grants 21) Previleges are the right to execute a particulare type of SQL statements. Parameter Files :: Parameter file is needed to start an instance.They store the data for the database.The grant has to be given by the owner of the object. 23) Physical Storage of the Data 23) The finest level of granularity of the data base are the data blocks. Segments :: Set of Extents allocated for Extents. 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. 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. 26) What is a 2 Phase Commit 26) Two Phase commit is used in distributed data base systems.g :: Right to Connect.redo log files and time stamp. 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. Right to create. e.acme lang Control Files :: Control files record the physical structure of the data files and redo log files They contain the Db name.:: db_block_buffers = 500 db_name = ORA7 db_domain = u. 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 Block :: One Data Block correspond to specific number of physical database space Extent :: Extent is the number of specific number of contigious data blocks.Data Files.Parameter File. Right to resource Grants are given to the objects so that the object might be accessed accordingly. There are basically 2 phases in a 2 phase commit. 29) What are Codd Rules .When a database is created two table spaces are created.To increase the size of the database to store more data we have to add data file. Data Files :: Every Oracle Data Base has one or more physical data files.Page 30 of 259 We can do the table as Share_Lock as many share_locks can be put on the same resource.g. It contains DML statements or Remote Procedural calls that reference a remote object.Once the Data file is created the size cannot change.:: Pctfree 20.s. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared.A parameter file contains the list of instance configuration parameters e. name and location of dbs. 28) What are mutating tables 28) When a table is in state of transition it is said to be mutating. data files . This is useful to maintain the integrity of the database so that all the users see the same values. Control Files 22)Table Space :: The table space is useful for storing the data in the database. 22)Table Space.Every datafile is associated with only one database. 39 ) What are attributes of cursor? %FOUND . %NOTFOUND . 38) what are the datatypes supported By oracle (INTERNAL)? Varchar2. 30) What is Normalisation 30) Normalisation is the process of organising the tables to remove the redundancy. MLSLABEL.There are mainly 5 Normalisation rules. 36) Is space acquired in blocks or extents ? In extents . update. 37) what is clustered index? In an indexed cluster. 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. rows are stored together based on their cluster key values . Can not applied for HASH. %ISOPEN. 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. 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. Number. 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.Char .%ROWCOUNT 40) Can you use select in FROM clause of SQL select ? Yes.Page 31 of 259 29) Codd Rules describe the ideal nature of a RDBMS. but is not actually stored in the table. . but you cannot insert. 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. You can select from pseudocolumns. 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. 4) What are referenced objects? 4) Referencing allows you to create objects that inherit their functionality and appearance from other objects. except that the resulting reference object maintains a link to its source object. Referencing an object is similar to copying an object. except that the resulting reference object maintains a link to its source object.EFFECTIVE_DATE SYSTEM. Referencing an object is similar to copying an 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 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.SUPPRESS_WORKING 3) What are object group? 3) An object group is a container for a group of objects. . 5) Can you store objects in library? 5) Referencing allows you to create objects that inherit their functionality and appearance from other objects.DATE_THRESHOLD SYSTEM.Page 32 of 259 Forms 4.MESSAGE_LEVEL SYSTEM. You define an object group when you want to package related objects so you can copy or reference them in another module. 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 deeppppppppppppp……He 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. 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. 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. Ø Providing multiple user interfaces. Ø View level: The highest level of abstraction describes only part of entire database. Ø 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. 5. describes what data are stored in database and what relationship among those data. What is extension and intension? Extension It is the number of tuples present in a table at any instance. 9. constructing and manipulating the database for various applications. Intension It is a constant value that gives the name. Advantages of DBMS? Ø Redundancy is controlled. 10. In other words. Ø Enforcing integrity constraints. Ø Security Problems.Page 38 of 259 2. What is a Database system? The database and DBMS software together is called as Database system. Ø Providing backup and recovery. Ø Difficult in accessing data. What is Data Independence? Data independence means that “the application is independent of the storage structure and access strategy of data”. structure of table and the constraints laid on it. Disadvantage in File Processing System? Ø Data redundancy & inconsistency. Define the "integrity rules" There are two Integrity rules. . 6. Ø Data isolation. Ø Concurrent access is not possible. Ø Logical level: The next higher level of abstraction. What is DBMS? It is a collection of programs that enables user to create and maintain a database. Ø Data integrity. 3. This is time dependent. Ø Unauthorised access is restricted. 7. 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. Its two subsystems are Ø Research Storage Ø System Relational Data System. with performance at least comparable to that of existing system. 8. 4. The ability to modify the schema definition in one level should not affect the schema definition in the next higher level. In other words it is general-purpose software that provides the users with the processes of defining. 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. Hence accounts for logical data independence. What is an Entity type? It is a collection (set) of entities that have same attributes. What is Relationship type? Relationship type defines a set of associations or a relationship set among a given set of entity types. which describes the entity. A relation is defined as a set of tuples. An) is made up of the relation name R and the list of attributes Ai that it contains.. 22.. then it is said to be Weak Entity set. …. . Ø Logical Data Independence: Modification in logical level should affect the view level. These bodies of code are called methods. 26. What is an attribute? It is a particular property. 16. t3. 21. An object contains values stored in instance variables with in the object. that is. 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. .. What is Relationship? It is an association among two or more entities. 17. A2. 24.. What is a view? How it is related to data independence? A view may be thought of as a virtual table. In other words. Each tuple is an ordered list of n-values t=(v1. Objects that contain same types of values and the same methods are grouped together into classes. Entities are described in a database by a set of attributes. 14. 13. Let r be the relation which contains set tuples (t1. there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.Page 39 of 259 Two types of Data Independence: Ø Physical Data Independence: Modification in physical level should not affect the logical level. What is Relationship set? The collection (or set) of similar relationships. 15. What is degree of a Relation? It is the number of attribute of its relation schema. What is Weak Entity set? An entity set may not have sufficient attributes to form a primary key. 23. a table that does not really exist in its own right but is instead derived from one or more underlying base table. Growth and restructuring of base tables is not reflected in views. data relationships data semantics and constraints. 19. Thus the view can insulate users from the effects of restructuring and growth in the database.v2. and its primary key compromises of its partial key and primary key of its parent entity. What is Data Model? A collection of conceptual tools for describing data. An object also contains bodies of code that operate on the object. What is degree of Relationship type? . 27. 20.. What is Object Oriented model? This model is based on collection of objects. 25. What is an Entity? It is a 'thing' in the real world with an independent existence.. tn). What is an Entity set? It is a collection of all entities of particular entity type in the database. vn). NOTE: Logical Data Independence is more difficult to achieve 12. What is an Extension of entity type? The collections of entities of a particular entity type are grouped together into an entity set. t2. 18. What is a Relation Schema and a Relation? A relation Schema denoted by R(A1. What is DDL Interpreter? It interprets DDL statements and record them in tables containing metadata.. What is Record-at-a-time? The Low level or Procedural DML can specify and retrieve each record from a set of records. 35. What is Query evaluation engine? It executes low-level instruction generated by compiler. 25. It consists of a set of operations that take one or two relations as input and produce a new relation.F. 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. 40. Codd. What is Relational Calculus? It is an applied predicate calculus specifically tailored for relational databases proposed by E.e. This retrieve of a record is said to be Record-at-a-time. 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. 36.g. 31. 28.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. What is Relational Algebra? It is procedural query language. What is DML (Data Manipulation Language)? This language that enable user to access or manipulate data as organised by appropriate data model. 32. This retrieve of a record is said to be Set-at-a-time or Set-oriented.e. variable whose only permitted values are tuples of that relation. What is Data Storage .g. 33. Ø Procedural DML or Low level: DML requires a user to specify what data are needed and how to get those data. How does Tuple-oriented relational calculus differ from domain-oriented relational calculus The tuple-oriented calculus uses a tuple variables i. QUEL The domain-oriented calculus has domain variables i. 27. E. E. 38. deletion and update anomalies. 39. Ø Non-Procedural DML or High level: DML requires a user to specify what data are needed without specifying how to get those data. E. What is DML Compiler? It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand. What is DDL (Data Definition Language)? A data base schema is specifies by a set of definitions expressed by a special language called DDL. 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.Page 40 of 259 It is the number of entity type participating. variables that range over the underlying domains instead of over relation. 26. of languages based on it are DSL ALPHA. QUEL. The constraint is for any two . 29.g. 37. What is SDL (Storage Definition Language)? This language is to specify the internal schema. 34. DEDUCE. This language may specify the mapping between two schemas. What is VDL (View Definition Language)? It specifies user views and their mappings to the conceptual schema.. ILL. 42. 52. Ø A is a prime attribute of R. What is Lossless join property? It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition. 46. 48.Page 41 of 259 tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. In other words. What is 5NF? A Relation schema R is said to be 5NF if for every join dependency {R1. What is Fully Functional dependency? It is based on concept of full functional dependency. Ø X is a super key. What is Multivalued dependency? Multivalued dependency denoted by X Y specified on relation schema R.. 50.. It is sometime called as Discriminator. 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. . This means the value of X component of a tuple uniquely determines the value of component Y. When is a functional dependency F said to be minimal? Ø Every dependency in F has a single attribute for its right hand side. one of following is true Ø X is subset or equal to (or) XY = R. 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. 45. 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. Alternate Key: . one the following is true Ø Ri = R for some i. What is 4NF? A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R. R2.. artificial.. 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. 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. Rn} that holds R. over R in which the left side is key of R. Ø The join dependency is implied by the set of FD. 49. What are partial. 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. if every non prime attribute is non-transitively dependent on primary key. 41. X must be a candidate key. 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. indivisible) values. Ø 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. 47. 44. Ø We cannot remove any dependency from F and still have set of dependency that is equivalent to F. alternate. What is 1 NF (Normal Form)? The domain of attribute must include only atomic (simple. 51. What is durability in DBMS? Once the DBMS informs the user that a transaction has successfully completed. information about every relation and index that it contains. 61. Inclusion Dependency: An Inclusion Dependency is a statement of the form that some columns of a relation are contained in other columns..A JD {R1. Artificial Key: If no obvious key. What is join dependency and inclusion dependency? Join Dependency: A Join dependency is generalization of Multivalued dependency. 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. Rn is a lossless-join decomposition of R . . A foreign key constraint is an example of inclusion dependency. R2. 59. 58. then it is called the natural key. What are the different phases of transaction? Different phases are . the delay in propagating local information might cause the deadlock detection algorithms to identify deadlocks that do not really exist. 60. 56. It is used when we need to express a relationship among relationships. Types: Ø Binary search style indexing Ø B-Tree indexing Ø Inverted list indexing Ø Memory resident table Ø Table indexing 54. DBMS ensures this by undoing the actions of incomplete transactions. Rn} is said to hold over a relation R if R1. by assigning a unique number to each record or occurrence. R3. 53.. Users should not have to worry about the effect of incomplete transactions. Then this is known as developing an artificial key. then the last resort is to simply create a key. its effects should persist even if the system crashes before all its changes are reflected on disk. either stand alone or compound is available.. the DBMS can reduce the amount of work to be done during restart in the event of subsequent crashes. What is a Phantom Deadlock? In distributed deadlock detection.. This information is stored in a collection of relations maintained by the system called metadata..Page 42 of 259 All Candidate Keys excluding the Primary Key are known as Alternate Keys. . It is also called data dictionary. By taking checkpoints.. What is indexing and what are the different kinds of indexing? Indexing is a technique for determining how quickly specific data can be found. There is no set of sound and complete inference rules for JD. 55. Such situations are called phantom deadlocks and they lead to unnecessary aborts. then combining multiple elements to create a unique identifier for the construct is known as creating a compound key. Aggregation: A concept which is used to model a relationship between a collection of entities and relationships. What is system catalog or catalog relation? How is better known as? A RDBMS maintains a description of all the data that it contains. 57. This property is called durability. Compound Key: If no single data element uniquely identifies occurrences within a construct. What is a checkpoint and When does it occur? A Checkpoint is like a snapshot of the DBMS state. What do you mean by atomicity and aggregation? Atomicity: Either all actions are carried out or none are. Natural Key: When one of the data elements stored within a construct is utilized as the primary key. R2. JOIN: Concatenation of rows from one relation and related rows from another. deletion and modification. and manages space usage within its table-space structures . or nested queries. 71. 74. What are the unary operations in Relational Algebra? PROJECTION and SELECTION. 66. manages memory caches and paging. Brief theory of Network. provides access to them. An RDBMS maintains its own list of authorized users and their associated privileges. its primary functions are storing. dispatches and schedules user requests. What is RDBMS KERNEL? Two important pieces of RDBMS architecture are the kernel.CNUM = ORDER. Columns from the subquery cannot be referenced anywhere else in the parent query. Are the resulting relations of PRODUCT and JOIN operation the same? No. 65. What is a query? A query with respect to DBMS relates to user commands that are used to interact with a data base. Memory Management. and the data dictionary. Storage Management. Depending on how the subquery is written. controls locking for concurrent resource usage. Distribution Control. it can be executed once for the parent query or it can be executed once for each row returned by the parent query. and . Transaction Control. It has no cross-file capabilities but is user-friendly and provides user-interface management. 68. are used to bring back a set of rows to be used by the parent query. Select * From CUST Where '10/03/1990' IN (Select ODATE From ORDER Where CUST. retrieving. E. 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. A correlated subquery can be easily identified if it contains any references to the parent subquery columns in its WHERE clause. which keeps its Physical Structure hidden from user. which is the software. designed specifically for controlling data access. 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. 63. 70. this is called a correlated subquery. 72.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. Lock Management 73. What is the job of the information stored in data-dictionary? The information in the data dictionary validates the existence of the objects. What is "transparent DBMS"? It is one. 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). and securing data. Name the buffer in which all the commands that are typed in are stored ‘Edit’ Buffer 69. Language Processing. The following example demonstrates a non-correlated subquery. PRODUCT: Concatenation of every row in one relation with every row in another. What are the primitive operations common to all record management systems? Addition. What do you mean by Correlated subquery? Subqueries. Logging and Recovery. Name the sub-systems of a RDBMS I/O. The query language can be classified into data definition language and data manipulation language. Security. If the subquery is executed for each row of the parent. 64.g. Process Control.CNUM) 67. 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. 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. 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. the location of the database and redo logs. the changes recorded in the redo logs can be used to bring the database to a consistent state without losing any committed transactions. Any database must have at least one control file. 79. 81. 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. These are Ø Database files Ø Control files Ø Redo logs The most important of these are the database files where the actual data resides. All the files are binary. In the case of non-data loss failure. the redo logs record all changes to the user objects or system objects. Without these files. . the system global area or shared global area. The control files and the redo logs support the functioning of the architecture itself. open. also known as Oracle background processes. the number (or location) of the files is immaterial. LGWR (Log Writer). or backing up and restoring just part of the database. Redo Logs Any database must have at least two redo logs. The data and control structures in the SGA are shareable. How do you communicate with an RDBMS? You communicate with an RDBMS using Structured Query Language (SQL) 77. the tables (and other objects) for all the user accounts can go in one database file—but that's not an ideal situation because it does not make the database structure very flexible for controlling access to storage for different users. What is an Oracle Instance? The Oracle system processes. more than one files are used. the date and time it was created. Every time you add a new database or redo log file to the database. If any type of failure occurs. The control file records the name of the database. 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. provide functions for the user processes—functions that would otherwise be done by the user processes themselves Oracle database-wide system memory is known as the SGA. you cannot access the database. These are the journals for the database. Oracle can apply the information in the redo logs automatically without intervention from the DBA. 78. the information is recorded in the control files. In terms of accessing and using the data in the tables and other objects. What are database files. if there is one. putting the database on different disk drives. The combination of the SGA and the Oracle background processes is known as an Oracle instance 80. control files and log files.Page 44 of 259 maps the actual physical storage location. and all the Oracle background processes and user processes can use them. and the synchronization information to ensure that all three sets of files are always in step. and available to Oracle for any data on the database to be useable. although you typically have more than one to guard against loss. The redo log files are fixed in size and never grow dynamically from the size at which they were created. 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). Not only RDBMS takes care of locating data it also determines an optimal access path to store or retrieve the data 76. All three sets of files must be present. and the database administrator might have to recover some or all of the database using a backup. and PMON (Process Monitor). SMON (System Monitor). 75. You must have at least one database file but usually. Depending on their sizes. 85. the exception name is ot_failure. and delete statements against a table. recreates the definitions of objects. Two blocks can have the same block address if they are in different database files. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination. the combination of which uniquely identifies the physical storage location of the row. User accomplishes this by naming an exception as in the following example: ot_failure EXCEPTION. update. the entire block is not available for holding data. The best you can do is recover the database to the time when the export was last performed. What is ROWID? The ROWID is a unique database-wide physical address for every row on every table. After the exception handler executes. 87. For any one table. and inserts the data If Export and Import are used as a means of backing up and recovering the database. Once assigned (when the row is first inserted into the database). Errors cause the program to raise an exception with a transfer of control to the exception-handler block. Each Oracle block is numbered sequentially for each database file starting at 1. The following is an example of a subprogram exception: . This block header has a minimum size. The Import utility reads the file produced by an export. Ø Oracle database file number. 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. The Export utility dumps the definitions and data for the specified part of the database to an operating system binary file. A database trigger can call database procedures that are also written in PL/SQL. it never changes until the row is deleted or the table is dropped. control returns to the block in which the handler was defined. which are use for backup and recovery. User-Defined Exceptions PL/SQL enables the user to define exception handlers in the declarations area of subprogram specifications. Application developers also use it in SQL statements as a quick way to access a row once they know the ROWID 83. Regardless of the block size. In this case. 86. 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 created—making it easier for the RDBMS software to manage the files and easier to read data into the memory areas. Stored procedures are used to reduce network traffic.Page 45 of 259 82. The block size should be a multiple of the operating system block size. Stored procedures are database objects that perform a user defined operation. all the changes made to the database cannot be recovered since the export was performed. control returns to the caller. out_msg := g_out_msg. The trigger can e defined to execute once for the entire statement or once for every row that is inserted. Increasing the Oracle block size can improve performance. but it can grow. but it should be done only when the database is first created. What are stored-procedures? And what are the advantages of using them. Oracle takes up some space to manage the contents of the block. These utilities are Export and Import. 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. which contains the block with the rows Ø Oracle block address. The exception handler must be defined within a subprogram specification. Oracle provides two utilities that you can use to back up and restore the database. A stored procedure can have a set of compound SQL statements. or deleted. updated. 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. If there are no more executable statements in the block. These Oracle blocks are the smallest unit of storage. Name two utilities that Oracle provides. Along with the RDBMS software. 84. A stored procedure executes the SQL commands and returns the result to the client. The ROWID consists of the following three components. What is database Trigger? A database trigger is a PL/SQL block that can defined to automatically execute for insert. there are twelve events for which you can define database triggers. 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. A B C is a set of attributes. 89. PL/SQL does not look only at the referenced name. PL/SQL internal exceptions. NO_DATA_FOUND is a system-defined exception. 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. 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. RAISE ot_failure. Table below gives a complete list of internal exceptions. The count and data types of formal parameters are also considered. PL/SQL internal exceptions. Within this exception is the RAISE statement that transfers control back to the ot_failure exception handler. Theta joins iii. to resolve a procedure or function call. 88. however.Page 46 of 259 EXCEPTION when NO_DATA_FOUND then g_out_status_code := 'FAIL'. 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. 91. To further ensure calling the proper procedure. PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or internal functions. there is a catch-all exception named OTHERS that traps all errors for which specific error handling has not been established. 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. Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference. Spurious tuples may occur due to i. The functional dependency is as follows AB -> B AC -> C C -> B a) is in 1NF . Bad normalization ii. you can use the dot notation. What is Buffer Manager? It is a program module. The language supports the use two . What is Transaction Manager? It is a program module. 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. which slows execution. 99. What is Authorization and Integrity manager? It is the program module. this it is not in 3NF. which is responsible for fetching data from disk storage into main memory and deciding what data to be cache in memory. 92. remains in a consistent state despite system failures and concurrent transaction execution proceeds without conflicting. Further B is not functionally dependent on key AC thus it is not in 2NF. C} hence AC is the primary key. 96.the string in single quotes 'NORTH' and 'SOUTH' c) Error . These types of procedures are not available for reference from other Oracle tools.the ORDER BY clause. 100. which manages the allocation of space on disk storage and data structure used to represent information stored on a disk.Page 47 of 259 b) is in 2NF c) is in 3NF d) is in BCNF (a) is in 1NF since (AC)+ = { A. What is Storage Manager? It is a program module that provides the interface between the low-level data stored in database. Another limitation of stand-alone procedures is that they are compiled at run time. What are stand-alone procedures? Procedures that are not part of a package are known as stand-alone because they independently defined.the string should be in double quotes d) Error . Select 'NORTH'. application programs and queries submitted to the system. Since C B is a FD given. What is File Manager? It is a program module. B. 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. 97. CUSTOMER From CUST_DTLS Where REGION = 'E' Order By CUSTOMER The above is a) Not an error b) Error . which ensures that database. What are cursors give different types of cursors.ORDER BY clause (d) Error . CUSTOMER From CUST_DTLS Where REGION = 'N' Order By CUSTOMER Union Select 'EAST'. Since ORDER BY clause cannot be used in UNIONS 95. where neither C is a Key nor B is a prime attribute. 101. PL/SQL uses cursors for all database information accesses statements. A good example of a stand-alone procedure is one written in a SQL*Forms application. Thus the given FDs is in 1NF. 98. which tests for the satisfaction of integrity constraint and checks the authority of user to access data. Ø Union or Additive rule: If {X Y. Ø Hot Backup: Some sites (such as worldwide airline reservations systems) cannot shut down the database while making a backup copy of the files.II Determining minimal K for relation schema R. Ø Decomposition rule : If X YZ then X Y. Repeat steps 2 and 3 until Old X+ = X+ Algo. Issue a SQL command to indicate to Oracle. on a tablespace-by-tablespace basis. If (K – A)+ = R then set K = (K – A)+ 105. If a cold backup is performed. given set of FDs F 1. 103. Set Old X+ = X+ 3. 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. If a data loss failure does occur. Set K to R that is make K a set of all attributes in R 2. i. The database must be running in ARCHIVELOG mode for the hot backup option. Of these the first three are known as Amstrong Rules. So different means of backing up database must be used — the hot backup. 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. Once the user has indicated that he/she wants to back up the tablespace files. the lost database files can be restored using the hot backup and the online and offline redo logs created since the backup was done. and control file) when the instance is shut down. that the files of the tablespace are to backed up. What is cold backup and hot backup (in case of Oracle)? Ø Cold Backup: It is copying the three sets of files (database files. . 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. redo logs. Set X+ = X 2.Page 48 of 259 types of cursors Ø Implicit Ø Explicit 102. I Determining X+. closure for X. 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. They are called complete because using these three rules we can generate the rest all inference rules. WY Z} then WX Z. What do you understand by dependency preservation? Given a relation R and a set of FDs F. X Z} then X YZ. The database is restored to the most consistent state without any loss of committed transactions. You must shut down the instance to guarantee a consistent copy. including making changes to the data.. the only option available in the event of data file loss is restoring all the files from the latest backup. he/she can use the operating system to copy those files to the desired backup destination. All work performed on the database since the last backup is lost. Algo. The cold backup is not an available option. Ø Pseudo Transitive rule : If {X Y. This is a straight file copy. Ø Augmentation rule: If X Y then XZ YZ. The users can continue to make full use of the files. given set of FDs F 1. 104. usually from the disk directly to tape. Y Z} then X Z. Compute (K – A)+ with respect to F b. They are sound because it is enough if a set of FDs satisfy these three. For each FD Y Z in F and if Y belongs to X+ then add Z to X+ 4.e. For each attribute A in K a. Ø Transitive rule: If {X Y. 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. What operator performs pattern matching? LIKE operator 3. <>. State true or false. What command is used to get back the privileges offered by the GRANT command? REVOKE 12. delete. Hence DELETE operation can be . Which system tables contain information on privileges granted and privileges obtained? USER_TAB_PRIVS_MADE. What are the privileges that can be granted on a table by a user to others? Insert. USER_TAB_PRIVS_RECD 13. Which is the subset of SQL commands used to manipulate Oracle Database structures. True 10. Which system table contains information on constraints on all the tables created? USER_CONSTRAINTS 14. The disadvantage in this type of join is that there FAQ In SQL 1. 15. Retroactive Update: The updates that are applied to database after it becomes effective in real world . and then executes it? RUN 7. execute. Proactive Update: The updates that are applied to database before it becomes effective in real world . alter. Which command executes the contents of a specified file? START <filename> or @<filename> 5. What are the wildcards used for pattern matching? _ for single character substitution and % for multi-character substitution 8. State true or false. select. all 11. What is the parameter substitution symbol used with INSERT INTO command? & 6. ^= all denote the same operation. Simulatneous Update: The updates that are applied to database at the same time when it becomes effective in real world . references. What is meant by Proactive. index. True 9. update. What operator tests column for the absence of data? IS NULL operator 4. SOME. TRUNCATE TABLE EMP. What is the difference between TRUNCATE and DELETE commands? TRUNCATE is a DDL command whereas DELETE is a DML command. 107. What are the different types of JOIN operations? Equi Join: This is the most common type of join which involves only equality comparisions. DELETE FROM EMP. Will the outputs of the above two commands differ? Both will result in deleting all the rows in the table EMP. including tables? Data Definition Language (DDL) 2. ANY are operators in SQL. EXISTS. Retroactive and Simultaneous Update. Which command displays the SQL command in the SQL buffer. !=. 106. 'TROUBLE') FROM DUAL. Here the table name starts with an '&' symbol. What command is used to create a table by copying the structure of another table? Answer : CREATE TABLE . a parent table can be dropped even when a child table exists. 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. AS SELECT command Explanation : To copy only the structure. then all the rows or rows satisfying the condition will be copied to the new table. TROUBLETHETROUBLE 18.1. the WHERE clause of the SELECT command should contain a FALSE statement as in the following. '**'). 20. COMM = SAL*0. Why does the following command give a compilation error? DROP TABLE &TABLE_NAME.'*'.Page 50 of 259 rolled back. '!'). Which function is used to find the largest integer less than or equal to a specific value? FLOOR .'YES'. WHERE clause can be used with DELETE and not with TRUNCATE.0) FROM EMP. 17. It is used to describe a schema as well as to retrieve rows from table in descending order. Which date function is used to find the difference between two dates? MONTHS_BETWEEN 21. 27.'!'). '1'. What will be the output of the following query? SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!'. CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2. comm = 1000 25. Answer : NO Explanation : The query checks whether a given string is a numerical digit. 16. Explanation : The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order. 'NO' ). The null values in the commission column will be replaced by 0 and added to salary. If the WHERE condition is true. 22. but TRUNCATE operation cannot be rolled back.'1111111111'). What will be the output of the following query? SELECT DECODE(TRANSLATE('A'. 26. 'AN'..'1234567890'. 19. Variable names should start with an alphabet. What is the use of the DROP option in the ALTER TABLE command? It is used to drop constraints specified on the table. 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. What does the following query do? SELECT SAL + NVL(COMM. This displays the total salary of all employees. What is the use of DESC in SQL? Answer : DESC has two purposes. sal = 11000. 23. What is the use of CASCADE CONSTRAINTS? When this clause is used with the DROP command. 24. Create. Redo Log data is generated in redo log buffer of SGA. Eg: select.5 and Reports 2. LGWR writes log entries into an online redo log file.Page 51 of 259 28. SOLD (NUMBER) Table 3 : PROGRAMMER PNAME (VARCHAR). They do the house keeping activities for the Oracle and are common in any system. drop. d)Process Monitor(PMON) :: The Process Monitor performs process recovery when user process fails. alter. DOB (DATE). DEVIN (VARCHAR). SAL (NUMBER) Important Questions in Oracle. PMON Clears and Frees resources that process was using.-2) FROM DUAL. TITLE (VARCHAR).They are a) Data Definition Language (DDL) :: The DDL statements define and maintain objects and drop objects. What is the output of the following query? SELECT TRUNC(1234. SCHEMAS Table 1 : STUDIES PNAME (VARCHAR). PROF2 (VARCHAR). PROF1 (VARCHAR).5) Oracle 1) What are the Back ground processes in Oracle and what are they. CCOST (NUMBER) Table 2 : SOFTWARE PNAME (VARCHAR). 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. e) CheckPoint(CKPT) :: At Specified times. As transaction commits and log buffer fills. There are basically 9 Processes but in a general system we need to mention the first five background processes. COURSE (VARCHAR). SPLACE (VARCHAR). SCOST (NUMBER). Developer /2000(Form 4. This is required since the data is not written whenever a transaction is commited. SEX (CHAR). 1) This is one of the most frequently asked question. DOJ (DATE). delete . b)LogWriter(LGWR) :: LogWriter writes the redo log entries to disk. c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup. 2) How many types of Sql Statements are there in Oracle 2) There are basically 6 types of sql statments. DCOST (NUMBER).5678. update. 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. 1200 SQL – QUERIES I. truncate b) Data Manipulation Language (DML) :: The DML statements manipulate database data. This is useful for recovery from system failure. 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. . Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards. e. Savepoints can be used to divide a transaction into smaller points. A cursor is basically an area allocated by Oracle for executing the Sql Statement. 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.Fetch.g:: Using the Sql Statements in languages such as 'C'. The set of database buffers in an instance is called Database Buffer Cache. delete 3 before . a transaction begins with first executable statement and ends when it is explicitly commited or rolled back. 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. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. They are basically used for backup when a database crashes.e. functions. update. Stored Procedures:: Stored Procedures are Procedures that are stored in Compiled form in the database. 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. g) Database Buffer Cache :: Databese Buffer of SGA stores the most recently used blocks of datatbase data. or delete from table. e) Cursor :: A cursor is a handle ( name or a pointer) for the memory associated with a specific statement. h) Redo log Buffer :: Redo log Buffer of SGA stores all the redo log entries. Set Role e) System Control Statements :: Change Properties of Oracle Instance .e. revoke d) Session Control Statements :: Used to control the properties of current session enabling and disabling roles and changing .g:: operations insert. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. e. c) SavePoint :: For long transactions that contain many SQL statements. Oracle uses an implicit cursor statement for Single row query and Uses Explcit cursor for a multi row query. 5) What are Procedure. The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format. b) Rollback :: A transaction that retracts any of the changes resulting from SQL statements in Transaction. 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.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. 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. j) Process :: A Process is a 'thread of control' or mechansim in Operating System that executes series of steps. Open. d) Rolling Forward :: Process of applying redo log during recovery is called rolling forward. According to ANSI.Page 52 of 259 c) Transaction Control Statements :: Manage change by DML eg : grant.DML and TCS in Programming Language. Procedures do not Return values while Functions return one One Value Packages :: Packages Provide a method of encapsulating and storing related procedures.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.g:: Alter System f) Embedded Sql :: Incorporate DDL. 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.g :: Alter Statements. intermediate markers or savepoints are declared. 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. 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. Select /*+ First_Rows */ Deptno. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No. e. Here the Null is the else statement where null is done.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.'1'. WHEN NO_DATA_FOUND. 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. 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 . 9) What are the Various Block Coordination Properties 9) The various Block Coordination Properties are a) Immediate Default Setting.'Second'Null). 12) How many types of Exceptions are there? 12) There are 2 types of exceptions.'First'.g select DECODE (EMP_CAT. When there is data in Child Tables the Master tables cannot be deleted. WHEN TOO_MANY_ROWS b) User Defined Exceptions e.Page 53 of 259 7) How many Integrity Rules are there and what are they 7) There are Three Integrity Rules. 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'.'FIRST_ROWS'). 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. They are a) System defined Exceptions e. Oracle Forms assigns seperate cursor only for each query SELECT statement. This slow downs the processing because for every time the SQL must be parsed whenever they are executed. 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.Dname.OPTIMIZER_HINT.'2'.g. The Detail records are shown when the Master Record is shown.Loc. c) Business Integrity Rules :: The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules. All other SQL statements reuse the cursor.g. acme lang Control Files :: Control files record the physical structure of the data files and redo log files. 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. 21) Previleges and Grants 21) Previleges are the right to execute a particular type of SQL statements. b) Share lock We can do the table as Share_Lock as many share_locks can be put on the same resource.g. name and location of dbs. Segments :: Set of Extents allocated for Extents. 18) What are the OOPS concepts in Oracle.:: db_block_buffers = 500 db_name = ORA7 db_domain = u. 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. The grant has to be given by the owner of the object. Data Files :: Every Oracle Data Base has one or more physical data files. Every datafile is associated with only one database. When a database is created two table spaces are created. They contain the Db name.redo log files and time stamp. 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 . Locks useful for accessing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert. We can categorize the properties by setting the visual attributes and then attach the property classes for the objects. 18) Oracle does implement the OOPS concepts. Views are built using the columns from one or more tables.s. 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. 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.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. Parameter File. Control Files 22)Table Space :: The table space is useful for storing the data in the database. Right to resource Grants are given to objects so that the objects might be accessed accordingly. The best example is the Property Classes. Data Files. 20) What is concurrency 20) Cuncurrency is allowing simultaneous access of same data by different users. Parameter Files :: Parameter file is needed to start an instance. 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. 23) Physical Storage of the Data 23) The finest level of granularity of the data base are the data blocks. This lock should not be applied when we do only select from the row. The Single Table View can be updated but the view with multi table cannot be updated. data files . Views with joins or grouping expressions cannot be updated. update or delete is being done. e. 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. A parameter file contains the list of instance configuration parameters e. 22)Table Space. They store the data for the database. Unique key is also useful for identifying the distinct rows in the table. Right to create.g :: Right to Connect. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg. 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. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared.There are mainly 5 Normal rules/forms. 30) What is Normalisation 30) Normalisation is the process of organising the tables to remove the redundancy.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. 29) What are Codd Rules 29) Codd Rules describe the ideal nature of a RDBMS. 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. a) 1 Normal Form :: A table is said to be in 1st Normal Form when the attributes are atomic. but you cannot insert. 26) What is a 2 Phase Commit 26) Two Phase commit is used in distributed data base systems. There are basically 2 phases in a 2 phase commit. but is not actually stored in the table. It contains DML statements or Remote Procedural calls that reference a remote object. 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. 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. or delete their values. 36) Is space acquired in blocks or extents? In extents . 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. 28) What are mutating tables? 28) When a table is in state of transition it is said to be mutating. This is useful to maintain the integrity of the database so that all the users see the same values. 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. 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. update. Data for row is stored in a chain of data blocks. 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. You can select from pseudocolumns.:: Pctfree 20. 1) PROPERTY CLASS . Any string expression up to 32K: · a literal . partially.5 object oriented tool ? why? 6) yes . 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. Number. 5) Can you store objects in library? 5) 6) Is forms 4. except that the resulting reference object maintains a link to its source object.SUPPRESS_WORKING 3) What is object group? 3) An object group is a container for a group of objects. Can not applied for HASH. but you have to use FORMS_DDL. %NOTFOUND . 7) Can you issue DDL in forms? 7) yes.DATE_THRESHOLD SYSTEM.inheritance property 2) OVERLOADING : procedures and functions. Referencing an object is similar to copying an object.Page 56 of 259 37) What is clustered index? In an indexed cluster.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. rows are stored together based on their cluster key values. %ISOPEN. 4) What are referenced objects? 4) Referencing allows you to create objects that inherit their functionality and appearance from other objects.EFFECTIVE_DATE SYSTEM.Char .%ROWCOUNT 40) Can you use select in FROM clause of SQL select ? Yes. You define an object group when you want to package related objects so that you can copy or reference them in another module. 38) what are the datatypes supported By oracle (INTERNAL)? Varchar2. MLSLABEL. Forms 4. 39 ) What are attributes of cursor? %FOUND . Yes . By simply changing the definition of a property class. Key-up. 2.Key-Down Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation. in long Raw datatype. e. Key Triggers :: Key Triggers are fired as a result of Key action. All type of triggers . The columns in a query record group derive their default names.etc Navigational Triggers :: These Triggers are fired as a result of Navigation. The item level trigger fires first and then the block and then the Form level trigger.g.Pre-text-item. * 12) If you have property class attached to an item and you have same trigger written for the item. but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. you can change the definition of all objects that inherit properties from that class.when-mouse-doubleclicked. 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. but whose structure and values can be modified programmatically at runtime.first_item’) in the Navigational triggers But can use them in the Key-next-item. However. data types. TYPES OF RECORD GROUPS: 1. Property classes also allow you to make global changes to applications quickly. unlike database tables. . 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. Programmatically. A record group can have an unlimited number of columns of type CHAR. 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. and lengths from the database columns referenced in the SELECT statement. If item level trigger fires. or DATE provided that the total number of columns does not exceed 64K. Mouse Triggers. When-mouse-buttonpresed. We cannot call restricted procedures like go_to (‘my_block. NUMBER. We also have event triggers like when –new-form-instance and when-new-block-instance. Triggers at the lowest level are always given the first preference. Record group column names cannot exceed 30 characters.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. Key next will not fire unless there is a key event. The records in a query record group are the rows retrieved by the query associated with that record group. 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 . Non-query Record Group :: A non-query record group is a group that does not have an associated query. Navigational Triggers. record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable. record groups are separate objects that belong to the form module in which they are defined. LONG.g : Post-Text-item. 8) What is SECURE property? 8) Hides characters that the operator types into the text item.g :: Key-next-field. property level trigger won't fire.e. ***The Difference between Key-next and Post-Text is a very important question. This setting is typically used for password protection. Which will fire first? 12) Item level trigger fires. E. Query Record Group :: A query record group is a record group that has an associated SELECT statement. 9 ) What are the types of triggers and how the sequence of firing in text item 9) Triggers can be classified as Key Triggers. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function. 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). 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. Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. 5) Does user exits supports DLL on MSWINDOWS ? 5) YES . object group can have block as well as program units. Content canvas is the default and the one that is used mostly for giving the base effect. 1) What are user-exits? 1) It invokes 3GL programs. This property is useful for calling a form from another one. pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. 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. replace the existing F45XTB. 18) What are timers? When when-timer-expired does not fire? 18) The When-Timer-Expired trigger can not fire during trigger. 14) What is an ALERT? 14) An ALERT is a modal window that displays a message notifying the operator of some application condition.DLL. The following questions might not be asked in an Average Interview and could be asked when the Interviewer wants to trouble u and go deeppppppppppppp……He cannot go further…. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type. 4) Can you call WIN-SDK thruo' user exits? 4) YES. 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. 19) Can object group have a block? 19) Yes. When Mouse Navigate is set to False. 21) How many types of canvases are there? 20) There are 2 types of canvases called as Content and Stacked Canvas. 17) What is FORMS_MDI_WINDOW? 17) Forms run inside the MDI application window.DLL. Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse. rather. Static Record Group :: A static record group is not associated with a query. . If you rename the DLL to F45XTB. navigation. It’s like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect. and they remain fixed at runtime. you define its structure and row values at design time. it must also be the appropriate parameter type as defined in the PL/SQL interface. After assigning an Oracle Forms variable or item value to a PL/SQL variable..DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL.INI file.Page 58 of 259 3. or transaction processing. or rename the DLL to F45XTB. 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. NEW_FORM? diff? 16) CALL_FORM : It calls the other form. (FORMS_OLE) 15) What does invoke built-in do? 15) This procedure invokes a method. but parent remains active. If the parent form was a called form. 10 ) what are key-mode and locking mode properties? level ? 10) Key Mode : Specifies how oracle forms uniquely identifies rows in the database. Parameters: object Is an OLE2 Automation Object.define cursur state across transaction Open/close. NEW_FORM : Exits the current form and enters the indicated form.Page 59 of 259 8) what is precompiler? 8) It is similar to C precompiler directives. For applications that will run against ORACLE. 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. Key setting unique (default. This is property includes for application that will run against NON-ORACLE datasources . Oracle Forms keeps the higher call active and treats it as a call to the new form. Oracle Forms rolls back uncommitted changes to this savepoint. method Is a method (procedure) of the OLE2 object. 9) Can you connect to non . 12) Can you replace default form processing ? How ? 13) What is transactional trigger property? 13) Identifies a block as transactional control block. 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. If the CLEAR_FORM function causes a rollback when the called form is current.INVOKE (object obj_type. Oracle Forms releases memory (such as database cursors) that the terminated form was using.database block that oracle forms should manage as transactional block. The calling form is terminated as the parent form. it releases lock and control goes back to the calling form.) dateable n-updateable. Oracle Forms rolls back uncommitted changes to this savepoint. If the calling form had been called by a higher form. Oracle Forms runs the new form with the same Runform options as the parent form. 16) What are OPEN_FORM.(NON-ORACLE datasource) default . When you call a form. This property is included primarily for applications that will run against non-ORACLE data sources. when called form completes the operation .FALSE.CALL_FORM. 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. Syntax: PROCEDURE OLE2. If the CLEAR_FORM function causes a rollback when the called form is current. Cursor mode .CREATE_ARGLIST function. Oracle Forms runs the new form with the same options as the parent form. i. . OPEN_FORM : When you call a form. Oracle Forms issues a savepoint for the called form. use the default setting.oracle datasource ? How? 9) Yes . list Is the name of an argument list assigned to the OLE2. Locking mode : Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form. Oracle Forms issues a savepoint for the called form. non . list list_type := 0). method VARCHAR2.e. If you define an item-level Current Record Attribute. color. 8) Can u have VBX and OCX controls in forms? 8) Yes. as the input focus changes. 11) Can u change the mouse pointer ? How? 11) Yes. 9) What r the types of windows (Window style)? 9) Specifies whether the window is a Document window or a Dialog window. color and pattern of the object at runtime. 7) Can u have OLE objects in forms? 7) Yes. Change windows registry (regedit). and pattern properties that you set for form and menu objects that appear in your application's interface.fmb scott/tiger GUI 1) What is a visual attribute? 1) Visual attributes are the font. 18) Can u port applications across the platforms? how? 18) Yes we can port applications across platforms.5 . color. you can display a pre-determined item in a special color when it is part of the current record. Specifies the mouse cursor style. Set form45_font to the desired font. Consider the form developed in a windows system. 10) What is OLE Activation style property? 10) Specifies the event that will activate the OLE containing item. The form would be generated in unix system by using f45gen my_form. You can change the appearance of objects at runtime by changing the named visual attribute programmatically. the resulting module hierarchy is known as the call form stack. the named visual attribute settings take precedence. between VAT and Property Class? imp 2) Named visual attributes define only font. Reports 2. Current Record Attribute is frequently used at the block level to display the current row in a multi-record. 6) Can u set default font in forms? 6) Yes. Use this property to dynamically change the shape of the cursor. and pattern attributes. When an object is inheriting from both a property class and a named visual attribute.Page 60 of 259 17 ) What is call form stack? 17) When successive forms are loaded via the CALL_FORM procedure. 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. and any visual attribute properties in the class are ignored. ***2) Diff. You can programmatically change an object's named visual attribute setting to change the font. 5) Can u change VAT at run time? 5) Yes. property classes can contain these and any other properties. property class assignment cannot be changed programmatically. but you cannot dynamically highlight the current item. Register table with AOL.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.168. If you have used mandatory application specific column with flexfield table defn then u cann’t use dynamic insertion.20. 11) What is Flex 5) Flex is the property of moving the related fields together by setting the flex property on. Register the flexfield with Oracle-AOL.0\reports\US Encumbrance Accounting: Definition: An encumbrance is an obligation to disburse funds in the future.102:\ildev2_appl\ap\11.0\forms\US Reports path in UNIX: \\192. 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.107\ildev2_appl\au\11. Key FF can be implemented for the following three types of forms: . Assign flexfield and segment qualifier. Design flexfield columns into application DB. What is dynamic insertion? When we are trying to insert flexfield through the foreign key reference forms. 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. (Optional) Develop forms that uses flexfield and calls AOL to activate them. 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.5. 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. This is useful for maintaining the fields. Defining a Flexfield in your application: • • • • • • Decide which application entities require key or descriptive flexfield.168. What is encumbrance accounting? What is Accrual account? For more info see P360 of Application developer guide.5. Recording encumbrances helps prevent over-spending the amount available in the account.20. Page 62 of 259 Combination Forms: General forms where you can enter the combination of different segment to constitute a flexfield. such as entereing orders. Basically these type of forms uses flexfeild. Form with foreign key reference: Forms whose base table foreign key reference to the combination table. 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 . e. all tables have a primary key. What are cascading triggers? Executing one trigger may cause another trigger to also be executed. DBMS_DDL.DBMS_OUTPUT. UTL_FILE. DELETE or INSERT statement. every row is determined by its primary key. DBMS_SQL. . based upon queries. which is usually the same tablespace as where the table is being created which can cause performance problems. 10.. For example. there are no duplicate rows. What are some methods for transferring a table from one schema to another? Export-Import. 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. 11. In their simplest form.. 4. UTL_HTTP. What's the difference between an equijoin and a self-join? An equijoin does an equality test between two fields in two different tables. Create table as . they can be thought of as a table created by a command such as: create table t as select * from z. What is 3rd normal form? All items are atomic.Page 69 of 259 Adding Flexfields to forms: Create hidden fields Create display field: Create ur concatenated segment field of size 2000. What packages has Oracle provided for use by developers? The DBMS_ series of packages. UTL_TCP. 1. DBMS_JOB. if your trigger contains a select statement or an update statement referencing the table it is triggering off of you will receive the error. Attach LOV ENABLE_LIST_LAMP to this set LOV validation to ‘NO’. every column is dependent on ONLY the primary key. In a Select statement. DBMS_ALERT. 13. 3. 10-20 percent at database level 9. 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. Where is most tuning done? 80-90 percent at application level.nn. 15. Select . but if the && is used the user will not be bothered with a second prompt for the value. How are reads and writes handled in Oracle that is different than almost every other database? Reads are not blocked by writes. 12. The way the Oracle shared pool (a very important shared memory data structure) operates is predicated on developers using bind variables. UTL_SMTP. DBMS_UTILITY. Text field. DBMS_LOCK. a self join does the same thing on a copy of the same table. 14.. 8.. 6. DBMS_PIPE. What is a mutating table? A mutating table is a table that is in the process of being modified by an UDPATE. DBMS_TRANSACTION. What is a bind variable and why is it important? A bind variable is a placeholder in a query. What are snapshots? Snapshots are copies of remote data. what is the difference between a & and &&? Both pass in values at runtime. 2. What is the purpose of the SUBSTR string function? To return a specified substring from a string. i. Copy 7. What Oracle package allows you to schedule one-off or recurring jobs in your database? DBMS_JOB 5. The result would be: GFG1BCD. Declare Begin Begin End.the var v_min_bal takes on the Type of sales. 23. What's another Best Practice? Make code reviews a regular part of your development process. Oracle Alert is an end-user tool. 19. 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. 37. I follow this advice when at a client site. 28. which character is used to pass in a value at runtime? The '&' character or the '&&' characters. 29.balance%TYPE := 10. not just a field. I act like the Duracell bunny and just keep going and going.'BCDEFGHIJ') from DUAL. What is the purpose of the SQL*Plus command GET? Get the contents of a previously saved operating system file into the buffer. I have found this useful during some data migrations where special characters needed to be translated. how far to scan a table's information when doing a full-table scan. . Why is the high water mark important? The high water mark is used in association with each individual table and tells Oracle 1. PL/SQL is compiled into PCode and the PCode is interpreted at runtime. The format is TRANSLATE (string.3 that dimension could be a record. Production. . 20. Declare Begin Exception End 22. 18.Page 70 of 259 16. when I'm at home. where to start loading data during a SQL*Loader process 2. 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. Design 3. What are PL/SQL Tables (or Arrays)? This is dependent upon your Oracle version. use Telnet. FTO. 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. What is the order of the stages of the system development cycle? 1. 36. if they can be put in memory via a PL/SQL table. for instance. 24.balance and the value of 10. What is the purpose of a referential integrity constraint? Enforce the rule that a child foreign key must have a valid parent primary key. 25. 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.00. 35. End. Begin End. What is an anonymous block? A stored procedure without a name. 34. Their main advantage is that when relatively small tables must be constantly consulted. Describe a nested PL/SQL Block. but after PLSQL 2. Build and document 4. FSG reports in Oracle General Ledger. 30. 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. Describe the PL/SQL Block structure. then). 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. What is the default length of the CHAR column? 1 33. What is %ROWTYPE used for? Assigns a row to a table. Transition 5.00. What does truncating a table do? It deletes the data from the table. 26. 27. What is %TYPE used for? v_min_bal sales. performance can be enhanced. etc. 31. if. PL/SQL Tables have only one dimension. In a SELECT statement. What does the TO_NUMBER function do? It converts VARCHAR2 values to numbers. and so individual alerts enjoy support from Oracle at the same level as. 32. 17. Example: select TRANSLATE (7671234. 234567890. What is the TRANSLATE function? TRANSLATE is a simple function that does an orderly character-by-character substitution in a string. Similar to %TYPE but for a record. 21. Strategy and analysis 2. 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. Name three things that are true about explicit cursors. 51. Which variable type accepts any length of character up to 32767 bytes? VARCHAR2 46. What data type is used to store large binary objects outside the database? The BFILE data type 44. 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. SQL%ISOPEN? They are all Boolean attributes. In a PL/SQL block. without having to explicitly reference the ROWID? 67. Can you have more than one transaction in a PL/SQL block? Yes 54. You have to specify the same number of variables in the INTO clause as the values returned by the SELECT statement. They need to be declared and named before they can be used. What are two statements that are true about the INTO clause? 1. 40. How do you begin defining a record type? TYPE emp_record_type IS RECORD 58. Which variable type accepts only character strings of a specified length? CHAR 45. 2. Do PL/SQL records have a predefined data type? No. 63. Dept_table(15) 60. 66. 55. You can't reference it outside the loop. 64. %ISOPEN 2. What is the term used for the rows produced by a query? Active set 62. With which symbol do you prefix a bind variable when you reference it in PL/SQL? : 50. What operator is used to assign a value to a variable that doesn't have a typical value? := 47. Internet Procurement 11i uses a security realm as an additional layer for application security. Name two things true about cursor FOR loops. and securing attributes to users. 39. They individually process each row returned by a multi row SELECT statement. A security realm is a list of objects (item source or a category) to which a user is granted access. What are two true statements concerning the index in a FOR loop? 1. They process rows in an explicit cursor. Describe at least one way explicit cursor attributes are used. What clause do you use to apply updates and deletes to the row currently being addressed. Give an example of the correct syntax to reference a row in a PL/SQL table. What are realms? Application security in Oracle Applications is maintained and managed by assigning responsibilities. The data types of the variables specified in the INTO clause need to correspond with the values returned by the SELECT statement. 57. You can use the explicit cursor attributes to test the success of each fetch before any further references are made to the cursor. Name three things about using cursors with parameters. They automate the processing as the cursor is automatically opened and the rows fetched for each iteration in the loop. all PL/SQL statements and the END clause 42. 2. 2. 2. 56. What keyword is used when you populate a host variable from the SQL prompt? The VARIABLE keyword 52. What occurs during the production phase of the system development cycle? Perform normal routine maintenance. %FOUND 4. What is common among these cursor attributes. How do you end each SQL statement in a PL/SQL block? With a . 1. How frequently are block declared variables initialized? Every time a block is executed 49. 1. A database trigger is fired automatically when what is executed? a DML statement 41. What character do you type to execute an anonymous block? / 43. SQL%FOUND. What keyword is used to assign a value to a variable that has a typical value? DEFAULT 48. SQL%NOTFOUND. What are four attributes that provide status information about a cursor? 1. . what needs to be followed with a semicolon? All SQL statements. and the cursor is closed when all the rows have been processed. 3. %NOTFOUND 3. The primary key of a PL/SQL table must be of what data type? Scalar 61. 53. They are manipulated through specific statements in the block's executable actions. 59. excluding attributes. %ROWCOUNT 65.Page 71 of 259 38. You can use an expression to reference its existing value within the loop. Elaborating on 74. They are raised explicitly with RAISE statements. What is a pseudo-column? A pseudo-column is a "column" that yields a value when selected. 3. Physical database design . EXEC is really shorthand for begin/end.g. without having to consider the numerous parameters associated with the physical implementation such as data integrity constraints. What are the more common pseudo-columns? sequence. The CDM thus provides a clear and succinct picture of the information system. 'MMDDYY'). 2. Once an Oracle error occurs. and key groups. User 78. The conceptual level schema. 1. you need to declare them in the DECLARE section of a PL/SQL block. 71. Most of the objects in the logical model correspond to a related object in the physical model. A single CDM may therefore be associated with a number of PDMs targeting different DBMSs.CurrVal.The process of producing a description of the implementation of the database on secondary storage. the associated exception is raised automatically. 80.. number_string := TO_CHAR (10000). Exceptions cannot appear in assignment statements or SQL statements. 4 CLERK 4 SALESMAN 3 MANAGER 2 ANALYST 1 PRESIDENT 82. 74. using natural objects of information and natural associations between them. e.The process of constructing a model of information used in an enterprise based on a specific data model. VARCHAR might be a separate data type used for variable length character strings compared with different comparison semantics. You can raise an exception explicitly by issuing the RAISE statement within the block. What's another Best Practice? Set standards and guidelines for your application before anyone starts writing code. What data type column can not be used with INTERSECT? LONG . job from emp group by job having count(*) > 0. How can I check for duplicates? select count(*). physical implementation-independent clear view of the format of the data sets and their descriptions. 2. In a future version of Oracle. Conceptual database design is the process of building a model of the essential part of the enterprise business process and the used information. When defining your own exceptions. When an exception occurs. 3. You can use parameters to pass values to a cursor when it is open. The model of information is independent of a particular implementation and other physical consideration.Page 72 of 259 1. RowNum. 3. The CALL statement is SQL(and only understands SQL types). A Conceptual Data Model lays the foundation for building shared databases and re-engineering the business. 81. What is the difference between call and execute sql*+ commands. It describes the storage structures and access methods used to achieve efficient access to the data. SysDate. independent of all physical considerations. How the exception handling architecture is designed. 79. 75. Selection of development tools 2. If overloading was not supported in PL/SQL (TO_CHAR is a function in the STANDARD package). How SQL is written in PL/SQL code. UID. data access speed and data storage efficiency. PL/SQL processes only one handler before leaving the block.NextVal. 73. 1. the logical model contains entities. which are represented in the physical model as tables. which is independent of the targeted DBMS. Describe two aspects about exceptions. If you use the OTHERS clause. 77. 4. it should be placed last of all the exception-handling clauses. What exception occurs when the conversion of a character string to number fails? INVALID_NUMBER 72. What is another name for ref cursors? cursor variables 83. What is the difference between VARCHAR and VARCHAR2? The VARCHAR data type is currently synonymous with the VARCHAR2 data type. Name three things true about trapping exceptions 1. The CDM allows the designer to concentrate solely on defining the objects in the information system and the relationships between them. 76. columns. 2. but which is not an actual column of the table. date_string := TO_CHAR (SYSDATE. then two different functions would be required to support conversions to character format. 1. Give an example of overloaded Built-in functions. 3. describe conceptual vs logical vs physical designs. You need to reference your declared exception within the corresponding exception-handling routine. It is recommended that you use VARCHAR2 rather than VARCHAR. 69. In the OPEN statement. should present to the user a simple. RowID. Name three things about user-defined exceptions. respectively. sequence. Explain the relationship between a Conceptual Data Model (CDM) and a Physical Data Model (PDM). 2. attributes. Processes for code review and testing. each formal parameter in the cursor declaration must have a corresponding real parameter. 70. Parameters are used in a query when it executes. and indexes. Logical database design . 91. 101. Therefore. expr3) NVL2 . a. What is 3rd normal form? (another explanation than #1) No nonkey column depends on another nonkey column. The datatype of the return value is that of expr2. 96. When declaring an integer variable. SELECT c FROM t WHERE c LIKE '_EU%L'.'EDATPU') --> 'ORACLE ' rtrim('ORACLE UPDATE'. the next two must be EU and the last must be L. b and c in a table of columns a. SELECT count(*). SELECT MGRNO FROM DEPT WHERE MGRNO IS NOT NULL INTERSECT SELECT EMPNO FROM EMP WHERE EDLEVEL < 18. Give an example of the NOT keyword.If expr1 is null then return expr2 else return expr1. What is SQLCODE? A predefined symbol that contains the Oracle error status of the previously executed PL/SQL statement. If a SQL statement executes successfully. Otherwise. Give an example of the LIKE keyword. UNION will remove them. Jayanta Sengupta Lowell. The second parameter is optional and defaults to a single space. What is SQLERRM? A PL/SQL symbol that contains the error message associated with SQLCODE.'set']) RTRIM is the opposite of RPAD and similar to LTRIM. Massachusetts 95.If expr1 is not null then the function will return expr2. 88. SELECT c FROM t WHERE NOT c = 'x'. if the table has duplicates. PLS_INTEGER operations use machine arithmetic. 85. What is 2nd normal form? Every nonkey column must depend on the entire primary key. NVL . which use library arithmetic. the function will return expr3. Describe RTRIM.' EDATPU') --> 'ORACL' 97. 98. 90. b. c HAVING COUNT(*) > 1.. Write a query to find the duplicate record(s) of column a. ROWNUM can limit the number of rows that are returned by a query. expr2). What is 1st normal form? Each cell must be one and only one value. List the numbers of all managers who do not hold advanced degrees. UNION will force a sort and cause performance degradation as compared to UNION ALL. so they are faster than BINARY_INTEGER. which are represented internally as 22-byte Oracle numbers. If a SQL statement executes without errors. SELECT c FROM t WHERE c != 'x'. The expr1 can have any datatype and arguments expr2 and expr3 can be of any datatype other than LONG. for example in a loop or record counter. UNION returns distinct rows selected by both queries while UNION ALL returns all the rows. SQLCODE is equal to 0 and SQLERRM contains the string ORA-0000: normal. Also. SQLCODE is equal to 0. What is 4th normal form? . 87. successful completion 93. When is the INTERSECT keyword used? To return only those rows that are the result of two or more SELECT statements. Explain the difference between NVL and NVL2. What is ROWNUM? A pseudocolumn that indicates the order of the retrieved row. NVL (expr1. 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. Give an example of the MINUS keyword. Give an example of the INTERSECT keyword. RTRIM (string [. SELECT MGRNO FROM DEPT WHERE MGRNO IS NOT NULL MINUS SELECT EMPNO FROM EMP WHERE EDLEVEL >= 18. INTEGER. Describe UNION and UNION ALL. 92. NVL2 (expr1. The ROWNUM for the first returned row is 1. expr2. The function removes characters from the right-hand portion of a string. 100. c FROM t GROUP BY a. If the table has no duplicates. 89. and that value must be atomic: there can be no repeating groups in a table that satisfies first normal form. Any number of chararcters or numbers could be between the U and L. List the numbers of all managers who do not hold advanced degrees. or NUMBER operations. What are the benefits of using the PLS_INTEGER Datatype in PL/SQL? If you have a whole-number counter. 99. 94. PLS_INTEGER is the most efficient numeric datatype because its values require less storage than INTEGER or NUMBER values. rtrim('ORACLE UPDATE ') --> 'ORACLE UPDATE' rtrim('ORACLE UPDATE'. ie the first character can be any character.z. 86. consider using a datatype of PLS_INTEGER instead of INTEGER or NUMBER. When is the MINUS keyword used? To remove those rows which are retrieved by one SELECT from those retrieved by another SELECT statement. b.Page 73 of 259 84. 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. job. 107. 103. grouping(job) from emp group by rollup(deptno. how do you write the code? scott@PO816>SELECT name. as illustrated here: select deptno. 2) department.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. This causes additional spinning (looking for availability at fixed intervals of time) of the process. count(*). without having to use the EXPLAIN PLAN command. job). 115. What is an inline view? A subquery in the from clause of your main query. Tables normalized to this extent consist of little more than the primary key. sal. The database for an international athletic competition consists of one table. A process acquires and holds the latch as long as the data structure is in use. and 3) grand total. and represented country. What does TKPROF do? Formats the raw trace files into a readable report. 118. 111. 106.---. Does ROLLUP work with multiple columns? The ROLLUP feature can in fact be applied to multiple columns.---. What does SQL_TRACE do? Enables logging of all application SQL. it must wait for the latch to be freed up by the process holding it. country. ATHLETES. rownum FROM (SELECT ename.---. min(age) FROM athletes GROUP BY country). What is a single-row subquery? The main query expects the subquery to return only one value. job. What does AUTOTRACE do? Allows us to see the execution plan of the queries we've executed and the resources they used. SMITH CLERK 800 1 JAMES CLERK 950 2 ADAMS CLERK 1100 3 108. the PMON process will clean up the lock on the data structure and release the latch. What SQL*Plus command is useful for determining whether the "N rows selected" message will appear? Feedback 109. age FROM athletes WHERE (country. If a process is not able to obtain a latch. What SQL*Plus keyword is used for defining formats for how SQL*Plus displays column information? Set 110. What are the two main index types that Oracle uses? B*Tree and Bitmap 119. Give an example of an inline view and Top-N Query. sal FROM emp ORDER BY sal) WHERE rownum <= 3. A dba has to monitor the latches for contention and make sure that CPU cycles are not being burnt on process spinning. In case the process dies without releasing the latch.sql script? Autotrace 112. The result is multiple levels of rollup. age ) IN ( SELECT country. 114. 113. This process will spin until the latch is available. grouping(deptno). DEPTNO JOB COUNT(*) GROUPING(DEPTNO) GROUPING(JOB) ---. performance stats and query plan used. What is 5th normal form? Fifth normal form breaks tables into the smallest possible pieces in order to eliminate all redundancy within a table. To determine the youngest athlete representing each country. The basic idea is to prevent concurrent access to shared data structures in the SGA. age.Page 74 of 259 Fourth normal form forbids (prohibits. 104. thereby causing extra load on the CPU. 102. What is an inline view? A subquery in a from clause used for defining an intermediate result set to query from. SELECT ename. When are Bitmap indexes appropriate? . What does pragma mean to Oracle? A pragma is simply a compiler directive. a method to instruct the compiler to perform some compilation option. prevents) independent one-to-many relationships between primary key columns and nonkey columns.---. What is a Latch? A Latch is a low level serialization mechanism that (released as quickly as it is acquired) protects shared data structures. 117. Use of what command requires that you first run the plustrce. containing contestant name. job. 116. 105. we're able to count the employees by 1) department and job. Reduced Resource Consumption Q22: What is the advantage of using Packages over using procedures and funtions? Ans: A Stored packages allow you to encapsulate. It is the most advanced open-source database available anywhere. Does the order of stored procedures in a package matter? It does if one procedure calls another. What is PostgreSQL? PostgreSQL is a sophisticated Object-Relational DBMS. New and Improved Networking Features 3. you go through the same steps used in table partitioning.Page 75 of 259 In situations of low cardinality data. To increase availability (derived from the fact that partitions are independent entities). in a single named. What are the three main reasons for partitioning a database? 1. To enhance DML and query performance (potential to perform parallel DML). datatypes. 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. Commercial Support is also available. 125. 124. faster. What are the two types of cursors? Implicit (Oracle's) and explicit (yours). 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. 121. if that happens. variables. including subselects. transactions. 3. Encapsulation of procedural constructs in a package also makes privilege management easier. 122. This provides for better organization during the development process. 3. New Parallel Data-Manipulation-Language Ability 2. Improved Backup and Recovery Mechanisms 1. as opposed to the separate loads required for standalone . 120. and user-defined types and functions. This load is completed in one operation.e. stored unit in the database. What is a top-n query? select * from ( select ename from emp order by sal ) where rownum <= 3. etc. or group. New index Partitioning Oracle8 provides the same flexibility with table indexes as it does with table partitions. Again. and less resource intensive than performing the same operation on a large object). data with few distinct values. supporting almost all SQL constructs. A Better Optimizer 7. the calling procedure must be the earlier of the two. related stored procedures. 123. Granting the privilege to use a package makes all constructs of the package accessible to the grantee. i. Using packages rather than stand–alone 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. 2. To ease administration burdens (derived from the fact that performing operations on small objects is inherently easier. To take advantage of this index flexibility. you do not have to modify existing applications and business processes. In general it refers to getting the top-n rows from a result set. 1 Write different type of report triggers? Ans. + c.'mm/dd/yy'). By using packages.database columns. no disk I/O is necessary to execute the compiled code already in memory. 32768 bytes 6 Which of the following is unary operator a. As a result.'mm/dd/yy'))/365 from dual. Therefore.to_date('06/11/67'. yes 8 number.021918 10 name of at least four predefined oracle exception errors Ans.Page 76 of 259 procedures. resulting in less impact on overall database performance.a.placeholder column summary columns 4 what is dynmic sql Ans. Ans. 30. when calls to related packaged procedures occur. 7 can you write a while loop that never end Ans. A package body can be replaced and recompiled without affecting the specification. invalid_number no-data-found too-many-rows invalid-cursor .Before Parameter Form After ParameterForm Before Report Between Pages After Report 2 diff type of reports in report25 Ans. unnecessary recompilations can be minimized.date 9 select( to_date('06/11/97'.formula columns.! b.tabular master detail matrix form form letter mailing label 3 diff type of columns in report25 Ans. objects that reference a package’s constructs (always via the specification) never need to be recompiled unless the package specification is also replaced.sql with sql_dbms package 5 what is the maximum length of a variable in pl/sql Ans. * Ans. c b)difference c)intersection d)Cartesian product write the result Ans.NEW_TIME(input_date_and-time.c select nvl(1.write the syntax of that function? Ans.b. the no of tuples in a relation and no of attributes in a relation are called cardinality and arity respective. Ans.b (a has 10 records and b has no records) Ans. 1 select * from a. no row selected can you use save points other than on-save-points trigger Ans. a.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. no 21 22 23 . 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. 20 from the given operation which three are union compitable a)union a.2) from dual Ans.b. virtual storage access method 18 two diff integrity rules are Ans.Page 77 of 259 value-error 11 legal or not legal ? employee_last_name % type. entity integrity and referential integrity 19 what do you understand by cardinality or arity Ans. floor for date Ans. curval. Ans.round(10.rowid.10 ceil(10. 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.e not true for form level? 1)when-clear-block 2)when-new-block-instance 3) 1.11.6).trunc(10. no select nvl(null.delete.floor(10.6) is b)11. ROWIDCHAR 34 diff between rowid and rownum Ans. union operator returns only distinct values while union all operator returns all the rows 32 what is optimization Ans. 2 can you use ceil.by using RR format a)11.6). excellent execution path for sql statements 33 which of the function is used to convert a rowid value to varchar2 Ans.'x') FROM DUAL.rownum.11. no whether oracle support y2k problems Ans.10.Page 78 of 259 24 25 26 27 28 can you delete a column from a table? Ans. Pseudocolumns 31 diff between union and union all Ans. XxxLASTWORD 39 Name the triggers which fire automatically when we create the master detail block Ans.10.11.2 both 4) none answer is 4.6).update their values Ans.2) from dual.10 c)11. yes.select LTRIM('xxxXxxLAST WORD'.10 answer is (c) 29 different pseudocolumns are Ans.nextval.10. on-clear-details . 38 write the result Ans.level 30 Name the column which behave like a table column but is not actullay stored in the table we can not insert . 1)key-next-item 2)when-validate-item 37 which one is block level trigger I. while procedures do not return values to the caller. NO. does the link have to be an equi-join And. functions always return a single value to the caller.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 ? . column. roles 50 what is redo log? Ans.. COPY [FROM username [/password] [@database_specification]| TO username [/password] [@database_specification]] APPEND|CREATE|INSERT|REPLACE} destination_table [(column. one 49 named groups of related privileges Ans. when we create a matrix report Ans. Q53 :When I create a link between queries. 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. unique key may have null value while primary key never be null 48 how many exclusive lock are possible on a resource Ans. . constraints . A snapshot is periodically refreshed to reflect changes made to the master table. column. truncate is DDL and delete is DML 42 what is 2nd normalization form Ans.but not updated. 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. A snapshot can be queried .)] USING query 46 what is the main diff between functions and procedure . 47 what is diff between unique key and primary key Ans. if all the nonkey attribute depend fully on primary key 43 diff between table level constraints and column level Ans.Snapshots are read-only copies of a master table located on a remote node. ORACLE provides an automatic method for table replication and update called snapshots. Ans. only the master table can be updated..Page 79 of 259 on-check-delete-master on-populate-details 40 how many groups are req. four 41 diff between truncate and delete statement Ans. Ans.CONSTRAINT) WHY this occurs ? And. Q52: Violated integrity constraint (OWNER. Q54 :What are the bind parameters ? attribute then relation is in 2nd normal form. Q55 :What are the name of block which have no base table ? Ans. And then. Q62 : Is there any way in Reports 2. Specifically. Q64 :What is name of SQL System Control command Ans. similar to the ON-ERROR and ON-MESSAGE triggers in Forms ? 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.but by using sql_dbms package it support the ddl. You have to create two fields. you test if it is an odd or an even page by using SRW. 'MM-DD-YYYY HH24:MI:SS') NOW Ans.concatenation FROM DUAL . Yes Q60 : Are there any facilities to restart a report that was stopped in the middle of processing for whatever reason? Ans. GROUP BY. you display or not the field.by using desc Q70 :true or false A table cannot contain more than one LONG column. Binds may not be referenced in the FROM clause. 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.GET_PAGE_NUM. Q69 :How we write the record in descending order Ans.) 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. one on the left side.5 to trap all errors in order to display your own error message. Ans.5 ? Ans. and START WITH clauses of queries. A break group divides a query's columns into sets. Control block Q56 :What is a 'Break Group' Ans.1 to Reports 2. (i. ORDER BY. one on the right side. RETURN WHICH DATATYPE? a)date b)number c)both Ans. no Q63 : Is pl/sql support data defination languge Ans. No Q59 : Is it possible to upgrade directly from SQL*ReportWriter 1. CONNECT BY. Currently this is an enhancement request and is being considered for a future release of the product. Bind references are used to replace a single value in SQL or PL/SQL. In the format trigger of each field. Alter system Q65:lock table is which type of command a)DDL b)DML c)sql transection control command Ans.0 or 2.first normal form Q72 :Is there any diff between varchar2 and varchar Ans. WHERE. No. b Q68 :SELECT TO_CHAR(SYSDATE.no Q73 :Could we multiply or divide the date values Ans. bind references may be used to replace expressions in SELECT.no Q74 :name any charcter operator Ans.Page 80 of 259 Ans.true Q71:A table must be in which normalization form Ans. No Q61 :Is there anyway to programmatically disable the PRINT button in the Previewer ? Ans. b)DML Q67 :MONTHS_BETWEEN FUN. HAVING.e. If expr is null. EXAMPLE: SELECT USERENV('LANGUAGE') "Language" -------------------------AMERICAN_AMERICA. UPDATE_ALLOWED. TITLE.PROPERTY_OFF).in such a case we must decide which of the candidate key will be used as primary key. Returns a character string containing the phonetic representation of char. Q80 :IS THERE ANY DIFF BETWEEN OF LIST OF VALUES AND LIST ELEMENTS Ans. INSERT_ALLOWED.'YYYY') "4-digit year" "4-digit year" FROM DUAL answer is 2017 Q77 :WHY VSIZE USE? Ans.Issue the following : Set_Block_Property('blockname'.Page 81 of 259 Q75: WHAT IS GLB Ans. but no group req for creating push button Q89 :What do you understand by metadata? Ans.x Q87 :WHAT IS THE DIFF BETWEEN PRIMARY KEY AND CANDIDATE KEY Ans. 2 Q92 :Write the syntax for grant statement Ans.]object TO {user | role | PUBLIC} [. Description of database is called meta data Q90 :What is third normal form Ans.US7ASCII Q79 :WHAT THE USE OF SOUNDEX Ans. :No Q81 :Can YOU replace an LOV's underlying record group with a different record group : Ans. 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..these attributes or combination of attributes are called candidate key. {user | role | PUBLIC}] .) ] [. column] . {object_priv | ALL [PRIVILEGES]} [ (column [. Q76: SELECT TO_CHAR(TO_DATE('27-OCT-17'. a radio button created with radio group.. Set_Block_Property('blockname'...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.x partially or fully Ans.GROUP_NAME.. there may be two or more attributes that uniquely identify an instance of an entity set. 84 DATATYPE OF GLOBALS Ans.PROPERTY_OFF).the remaning keys would be considered as alternate key Q88 :WHAT IS THE DIFF BETWEEN RADIO BUTTON AND PUSH BUTTON Ans.Returns the greatest lower bound of label.yes Q86 :HOW MANY CODD'S RULE ARE SATISFIED BY ORACLE7. this function returns null. but sound alike in English.GRANT {object_priv | ALL [PRIVILEGES]} [ (column [. 'Your Title').char Q85 :Is it possible to defer locking of a record until commit time ? Ans. Q82 :How can I change the title of my RUNFORM window ? Ans. Q83 :How can I dynamically make an entire block query-only at runtime ? Ans. Q93 :What is the diff between row trigger and statement trigger ..ON [schema.. Q78 :WHY WE USE USERNV Ans.Returns the number of bytes in the internal representation of expr. Returns information of VARCHAR2 datatype about the current session. column] .all the codd's rule are satsfied by oracle 7. 'DD-MON-RR') .. YES BY USING Set_LOV_Property('my_lov'.'new_group').) ] ] . Use the following code in you When-New-Form-Instance trigger :Set_Window_Property(FORMS_MDI_WINDOW. You cannot use this function in the condition of a CHECK constraint. This function allows you to compare words that are spelled differently. $$date$$ Q99 :What is the conditon for creating master detail form Ans.. CREATE [OR REPLACE] TRIGGER [schema.. ON [schema. 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.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. Oracle fires a statement trigger only once when the triggering statement is issued if the optional trigger constraint is met.]}] .]} [OR {DELETE | INSERT | UPDATE [OF column [.Record_Status = 'NEW') THEN RAISE Form_Trigger_Failure. Destination name.delete statement being issued against a table. dynamically prevent the user from entering a new record .. column] ...]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. 'Immediate' or 'Delayed'. END IF. Q94 : Diff between database trigger and form trigger Ans. column] .Page 82 of 259 Ans. Static value..]trigger{BEFORE | AFTER} {DELETE | INSERT | UPDATE [OF column [. Ans. Which have no base table Q96 :Write diff type of library file format Ans. non-isolated Q98 :What is the default value set for sys date in a form Ans. Q104 : Write the syntax for creating a trigger Ans..pll.sql*form triggers are fired only when a specific trigger point is executed witin a specific application Q95 :What are control items item 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. At least one Q106 : Diff type of locking mode are? Ans. the trigger is a statement trigger.if you omit this clause. ..plx.pld Q97 :When creating master detail form which of the master delete property set by default Ans.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. update. Database triggers are defined on a table and stored in the associated database and executed as a result of an insert. Primary key -foreginkey relationship between two bas etable Q100 :What is ballon help Ans. what is the result of this--Ans. Q107 : Have a Pre-Record trigger that does: IF ((dynamic-condition-is-true) AND :System. Q118 : Which of the following is not a lockmode option for the lock table command a. Issue the builtin Get_Application_Property (USER_INTERFACE). a COUNT(*) type query. No Ans.BMP. Even if you specify a low value of 3.maty will no longer be able to use the connect privilege d.listener c.'dallas') a.Get_Block_Property(.. UPDATE_ALLOWED.share update ..given rule based optimization : select distinct city from emp where city not in('new york'. Yes b. b Q116 : What will the outcome of following command? REVOKE CONNECT FROM MARY a.'boston'.Parameters are NUMBER.Page 83 of 259 Q108 :How can I dynamically make an entire block query-only at runtime ? Ans. ARRAY SIZE is the number of records that get fetched each time forms goes to the database. Q110 :What is the difference between the block properties of ARRAY SIZE and RECORDS BUFFERED ? Ans. mary's current session will be disconnected b.PROPERTY_OFF).'PICT' Q115 : Will the following query use an index . The RECORDS BUFFERED specifies the minimum number of records that should be placed in memory when records are fetched from the database.and just before the actual. Q113 : To store images in the database. PRE-SELECT fires after the PRE-QUERY trigger has fired.tnsping answer is d.name some of the files? Ans. 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).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.listener b.PROPERTY_OFF). category: security And : d. CHAR. Set_Block_Property(. the minimum per form is slightly over 300. tnsname b.mary's account will be dropped c.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.orasrv d.TIFF Q114 :How can I determine which user interface I am using at runtime Ans. Q111 : Write diff datatypes for a parameter in a form? 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. QUERY_OPTIONS) lets your transactional trigger know whether it's supposed to be doing a normal query. Pre-Select Ans.tnsping d. QUERY_HITS) simply returns the number of records that have been retrieved by the query. or DATE Q112 : What is the diff between Pre-Query vs. Q117 : Which program is used to verify sql*net v2 connectivity from a window connectivity a. JFIF."Getting this property via Get_Block_Property(.. physical construction of the SELECT statement begins.PCX.orasrv c. Q109:What exactly does 'Query Hits' and 'Query Options' mean in the context of a block ? Ans. INSERT_ALLOWED. 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). Issue the following : Set_Block_Property('blockname'.mary will no longer be able to enable the connect role....share update a. or a lock record query. Set_Block_Property('blockname'. you need to read them from the file system in one of the supported standard file formats . D.create tablespace roll_segs.system contril number c..-objects Q123 : Place the database creation steps listed below in their proper chronological order: 1.the table have more index on it select count(*) from employee.A..-segments d.A.share row level exclusive c row share d. Q125 :A large table has all of its records are deleted. Q119 :When you create a new table space .B. Ans :d.a user process that is not connected.default b. no Ans b.all successfull and unsuccesfull connection are recorded Q122 :Which data dictionary view records the creation date of table a.do the control file increase in size a. and the deletion is commited .D.all succesfull connection to the databases will be recorded audit session b.A.B.a transection that is in the process of rolling back d).But it takes long time to give the result d.B.B.a deadlock between two process.-tables c.system change number d.the command will return an error Ans.alter rollback segment R_1 online Q124 :What is the name of the default user profile? a. b). b. Q127 :Which of the following can you not change after a database has beencreated a.D. 3. c..create rollback segments r1 tablespace system 5.Page 84 of 259 b.A.create rollback segments R_1 table space roll_segs 4.update Ans: d. Q121 : What is the outcoming of following command : a.all unsucessfull connection to the data base are recorded c.)the default no of listener .a transacton that has just started.-tab-columns Ans: a.D. c.A.The table has not analyzed since its records had been deleted. Q120 : An SCN is a.SOURCE CODE NO b. c).all successfull and unsuccesfull connection are recorded d.profile Ans: a.to verify that there is no record a.yes..user c.D. Ans.connect d.session commit node Ans : C.-objects b.cretae database 2.d.The tables highwatermark had not been reset.) shared pool size b. Q126 :WHICH OF THE FOLLOWING WOULD CAUSE A SHUTDOWN IMMEDIATE TO FAIL? a).Table was fragmentd into multiple extents.you perform the following query b.B. after each table b.ora d.will automatically create an index? a. tcp. 99 Q136 :select round(99.when applied to a table. 99.oracle d.EXPLAIN THIS Ans. Q128 :Can a database trigger contain a commit.after each 100sec c.after each user is imported Ans: a. 100 Q137 :WHAT IS THE DIFF BETWEEN APPEND AND INSERT IN CASE OF SQLLODER? Ans : Append is done if the table have record.ora c.tnsnames. Ans. Ans.-1) FROM DUAL. of control file. chown user2 temp Q141 :How to display hidden file in UNIX .lsnrctl Ans: a.tnsnames c. a.what is the frquency of commits during an import? a.)the no.check c. Q131 :By default.but in case of insert the table must be empty. Q138 :HOW MANY DATATYPES CAN BE LOADED USING SQL*LOADER Ans. d.308.)the database block size Ans.yes b. 1.unique d. Ans.us.3 Q135 :SELECT ROUND(99.308. d.14 Q139 :$CHMOD 753 MEMO1.com)(port=1521)))(connect_data=(sid=oracle7))) a.oracle. Q132 : What is the default password for the sql*net v2 listner? a.oracle.db.tnsnames.com=(description=(address_list=(address=(community=tcp.listner b.com)(protocol=tcp)(ho st=tcp_server.after the import complete d.listner. Q129 :Which file does the following listing come from.no answer is b.ora Ans : b.not null Ans: c.us.1) FROM DUAL.308) FROM DUAL.ora Q130 : Which of the following constraints . Q133 :DUAL is a tiny table provide with how many rows and column in it Ans.config.oracle.foreign key b. owner has rwe rights group has re others has we Q140 :To change the ownership which of the commond is used in unix Ans.Page 85 of 259 c.us.init.1 Q134 :SELECT ROUND(99.ora b. . an entity set is shown in rectangle. which have no base table Q152 :CEIL(4*3*(12-1)+12*9+7*(55-12*4)/11) Ans.PLD) to a binary format (.Page 86 of 259 Ans. ls -a Q142 : Define entity Ans. Distributed data base management system Q154 :WHAT IS LOGICAL DATAINDEPEDENCY .MMT.PLL). . Q147 :WHAT IS THE Btitle Ans.MMB. 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. Converts the text file format of a module (.FMT. TO_DATE(char [. 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. .FMB. Q148 :Oracle Forms supplies how many triggers? Ans. Q151 :What is control block Ans. fmt [. when -timer-expierd when-new-form-instancre when-window-activate when-window-close when-form-navigate Q150 :What is parse option? Ans. entities are distinguishable objects of concern and are modeled using their attributes Q143 : In an E-Rdig what are the meaning of Ans. 245 Q153 :What is DDBMS ? Ans. About 80 triggers Q149 :Name any five form level triggers only Ans. Set the bottam title for each page of a report. 'nlsparams'] ]) Q146 :WHAT IS FUNCTIONAL DEPENDANCY ?given two sets of attributes X AND Y Ans. . Q164 :Why we use wc -c in UNIX Ans.sqlload b. IF WE ADD AN ADDITIONAL ATTRIBUTE TO A PRIMARY KEY THEN THE RESULTING COMBINATION IS AGAIN A PRIMARY KEY.15. Q165 :ORACLE 6 FOLLOWS HOW MANY CODD'S RULE Ans.the no of extent in the employee table d. e. Q158 :what is the diff between execute-query and execute-query(no-validate) Q159 :What is deadlock? Ans.g age: depend upon date of birth and todays date. Q160 :UPDATE emp 1 SET sal = sal*1. Process Monitor Q169 :WHAT IS VIRTUAL MEMORY Ans. To search for a pattern in a file.89 SPECIFIED AS NUMBER(6) STORED AS ? Ans. WHAT IS THE RESULT OF TIME POINT2 Ans : deadlock Q161 :WHAT IS BOM IN AN ERP Ans.A deadlock can occur when two or more users are waiting for data locked by each other.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. b. Q155 :WHAT IS SUPER KEY? Ans.1 WHERE empno = 1000.the number of rows in the employee table FROM EMPLOYEE.1 WHERE empno = 2000. The conceptual schema can be changed withot affecting the existing external schema. It typically happens when each of two or more users are waiting to access a resource that another user has already locked. UNLIKE A REAL FIELD A VIRTUAL FIELD CANNOT MODIFIED BY USER.8)||SUBSTR(ROWID. Q156 :WHAT IS UWA? Ans. Counts only the characters in the file. Seven Q166 :INPUT DATA 7456123. form----->block------->item Q163 :WHAT IS THE use of grep command in UNIX Ans.the no of blocks used by employee table WHAT WILL BE THE RESULT OF THE QUERY? c.the no of block allocated to the employee table Ans: b. A deadlock is a situation that can occur in multi-user systems that causes some number of transactions to be unable to continue work. exceeds precision) Q167 :WHAT IS LGWR? Ans.sqldba . Bill of material Q162 :WHAT IS THE ORDER OF FIRING THE TRIGGERS IN A FORM Ans.1. On many operating systems.(not accepted.The operating system accesses virtual memory by making secondary storage look like main memory to application Q170 :SELECT COUNT(DISTINCT(SUBSTR(ROWID.lsnrctl c.Virtual memory simulates memory using a combination of real(main) memory and secondary storage (usually disk space).Page 87 of 259 Ans. Log Writer PROCESS Q168 :WHAT IS THE PMON ? Ans. Q171 :Reload is the option for which of the following utilities a.SUCH A KEY IS CALLED SUPER KEY. ORACLE takes advantage of virtual memory.import d. IT IS USER WORK AREA Q157 :WHAT ARE VIRTUAL FIELD Ans. UPDATE emp 2 SET sal = sal*1.4)) a. dbms is the software system that allow access to data contained in a database.. Q179 :WHAT IS DATABASE AND DATABASE MANAGEMENT SYSTEM Ans.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.m:n Q182 :What are weak entity? Ans. Q175 : An index corrosponds to a table from which many record are being deleted .to reclaim or reuse a.which action would be best? b. 1:1 .alter the index to increse next d.imon d. Ans.DDL C." Views can be used in most places where a table can be used.alter the index to increase pctused c. Views are created on these tables.create session b.analyze any Ans :b Q173 :Which of the background process periodically coalesces free space in the table a. Q177 : What is sys. and then synonyms are created for the views. prepare phase Commit phase Q184 :The two-phase commit mechanism is only used if a transaction contains a.pctfree b. Q172 :Which of the following privileges can not be granted to a role a.DML B.fmon Ans :a . Q180 :DEFINE TWO DISTICT LEVEL OF DATA INDEPENDENCY Ans.unlimited tablespace c. The dynamic performance tables are owned by SYS and their name is all begin with V_$. The synonym names begin with V$.initrans d. Q174 :Which of the foloowing is not apart of create index statment? a. Therefore.freelist Ans: b. and can thus be thought of as a "stored query" or a "virtual table.smon b.drop and recreate the index Ans:d.insert any table d. logical data independency and physical data independency Q181 :NAMED DIFF TYPES OF RELATIONSHIPS IN THE SETS/ Ans.pctused c.Page 88 of 259 Ans: b.pmon c. A view is defined using a query.alter the index to decrese pctused to 20 space used by the deleted index rows. .g employee in atble is an entity but dependents of an emp are weak entity Q183 :Name two phase in two phase commit? Ans. Q176 :What is virtual table? Ans. The integrated collection of related files is called database.remote procedure call that references a remote object using its global object name which of the above is false? Ans: b. ENTITES WHICH ARE THE PART OF AN ENTITES e. All base tables and user accessible views of the data dictionary are owned by the ORACLE user SYS.1:m . 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 all successfull and unsuccesfull connection are recorded d.all succesfull connection to the databases will be recorded audit session b.cretae database 2.But it takes long time to give the result d.SOURCE CODE NO b.session commit node Ans : C.-objects Q123 : Place the database creation steps listed below in their proper chronological order: 1. Q120 : An SCN is a.share row level exclusive c row share d. b).The table has not analyzed since its records had been deleted. Q125 :A large table has all of its records are deleted.yes.profile Ans: a.D.create tablespace roll_segs. c.B.a user process that is not connected.connect d. 3.you perform the following query b.B. b.a deadlock between two process.a transection that is in the process of rolling back d).A.B.D.-tab-columns Ans: a. Ans :d.the table have more index on it select count(*) from employee.-objects b.A. c. .A. Q126 :WHICH OF THE FOLLOWING WOULD CASUSE A SHUTDOWN IMMEDIATE TO FAIL? a). and the deletion is commited . Q118 : Which of the following is not a lockmode option for the lock table command a.D.create rollback segments r1 tablespace system 5.. no Ans b.do the control file increase in size a. c).A.create rollback segments R_1 table space roll_segs 4. Q121 : What is the outcoming of following command : a.default b.share update a.user c.tnsping answer is d.-segments d.system change number d.system contril number c..all unsucessfull connection to the data base are recorded c.d.to verify that there is no record a.alter rollback segment R_1 online Q124 :What is the name of the default user profile? a..D.all successfull and unsuccesfull connection are recorded Q122 :Which data dictionary view records the creation date of table a.a transacton that has just started.A..B.-tables c.The tables highwatermark had not been reset. Ans.share update b. Q119 :When you create a new table space .update Ans: d.B.the command will return an error Ans.D.Page 94 of 259 d.Table was fragmentd into multiple extents. check c.but in case of insert the table must be empty. d. of control file. 100 Q137 :WHAT IS THE DIFF BETWEEN APPEND AND INSERT IN CASE OF SQLLODER? Ans : Append is done if the table have record.EXPLAIN THIS Ans.tnsnames. Q128 :Can a database trigger contain a commit.unique d.us. 1.oracle. owner has rwe rights group has re others has we .ora c.tnsnames.com)(protocol=tcp)(ho st=tcp_server. Ans.Page 95 of 259 Q127 :Which of the following can you not change after a database has beencreated a.yes b.)the default no of listener c.308.after each user is imported Ans: a. Q129 :Which file does the following listing come from.oracle.-1) FROM DUAL.no answer is b.oracle d.will automatically create an index? a.308. a.3 Q135 :SELECT ROUND(99.ora d.listner.us.)the no. Q133 :DUAL is a tiny table provide with how many rows and column in it Ans. Q132 : What is the default password for the sql*net v2 listner? a.308) FROM DUAL. 99 Q136 :select round(99.lsnrctl Ans: a.oracle.tnsnames c. Ans. 99.ora Q130 : Which of the following constraints . Q131 :By default.1) FROM DUAL.after the import complete d.com=(description=(address_list=(address=(community=tcp.after each table b. tcp.ora b.when applied to a table.listner b.us. d.db.)the database block size Ans.ora Ans : b.not null Ans: c.com)(port=1521)))(connect_data=(sid=oracle7))) a. Q138 :HOW MANY DATATYPES CAN BE LOADED USING SQL*LOADER Ans.14 Q139 :$CHMOD 753 MEMO1.1 Q134 :SELECT ROUND(99.init. Ans.what is the frquency of commits during an import? a.config.after each 100sec c.foreign key b.) shared pool size b. chown user2 temp Q141 :How to display hidden file in UNIX Ans. '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. ls -a Q142 : Define entity Ans. Converts the text file format of a module (. . 245 .FMB. fmt [. About 80 triggers Q149 :Name any five form level triggers only Ans. which have no base table Q152 :CEIL(4*3*(12-1)+12*9+7*(55-12*4)/11) Ans. Q147 :WHAT IS THE Btitle Ans. when -timer-expierd when-new-form-instancre when-window-activate when-window-close when-form-navigate Q150 :What is parse option? Ans. an entity set is shown in rectangle. . entities are distinguishable objects of concern and are modeled using their attributes Q143 : In an E-Rdig what are the meaning of Ans.Page 96 of 259 Q140 :To change the ownership which of the commond is used in unix Ans. 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. Q148 :Oracle Forms supplies how many triggers? Ans.PLD) to a binary format (.FMT.PLL).MMB. Set the bottam title for each page of a report.MMT. . . TO_DATE(char [. Q151 :What is control block Ans. e.15. Bill of material Q162 :WHAT IS THE ORDER OF FIRING THE TRIGGERS IN A FORM Ans. Q158 :what is the diff between execute-query and execute-query(no-validate) Q159 :What is deadlock? Ans. On many operating systems. The conceptual schema can be changed withot affecting the existing external schema. The number of rows in the employee table FROM EMPLOYEE.The operating system accesses virtual memory by making secondary storage look like main memory to application Q170: SELECT COUNT(DISTINCT(SUBSTR(ROWID.(not accepted. IF WE ADD AN ADDITIONAL ATTRIBUTE TO A PRIMARY KEY THEN THE RESULTING COMBINATION IS AGAIN A PRIMARY KEY.1 WHERE empno = 2000. To search for a pattern in a file. Distributed database management system Q154: WHAT IS LOGICAL DATAINDEPEDENCY Ans. form----->block------->item Q163: WHAT IS THE use of grep command in UNIX Ans. Counts only the characters in the file. A deadlock can occur when two or more users are waiting for data locked by each other. b. Q160 :UPDATE emp 1 SET sal = sal*1. He no of blocks used by employee table WHAT WILL BE THE RESULT OF THE QUERY? c. Q165: ORACLE 6 FOLLOWS HOW MANY CODD'S RULE Ans.1 WHERE empno = 1000. ORACLE takes advantage of virtual memory. It typically happens when each of two or more users are waiting to access a resource that another user has already locked.8)|| SUBSTR (ROWID.89 SPECIFIED AS NUMBER(6) STORED AS ? Ans. The no of extent in the employee table d. Seven Q166: INPUT DATA 7456123. Process Monitor Q169: WHAT IS VIRTUAL MEMORY Ans.Page 97 of 259 Q153: What is DDBMS ? Ans. UNLIKE A REAL FIELD A VIRTUAL FIELD CANNOT MODIFIED BY USER. IT IS USER WORK AREA Q157 :WHAT ARE VIRTUAL FIELD Ans.1. The no of block allocated to the employee table Ans: b. Q171 :Reload is the option for which of the following utilities . Q164 :Why we use wc -c in UNIX Ans.Virtual memory simulates memory using a combination of real(main) memory and secondary storage (usually disk space). UPDATE emp 2 SET sal = sal*1.4)) a.SUCH A KEY IS CALLED SUPER KEY. exceeds precision) Q167: WHAT IS LGWR? 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. Q155: WHAT IS SUPER KEY? Ans. Q156: WHAT IS UWA? Ans.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. Log Writer PROCESS Q168: WHAT IS THE PMON ? Ans.g age: depend upon date of birth and todays date. WHAT IS THE RESULT OF TIME POINT2 Ans : deadlock Q161 :WHAT IS BOM IN AN ERP Ans. The synonym names begin with V$.sqldba Ans: b.DDL . The dynamic performance tables are owned by SYS and their name is all begin with V_$. dbms is the software system that allow access to data contained in a database. Q176 :What is virtual table? Ans. logical data independency and physical data independency Q181 :NAMED DIFF TYPES OF RELATIONSHIPS IN THE SETS/ Ans.1:m .fmon Ans :a . Q175 : An index corresponds to a table from which many record are being deleted . Ans. 1:1 . Q174 :Which of the foloowing is not apart of create index statment? a.Page 98 of 259 a. All base tables and user accessible views of the data dictionary are owned by the ORACLE user SYS.smon b. Drop and recreate the index Ans:d." Views can be used in most places where a table can be used. and can thus be thought of as a "stored query" or a "virtual table. The integrated collection of related files is called database.insert any table d. Alter the index to increase pctused c.which action would be best? b. Q172 :Which of the following privileges can not be granted to a role a.sqlload b.pctfree b. ENTITES WHICH ARE THE PART OF AN ENTITES e.analyze any Ans :b Q173 :Which of the background process periodically coalesces free space in the table a. A view is defined using a query.lsnrctl c. Therefore. Alter the index to increase next d.pctused c.pmon c.m:n Q182 :What are weak entity? Ans. Q180 :DEFINE TWO DISTICT LEVEL OF DATA INDEPENDENCY Ans.import d.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. Alter the index to decrease pctused to 20 space used by the deleted index rows. Views are created on these tables.imon d. prepare phase Commit phase Q184 :The two-phase commit mechanism is only used if a transaction contains a.initrans d.freelist Ans: b. Q177 : What is sys.unlimited tablespace c.g employee in atble is an entity but dependents of an emp are weak entity Q183 :Name two phase in two phase commit? Ans. and then synonyms are created for the views.to reclaim or reuse a.DML B. Q179 :WHAT IS DATABASE AND DATABASE MANAGEMENT SYSTEM Ans.create session b.. Q200: Source code of UNIX is written in which language? Ans. search. result [. The RR date format element is similar to the YY date format element. [. default] ) 191 SELECT TO_CHAR(17145. :button.based on the parsed code.based on the or p code . 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 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. FALSE Q199 :WRITE SYNTAX FOR GENERATING modules IN THE UNIX MODE ? Ans. Q186 :What is RR FORMAT Ans. Stop Q196 :What is the default value of menu style in a form Ans.'NLS_NUMERIC_CHARACTERS = ". Q187 :IS THERE ANY DIFF BETWEEN DATABASE TABLE AND PL/SQL TABLE?' Ans. Q188 :WHAT ARE Lexical Units Ans.caution Q195 :What is the default value for alert style? Ans.. but the primary key must belong to type BINARY_INTEGER. The PL/SQL engine executes this when the procedure or package is invoked.The column can belong to any scalar type. Q189: NAME DIFF SQL COMMANDS? Ans. DECODE( expr. stop.check box Q198 :ON-FETCH IS ITEM LEVEL TRIGGER ALSO TRUE OR FALSE Ans. pull_down Q197 :Access key property applied to which type of item type? Ans.remote procedure call that references a remote object using its global object name which of the above is false? Ans: b. pseudo code (P code)The PL/SQL compiler generates the pseudocode. Q185 :What is pseudo code? Ans. A radio group is an interface control that displays a fixed number of options that are mutually exclusive. Q194 :Write diff alert style? Ans.145 Q192 :What is radio group? Ans.but it provides additional flexibility for storing date values in other centuries. Generate Module = <formname> Userid = <userid/password> [Parameters]. result] . A line of PL/SQL text contains groups of characters known as lexical units. It will also allow you to store twentieth century dates in the twenty-first century in the same way if necessary. neither of which can be named. Q193 :Write diff between post_form_commit and post_ database_commit Ans :POST-FORMSCOMMIT is the renamed version of POST-COMMIT from V3. * Data Definition Language commands * Data Manipulation Language commands * Transaction Control commands * Session Control commands * System Control commands Q190 :Write an experssion for decode? Ans." NLS_CURRENCY = "AUD" ') "Char" FROM DUAL write result of it ? Ans.note.'L099G999'. search.AUD017.The POST-DATABASE-COMMIT triggers fires just after the 'COMMIT' statement is issued by forms to close the current transaction.Each option is represented by an individual radio button. PL/SQL tables can have one column and a primary key. or P code.. C .Page 99 of 259 C..radio button. fclose(fp).bad discard=gvdis.the direct path loader (direct = true) by possess of logic involved with that. empname. 4) What is SET-OF-BOOKS? Collection of Chat of Accounts and Currency and Calendars is called SOB 5) What is the interface? .putf(fp. [and] produce and access information in a real-time environment. Begin Fp := utl_file.txt’.” optionally enclosed by ‘”’ (empno. Utl_file. 2) Tell me some thing about SQL-LOADER.deptno) >sqlldr scott/tiger@vis control=loader. 3) how do u dump data from pl/sql block to flat files? Using utl_file package.tab1.40 1002.sal. End.ctl log= gvlog. 1) conventional --The conventional path loader essentially loads the data by using standard ‘insert’ statement. share common data and practices across the enterprise.dsc . Sql * loader is a bulk loader utility used for moving data from external files into the oracle database.fopen(c:\oradata’.2345.Page 100 of 259 Oracle app’s 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. --utl_file_dir = ‘c:\oradata’ Declare Fp utl_file.ORA) Using the UTL_FILE_DIR parameters. and multi-tables loads. 55). EX:My data. Utl_file.csv’ Into table emp Fields terminated by “.csv file 1001.”gvreddy”. selective loading.’%s %s \n ‘text field’.ORA. Ex: UTL_FILE_DIR = <Directory name> EX:--remember to update INITSID.1000.file_type. and loads directly in to the oracle data files.50 Load data Infile ‘c:\data\mydata.log bad=gvbad.’w’). we can dump data from pl/sql block to flat file. 2) direct -. PRE-REQUIREMENTS for UTL_FILE is specify the accessible directories for the UTL_FILE function in the initialization file (INIT. “scott tiger”. Sql * loader supports various load formats. If a party becomes a customer. hz_cust_acct_sites_all (cust_acct_site_id) HZ_CUST_ACCT_SITES_ALL stores information about customer sites. Outbound Interface: For outbound interfaces. groups and people) HZ_PARTIES stores information about parties such as organizations. hz_cust_accounts (cust_account_id) HZ_CUST_ACCOUNTS stores information about customer relationships. hz_cust_site_uses_all (site_use_id) HZ_CUST_SITE_USES_ALL stores information about site uses or business purposes. which is used as medium for transfer of data between two systems. including the identifying address information for the party. people. 9) What r the table’s interface tables in the customer interface tables? 1) Ra_customers_interface_all . interface tables as well as supporting validation. information about the customer account is stored in this table. 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 source. processing. hz_Person_Profiles (person_profile_id) HZ_PERSON_PROFILES stores detail information about people. socioeconomic and corporate linkage information for business sites. You can establish multiplecustomer relationships with a single party. financial statistics. The primary key for this table is ORGANIZATION_PROFILE_ID. and groups. where these products are the destination. hz_locations (location_id) HZ_LOCATIONS stores information about physical locations. and maintenance programs 8) Tell me what r the Base tables in the AR? hz_parties (party_id) (store info about org. hz_Organization_Profiles (organization_profile_id) HZ_ORGANIZATION_PROFILES stores credit rating. hz_party_sites (party_site_id) HZ_PARTY_SITES stores information about the relationship between Parties and Locations. database views are provided and the destination application should provide the validation. so each party can have multiple customer account records in this table. such as bill to or ship to. and maintenance programs are provided. The address is maintained in HZ_LOCATIONS. and each site use is stored as a record in this table. A single customer site can have multiple site uses.One customer account can have multiple sites.Page 101 of 259 Interface Table is a table. The same party can have multiple party sites. processing.Physical addresses are stored in HZ_LOCATIONS. 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. you must enter a value in ADDRESS1.ADDRESS1. 3) Ra_contact_phones_int_all This table stores telephone numbers for customers. HZ_LOCATIONS. 5) Ra_cust_paymethod_int_all To import payment methods for customers and bill–to business purposes.Page 102 of 259 This table stores customer. 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. You can enter up to four lines of an address. address. You do not have to enter values in this table if you do not want to import customers. addresses. Validation: If you enter a value in ORIG_SYSTEM_ADDRESS_REF. HZ_LOCATIONS. ADDRESS1 through 4 Enter the address for your customer in these four columns. you must enter a bank account for this customer. For multiple rows with the same address reference. b) Ra_customer_profile_int_all 1) customer_profile_class_name c) Ra_contact_phones_int_all . or business purposes. addresses and contacts as well as contacts for customers and addresses.ADDRESS2. 4) Ra_customer_banks_int_all This table stores bank information for a customer or for a specific Bill–To address.ADDRESS4 2) Ra_customer_profile_int_all A customer level profile must exist in A_CUSTOMER_PROFILES_INTERFACE for new customers and each bill–to business purpose.ADDRESS3. HZ_LOCATIONS. insert values in address 1–4. Destination: HZ_LOCATIONS. and business purpose information. 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.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 . 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. arplscin. 7. What should be the batch size (number of customer records) general guidelines for optimal performance About 10. and that has not already been marked in error.sql and arplbcin. SIC_CODE . Why does customer interface error out if there is mismatch in address information? Because the code validates against these mismatches. (Refer Bug: 879121 for the intended functinality) 12. it is suggested to keep the batch size small. 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.000 records per bacth is ideal. You cannot run Customer Interface to update only changed data. 6.6 ) 9. 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.Page 104 of 259 And so on. (Refer Note: 1070800. For each row being inserted or updated in RA_CUSTOMERS_INTERFACE. Refer Enhancement Bug: 147495 11. Does Customer Interface import salesperson data? No. How do you send records at customer level profile and address/site level profile? For every customer record in RA_CUSTOMERS_INTERFACE_ALL. 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.sql It validates the address being inserted or updated with respect to the tax location flexfield structure. insert two records in table RA_CUSTOMER_PROFILES_INT_ALL. 5. The RA_CUSTOMERS_INTERFACE record is then updated with the value of the ccid returned. a. e. customer name : the same customer reference can’t have different customer names with in this table HZ_PARTIES. First we will get the Requirement document. must exit if you are not using automatic customer numbering. Through pl/sql programs we will mapping and validate the data and then dump into the interface tables. New TCA/Customer Model. d. Then the control files which loads the data into staging tables. customer number : must be null if your r using automatic customer numbering. This value much be unique with in HZ_PARTIES c.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. We will create control file based on that plot file. 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. c. 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 . Through the standard programs we will push the data from interface tables to Base tables. b. d.PAYMENT_TERM_ID (Refer Enhancement Request Bug: 245300) 13.PARTY_NAME b. 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? . UPDATE_CUST_A/C HZ_CUST_A/C_VZPUB.LOG) FND_FILE..OUTPUT) Is the Program exits. delete conc program and its executables.APPLICATION_NAME_IN) END. 18) What are profile options? Is the Functional and Technical behavior of Oracle Applications Package.Human resources information is secured by .’EXECUTABLE NAME’.PUTLINE(FND_FILE.PUTLINE(FND_FILE. EX: .DELETE_PROGRAM(‘EMP’.SUBMIT_REQUEST (‘PO’.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. 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.APPLICATION_NAME_IN) FND_PROGRAM.PROGRAM_EXITS(‘EMP’.. 15) How can u call a standard interface program from sql or pl/sql code? FND_REQUEST.. Error msg. IF FND_PROGRAM.Page 106 of 259 if the bank a/c does not exist you must enter a value e. (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 --.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.APPLICATION_NAME_IN) THEN FND_PROGRAM.DELETE_EXECUTABLE(‘EMP’.PARAMETERS) 16) API’s FOR CUSTOMER INTERFACE? HZ_CUST_A/C_VZPUB. multiple organizations and allows Oracle Application ensures that all the memory allocated for AOL user exits have been freed up properly. OE. ----. --. 2) Independent ------input must exist on previously defined list of values 6) Translatable independent ----.Page 107 of 259 Business group b) Legal entity.) ERRBUF :Used to write the error message to log or request file. It provides list of values to the end user to accept one of the values as report parameter value. ------input is checked against a subset of values based on a prior value.Populate log request file with program submission details info. -.If the list of values needed to be dynamic and ever changing and define a table based values set.secures AR. FND FLEXIDVAL are used to display flex field information like prompt. -----. c) Operating unit --.input is checked against values in an application table ------values set uses a flex field itself. Security responsibility operating unit. d) Organizations --.inter-company and fiscal/tax reporting.two flex fields together specify a range of valid values.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. of values.input must exist on previously defined list . PA and PO Information. translated values can be used. 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. --When ever the value set associated with any report parameters. 27) What is Value Set? --The value set is a collection (or) container of values. RETCODE :. 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 …………………. 27) What r the validation types? 1) None 3) Dependent 3) Table 4) Special 5) Pair -------.validation is minimal. AP. input is checked against a subset of values based on a prior values. First navigation p) Save and compile the form. In the program unit. Then Compile it. Open the data module and modify the query (what is client requirements) assign the columns to the attributes.rdf b. d) Delete the default blocks.if u want to customize in the AR module path is Appl top\ar\11. Then u will get a . 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. g.rep file in the specified module. (sub class item Text item) l) Modify the app_cusom package. 1) from-period 2) to-period . c. Then Register in the AOL Concurrent executable.Page 108 of 259 7) Translatable dependent ------. what r the newly created columns. window. and canvas e) Create a window. 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. m) Modify the pre-form trigger (form level) n) Modify the module level properties ((console window. e. Go to report wizard and select.0\reports\US\ . If it is not in the specified directory then we have to put in the server directory.rdf file in Report builder and change the name of the module.fmb c) Change the form module name as form name. 28) Form development process? a) open template form b) Save as <your form>. Q) Register in the AOL APPLICATION FORM APPLICATION FUNCTION APPLICATION MENU 29) How do u customize the Reports? a. Place the . translated value can be used.5. d. f. Concurrent program. Identify the Short name of the standard report in which module we have to customize Ex: . Open the .fmx in the server directory. 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. AP. on account credit. amount. 1) ap_invoice_all .from g_emp where empno between :from_no and to_no c) Compile and put the . chargeback.Page 109 of 259 a) Go to object navigator and create the parameters. debit memo. AR. control count. 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. status. and AR_RECEIVABLE_APPLICATIONS tables for invoice–related receipts. 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.ename. debit memo no. 8) ra_cash_receiots_all Cash_receipt_id This table stores one record for each receipt that you enter. Each row includes information about a specific batch such as batch source. or receipt. Oracle Receivables creates records concurrently in the AR_CASH_RECEIPT_HISTORY_ALL. accounting information. batch type. You need one row for each adjustment you are making to an invoice. d) Registering in AOL. and PO? 1) ra_customer_trx_all customer_trx_id trx_number (invoice no. Concurrent executable Concurrent program then go to “PARAMETERS” e) Go to Application validation set. and control amount 6) ra_receivable_application_all 7) ra_adjustments_all This table stores information about your invoice adjustments. and type of adjustment. credit memo. 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. Each row includes general information about the adjustment you are making such as activity name. Oracle Receivables updates this table when activity occurs against an invoice.RDP file in the server directory. AR_PAYMENT_SCHEDULES_ALL. User parameters from_no. reason. Page 110 of 259 invoice_amount, base_amount, payment_status_flag(‘y’ –fully paid ‘n’—unpaid ‘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 one–to–many 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 one–to–many 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 one–to–many 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 information’s? 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, It’s 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 can’t 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 area’s 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 putline(emp_record.Page 115 of 259 For emp_record in emp_cursor loop Dbms_output. ename FROM emp) LOOP -.implicit close occurs END.conversion. 8) to_many_row ---------single row select returned more than one row. 4) Invalid_number -------. .attempted to divided by zero.pl/sql ran out of memory or memory is corrupted.putline(emp_record. 6) program_error -------. USER-DEFINED: Declare : name the exception Raise : explicitly raise the exception by using the raise statements Reference: exception handing section.illegal cursor operation occurred. 3) Invalid_cursor -------. 5) Login_denied ---------loging on to oracle with an invalid user name and password. BEGIN FOR emp_record IN ( SELECT empno..conversion of character string to number fails. END LOOP. Can we create a cursor without declaring it? Yes – by using cursor for loop using subqueries.ename) End loop End. 7) storage_error -------.arithmetic. -.empno). 10) zero_devided -------. 2) Dup_val_on_index --------attempted to insert a duplicate values.empno = 7839 THEN . PRE-DEFINED: 1) cursor_already_open--------attempted to open an already open cursor. From…….truncation or size constraint error occurred. 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.implicit open and implicit fetch occur IF emp_record. 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 …….. 9) value_error -------. Dbms_output.pl/sql has an internal problem. 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. empno). So.putline(‘no such dept’). to access the information.{true/false}] Error number between -20000 to -20999 pragma exception_init? It tells the compiler to associate an exception with an oracle error.empno ||’doest exist’). which names the work area or. 2) User defined exceptions? Define p_dept_desc =’gvreddy’ Define p_dept_number =1236 Declare E_invalid_dept exception. Commit.empno := &empno. Ex: pragma exception_init(exception name. oracle opens an unnamed work area that stores processing information. where as a cursor always refers to the same query work area. If sql% not found then Raise e_invalid_departments. a cursor variable. a cursor variable can refer to a different work areas. Begin Update departments Set dept_name=’&p_dept_desc’ Where dept_id =’&p_dept_number’. which hold the memory location(address) of some object instead of the object itself. You can report errors to your applications and avoid returning unhandled exceptions.empno. 52) what is REF Cursor? To execute a multi-row query. 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? . an explicit.putline(‘empno’ || e. End if. End. Dbms_output. End.message[. which points to the work area. oracle error number) Example for Exceptions? 1) Check the record is exist or not? Declare E emp% rowtype Begin e. not an object. Exception When e_invalid_departments then Dbms_output. declaring a cursor variable creates a pointers.putline(e. Raise_Application_Error(error_number. To get an error message of a specific oracle error. cursor variable area like ‘c’ or ‘pascal’ pointers. select * into e from emp where empno =e.Page 116 of 259 The Raise_Application_Error_Procedure: You can use this procedure to issue user-defined error messages from stored sub programs. Exception When no_data_found then Dbms_output. 36) 53) What is procedure? ------------is a named pl/sql block to perform a specific task. Return v_salary End get_sal. Exec empy(:empx).is a named pl/sql block to perform a specific task. Emp_record emp%rowtype. Output : var empx number. It may or may not return a value. ---. A procedure may have DML statements. Print (emp_record. Output : var g_sal number. End.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.emp_no% type) Return number Is v_sal emp. End. 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.Every function should return a value Example for function Create or replace Function get_sal(p_id in emp.sal). Exec :g_sal := get_sal(99).empno). Begin For emp_record in emp_cursor loop Print (emp_record.ename). Begin :empx := ‘1234’. End loop. . Print empy. is mainly used for calculation purpose. Print (emp_record.’yyyy’)=’y’.A function is called as part of an exception. Begin Select salary into v_salary From emp Where emp_no = p_id. End. ---. Procedure can return more than one value. 54) What is function? ---.sal%type :=0. ). .forward declaration PROCEDURE award_bonus(. ...). • Group subprograms in a package Example of forward Declaration: CREATE OR REPLACE PACKAGE BODY forward_pack IS PROCEDURE calc_rating(. 9. . even if the types are in different families. 55) What is the package? ---. • Define mutually recursive subprograms. You can use forward declarations to do the following: • Define subprograms in logical or alphabetical order. PROCEDURE calc_rating(.in alphabetical order calc_rating(. . .(both calling each other). . It consists of the subprogram specification in the package body terminated by a semicolon. . 56) What is FORWARD DECLARATION in Packages? PL/SQL allows for a special subprogram declaration called a forward declaration. .Can 2 functions have same name & input parameters but differ only by return datatype No.) IS -.. (datatype and their total number is same). END. .) IS BEGIN . 10. 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.Can functions be overloaded ? Yes.subprograms defined BEGIN -.Page 118 of 259 Print g_salary. •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. ..Group logically related pl/sql types. items and subprograms. -. END. Page 119 of 259 END forward_pack. executable and exception-handling sections. how ever a procedure is executed explicitly from another block via a procedure call. update.ename =’smith’ or New. ---.The triggering event is a DML (insert.’u can insert in the office timings’) End if.’sun’)) or To_char(sysdate. 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.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. delete) operations on a data base table ----.A trigger is executed implicitly when ever a particular event task places.’dy’) in(‘sat’. End.ename =’smith’) Begin before statement trigger before row trigger after row trigger after statement trigger . in that they are the named pl/sql blocks with declarative. which can also pass arguments.triggers are similar to procedures.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. And is nothing but a event.’hh24:mi’) Not between ’08:00’ and ’18:00’) Then raise_application_error(-20500. 56) What are triggers? ---. ---. Ex :. Page 120 of 259 Raise_application_error(-20003. PROFILES AND CONCURRENT PROCESSING. request security groups and data groups Menus: collection of forms is nothing but menus Request security groups: collection of programs.others can only read. CUSTOM :. 57) Difference between triggers and procedures? Defined with create trigger The data dictionary contains source code in the user_triggers. ad hoc tax codes or an ad hoc database query 60) What is responsibility? Is collection of menus. Implicitly invoked Commit.Is to reduce concurrency 1) share lock ---it allows the other users for only reading not to insert or update or delete. 58) What is template? a) The TEMPLATE form is the required starting point for all development of new Forms. update delete Lock levels : 1) table level 2) table space 3) data base level. b) The TEMPLATE form includes platform–independent attachments of several Libraries. Concerned with or formed for a particular purpose.It contains packages that control the oracle applications CALENDER FEATURES. 3) update lock ----multiple user can read. 2) exclusive lock --. 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? -. For example. Data groups: is a group of modules to be made accessible by the user through Responsibility System adminsecuritydefine .it allows extension of oracle applications forms with out modification of oracle application code. FNDSQF :.It contains package and procedures that are required of all forms to support the MENUS . End.’smith’).only one user can have the privileges of insert or update and delete of particular object --. APPSDAYPK :. 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. APPSCORE :. FLEX FIELDS.it contains packages and procedures for MESSAGE DICTONARY.TOOLBARS.: Ad-hoc Report is made to meet one-time reporting needs. This combination of the SGA and the Oracle processes is called an Oracle instance. The execution file is a SQL script. and suggest you use either a PL/SQL Stored Procedure or a Spawned C Program instead. The Instance and the Database After starting an instance. The execution file is a program written to run as a subroutine of the concurrent manager. Oracle allocates a memory area called the System Global Area (SGA) and starts one or more Oracle processes. The execution file is an Oracle Reports file. Group by… Having… Orderby. The execution file is a stored procedure. The execution file is written using the FlexSql API. This is called mounting the database.orderby in a select statements ? Select…. Oracle associates the instance with the specified database. The execution file is a SQL*Report script. . 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. Composite Datatypes : – PL/SQL TABLES – PL/SQL RECORDS Nested TABLE VARRAY What is the sequence of functions – group by. When a database is started on a database server (regardless of the type of computer). The execution file is a host script. We recommend against defining new immediate concurrent programs.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.having. The execution file is a C or Pro*C program. The execution file is a SQL*Plus script. The database is then ready to be opened... which makes it accessible to authorized users. The memory and processes of an instance manage the associated database’s data efficiently and serve the one or multiple users of the database. Security for database startup and shutdown is controlled via connections to Oracle with administrator privileges. rather. If a database is open. each accessing its own physical database.implicit 2.Page 122 of 259 Multiple instances can execute concurrently on the same computer. Q: What is a view? A view is a tailored presentation of the data contained in one or more tables (or other views).sql%notfound : returns a boolean value stating whether the record is not found in the cursor 4. Unlike a 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. nor does a view actually contain data. cursors are of two types 1. 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. adv: 1.sql % found: returns boolean value stating whether the record is found in the cursor. Views present a different representation of the data that resides within the base tables. note: data which is populated into the cursor is known as active dataset.of rows executed in the cursor.sql %rowcount :returns a pneumeric value stating no.sql%is open:attribute returns a boolean value stating wether the cursor is open or closed. Views are very powerful because they allow you to tailor the presentation of data to different types of users. the database administrator can shut down the database so that it is closed. When a database is closed. 3. What is a cursor? cursor is a private sql work area used to perform manipulations on data using pl\sql. a view is defined by a query that extracts or derives data from the tables the view references. . users cannot access the information that it contains. 2. In clustered and massively parallel systems (MPP). the Oracle Parallel Server allows multiple instances to mount a single database.mainly used for multiple row manipulations and locking columns. a view is not allocated any storage space.explicit implicit ——— attributes or properties for implicit cursor 1. Normal users do not have control over the current status of an Oracle database. 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. These tables are called base tables. Only the database administrator can start up an instance and open the database. It is available locally only on CMS and PCs with oracle version 5. we can create ddl trigger. 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. ODL loads the table from a control file and separate fixed format data file.startoff). 1.% is open 2. SQL * Loader is much more flexible than ODL and will eventually supersede it on all systems. for Example : insert into CAR values(…) where the values to be inserted into a row of the table are listed inside the parentheses. We can execute a function in sql query select functionname(paramaters) from dual.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. The Sql insert command may be used from the SQL * Plus module.logoff. There are several methods others than using SQL *Loader of inserting data into a table.level etc Normalization is the techinque of designing the database with the least redundancy and duplicacy of data.% rowcount Note: DATA which is populated in the cursor is known as active data set. Throughout this documentation the CAR database described in Referance A is used for illustration.audit triggers pseudo column the column which does not exist in a table ex.Page 123 of 259 explicit cursors—retrives multiple rows. ODL is available on all versions of ORACLE . The forms may contain default values and checks for invalid data.startup. Name the data dictionary that stores user-defined Stored procedures? ans :. 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. Types of Normalization: 1 NF 2 NF 3 NF BCNF 5 NF 6NF : Impossible to achieve this level of normalization what is a synonym ? . Sql*Forms allows you to add rows interactively using forms. items are seperated by commas.% not found 4. Dates and Characters data must be Surrounded by single quotes. 3. ************ adv: users can perform locks on th data in the cursor attributes 1.% found 3.rownum. 2.database trigger(logon.rowid.4) from dual. Suppose i am created a function add which returns the addition of two numbers then select add(3. Syntax: create synonym synonym-name for schemaname. for all the exceptions raised oracle fills in sqleerm and sqlcode variable which provide the error message and error code for the exception raised. It also eliminates the need to recompile components when minor changes occur to the database. or delete their values. or SQL> delete duplicate_values_field_name dv from table_name ta where rowid < (select min(rowid) from table_name tb where ta. A synonym is an alternative name for tables. 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). you can name these exceptions using PRAGMA EXCEPTION_INIT 4)Unnamed programmer-defined exceptions. 1.ROWID. 2.dv). In oracle there are serveral types of exceptions 1) Pre-defined exceptions like NO_DATA_FOUND.LEVEL what is a schema ? A schema is a oracle database user account. 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 . but you cannot insert. but is not actually stored in the table. The result set of a three table Cartesian product will have x * y * z number of rows where x.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. You can select from pseudocolumns. What are pseudo-columns in SQL? Provide examples? A pseudocolumn behaves like a table column.views. It is causes by specifying a table in the FROM clause without joining it to another table. How do you view version information in Oracle? SQL> select banner from $version. z correspond to the number of rows in each table involved in the join. It allows the DBMS control of permissions for security purposes. the programmer provides both an error number (between -20000 and -20999) and an error message.Page 124 of 259 Ans.dv=tb. Exceptions that are defined and raised in the server by the programmer. y..object-name what is an exception ? Exception is an event that causes suspension of normal program execution. 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. and raises that exception with a call to RAISE_APPLICATION_ERROR.NEXTVAL. update. Examples: CURRVAL. In this case. 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. 3.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 . DBMS_LOCK. When is a declare statement needed ? The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone. In Oracle 8 they will be able to be of the %ROWTYPE designation. DBMS_ALERT. It must come first in a PL/SQL stand alone file if it is used. Expected answer : Candidate should mention use of DECLARE statement. What packages (if any) has Oracle provided for use by developers? Expected answer: Oracle provides the DBMS_ series of packages. great. There are many which developers should be aware of such as DBMS_SQL. Describe the use of %ROWTYPE and %TYPE in PL/SQL Expected answer: %ROWTYPE allows you to associate a variable with an entire table row. 5. DBMS_UTILITY. 4. 8. It occurs because the trigger is trying to update a row it is currently using. DBMS_DDL. DBMS_JOB. 3.Page 125 of 259 declared table based on the column the join has been declared on. 7. UTL_FILE. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers? Level: Intermediate . Describe the use of PL/SQL tables Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer. The %TYPE associates a variable with a single column type. 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. 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 they can mention a few of these and describe how they used them. If they include the SQL routines provided by Oracle. DBMS_TRANSACTION. They can be used to hold values for use in later queries or calculations. function and anonymous pl/sql block. or RECORD. non-stored PL/SQL procedures. even better. but not really what was asked. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other. What is a mutating table error and how can you get around it? Expected answer: This happens with triggers. 2. 6. DBMS_PIPE. An INNER JOIN will take only matching values from both tables PL/SQL Questions: 1. Describe the difference between a procedure. DBMS_OUTPUT. a function must return a value while a procedure doesn?t have to. Give one method for transferring a table from one schema to another: Level:Intermediate Expected Answer: There are several possible methods. 9. DBA: 1. If it is not specified the tables that already exist will be skipped. INSERT. 3. 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. How can you find within a PL/SQL block. The SQLERRM returns the actual error message for the last error encountered. but this only shows errors. or COPY. You have a rollback segment in a version 7. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. store in an error log table. or. 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. ROW. how can it be restored to optimal? . CREATE TABLE. the error is ignored and the tables data will be inserted.Page 126 of 259 Expected answer: SQLCODE returns the value of the error number for the last error encountered.2 database that has expanded beyond optimal. DELETE and ALL key words: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT etc. UPDATE. The default value is N. AS SELECT. 2. export-import. if a cursor is open? Level: Low Expected answer: Use the %ISOPEN cursor status variable. TABLE. These are especially useful for the WHEN OTHERS exception. the error that occurred in the code. AFTER.. 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. If it is specified. 11. They can be used in exception handling to report. The new package UTL_FILE can also be used. 10.. 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. for the enable clause you must specify the USING INDEX and TABLESPACE clause for primary keys. 6. but only as part of the index definition. DBMS_SESSION.SQL series of SQL procedures. 7.. DBMS_DDL. 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. 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). 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.. 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. DBMS_OUTPUT and DBMS_SNAPSHOT. when the constraint was disabled the index was dropped and the information is gone.Page 127 of 259 Level: Low Expected answer: Use the ALTER TABLESPACE . These can be viewed as extra credit but aren?t part of the answer. 4. 5. 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. DBMS_UTILITY. DBMS_SQL. SHRINK command. Since this will usually be the same tablespace as the table is being created in. However.. this can cause serious performance problems. This is bad since it makes tracking which table the constraint belongs to or what the constraint does harder.SQL or CAT*. 9. The packages used by DBAs may include: DBMS_SHARED_POOL. 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. They may also try to answer with the UTL*. 8. . 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. what is the best way to get sizing data for the production table implementation? Level: Intermediate . A user is getting an ORA-00942 error yet you know you have granted them permission on the table. How can you tell if a database object is invalid? Level: Low Expected answer: By checking the status column of the DBA_. 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. (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. 12. 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.emp. 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. 13. ALL_ or USER_OBJECTS views. what is the problem? Level: Intermediate Expected answer: You need to verify the developer has direct grants on all tables used in the view. 11. 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. You are using hot backup without being in archivelog mode. 16. instead of select empid from emp. 14. You can?t create a stored object with grants given through views.emp.) or has a synonym that points to the object (create synonym emp for scott.Page 128 of 259 10. depending upon whether you own or only have permission on the view or are using a DBA account. 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. If you have an example table. So no. you couldn?t recover.) 15. You want to include a carriage return/linefeed in your output from a SQL script.nextval FROM dual. 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. Use of double ampersands tells SQLPLUS to resubstitute the value for each subsequent use of the variable. SQL/ SQLPlus 1. 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. What is the problem? Level: Intermediate Expected answer: Somehow two values have been inserted into the dual table. To be prompted for a specific variable.3. greater than 0... How can variables be passed to a SQL routine? Level: Low Expected answer: By use of the & symbol. This table is a single row. One is to look at the v$session or v$process views.. 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. but this only works against a single instance installation. a single ampersand will cause a reprompt for the value unless an ACCEPT statement is used to get the value from the user. 19.0 (i.. single column table that should only have one value in it. A user selects from a sequence and gets back two values. Or if the ratio BR_BLK_LEN/ LF_BLK_LEN+BR_BLK_LEN is nearing 0. Another if you are on UNIX is to do a "ps -ef| grep oracle|wc -l? command. Another way is to check the current_logins parameter in the v$sysstat view. his select is: SELECT pk_seq." . place the ampersanded variable in the code itself: "select * from dba_tables where owner=&owner_name. &2. 17. 2. how can you do this? Level: Intermediate to high . 18.e. For passing in variables the numbers 1-8 can be used (&1.7 or so) then the index should be rebuilt.&8) to pass the values after the command into the SQLPLUS session.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. CASCADE. although it is hard to document and isn?t always portable is to use the return/linefeed as a part of a quoted string. 6. Another method. min(sum_of_cost). What SQLPlus command is used to format output from a select? Level: low Expected answer: This is best done with the COLUMN command. 7. 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. spool off Essentially you are looking to see that they know to include a command (in this case DROP USER. 4.? from dba_users where username not in ("SYS?. what is this called and give an example Level: Intermediate to high Expected answer: This is called dynamic SQL. item_no Level: Intermediate Expected answer: The only column that can be grouped on is the "item_no" column. count(item_no). 8.) and that you need to concatenate using the ?||? the values selected from the database. the rest have aggregate functions associated with them.?SYSTEM?).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 "||".. How can you call a PL/SQL procedure from SQL? Level: Intermediate Expected answer: By use of the EXECUTE (short form EXEC) command. 3. 5. You want to use SQL to build SQL. What special Oracle feature allows you to specify how the cost based system treats a SQL statement? Level: Intermediate to high .sql select ?drop user ?||username||? cascade. An example would be: set lines 90 pages 0 termout off feedback off verify off spool drop_all.. You want to group the following set of select returns. what can you group on? Max(sum_of_cost). emp_no = e. In the situation where multiple columns make up the proposed key. z correspond to the number of rows in each table involved in the join. ALL ROWS. STAR. If they can give some example hints such as FIRST ROWS. 12. the rowid column. The result set of a three table Cartesian product will have x * y * z number of rows where x. 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. 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. You want to determine the location of identical rows in a table before attempting to place a unique index on the table. y. 9. This can also be used to generate explain plan output. 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. . the network manager complains about the traffic involved. USING INDEX. What is a Cartesian product? Level: Low Expected answer: A Cartesian product is the result of an unrestricted join of two or more tables. What is the default ordering of an ORDER BY clause in a SELECT statement? Level: Low Expected answer: Ascending 13. 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.emp_no). even better.rowid) from emp x where x.Page 131 of 259 Expected answer: The COST based system allows the use of HINTs to control the optimizer path selection. how can this be done? Level: High Expected answer: Oracle tables always have one guaranteed unique column. they must all be used in the where clause. 10. This will result in only the data required for the join being sent across. You are joining a local and a remote table.rowid > (select min(x. 11. 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. . REDO LOG. Is this bad? Why or why not. Level: Intermediate Expected answer: Multiple extents in and of themselves aren?t bad. This option can be shortened to TERM. Explain plans can also be run using tkprof. 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. The PAGESIZE and LINESIZE options can be shortened to PAGES and LINES. The explain_plan table is then queried to see the execution plan of the statement. TEMPORARY and INDEX segments. for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines long with a line width of 80 characters. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. How do you generate file output from SQL? Level: Low Expected answer: By use of the SPOOL command Tuning Questions: 1. 18. Setting TERMOUT OFF turns off screen output. A tablespace has a table with 30 extents in it. How do you prevent output from coming to the screen? Level: Low Expected answer: The SET option TERMOUT controls output to the screen. 17. 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.sql script. 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. This is created using the utlxplan. However if you also have chained rows this can hurt performance.Page 132 of 259 14. 2. 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. DATA. 15. ROLLBACK. To use it you must have an explain_table generated in the user you are running the explain plan for. 16. . 8. 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. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system. When looking at v$sysstat you see that sorts (disk) is high. 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 indicates you need to tune the sort area parameters in the initialization files. The two should have a product equal to 64 or a multiple of 64.Page 133 of 259 3. This can also be used to generate explain plan output. 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. 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 see multiple fragments in the SYSTEM tablespace. 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. getting error ORA-04031. 9. 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. The major sort are parameter is the SORT_AREA_SIZe parameter. What is the fastest query method for a table? Level: Intermediate Expected answer: Fetch by rowid 7. Another indication is steadily decreasing performance with all other tuning parameters the same. 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. 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. 6. 5. 4. If you see contention for library caches how can you fix it? Level: Intermediate Expected answer: Increase the size of the shared pool. 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. rollback or data blocks.ora file for an indication of manually set parameters. 16. If you do a comparison between pairs of readings based on some arbitrary time span. DATA is data base buffers. this is the instantaneous ratio for that time span. 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. UNDO is rollback segments. 13. 11. look in the v$parameter view. 12. 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. 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. If you simply take the ratio of existing parameters this will be a cumulative value since the database started. If you see statistics that deal with "undo" what are they really talking about? Level: Intermediate Expected answer: Rollback segments and associated structures.Page 134 of 259 10. Is this bad? How can you find what is causing it? Level: high Expected answer: Buffer busy waits could indicate contention in redo. It can be corrected by export and import of the effected table. It can be reduced by setting the storage parameters on the table to appropriate values. If a tablespace has a default pctincrease of zero what will this cause (in relationship to the smon process)? . 15. 14. the "class" column tells you with what. their value and whether or not the current value is the default value. Discuss row chaining. For all parameters. The value of the "count" column tells where the problem is. When looking at the estat events report you see that you are getting busy buffer waits. less could indicate problems. Describe hit ratio as it pertains to the database buffers. This results in the row chaining to another block. You need to check the v$waitstat view to see what areas are causing the problem. A value greater than 8090% is good. how do you fix it? Level: Intermediate Expected answer: This indicate that the shared pool may be too small. 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.1. 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. 18. If the free space isn?t contiguous then export. If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7. Increase the shared pool size. If you see the value for reloads is high in the estat library cache report is this a matter for concern? Level: Intermediate . If the wait time was high it might indicate a need for more or larger redo logs. 22. then it is fragmented.3 the ?alter tablespace coalesce.8 in the estat library cache report is this a problem? If so.2 and 7. If you see a pin hit ratio of less than 0. drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space. 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. In version 7. and or excessive statement re-parses.? is best.? command is the easiest way to defragment contiguous free space fragmentation. 20.3 only) Level: High Expected answer: In Oracle 7. excessive dynamic space management actions. You need to determine the cause and correct it By either relinking applications to hold cursors.2 The use of the 'alter session set events 'immediate trace name coalesce level ts#'. 19.Page 135 of 259 Level: High Expected answer: The SMON process won?t automatically coalesce its free space fragments. use proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse. The ts# parameter corresponds to the ts# value found in the ts$ SYS table. no. 21.7.0 to 7. 17. If you see excessive reloads then increase the size of the shared pool. it can even improve performance since Oracle won?t have to create a new extent when a user needs one. 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 there a problem? Should you take any action? Level: Intermediate Expected answer: No there is not a problem. 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. Is this a problem? Level: Intermediate Expected answer: As long as they are all the same size this isn?t a problem. 26.Page 136 of 259 Expected answer: Yes. You can look at the average transaction size in the same view to get the information on transaction size. Installation/Configuration . Ideally you should have no shrinks or a small number of large shrinks. You see multiple extents in the temporary tablespace.-------------------------R01 11 R02 8 R03 12 R04 9 SYSTEM 4 You have room for each to grow by 20 more extents each. 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. To fix this just increase the size of the extents and adjust optimal accordingly. you should strive for zero reloads if possible. In fact. In a system with an average of 40 concurrent users you get the following from a query on rollback extents: ROLLBACK CUR EXTENTS --------------------. Increase the size of your extents to reduce the number of wraps. You have 40 extents showing and an average of 40 concurrent users. 24. 25. Since there is plenty of room to grow no action is needed. 23. As long as they have a logical plan for combining or further separation more or less disks can be specified.ORA 7. 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.ORA. Be sure enough contiguous disk space is available. 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 137 of 259 1. 4. This can fill up your archive log destination causing Oracle to stop to wait for more space. 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. 5. 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. TNSNAMES.ORA file 6. TNSNAMES. When configuring SQLNET on the server what files must be set up? Level: Intermediate Expected answer: INITIALIZATION file. data and indexes and isolation os SYSTEM tables from other tables.ORA file. When configuring SQLNET on the client what files need to be set up? Level: Intermediate Expected answer: SQLNET. 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. 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. You have been waiting an hour for the initialization script to finish. 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. You have installed Oracle and you are now setting up the actual instance. Level: Low Expected answer: OFA stands for Optimal Flexible Architecture. redo logs on two (mirrored redo logs) the TEMPORARY tablespace on another. Define OFA. 3. SQLNET. If archive logging is turned on during install a large number of logs will be created. e. 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. 9. How many control files should you have? Where should they be located? Level: Low Expected answer: At least 2 on separate disk spindles. Is the following statement true or false: "All relational databases must be in third normal form" Why or why not? . 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. How many disks should you have assuming standard layout for SYSTEM. 12. The redo logs should not be on raw devices on UNIX if it can be avoided. 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. 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). Performance is terrible. not just file systems. 13. see disk configuration answer above.Page 138 of 259 8. TEMP and ROLLBACK tablespaces? Expected answer: At least 7. When should the default values for Oracle initialization parameters be used as is? Level: Low Expected answer: Never 11. Data Modeler: 1. You have just started a new instance with a large SGA on a busy existing server. USER. Be sure they say on separate disks. 10. uniform IO and access requirements). You have a simple application with no "hot" tables (i. While 3NF is good for logical design most databases. will not perform well using full 3NF. or the junior janitor because he has no subordinates). 3. UNIX: 1. if they have more than just a few tables. It is used to show the entities and relationships for a database logical model. How should a many-to-many relationship be handled? Level: Intermediate Expected answer: By adding an intersection entity table 7.Page 139 of 259 Level: Intermediate Expected answer: False. 6. Usually some entities will be denormalized in the logical to physical transfer process. Usually it is used when a concatenated key becomes too cumbersome to use as a foreign key. What is an ERD? Level: Low Expected answer: An ERD is an Entity-Relationship-Diagram. 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. How can you determine the space left in a file system? Level: Low . 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. 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. 5. 8. These type of relationships are usually resolved by adding a small intersection entity. When should you consider denormalization? Level: Intermediate Expected answer: Whenever performance analysis indicates it would be beneficial to do so without compromising data integrity. 4.e. 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. usually a case-esac or an if-endif or fi structure 7. more. It is stored in both disk and memory and tracts file status. pg 4. There is one inode for each file on the system. . 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.Page 140 of 259 Expected answer: There are several commands to do this: du. if you do a ps -ef|grep oracle|wc -l you can get a count of the number of users. What is an inode? Level: Intermediate Expected answer: an inode is a file status indicator. What command is used to type files to the screen? Level: Low Expected answer: cat. How do you create a decision tree in a shell script? Level: intermediate Expected answer: depending on shell. Can you remove an open file under UNIX? Level: Low Expected answer: yes 6. 3. df. The system has a program that always includes the word nocomp in its name. What command is used to remove a file? Level: Low Expected answer: rm 5. how can you determine the number of processes that are using this program? Level: intermediate Expected answer: ps -ef|grep *nocomp*|wc -l 9. or bdf 2. 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. Some UNIX systems don?t clean up well after themselves. 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.who -d depending on the system. Most UNIX systems should have a scheduled periodic reboot so file systems can be checked and cleaned and dead or zombie processes cleared out. 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 . 13.or -. The system administrator tells you that the system hasn?t been rebooted in 6 months. How can you find all the processes on your system? Level: Low Expected answer: Use the ps command 14. What is the finger command? Level: Low Expected answer: The finger command uses data in the passwd file to give information on system users. 12. This can be done using the pipe symbol "|". should he be proud of this? Level: High Expected answer: Maybe. How can you find your id on a system? Level: Low Expected answer: Use the "who am i" command.Page 141 of 259 10. This is one of the strengths of UNIX allowing the output from one command to be redirected directly into the input of another command. 11. Inode problems and dead user processes can accumulate causing possible performance and corruption problems. How can you find dead processes? Level: Intermediate Expected answer: ps -ef|grep zombie -. the greater than symbol ">" or the "tee" command. 15. 16. pmon. 18. Review the results from the command to find the command of interest. You can use the command "tcpctl status" to get a full status of the V1 TCPIP server. 4.Page 142 of 259 Expected answer: The ">>" redirection symbol appends the output from the command specified into the file specified. See Servr Msgs & Codes Manual) What could the problem be? Expected answer: The instance name is probably incorrect in their connection string. Users from the PC clients are getting messages indicating : Level: Low ORA-06114: (Cnct err. 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. restart the instance. For SQLNET V2 check for the presence of the LISTENER process(s) or you can issue the command "lsnrctl status". 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. 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. The file must already have been created. 2. For example. Any answer that has them using their operating system process showing feature to check for these is acceptable. 5.dbf file. these will be smon. 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. other protocols have similar command formats. What file will give you Oracle instance status information? Where is it located? . 3. dbwr and lgwr. on UNIX a ps -ef|grep dbwr will show what instances are up. Oracle Troubleshooting: 1. 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. can't get err txt. If the MAX_DATAFILES is set to low. If pct_increase is zero. you will have to rebuild the control file to increase it before proceeding. 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. smon will not coalesce their free space. Users aren?t being allowed on the system. 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. until freed What is the problem? Expected answer: The archive destination is probably full. You can shutdown and reset this to a higher value.ora log. 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? . up to the value of MAX_DATAFILES as specified at database creation. 6. 7. What is the problem? Level: High Expected answer: Check the dba_tablespaces view for the value of pct_increase for the tablespaces. 9. The following message is received: Level: Intermediate ORA-00257 archiver is stuck. It is located in the directory specified by the background_dump_dest parameter in the v$parameter table. 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.Page 143 of 259 Level: Low Expected answer: The alert. you must check the alert. Connect internal only. 8. 10.log file for this information. backup the archive logs and remove them and the archiver will re-start. .. MAXDATAFILES for the database to use the command. logfiles.. He has corrupted all of the control files while playing with the ALTER DATABASE BACKUP CONTROLFILE command. (bring read-only tablespaces back online) Shutdown and backup the system.) RECOVER DATABASE USING BACKUP CONTROLFILE ALTER DATABASE OPEN RESETLOGS.. 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 . they will need to know all of the datafiles. If you are sure that this is just a temporary problem.. command.. they can use that to recover as well. If this value is set to low (which it is by default) you will get this error. 11... and settings for MAXLOGFILES. you can have them wait and then try again later and the error should clear. MAXLOGHISTORY. However. You get a call from you backup DBA while you are on vacation. MAXLOGMEMBERS.Page 144 of 259 Expected answer: The number of DML Locks is set by the initialization parameter DML_LOCKS. OFFLINE. then restart If they have a recent output file from the ALTER DATABASE BACKUP CONTROL FILE TO TRACE. DATABASE PACKAGES & THEIR USAGE . Increase the value of DML_LOCKS. If no backup of the control file is available then the following will be required: CONNECT INTERNAL STARTUP NOMOUNT CREATE CONTROL FILE . DBMS_HS Lets you create and modify objects in the Heterogeneous Services dictionary. DBMS_AQ Lets you add a message (of a predefined object type) onto a queue or to dequeue a message. Probe. DBMS_APPLICATION_INFO Lets you register an application name with the database for auditing or performance tracking purposes. in the Oracle server. . DBMS_DDL Provides access to some SQL DDL statements from stored procedures.Page 145 of 259 Package Name Calendar Description Provides calendar maintenance functions. DBMS_DESCRIBE Describes the arguments of a stored procedure with full name translation and security checking. DBMS_DEFER Provides the user interface to a replicated transactional deferred remote procedure call facility. DBMS_DISTRIBUTED_TRUST_ ADMIN Maintains the Trusted Database List. DBMS_HS_PASSTHROUGH Lets you use Heterogeneous Services to send pass-through SQL statements to non-Oracle systems. DBMS_DEFER_QUERY Permits querying the deferred remote procedure calls (RPC) queue data that is not exposed through views. and provides special administration operations not available as DDLs. DBMS_ALERT Provides support for the asynchronous notification of database events. which is used to determine if a privileged database link from a particular server can be accepted. Requires the Distributed Option. Requires the Distributed Option. DBMS_AQADM Lets you perform administrative functions on a queue or queue table for messages of a predefined object type. Requires the Distributed Option. DMBS_DEFER_SYS Provides the system administrator interface to a replicated transactional deferred remote procedure call facility. DBMS_DEBUG A PL/SQL API to the PL/SQL debugger layer. SQL3 support object extensions and will be (partially?) implemented in Oracle8. as well as an ISO and ANSI standard. . What are the difference between DDL. UPDATEs.alters the structure of the database DROP . These characters can be escaped in SQL. Example: SELECT name FROM emp WHERE id LIKE '%\_%' ESCAPE '\'. 2.retrieve data from the a database INSERT . used for creating and modifying tables and other database structures. including all spaces allocated for the records are removed COMMENT . Some examples: • • • • COMMIT .to create objects in the database ALTER . '%' is used to match zero or more occurrences of any characters. SQL was developed by IBM in the 1970s for use in System R. SQL is often pronounced SEQUEL.remove all records from a table. The '_' wild card character is used to match exactly one character.withdraw access privileges given with the GRANT command DML is Data Manipulation Language statements. DML and DCL commands? DDL is Data Definition Language statements. the space for the records remain CALL .deletes all records from a table.call a PL/SQL or Java subprogram EXPLAIN PLAN . Some examples: • • • • • • • CREATE . How does one escape special characters when building SQL queries? The LIKE keyword allows for string searches. A major revision to the SQL standard was completed in 1992. What is SQL and where does it come from? Structured Query Language (SQL) is a language that provides an interface to relational database systems.explain access path to data LOCK TABLE .Change transaction options like what rollback segment to use 3.Page 146 of 259 1.save work done SAVEPOINT .add comments to the data dictionary GRANT .gives user's access privileges to database REVOKE .delete objects from the database TRUNCATE . called SQL2.insert data into a table UPDATE . DELETEs and DDL (Data Definition Language). Some examples: • • • • • • • SELECT . The development of SQL is governed by standards.restore database to original since the last COMMIT SET TRANSACTION . and is a de facto standard.control concurrency DCL is Data Control Language statements.updates existing data within a table DELETE .identify a point in a transaction to which you can later roll back ROLLBACK . In common usage SQL also encompasses DML (Data Manipulation Language). for INSERTs. SQL> drop table_name1. you. 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).key_value1 = t1. . 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 ). SELECT 'A ''quoted'' word. This will speed-up th Note 2: If you are comparing NOT-NULL columns.key_values = B. 5. This should not be a problem as all key columns should be NOT NULL. SQL> rename table_name2 to table_name1. Method 2: SQL> create table table_name2 as select distinct * from table_name1. SELECT 'A ''''double quoted'''' word. eliminate N^2 operations (no need to loop through the entire table on each pass by a record).key_value1 and t2. How can I generate primary key values for my table? Create your table with a NOT NULL column (say SEQNO).key_value2 = t1.' FROM DUAL.rowid > t1. 4. Note: If you create an index on the joined fields in the inner loop. for all intents purposes. use the NVL function. Remember that NULL is not equal to NULL. This column can now be populated with unique values: SQL> UPDATE table_name SET seqno = ROWNUM.' FROM DUAL. 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.rowid).key_value2 and t2. Example: SELECT 'Franks''s Oracle site' FROM DUAL.Page 147 of 259 Use two quotes for every one displayed. sum( decode(sex.. 7. create a unique index on this column. NOW NOW_PLUS_30_SECS -------------------. How does one add a day/hour/minute/second to a date value? The SYSDATE pseudo-column shows the current system date and time.-------------------03-JUL-2002 16:47:23 03-JUL-2002 16:47:53 8.'M'.NEXTVAL.1. 6. How does one count different data values in a column? select dept.. . sysdate + 1/86400 from dual. sysdate +1/1440. Use fractions to add hours. Finally. Adding 1 to SYSDATE will advance the date by 1 day. minutes or seconds to the date. sysdate+30/(24*60*60) NOW_PLUS_30_SECS from dual.-------------------. sequence_name.-------------------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.-------------------. 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 .0)) MALE. SYSDATE SYSDATE+1/24 SYSDATE+1/1440 SYSDATE+1/86400 -------------------. Look at these examples: SQL> select sysdate. sysdate+1/24.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. 0. Alternatively. 29).). sum(decode(greatest(f1. 1.1)) TOTAL from my_emp_table group by dept. decode( trunc(f2/1000.'F'. sum(decode(greatest(f1. 1.31) "Tax rate" from my_table. For equal size ranges it might be easier to calculate it with DECODE(TRUNC(value/range). 0.100). 3.0)) FEMALE. However.2. rate_0. 10.59). 59).'M'. this query is quite fun and may even help in the odd situation. 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). SELECT * FROM emp WHERE rownum=1 AND rowid NOT IN (SELECT rowid FROM emp WHERE rownum < 10). sal "Salary". sum(decode(greatest(f1. 1. 0)) "Range 00-29" from my_table group by f2..0.1. . 1.1.. Eg. Look at this example: select f2. select ename "Name". 2.30). rate_1. Please note.. least(f1. 9. 11. y) = LEAST(x.1. 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. 0.. 0. Can one retrieve only rows X to Y from a table? . 0). 0)) "Range 30-59". there is no explicit row order in a relational database. z). 1. least(f1. 0. 0).Page 149 of 259 sum( decode(sex. 0. 0)) "Range 60-100". least(f1. count(decode(sex.'F'. or Nth rows from a table using SQL queries like this: Method 1: Using a subquery SELECT * FROM emp WHERE (ROWID. odd. ename FROM emp ) temp WHERE MOD(temp. there is no explicit row order in a relational database. Look at this example: SELECT * FROM (SELECT * FROM my_table ORDER BY col_name_1 DESC) WHERE ROWNUM < 10.0) IN (SELECT ROWID.4) = 0. 13.4) FROM emp). However. Method 2: Use dynamic views (available from Oracle7.ROWNUM. How does one select the TOP N rows from a table? Form Oracle8i one can have an inner-query with an ORDER BY clause. How does one select EVERY Nth row from a table? One can easily select all even. 12. Please note. Use this workaround with prior releases: SELECT * FROM my_table a . However. Please note. there is no explicit row order in a relational database. these queries are quite fun and may even help in the odd situation. 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). MOD(ROWNUM.Page 150 of 259 To display rows 5 to 7.2): SELECT * FROM ( SELECT rownum rn. this query is quite fun and may even help in the odd situation. empno. and concatenate that to the string. The LEVEL pseudo-column is an indication of how deep in the tree one is. One way of working around this is to use PL/SQL... sum(decode(deptno. The "connect by prior" clause is rarely implemented in the other database offerings. EMPNO.sal)) DEPT10. and the select matching records from other tables on a row-by-row basis. Look at this example: select lpad(' '. sum(decode(deptno. LEVEL * 2) || ENAME . sum(decode(deptno. One uses the "start with" clause to specify the start of the tree.maxcol) ORDER BY maxcol DESC.30.Page 151 of 259 WHERE 10 >= (SELECT COUNT(DISTINCT maxcol) FROM my_table b WHERE b. ENAME. Also.. open the driving cursor with the "connect by prior" statement... inserting the results into a temporary table for later retrieval. Trying to do this programmatically is difficult as one has to do the top level query first. The SCOTT/TIGER database schema contains a table EMP with a self-referencing relation (EMPNO and MGR columns). One disadvantage of having a "connect by prior" clause is that you cannot perform a join to other tables. then.. for each of the records open a cursor to look for child nodes. More than one record can match the starting condition. this feature is not often found in other database offerings. Oracle can handle queries with a depth of up to 255 levels. How does one code a matrix report in SQL? Look at this example query with sample output: SELECT * FROM (SELECT job.maxcol >= a. MGR from EMP connect by prior EMPNO = MGR start with MGR is NULL.20. One can produce an indented report by using the level number to substring or lpad() a series of spaces.40. Look at this example: select LEVEL. 15. 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). 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. 14.10.sal)) DEPT30.sal)) DEPT40 FROM scott.emp GROUP BY job) . sum(decode(deptno.sal)) DEPT20.. . 0. It is one of the good things about Oracle. but use it sparingly if portability is required. Some examples: select decode(sex.---------ANALYST CLERK MANAGER PRESIDENT SALESMAN 1300 2450 5000 5600 6000 1900 2975 950 2850 16. JOB DEPT10 DEPT20 DEPT30 DEPT40 --------. 'a < b') from tableX. 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. 'M'. A. decode( abs(a-b). 'a > b'. 'a = b'. Note: The decode function is not ANSI SQL and is rarely implemented in other RDBMS offerings. select a..---------.Page 152 of 259 ORDER BY 1. 'Female'. 'F'. b. select decode( GREATEST(A. 17. From Oracle 8i one can also use CASE statements in SQL. a-b.---------. 'Unknown') from employees. 'A is greater than B'. CASE WHEN sal>1000 THEN 'Over paid' ELSE 'Under paid' END FROM emp. Look at this example: SELECT ename. How can one dump/ examine the exact content of a database column? SELECT DUMP(col1) FROM tab1 WHERE cond1 = val1.B). 'Male'. 'B is greater than A'). .---------. -. which is the ASCII code for a space. rename t2 to t1.Page 153 of 259 DUMP(COL1) ------------------------------------Typ=96 Len=4: 65. Other workarounds: 1. SQL> rename t1 to t1_base.. rename t1 to t1_base.. update t1 set newcolname=oldcolname. 20.. How can I change my Oracle password? . 19. and the last byte in the column is 32. Look at this sample script. -. demonstrating the ALTER TABLE table_name DROP COLUMN column_name. 2. command. this is listed as Enhancement Request 163519... SQL> create view t1 as select <specific columns> from t1_base. create view t1 <column list with new name> as select * from t1_base. This tells us that this column is blank-padded. SQL> update t1 set column_to_drop = NULL.. alter table t1 drop column oldcolname. SQL> rename t2 to t1.Add a column with a new name and drop an old column. 18. 3.66. indicating CHAR. create table t2 <column list with new name> as select * from t1.Recreate the table with correct column names. -.Use a view with correct column names. drop table t1. Some workarounds: 1. Can one drop a column from a table? From Oracle8i one can DROP a column from a table. SQL> drop table t1.32 For this example the type is 96. Can one rename a column in a table? No. 2. alter table t1 add ( newcolame datatype ).67. SQL> create table t2 as select <specific columns> from t1. MODIFY. GENERAL. From sql1992. RETURNS. - 23. If you then select from the USER_SEQUENCES dictionary view. OPERATION. SQL3 probably won't be complete until 1998. EQUALS. ROUTINE. CACHE" to restore caching.. BREADTH. ALIAS. LEAVE. OBJECT.. is a database query language that was adopted as an industry standard in 1986. LOOP. OPERATORS. What are the SQL reserved words? I grep'd the following list out of the sql docs available via anonymous ftp to speckle. This way. PARAMETERS. SQL3 words are not set in stone. SQLEXCEPTION. RECURSIVE.ncsl. LIMIT. 21. you will see the correct high water mark value that would be returned for the next NEXTVALL call. OTHERS. convert your LONGs to LOBs. You can use the above technique to prevent sequence number loss before a SHUTDOWN ABORT. What is SQL? SQL. SAVEPOINT. SIMILAR. How does one find the next value of a sequence? Perform an "ALTER SEQUENCE . DICTIONARY. 25. SEQUENCE. DATA. . OID.txt: AFTER. or if you need to change another user's password. however. SQLWARNING. ROLE. IMAGE FROM IMAGES. SQL3 supports objects. SIGNAL. More information about SQL3 is available via anonymous ftp to speckle.nist.. SENSITIVE. OLD. Note: If you run Oracle8. CYCLE. or any other operation that would cause gaps in sequence values. OFF. type "password user_name". Eg: COPY TO SCOTT/TIGER@REMOTE CREATE IMAGE_TABLE USING SELECT IMAGE_NO. 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. NEW. Structured Query Language.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. PRIVATE.ncsl. NOCACHE" to unload the unused cached sequence numbers from the Oracle library cache. perform an "ALTER SEQUENCE . Afterwards. SEARCH. but you'd do well to avoid them.nist. ROW. ELSEIF. 22. REF. DEPTH. ASYNC. NONE. REFERENCING. RESIGNAL. BEFORE. PREORDER. What is SQL3? Among other enhancements. PENDANT. as it can be replicated. IF. Illustra already implements many SQL3 features. RETURN.gov:/isowg3. COMPLETION. PROTECTED. REPLACE. LESS.. 24. BOOLEAN. EACH. no cached numbers will be lost.gov:/isowg3. CALL. IGNORE. ALLOCATE. INSENSITIVE. SPACE. SIMILAR. WAIT. TRANSACTION. CYCLE. OPERATION. USAGE. UNDER. IGNORE. RESIGNAL. THERE. SAVEPOINT. EXCEPTION. TRANSLATE. RETURNS. CASCADE. STATE. TEMPORARY. DO. ATTRIBUTES. CONVERT. REVOKE. WITHOUT From sql1992. ASSERTION. RESTRICT. YEAR. COLUMN. REFERENCING. SIZE. THEN. EQUALS. PARAMETERS. LEFT. LOCAL. START. PRESERVE. LEVEL. CURRENT_PATH. SESSION. HOUR. RELATIVE. ROLE. VISIBLE. EXCEPT. WAIT. LOOP. WHEN. NONE. OVERLAPS. TUPLE. TYPE. ASYNC. WITHOUT sql3part4. TRIM. CROSS. CHAR_LENGTH. SCROLL.txt (ANNEX E): CALL. CONNECT. RIGHT. CHARACTER_LENGTH. TIMESTAMP. CURRENT_USER. ADD. PROTECTED. NEW_TABLE. PAD. SIGNAL. LAST. DROP. ARE. ALIAS. BOOLEAN. REPLACE. TRAILING. FALSE. END-EXEC. SEQUENCE. INTERSECT. FIRST. ACTOR. NULLIF. ROWS. OTHERS. SUBSTRING. PRIVATE. DESTROY. CURRENT_DATE. ONLY. SEARCH. TEST. ZONE From sql3part2. PENDANT. IDENTITY. COMPLETION. DOMAIN. DEALLOCATE. USING. VALUE. DATA. COLLATION. PREORDER. DEPTH. INNER. SENSITIVE. SQLEXCEPTION. SQLWARNING. DEFERRED. WHILE. CONNECTION. CORRESPONDING. HOLD.Page 155 of 259 STRUCTURE. TIME. VIRTUAL. WHILE . SYMBOL. DIAGNOSTICS. OLD_TABLE. IMMEDIATE. CASCADED. RECURSIVE. EXCEPTION. VIRTUAL. ALTER. OCTET_LENGTH. CONSTRAINT. BEFORE. NEW. GLOBAL. BOTH. LOWER.txt (Annex E): ABSOLUTE. SPACE. MATCH. NAMES. INTERVAL. EACH. UPPER. DAY. EXECUTE. ELEMENT. NCHAR. ROUTINE. OUTER. OID. ELSEIF. JOIN. TIMEZONE_MINUTE. TRANSLATION. THERE. PATH. OUTPUT. TRIGGER. OFF. LIST. NATIONAL. POSTFIX. POSITION. COALESCE. UNKNOWN. UNDER. CURRENT_TIMESTAMP. INSTEAD. SESSION_USER. AT. PREPARE.txt (Annex E) ACTION. RETURN. DEFERRABLE. LIMIT. STRUCTURE. OLD. ELSE. EXTRACT. AFTER. ACTION. CURRENT_TIME. LEAVE. PREFIX. CASE. NATURAL. BETWEEN. DESCRIBE. ELSEIF. COLLATE. TEST. DATE. VARIABLE. TYPE. GET. TIMEZONE_HOUR. FACTOR. GENERAL. CAST. OPERATORS. INPUT. FULL. SECOND. WRITE. BREADTH. VARYING. CATALOG. MONTH. LESS. PRIOR. READ. TRIGGER. ISOLATION. NO. MINUTE. TERM. IF. BIT_LENGTH. ROW. CONSTRAINTS. DISCONNECT. DICTIONARY. LEADING. EXTERNAL. OPERATOR. SESSION. NEXT. INITIALLY. PARTIAL. VARIABLE. BIT. VISIBLE. VARCHAR. NO. SYSTEM_USER. TRUE. MODIFY. SQLSTATE. DESCRIPTOR. 0.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 . ml_dbase() lists all databases on an Illustra server: * select * from ml_dbase(). 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. and objects in a database are stored in the Illustra system catalogs.9 |pbrown | -----------------------------------------------------------6 rows selected The following error means the dba functions have not been installed: * select * from ml_dbase(). How do you tell what other database objects exist? Information about databases.9 | | | |template1 |testsaif |jiangwu |jta |jta |pbrown |testsaif |2. -----------------------------------------------------------|database_dba |database_name|database_path|database_release| -----------------------------------------------------------|jolly |miro |jolly |jiangwu |jta |pbrown |jolly |jolly |2.0. Illustra provides DBA functions that make querying the system catalogs easier.9 | |2. for example. 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 [.0.0.9 |2.Page 156 of 259 SQL FAQ: How To's 26.9 |template1 | |2. The DBA functions are fully documented in Chapter 6 of the Illustra System Administrator's Guide.0. XP0038:Cannot find a function named 'ml_dbase' taking no arguments As the owner of a database.0.9 |jiangwu |2. users. 28. ------------------------------------|Now | ------------------------------------|Mon Apr 18 09:06:10.2 in the Illustra User's Guide.7.490753 1994 PDT| ------------------------------------one row selected * return substring('now'::abstime::text from 5 for 3) as Month.Page 157 of 259 ml_rules(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. How do you extract just the month from an abstime? substring extracts just a portion of a string: * return('now'::abstime) as Now. see section 3. --------------|Month --------------|Apr | | --------------one row selected For more examples. How do you remove duplicate entries from a table? Table foo has duplicate entries for Donald Duck: * select * from foo.5. ----------------------------|first_name |last_name ----------------------------|Donald |Duck | | . views and indices column information for object indices for table statistics for objects column information for type user-defined types user information 27. table_name]) ml_stat_procs(pid) ml_tables([owner [. ----------------------------6. 13. Using a temporary table to remove duplicates. Using a temporary table to remove duplicates. |Donald |Duck | 9. last_name from foo. 2. 4. Rename the temporary table to the original table.Page 158 of 259 |Mighty |Donald |Mouse |Duck | | ----------------------------3 rows selected This note describes two approaches for removing the duplicates: 1. Using oid to remove duplicates. * select * from foo2. * from foo. ----------------------------8. select distinct into a temporary table. * drop table foo. 14. 5. 15. |first_name |last_name | 7. ----------------------------11. * create table foo2 as select distinct first_name. |Mighty |Mouse | 10. 2. Don't forget to recreate any indexes and permissions that were on the original table. Here is the original state of table foo that has duplicate entries for Donald Duck: * select oid. * alter table foo2 rename to foo. 3. 1. Using oid to remove duplicates. Drop the first table. ------------------------------------------|oid |first_name |last_name | ------------------------------------------- . Doublecheck the results. The steps for this method are: 1. This method describes how to remove duplicate entries from a table by using the oid. Syntax is for Illustra Version 2. 2. 2 rows selected 12. * select f1. Creating an index automatically updates the statistics for the column(s) being indexed. 17. |Donald |Duck | 30. ----------------------------32.oid::text) 6.last_name).last_name=f2.oid::text > 5. Do this inside a transaction.last_name).first_name. 34. f1. ------------------------------------------10.2001 |202f.first_name 8. for example if the distribution of values in a column changes dramatically. ----------------------------27. and f1. one row selected 15. ----------------------------29. 25. (select min(f2.first_name 22. from foo f1 4. f1. 16.2003 |Donald |Mighty |Donald |Duck |Mouse |Duck | | | ------------------------------------------3 rows selected The goal is to leave the row with the lowest oid in place (202f.last_name=f2. 9.oid::text) 20. 2. If statistics get out of date. Find all rows that have an oid greater than the min oid. one row deleted 24. where f1. 23. + select * from foo. 29. where f1. where f1. from foo f2 21. and don't commit the change unless the results look correct. (select min(f2. |oid |first_name |last_name | 11. ------------------------------------------12. where f1. and f1. |202f. The steps are to: 1. The vacuum command invoked with the statistics modifier updates statistics. * delete from foo f1 18. 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.2002 |202f.last_name 3. Delete all rows that have an oid greater than the min oid. You can look at some of this information with the ml_cstat() and ml_tstat() functions. the optimizer might choose a slower way to execute the query.oid.2003 |Donald |Duck | 13.Page 159 of 259 |202f. 2 rows selected 33. * begin transaction.2001 in this example) and to delete all rows with an oid higher than this one (202f. Change the select query to actually delete the duplicate row.2003 in this example). |Mighty |Mouse | 31. . ------------------------------------------14. |first_name |last_name | 28. + end transaction. 26. from foo f2 7.first_name=f2.oid::text > 19.first_name=f2. for example. For more information. Cartesian Products When you join tables. with the using clause. ----------------------------|tag |name | * select * from spanish. For more information. Can I tell Illustra which index to use? You can provide hints to the Illustra optimizer. How can I tell what indices a table has? The ml_tindex() function lists all indices on a table. you will get many more rows returned than you probably intended. including which index to use. 32. Doing joins with Illustra ref(). the following query list all indices on the tables system catalog: * select * from ml_tindex('tables'). How can I tell which index Illustra is using? Call the trace function with the 'Planner. SQL FAQ: JOINS • • • I get too many rows when I join two tables. For example. see Appendix E of the Illustra User's Guide. make sure that the number of join predicates in the search condition is one less than the number of tables in the from list. --------------------------------------------------------|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. I don't get enough rows when I join two tables.1' argument. see Appendix E of the Illustra User's Guide. ----------------------------|tag |name | ----------------------------|1 |2 |3 |one |two |three | | | ----------------------------|2 |3 |4 |dos |tres |cuatro | | | ----------------------------- ----------------------------- .Page 160 of 259 30. Otherwise. table english and spanish look like this: * select * from english. this is not what you had in mind. --------------------------------------------------------|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. Since there are two tables in the from_list.tag = spanish. you get a cartesian product. For example. one join predicated is needed: * select * from english. tables english and spanish look like this: * select * from english. spanish where english. every possible combination of both: * select * from english.tag.Page 161 of 259 3 rows selected 3 rows selected If you select from both tables without joining them in the where clause. --------------------------------------------------------|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. ----------------------------|tag |name | . ----------------------------|tag |name | * select * from spanish. spanish. This is called an inner join and frequently causes confusion since fewer rows are returned than the user expects. tag. spanish s where e.tag.tag).right outer +--------------+ You can select outer join rows by using not exists.name.name as English. e.tag. ------------------------------------------- . you get only the two rows that have the same tag: * select e. This query fetches the row in english that is not in spanish (the left outer join): * select e.-+ | 4 | cuatro| <--.tag=s.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.name from english e.tag = s. ------------------------------------------|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 | +--------|. e. s. '--no row --' as Spanish from where english e not exists (select * from spanish s where e.. english e.| ------------------------------------------one row selected This query fetches the row in spanish that is not in english (the right outer join): * select '--no entry--' as English. e.tag ------------------------------------------- . spanish s e. s.tag=s.name::text spanish s not exists (select * from english e where e.name::text as English.tag. s.tag) order by 2.name as Spanish from where spanish s not exists (select * from english e where e.tag.tag = s.tag. s.|4 |cuatro | ------------------------------------------one row selected You can string all statements together with union: * select e.name::text. '--no entry--'::text english e not exists (select * from spanish s where e.Page 163 of 259 |English |tag |Spanish | ------------------------------------------|one |1 |--no row -.tag.tag) union select from where '--no entry--'::text.tag). s. s. e.name::text as Spanish from where union select from where e.tag=s.tag=s. ------------------------------------------|English |tag |Spanish | ------------------------------------------|--no entry-. insert into english (name. insert into spanish (name. This section looks at another way to resolve outer join confusions in Illustra by using ref(). insert into spanish (name. tag integer.Page 164 of 259 |English |tag |Spanish | ------------------------------------------|one |two |three |1 |2 |3 |--no entry-. 1). Keep reading.|4 ------------------------------------------4 rows selected If you think this is a lot of trouble to retrieve outer join data. 3 rows updated . tag) values ('one'.tag). 3). insert into english (name. tag) values ('dos'. there's another way to handle known joins in Illustra that will factor in outer join data. tag) values ('two'. 3). create table english of new type english_t (name varchar(20). tag) values ('three'. 2). tag integer). insert into spanish (name. 4). tag) values ('cuatro'. 2).tag = s1. We start by creating the two tables like this and inserting data: create table spanish of new type spanish_t (name varchar(20). tag) values ('tres'.| |dos |tres |cuatro | | | |--no entry-. Next we update the reference in english: * update english set sname = (select unique ref(s1) from spanish s1 where english. insert into english (name. sname ref(spanish_t)). Solving Outer Joins in Illustra with ref() Confusion with outer joins was described above. ------------------------------------------|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).name as english from spanish. deref(ename). You can dereference that oid as follows: * select name as english. deref(sname). * update spanish set ename = (select unique ref(e1) from english e1 where spanish. ------------------------------------------|name |tag |sname | ------------------------------------------|one |two |three |1 |2 |3 |NULL |202d.tag). tag. tag.tag = e1.2002 | | | ------------------------------------------3 rows selected Notice that the select from english returned the oid reference to spanish. ------------------------------------------|spanish |tag |english | ------------------------------------------|dos |tres |2 |3 |two |three | | .Page 165 of 259 * select * from english.2001 |202d. 3 rows updated * select name as spanish.name as spanish from english. function overloading. Oracle PL/SQL FAQ 33. information hiding (all but inheritance). PL/SQL's language syntax. In fact. tag. Many Oracle applications are based on PL/SQL and it would be difficult of Oracle to ever desupport PL/SQL. the reference must be set in the tables that references it.name as spanish from english union select deref(ename).name as english. Many enhancements are still being made to PL/SQL. The PL/SQL language includes object oriented programming techniques such as encapsulation. tag.Page 166 of 259 |cuatro |4 |NULL | ------------------------------------------3 rows selected Finally. Oracle 9iDB supports native compilation of Pl/SQL code to binaries. Should one use PL/SQL or Java to code procedures and triggers? Internally the Oracle database supports two procedural languages. we can use union to select from both: * select name as english. For example. ------------------------------------------|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. 34. What is PL/SQL and what is it used for? PL/SQL is Oracle's Procedural Language extension to SQL. namely PL/SQL and Java. name as spanish from spanish order by 2. This leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in favour of Java?". 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 . structure and data types are similar to that of ADA. PL/SQL and Java appeal to different people in different job roles. all indications are that PL/SQL still has a bright future ahead of it. PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database. deref(sname). This way one can easily revert to previous code should someone make any catastrophic changes.Store code in hist table AFTER CREATE ON SCOTT. TO_CHAR(CREATED. 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. 37. .Create history table AS SELECT SYSDATE CHANGE_DATE. Example: SELECT OBJECT_NAME. 36. 'DD-Mon-RR HH24:MI') CREATE_TIME. 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. LINE FROM USER_SOURCE WHERE UPPER(TEXT) LIKE '%&KEYWORD%'. 'DD-Mon-RR HH24:MI') MOD_TIME. 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. TO_CHAR(LAST_DDL_TIME. Look at this example: CREATE TABLE SOURCE_HIST -.7). CREATE OR REPLACE TRIGGER change_hist -. NAME. 'FUNCTION'. SELECT TYPE.* FROM USER_SOURCE WHERE 1=2. USER_SOURCE.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.1. 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.SCHEMA -. How can one see if somebody modified any code? Code for stored procedures. STATUS FROM USER_OBJECTS WHERE LAST_DDL_TIME > '&CHECK_FROM_DATE'.Change SCOTT to your schema name DECLARE BEGIN if DICTIONARY_OBJ_TYPE in ('PROCEDURE'. set the buffer size to a larger value. Just be careful. end if. there is no "decode" command available. implements a binary wrapper for PL/SQL programs to protect the source code. Can one print to the screen from PL/SQL? One can use the DBMS_OUTPUT package to write information to an output buffer. However. SQLERRM). command. SQL*Plus will display the entire contents of the buffer when it executes this dummy PL/SQL block. EXCEPTION WHEN OTHERS THEN raise_application_error(-20000.* FROM USER_SOURCE WHERE TYPE = DICTIONARY_OBJ_TYPE AND NAME = DICTIONARY_OBJ_NAME. and then EXEC NULL.sql oname=xxxx. In that case.Page 168 of 259 'PACKAGE'. I can print from PL/SQL!!!'). How can I protect my PL/SQL source code? PL/SQL V2. user_source. end. if you print too much. the output buffer will overflow.2. 'TYPE') then -. This is done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than the original). / DBMS_OUTPUT is useful for debugging PL/SQL programs.put_line('Look Ma.2. This way you can distribute software without having to worry about exposing your proprietary algorithms and methods.plb 39. For example: set serveroutput on begin dbms_output. This buffer can be displayed on the screen from SQL*Plus if you issue the SET SERVEROUTPUT ON.Store old code in SOURCE_HIST table INSERT INTO SOURCE_HIST SELECT sysdate. SQL*Plus and SQL*DBA will still understand and know how to execute such scripts.: set serveroutput on size 200000 If you forget to set serveroutput on type SET SERVEROUTPUT ON once you remember. The syntax is: wrap iname=myscript. END. .. eg. available with Oracle7. 'PACKAGE BODY'. / show errors 38. If you haven't cleared the DBMS_OUTPUT buffer with the disable or enable procedure. location. end. 'w'). dept_name. END.FILE_TYPE. UTL_FILE. Copy this example to get started: DECLARE fileHandler UTL_FILE.. DROP.Page 169 of 259 40. EXECUTE IMMEDIATE sql_stmt USING dept_id. Before Oracle 7. -. :2.ORA file (see UTL_FILE_DIR=.PUTF(fileHandler.'). TRUNCATE. :3)'.. NOTE: The DDL statement in quotes should not be terminated with a semicolon. BEGIN fileHandler := UTL_FILE. / 41. sql_stmt := 'INSERT INTO dept VALUES (:1.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command. Can one read/write files from PL/SQL? Included in Oracle 7. Can one call DDL statements from PL/SQL? One can call DDL statements like CREATE. UTL_FILE.. Note that statements are NOT terminated by semicolons: EXECUTE IMMEDIATE 'CREATE TABLE x (a NUMBER)'. parameter). Users running Oracle versions below 8i can look at the DBMS_SQL package (see FAQ about Dynamic SQL). . 'Look ma.Using bind variables. 42.3 is an UTL_FILE package that can read and write operating system files. 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).FOPEN('/tmp'. I''m writing to a file!!!\n').. from PL/SQL by using the "EXECUTE IMMEDATE" statement. 'ERROR: Invalid path for file or path not in INIT.invalid_path THEN raise_application_error(-20000. 'myfile'. The directory you intend writing to has to be in your INIT. EXCEPTION WHEN utl_file.ORA. Look at these examples. etc.FCLOSE(fileHandler). begin EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)'. DBMS_SQL. v_dname.. DBMS_SQL.OPEN_CURSOR. v_rows := DBMS_SQL. DBMS_SQL.PUT_LINE('Deptartment name: '||v_dname). DBMS_SQL. 'CREATE TABLE X (Y DATE)'. v_rows integer. 1.COLUMN_VALUE_CHAR(v_cursor. BEGIN cur := DBMS_SQL.Page 170 of 259 -. One can also use the older DBMS_SQL package (V2.PARSE(cur. sql_stmt := 'SELECT * FROM emp WHERE empno = :id'. / More complex DBMS_SQL example using bind variables: CREATE OR REPLACE PROCEDURE DEPARTMENTS(NO IN DEPT. DBMS_OUTPUT.EXECUTE(v_cursor).OPEN_CURSOR. end loop. Look at these examples: CREATE OR REPLACE PROCEDURE DYNSQL AS cur integer. rc := DBMS_SQL. 1.EXECUTE(cur). DBMS_SQL. v_dname).CLOSE_CURSOR(cur). END. 'select dname from dept where deptno > :x'.. DBMS_SQL.DEPTNO%TYPE) AS v_cursor integer. 20).PARSE(v_cursor.DEFINE_COLUMN_CHAR(v_cursor.V7). end if.FETCH_ROWS(v_cursor) = 0 then exit. BEGIN v_cursor := DBMS_SQL. v_dname char(20).NATIVE). ':x'. loop if DBMS_SQL. DBMS_SQL. DBMS_SQL. EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id.1 and above) to execute dynamic statements. . no).Returning a cursor. rc integer.BIND_VARIABLE(v_cursor. 44. else dbms_output.put_line('False. %TYPE is used to declare a field with the same type as that of a specified table's column. NULL <> NULL'). END.CLOSE_CURSOR(v_cursor).CLOSE_CURSOR(v_cursor). . Any comparison to NULL is evaluated to NULL. b number := NULL. raise_application_error(-20000.put_line('Undefined NULL is neither = nor <> to NULL').empno%TYPE. Look at this code example to convince yourself. / 43. and allows programs to adapt as the database changes to meet new business needs. elsif a<>b then dbms_output. nor it is not equal to NULL. What is the result of comparing NULL with NULL? NULL is neither equal to NULL. NULL = NULL').put_line('True. What is the difference between %TYPE and %ROWTYPE? The %TYPE and %ROWTYPE constructs provide data independence. view or cursor. end if. EXCEPTION when others then DBMS_SQL.Page 171 of 259 DBMS_SQL. declare a number := NULL. begin if a=b then dbms_output. Example: DECLARE v_EmpNo emp. 'Unknown Exception Raised: '||sqlcode||' '||sqlerrm). reduces maintenance costs. %ROWTYPE is used to declare a record with the same types as found in the specified database table. Example: DECLARE v_EmpRecord emp%ROWTYPE. Results are passed back on a different database pipe.Employee is '||emp_rec.. DECLARE CURSOR dept_cur IS SELECT deptno FROM dept ORDER BY deptno. END LOOP.Page 172 of 259 end.deptno)).ename). How does one get the value of a sequence into a PL/SQL variable? As you might know. one can write an external program (using one of the precompiler languages. Oracle (for some silly reason) prohibits this: i := sq_sequence. the listener picks it up and run the requests.put_line('.NEXTVAL into :i from dual.Employee cursor all employees for a dept number CURSOR emp_cur (v_dept_no DEPT.DBMS_PIPE). BEGIN FOR dept_rec IN dept_cur LOOP dbms_output. FOR emp_rec in emp_cur(dept_rec. Look at this External Procedure example. For an Pro*C example. 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. OCI or Perl with Oracle access modules) to act as a listener on a database pipe (SYS. How does one loop through tables in PL/SQL? Look at the following nested loop code example. 45. In Oracle8 one can call external 3GL code in a dynamically linked library (DLL or shared object). see chapter 8 of the Oracle Application Developers Guide. 46.DEPTNO%TYPE) IS SELECT ename FROM emp WHERE deptno = v_dept_no. Your PL/SQL program then put requests to run commands in the pipe.. One just write a library in C/ C++ to do whatever is required.put_line('Employees in Department '||TO_CHAR(dept_rec. one cannot use sequences directly from PL/SQL. one can use embedded SQL statements to obtain sequence values: select sq_sequence. Defining this C/C++ function to PL/SQL makes it executable. However.NEXTVAL.deptno) LOOP dbms_output. -. However. 47. . .. A mutating table is a table that is currently being modified by an update.Page 173 of 259 END LOOP. Choose one of the following solutions: -.. IF mod(i. the sooner the extents in the rollback segments will be cleared for new transactions. COMMIT. it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state. or insert statement. . END LOOP.. / 48.. Move all the tables to one user/schema. to .. If you still get ORA-1555 errors. 50.. The consequence is that a SQL statement can work in SQL*Plus. contact your DBA to increase the rollback segments. delete.do some stuff. What is a mutating and constraining table? "Mutating" means "changing". END. is not supported by the ANSI standard.. one should COMMIT less frequently within a PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. NOTE: Although fetching across COMMITs work with Oracle. FOR records IN my_cursor LOOP . END LOOP.. I can SELECT from SQL*Plus but not from PL/SQL. When a trigger tries to reference a table that is in state of flux (being changed). 10000) THEN COMMIT. i := i+1. causing ORA-1555 errors.emp TO my_user. but does not observe privileges given through roles.do some stuff.. What is wrong? PL/SQL respect object privileges given directly to the user.. The higher the frequency of commit.. END IF.. 49. but will give an error in PL/SQL. How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy? Contrary to popular believe. Do not use roles! GRANT select ON scott.Commit every 10000 records • • • • Grant direct access on the tables to your user. To fix this problem one can easily rewrite code like this: FOR records IN my_cursor LOOP . Define your procedures with invoker rights (Oracle 8i and higher). Unlike Oracle Forms. the workaround is to enforce the referential integrity through triggers as well. A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete. (Of course. Is there a PL/SQL Engine in SQL*Plus? No. END. Oracle SQL*Loader FAQ 54.do something with TabX from database B null. If you must have triggers on tables that have referential constraints. all your PL/SQL code is sent directly to the database engine for execution. / 52. / -. Thus. What is SQL*Loader and what is it used for? .Page 174 of 259 Another way this error can occur is if the trigger has statements to change the primary. 53.Database A: receives a PL/SQL table from database B CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL. There are several restrictions in Oracle regarding triggers: • • A row-level trigger cannot query or modify a mutating table. 51. BEGIN pcalled@DBLINK2(TabX). At that stage procedures executed faster than triggers as triggers had to be re-compiled every time before executed (unless cached). This makes it much more efficient as SQL statements are not stripped off and sent to the database
[email protected] B: sends a PL/SQL table to database A CREATE OR REPLACE PROCEDURE pcalling IS TabX DBMS_SQL. SQL*Plus does not have an embedded PL/SQL engine. NEW and OLD still can be accessed by the trigger) . foreign or unique key columns of the table off which it fires. Look at this example: -. 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. 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. 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. END. Note that it is not enough to just use the same type definitions.VARCHAR2S) IS BEGIN -. selective loading. but comes with more options. Its syntax is similar to that of the DB2 Load utility. Can one skip header records load while loading? Use the "SKIP n" keyword.B.Page 175 of 259 SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database. data2 POSITION(6:15) ) BEGINDATA 11111AAAAAAAAAA 22222BBBBBBBBBB 56. and multi-table loads. where n = number of logical rows to skip." If you need to load positional data (fixed length). data2 ) BEGINDATA 11111.C.D. 55." OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS ( data1. look at the following control file example: LOAD DATA INFILE * INTO TABLE load_positional_data ( data1 POSITION(1:5). Can one load variable and fix length data records? Yes. data2 POSITION(6:15) ) . In the first we will load delimited data (variable length): LOAD DATA INFILE * INTO TABLE load_delimited_data FIELDS TERMINATED BY ". Look at this example: LOAD DATA INFILE * INTO TABLE load_positional_data SKIP 5 ( data1 POSITION(1:5). SQL*Loader supports various load formats.AAAAAAAAAA 22222."A. look at the following control file examples. Note that this only applies for the conventional load path and not for direct path loads. null. mailing_addr "decode(:mailing_addr. mailing_state ) "my_db_sequence. Can one modify data as it loads into the database? Data can be modified as it loads into the Oracle Database. :city. null.txt' BADFILE 'bad_orders. POSITION(16:22)"to_date(:data3. POSITION(6:15) "upper(:data2)". "to_char(SYSDATE. :mailing_addr)". POSITION(1:5) ":data1/100".nextval".Page 176 of 259 BEGINDATA 11111AAAAAAAAAA 22222BBBBBBBBBB 57. LOAD DATA INFILE * INTO TABLE modified_data ( rec_no region time_loaded data1 data2 data3 ) BEGINDATA 11111AAAAAAAAAA991201 22222BBBBBBBBBB990112 LOAD DATA INFILE 'mail_orders." ( addr. 'HH24:MI')". :addr. mailing_city "decode(:mailing_city. :mailing_city)".txt' APPEND INTO TABLE mailing_list FIELDS TERMINATED BY ". zipcode. CONSTANT '31'. state. 'YYMMDD')" . city. from Oracle 8i one can specify FILLER columns. ignoring fields that one does not want. 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. POSITION(01:11) INTEGER EXTERNAL.dis' APPEND INTO TABLE my_selective_table WHEN (01) <> 'H' and (01) <> 'T' and (30:37) = '19991217' ( region service_key call_b_no ) 60.bad' DISCARDFILE 'mydata. (01) is the first character. deptno POSITION(17:18) CHAR. mgr ) INTO TABLE proj WHEN projno != ' ' ( projno POSITION(25:27) INTEGER EXTERNAL. Can one selectively load only the records that one need? Look at this example.dat' BADFILE 'mydata. (30:37) are characters 30 to 37: LOAD DATA INFILE 'mydata. POSITION(12:29) CHAR POSITION(20:23) INTEGER EXTERNAL . Look at this example: LOAD DATA TRUNCATE INTO TABLE T1 CONSTANT '31'. FILLER columns are used to skip columns/fields in the load file. ename POSITION(6:15) CHAR. Luckily. Can one skip certain columns while loading data? One cannot use POSTION(x:y) with delimited data. empno POSITION(1:4) INTEGER EXTERNAL ) 59.Page 177 of 259 58. SQL*Plus's predecessor was called UFI (User Friendly Interface).sql SET Modify the SQL*Plus environment eg. 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. UFI was included in the first releases of Oracle.use when SQL*Loader should combine the same number of physical records together to form one logical record.' ( field1. 62. It can be used interactively or driven from scripts. Make sure you have big rollback segments ready when you use a high value for ROWS=.use if a condition indicates that multiple records should be treated as one. its interface was extremely primitive and anything but user friendly. How can get SQL*Loader to COMMIT only at the end of the load file? One cannot. committing can be reduced. SPOOL Send output to a file. by having a '#' character in column 1.lst START Run a SQL script file (short: @) . 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: . 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. field2 FILLER. SQL*Plus is frequently used by DBAs and Developers to interact with the Oracle database. Eg. field3 ) 61. 64. 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. but by setting the ROWS= parameter to a large value. CONTINUEIF . 63. Eg SHOW ALL.Page 178 of 259 FIELDS TERMINATED BY '. SET PAGESIZE 23 SHOW Show environment settings (short: SHO). Eg "save x" will create a script file called SAVE x. Eg "spool x" will save STDOUT to a file called x. SHO PAGESIZE etc. This is normally used for nested command files. 66. Eg: SQL> SELECT * FROM TAB WHERE TNAME LIKE '%&TABLE_NAME.buf" 65. the last SQL or PL/SQL command will be saved to a file called AFIEDT.Page 179 of 259 65. "&&" 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. The name "Advanced UFI" was never used officially. short for UFI editing buffer.buf".buf" and then to "afiedt.%'. They presumably needed to keep the name short for compatibility with some of the odd operating systems that Oracle supported in those days. When new features were added to UFI. 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 .BUF is the SQL*Plus default edit save file. as the name was changed to SQL*Plus before this version was released.buf". it was the initially named Advanced UFI and the filename was changed to "aufiedt. What is the difference between @ and @@? The @ (at symbol) is equivalent to the START command and is used to run SQL*Plus command scripts. Once you have entered a value it will use that value every time the variable is referenced. @@ 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). You can overwrite the default edit save file name like this: SET EDITFILE "afiedt. 67. or one that is found in you SQLPATH or ORACLE_PATH. the file name was "ufiedt.BUF and opened in the default editor. A single @ symbol runs the script in your current directory. What is AFIEDT. When you issue the command "ed" or "edit" without arguments.BUF? AFIEDT. 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. or one specified with a full or relative path. In the prehistoric days when SQL*Plus was called UFI. There are many which developers should be aware of such as DBMS_SQL. UTL_FILE. If they can mention a few of these and describe how they used them. 72.sql var1 var2 var3 Parameter var1 will be mapped to SQL*Plus variable &1. Can one send operating system parameters to SQL*Plus? One can pass operating system variables to sqlplus using this syntax: sqlplus username/password @cmdfile.Page 180 of 259 These settings can also be entered on one line. exit 5. 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. even better. - 70. DBMS_TRANSACTION. 69. It occurs because the trigger is trying to update a row it is currently using. If they include the SQL routines provided by Oracle. When is a declare statement needed ? . DBMS_PIPE. DBMS_OUTPUT. IMAGE FROM IMAGES. but not really what was asked. great. Look at this example: COPY FROM SCOTT/TIGER@LOCAL_DB TO SCOTT/TIGER@REMOTE_DB CREATE IMAGE_TABLE USING SELECT IMAGE_NO. etc. 71. eg.sql '"test parameter"' dual Where x.sql consists of: select '&1' from &2. DBMS_JOB. or RECORD. They can be used to hold values for use in later queries or calculations. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other. DBMS_UTILITY. In Oracle 8 they will be able to be of the %ROWTYPE designation. What packages (if any) has Oracle provided for use by developers? Oracle provides the DBMS_ series of packages. Describe the use of PL/SQL tables Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer. var2 to &2. DBMS_LOCK.: SET ECHO OFF NEWPAGE 0 SPACE 0 PAGESIZE 0 FEED OFF HEAD OFF TRIMSPOOL ON 68. Look at this example: sqlplus scott/tiger @x. DBMS_DDL. 73. DBMS_ALERT. What is a mutating table error and how can you get around it? This happens with triggers. place the ampersanded variable in the code itself: “select * from dba_tables where owner=&owner_name.. 74. 77. 83. what is this called and give an example This is called dynamic SQL. 76. What are the types of triggers? There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE. 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 new package UTL_FILE can also be used.Page 181 of 259 The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone. UPDATE. 78. 81. You want to use SQL to build SQL.” . &2. 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. These are especially useful for the WHEN OTHERS exception. TABLE. How can you find within a PL/SQL block. 75. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. You want to include a carriage return/linefeed in your output from a SQL script.. Another method. INSERT.&8) to pass the values after the command into the SQLPLUS session. 82. How can you call a PL/SQL procedure from SQL? By use of the EXECUTE (short form EXEC) command. although it is hard to document and isn’t always portable is to use the return/linefeed as a part of a quoted string.. how can you do this? The best method is to use the CHR() function (CHR(10) is a return/linefeed) and the concatenation function “||”. non-stored PL/SQL procedures. but this only shows errors. a single ampersand will cause a reprompt for the value unless an ACCEPT statement is used to get the value from the user. They can be used in exception handling to report. 80. the error that occurred in the code. Another possible method is to just use the SHOW ERROR command. 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. How can variables be passed to a SQL routine? By use of the & symbol. 79. store in an error log table. The SQLERRM returns the actual error message for the last error encountered. How can you generate debugging output from PL/SQL? Use the DBMS_OUTPUT package.. if a cursor is open? Use the %ISOPEN cursor status variable. or. Use of double ampersands tells SQLPLUS to resubstitute the value for each subsequent use of the variable.sql . An example would be: set lines 90 pages 0 termout off feedback off verify off spool drop_all. It must come first in a PL/SQL stand alone file if it is used. AFTER. To be prompted for a specific variable. ROW. 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. For passing in variables the numbers 1-8 can be used (&1. DELETE and ALL key words: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT etc. What SQLPlus command is used to format output from a select? This is best done with the COLUMN command. 85. the network manager complains about the traffic involved. 89. min(sum_of_cost). The explain_plan table is then queried to see the execution plan of the statement. STAR. 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. item_no Expected answer: The only column that can be grouped on is the “item_no” column. What is explain plan and how is it used? The EXPLAIN PLAN command is a tool to tune SQL statements..Page 182 of 259 select ‘drop user ‘||username||’ cascade. This is created using the utlxplan. 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. The PAGESIZE and LINESIZE options can be shortened to PAGES and LINES.) and that you need to concatenate using the ‘||’ the values selected from the database. 84. What is the default ordering of an ORDER BY clause in a SELECT statement? Expected answer: Ascending 91.CASCADE.. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines long with a line width of 80 characters. You want to group the following set of select returns. If they can give some example hints such as FIRST ROWS. Explain plans can also be run using tkprof. The result set of a three table Cartesian product will have x * y * z number of rows where x. This will result in only the data required for the join being sent across.rowid > (select min(x. 88. y. You want to determine the location of identical rows in a table before attempting to place a unique index on the table. 90. z correspond to the number of rows in each table involved in the join. count(item_no). they must all be used in the where clause.emp_no = e. how can this be done? Oracle tables always have one guaranteed unique column.rowid) from emp x where x. spool off Essentially you are looking to see that they know to include a command (in this case DROP USER. 86. For example: select rowid from emp e where e.’SYSTEM’). the rest have aggregate functions associated with them.sql script. In the situation where multiple columns make up the proposed key. what can you group on? Max(sum_of_cost). 87. What is a Cartesian product? A Cartesian product is the result of an unrestricted join of two or more tables. the rowid column. 92. even better. ALL ROWS. You are joining a local and a remote table. USING INDEX.’ from dba_users where username not in (“SYS’. 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. .emp_no). 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. To use it you must have an explain_table generated in the user you are running the explain plan for. Pmon Clears and Frees resources that process was using. b) LogWriter (LGWR): LogWriter writes the redo log entries to disk. This option can be shortened to TERM. 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. This is required since the data is not written whenever a transaction is committed. There are basically 9 Processes but in a general system we need to mention the first five background processes. 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. c) System Monitor (SMON): The System Monitor performs instance recovery at instance startup. LGWR writes log entries into a online redo log file. e) Checkpoint (CKPT): At Specified times. As transactions commit and log buffer fills. 95. 94. Setting TERMOUT OFF turns off screen output. Redo Log data is generated in redo log buffer of SGA. How do you prevent output from coming to the screen? The SET option TERMOUT controls output to the screen.Page 183 of 259 93. This is useful for recovery from system failure d) Process Monitor (PMON): The Process Monitor performs process recovery when user Process fails. They do the house keeping activities for the Oracle and are common in any system. What are Background processes in Oracle and what are they. How do you generate file output from SQL? Expected answer: By use of the SPOOL command 96. 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 :: . f. b.g :: Alter Statements. Oracle uses an implicit cursor statement for Single row query and Uses Explicit cursor for a multi row query.g:: Using the Sql Statements in languages such as 'C'. .Page 184 of 259 We can have upto 10 lock processes for inter instance locking in parallel sql. According to ANSI. 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 . Rollback A transaction that retracts any of the changes resulting from SQL statements in Transaction. intermediate markers or savepoints are declared.S in Programming Language. They are a) Data Defination Language(DDL) : The DDL statments define and maintain objects and drop objects. 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. c.e. Committing A transaction is said to be commited when the transaction makes permanent changes resulting from the SQL statements. 99.g:: Alter System e) Embedded Sql Incorporate DDL. Set Role d) System Control Statements Change Properties of Oracle Instance . Cursor A cursor is a handle (name or a pointer) for the memory associated with a specific statement.e. e.e. A cursor is basically an area allocated by Oracle for executing the Sql Statement. a transaction begins with first executable statment and ends when it is explicitly commited or rolled back.C.Fetch. b) Data Manipulation Language(DML) : The DML statments manipulate database data. Key Words Used in Oracle The Key words that are used in Oracle are: a. Rolling Forward :: Process of applying redo log during recovery is called rolling forward. execute and close 98.DML and T. SavePoint For long transactions that contain many SQL statements. System Global Area(SGA) :: d. 97. Open. How many types of Sql Statements are there in Oracle There are basically 6 types of sql statments. Savepoints can be used to divide a transaction into smaller points. g. 102. variables and other Package Contents 101. k. What are Procedure. Procedures do not Return values while Functions return one One Value Packages Packages Provide a method of encapsulating and storing related procedures. c) Business Integrity Rules :: . Process A Process is a 'thread of control' or mechansim in Operating System that executes series of steps. How many Integrity Rules are there and what are they There are Three Integrity Rules. h. What are Database Triggers and Stored Procedures Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in.A total of 6 combinations At statement level(once for the trigger) or row level( for every execution ) 6 * 2 A total of 12. The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format. Program Global Area (PGA) :: The PGA is a memory buffer that contains data and control information for server process. 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. update . They are basically used for backup when a database crashes. 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.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. or delete from table. j. Database Buffer Cache :: Database Buffer of SGA stores the most recently used blocks of database data.3 Onwards. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules. Redo log Buffer Redo log Buffer of SGA stores all the redo log entries.g. update to. The set of database buffers in an instance is called Database Buffer Cache. i. We can have the trigger as Before trigger or After Trigger and at Statement or Row level. 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. Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.When there is data in Child Tables the Master tables cannot be deleted. 100. b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced. They are as follows :: a) Entity Integrity Rule :: The Entity Integrity Rule enforces that the Primary key cannot be Null. e. Stored Procedures Stored Procedures are Procedures that are stored in Compiled form in the database.It consists of Database Buffer Cache and Redo log Buffer. functions.after 3*2.delete 3 before . operations insert. Rowid from dept where (Deptno > 25) c) Optimize_Sql :: By setting the Optimize_Sql = No. The Detail records are shown when the Master Record are shown. c) Deferred with No Auto Query The operator must navigate to the detail block and explicitly execute a query 105.'1'. b) Deferred with Auto Query Oracle Forms defer fetching the detail records until the operator navigates to the detail block.'2'. 103. 104.Loc. Here the Null is the else statement where null is done . Oracle Forms assigns seperate cursor only for each query SELECT statement. 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. What are the Various Master and Detail Relation ships. f45run module = my_firstform userid = scott/tiger optimize_sql = No d) Optimize_Tp :: By setting the Optimize_Tp= No.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed.'First'. When no_data_found. What are the Various Block Coordination Properties The various Block Coordination Properties are a) Immediate Default Setting.Page 186 of 259 The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules. They are a) System Exceptions e.'Second'Null). 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.OPTIMIZER_HINT. All other SQL statements reuse the cursor. My_exception exception When My_exception then 108. 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.g. Oracle Forms assigns a single cursor for all SQL statements.How many types of Exceptions are there There are 2 types of exceptions.g. When too_many_rows b) User Defined Exceptions e.Dname. Select /*+ First_Rows */ Deptno. 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 . 107.'FIRST_ROWS'). 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'.e. f45run module = my_firstform userid = scott/tiger optimize_Tp = No 106.g select DECODE (EMP_CAT. Data Files. Once the Data file is created the size cannot change. Parameter Files . They store the data for the database. Views are built using the columns from one or more tables. Every data file is associated with only one database. Unique key is also useful for identifying the distinct rows in the table. 115. Oracle does implement the OOPS concepts. 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. What is the difference between candidate key. What is concurrency Cuncurrency is allowing simultaneous access of same data by different users. e. Data Files Every Oracle Data Base has one or more physical data files.This lock should not be applied when we do only select from the row. 116.Parameter File. We can categorise the properties by setting the visual attributes and then attach the property classes for the objects. Locks useful for accesing the database are a) Exclusive The exclusive lock is useful for locking the row when an insert. The best example is the Property Classes. Previleges and Grants Privileges are the right to execute a particulare type of SQL statements.Page 187 of 259 111.update or delete is being done. 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.The grant has to be given by the owner of the object. When a database is created two table spaces are created. Right to resource Grants are given to the objects so that the object might be accessed accordingly. What are the OOPS concepts in Oracle. Control Files Table Space :: The table space is useful for storing the data in the database. Right to create. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects 113. The Single Table View can be updated but the view with multi table cannot be updated 112. 114. To increase the size of the database to store more data we have to add data file. b) Share lock We can do the table as Share_Lock as many share_locks can be put on the same resource. What are snap shots and views Snapshots are mirror or replicas of tables.g :: Right to Connect. Table Space. What is a 2 Phase Commit Two Phase commit is used in distributed data base systems.g. It contains DML statements or Remote Procedural calls that reference a remote object.redo log files and time stamp. 117. 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. What is Row Chaining The data of a row in a table may not be able to fit the same data block. data files . Segments Set of Extents allocated for Extents. What are Codd Rules Codd Rules describe the ideal nature of a RDBMS. 120. 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. 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.:: Pctfree 20. 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. name and location of dbs. 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 mutating tables When a table is in state of transition it is said to be mutating. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg. 123.acme lang Control Files Control files record the physical structure of the data files and redo log files They contain the Db name.s. . 122. Pctused 40 119.:: db_block_buffers = 500 db_name = ORA7 db_domain = u. A parameter file contains the list of instance configuration parameters e. Data for row is stored in a chain of data blocks . 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. a) Prepare Phase :: Global coordinator asks participants to prepare b) Commit Phase :: Commit all participants to coordinator to Prepared. Physical Storage of the Data The finest level of granularity of the data base are the data blocks. There are basically 2 phases in a 2 phase commit. Read only or abort Reply 121. This is useful to maintain the integrity of the database so that all the users see the same values.Page 188 of 259 Parameter file is needed to start an instance. 126. 130. but you cannot insert. what are the data types supported By oracle (INTERNAL)? Varchar2. Where do u decalare Global Variable in Package? Ans: Package Specification 136. Can you use select in FROM clause of SQL select ? Yes. 133. With respect to table ALTER TABLE TABLE [ DISABLE all_trigger ] 128. 135. 132. Can not applied for HASH.Page 189 of 259 124. MLSLABEL. rows are stored together based on their cluster key values . Can U disable database trigger? How? Yes. Char. How many columns can table have? The number of columns in a table can range from 1 to 254. or delete their values. You can select from pseudocolumns.%ROWCOUNT 134. but is not actually stored in the table.There are mainly 5 Normalisation rules. %NOTFOUND . update. what is clustered index? In an indexed cluster. Deleting the Duplicate rows in the table We can delete the duplicate rows in the table by using the Rowid 127. %ISOPEN. 131. This section describes these pseudocolumns: * CURRVAL * NEXTVAL * LEVEL * ROWID * ROWNUM 129. Can u create procedure or function without declaring it in Package specs? . What are attributes of cursor? %FOUND . Number. What is pseudo columns ? Name them? A pseudocolumn behaves like a table column. What is Normalisation Normalisation is the process of organising the tables to remove the redundancy. 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. 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. Is space acquired in blocks or extents ? In extents . Private func f4(){}. i grant select on scott1.It is used to retrack wrongly committed transaction . Rollback Segment is being replaced by Undo Tablespace. open a new session and execute first statement as select sequence.t1.Private end. 8i.. -. pack body p1. How many types of Triggers.t1 to scott.Public function end. 7. 139.. func f1(). what is private function and public functions in package? Ans: If the function is declared in Package Specification then it is called Public Function. First time we have to fire next val & then only we can use currval. -. how do u call private functions in package? Ans: pack spcs p1.Page 190 of 259 Ans: YES. 9i ( undo tablespace) Ans: 9i New Features-------------1. -. I have t1 table in scott . -.. -. (We can use either) 2... now i create a synonym for scott1. to call private call it in public function and public fun can be called from outside.. (24) 142.x. Same name can not be used 141. 138. will it give runtime error or error while creating synonym? Ans: This will give an error.. and same i have scott1 schema with same name. what happenes when it is created. what will happene? Ans:It will give an error..public func f3(){}. If the function is not declared in Package Specification then it is called Private Function. 8. create a syquence. func f1(){}. tell me diff between . 137. It is called private procedure.. 140. -.Public function func f2().. Flashback Query . Public function can be called outside of Package.public func f2(){}. currval from dual. Private function can not be called outside of Package. Buffer catche size is now dynamic (upto 4 different sizes can be specified for buffers) 143.. 148. Memory Tuning. Database Tuning. types of tuning? Ans: Application Tuning. but it is NOT if more than one tables) 146..Table can be partitioned on a list 5. 144. Are views updatable? Ans: Yes (Only if the view is based on one table.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... 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. will generate updated table) 4. Form Builder determines the available locking facilities and behaves as much like Immediate as possible. which does not physically store data.. O/S Tuning 147. For other datasources. Delayed:. List Partition . Create table as select * from . Why instade of trigger is created? Ans: To Insert/Update/Delete record from base table for any view operation 145.Form Builder locks the row only while it posts the transaction to the database. Online Table Creation (e. locking mode property of block(Immediate/Automatic/Delayed) Automatic (default):.Identical to Immediate if the datasource is an Oracle database.Page 191 of 259 3. What is Function Over loading? .g. what is view? Ans: View is a virtual table (or logical container of data).. Immediate:. PROGRAM_ERROR. INVALID_CURSOR. Each element has a unique subscript that determines its position in the collection. So. then use them programmatically in your applications. How can we return a value in procedures? By using in. collections can store instances of an object type and (except for index-by tables) can be attributes of an object type. you can pass collections as parameters. Ans: REF Cursor is like Pointer whereas PL/SQL Table is like ARRAY. ZERO_DIVIDE 153. 156. use it in “<<label name>>” structure 152. 149. 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). What is the difference between REF Cursor & PL/SQL Table. However. VALUE_ERROR. INVALID_NUMBER. collections can have only one dimension and must be indexed by integers. What are the types of Variable binding? Ans: Two types of binding Early Binding (at compile time) Late Binding (Runtime) 154. NO_DATA_FOUND. What are the user defined data types ? Ans: 1. Collections work like the arrays found in most third-generation programming languages. Structured Types Object Types Collection Types Varray Nested Tables REFS (To object Types) 155. Also. Items of type VARRAY are varrays (short for variable-size arrays). all of the same type (for example. you can use them to move columns of data into and out of database tables or between client-side applications and stored subprograms. PL/SQL offers two collection types.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. How can we know that proc has passed a value ? Ans: We can check it using “IN” or “OUT” or “INOUT” parameter. 157. the grades for a class of students). What are the exceptions in PL/SQL Block? Ans: CURSOR_ALREADY_OPEN. In addition. . What Is a Collection? A collection is an ordered group of elements. DUP_VAL_ON_INDEX. Can we use label for anonymous PL/SQL block? Ans: Yes. What are the features of OOPS used in PL/SQL ? Ans: Inheritance – Reusability Abstract Datatype Method Overloading 151. You can define collection types in a package. out parameters we can return the values in procedures 150. 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. 3. or delete data from Oracle (and other) databases.0/ 6i and 9i FAQ 1. pass varchar2(10). 2. access.5/ 5. END LOOP 4.Last_Record = 'TRUE') THEN Go_Record(OriPos). END IF. . So.Trigger_Record). What is Oracle Forms and what is it used for? Oracle Forms is a 4GL Rapid Application Development (RAD) environment. You can bypass this screen or customise it by displaying your own logon screen. Code example: OriPos := TO_NUMBER(:System. and database to connect to. LOOP -. 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. Forms Builder is used to create applications to enter. Oracle Forms is part of the Oracle Internet Developer Suite (iDS). you have to regenerate them when ever you change the operating system or the Forms version. ELSE Next_Record. Eg: ON-LOGIN declare uname varchar2(10). EXIT.do processing IF (:System.Page 193 of 259 Oracle Forms 4. It was previously called SQL*Forms. Forms can also be deployed across the Web using the Oracle Internet Application Server (iAS) Forms Services. FMB's are not. 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. First_Record. The Forms Runtime environment is required to execute compiled Forms modules. password. On the other hand. Can an Forms FMX be moved from one operating system to another? FMX files are operating system dependent.0/ 6. change. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. A statement like CREATE TABLE X (A DATE). What should I do? How to get around the "can't use a restricted built-in in built-in XXX" message: 1. will result in error: Encountered the symbol "CREATE" which is a reserved word. 8. 15). MAXIMIZE). pass||'@connect_database').Page 194 of 259 begin uname := 'username'. 7. Examples: set_window_property(FORMS_MDI_WINDOW. end. 7. How does one suppress or customize error messages in Forms? One can either set the message level using the system variable SYSTEM. FORMS_DDL can also be used to create dynamic SQL statements at runtime. DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure. set_window_property(FORMS_MDI_WINDOW. 9. Forms run inside a Windows Multiple-Document Interface (MDI) window. you can use the FORMS_DDL built-in to execute DDL statements. Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism. . logon(uname. 6. set_window_property('my_window_name'. Can one execute dynamic SQL from Forms? Yes.WINDOW_STATE. Create a TIMER at the point where you want the navigation to occur. 5. MINIMIZE). pass :='password'. Eg: FORMS_DDL('CREATE TABLE X (A DATE)'). Forms won't allow me to use restricted built-in's. WINDOW_STATE.MESSAGE_LEVEL or trap the errors using the ON-ERROR or ON-MESSAGE triggers. Can one Maximize/ Minimize a Window in Forms? On MS-Windows. Can one issue DDL statements from Forms? DDL (Data Definition Language) commands like CREATE. POSITION. Eg: FORMS_DDL('INSERT INTO X VALUES (' || col_list || ')'). The FORMS_SUCCESS built-in can be used to determine if the last executed built-in was successful. However. use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. BUSY.5. To display messages immediately. END IF. INSERTION and CROSSHAIR. BUSY). 2. Code a WHEN-TIMER-EXPIRED trigger to handle the navigation DECLARE tm_name VARCHAR2(20). but you can download it from here: . BEGIN tm_name := Get_Application_Property(TIMER_NAME). HELP. SQL*Menu is fully integrated into Oracle Forms. Dirty but effective (didn't Oracle promise to fix this feature?).MMB) and generate it to Menu Module Executables (*. What happened to SQL*Menu? From Forms V4. or with no mode specification at all. 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). your message may or may not be displayed. Eg: SET_APPLICATION_PROPERTY(CURSOR_STYLE. The following cursor styles are supported: DEFAULT. 11. 14. 10.'). How does one create a custom toolbar? Create a new block. create_timer('TIMER_X'. synchronize. Application menus can be added to your application by creating Menu Modules (*.Page 195 of 259 Eg. 13. NO_REPEAT). use the SYNCHRONIZE build-in: message('. let's name it "TOOLBAR" and a canvas named "C_TOOLBAR" (for ilustration purposes).. 12. How does one compile MS Help files? The Microsoft Help Compiler does not ship with Designer/2000 or Developer/2000. Put some iconic buttons on your canvas. Why doesn't my messages show on the screen? Regardless of whether you call the MESSAGE() built-in with ACKNOWLEDGE.MMX). 5. END. Can one change the mouse pointer in Forms? The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow one to change the mouse pointer. NO_ACKNOWLEDGE. This can also be used to execute a query while the user is looking at the results of a previous query. This is because messages are displayed asynchronously.. IF tm_name = 'TIMER_X' THEN Go_Item('ITEM_X'). TEXT_IO. @echo. BEGIN= file1 := TEXT_IO.FOPEN( 'output. PUT.FCLOSE( file1 ). 15. 16. file2 := TEXT_IO. str ). | Create runtime FMXs from source FMBs @echo.txt'. How can I generate all my forms in a batch? Look at this DOS Batch file example: @echo off @echo. | @echo.FOPEN( 'input. TEXT_IO. Example: DECLARE file1 TEXT_IO.'r' ). How can I read/write OS Files from Forms? OS files can be read/written from Forms using the TEXT_IO package in Forms.BAT @echo.GET_LINE( file1. GET_LINE. Username/Password@connect_string = %1 @echo. IF %1 == "" GOTO END . TEXT_IO. str VARCHAR2(80). +---------------------------------------------------------@echo.FCLOSE( file2 ). END.Page 196 of 259 Help Compiler . +---------------------------------------------------------@echo.FILE_TYPE. | FMXGNALL. file2 TEXT_IO. PUT_LINE & PUTF and a function FOPEN. The TEXT_IO package has a datatype FILE_HANDLE. +---------------------------------------------------------@echo.txt'. It also has procedures FCLOSE. | Will convert ALL of the fmbs in the current direcotry @echo.FILE_TYPE. 'w' ).BAT username/password@connect string @echo. TEXT_IO. str ). | @echo. NEW_LINE. | Usage : FMXALL.FTP Sites Note: Designer/2000 includes a Help Generator that can generate source files for the Help Compiler.PUT_LINE( file2. What is Forms and Reports Services? .5.0 for a couple of reasons: • • • • You need to design on a PC and frequently get compatibility problems (font scaling.0 terminal users at all.0 back for terminal users. @echo.5/ 5. I think Oracle should bring SQL*Forms v3. They could rename the product to Oracle Forms for Terminals. The largest Oracle Forms customers still runs on Forms V3.Page 197 of 259 @echo Removing old FMX files del *.5 uses too much memory and executables are about 400% larger than for its 3. If you generate for a terminal environment (character based). Oracle Forms and Reports Services FAQ 1. etc). rather it is a step backwards. @echo Done!!! Remember to move the FMX files into your runtime directory.0 and will rather throw out Oracle than to convert to Forms 4.0/ 6.0 counter part. How does one get a form to run on Unix? You need to design your form on your workstation. :END 17. FOR %%F in (*. replace FORM with LIBRARY. MVS and VMS users do not like Forms 4. FTP or copy the Forms's FMB file to the Unix box. Use the "f45run" command to run your form. Use f45genm to generate your form in a Motif environment. Forms 4.fmx @echo Creating the new FMX files rem Change f45gen32 to f45gen if in 16 bit environment. Why do terminal users hate Forms? Most Unix. or something. Forms 4. the syntax is: f45gen USERID=userid/passwd@db_name MODULE_TYPE=FORM MODULE=module_name If you want to generate a Library file.5 is no improvement for Forms 3.fmb) DO start /w f45gen32 userid=%1 batch=y module=%%F @echo. inheritance property 2) OVERLOADING : procedures and functions. 4) Can you issue DDL in forms? 4) Yes.. Copy or FTP the Form's FMB file to the server where the Forms Services are running. 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.DATE_THRESHOLD SYSTEM. WebForms consist of a Forms client (downloadable Java applet) and FormsServer (Java NCA Cartridge).5 object oriented tool and why? 3) Yes.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.5 Questions 1) which system variables can be set by users? 1) SYSTEM. 2. . How does one deploy a Form on the Web? Follow these steps to deploy a Form on the Web: 1. 3.htm.MESSAGE_LEVEL SYSTEM. Some people also refer to it as the Forms and Reports Server.. 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. any web server that supports CGI (Common Gateway Interfaces) can be used. Re-compile the Form to a FMX Etc. WebForms can be centrally deployed and managed and provides a nice thin client implementation. the 4. Change host_name and port to the server where you HTTP server is running. With Oracle's Forms and Reports Services one can web-enable existing Oracle Developer (Forms and Reports) applications without changing any application code. Referencing an object is similar to copying an object. 3) Is forms 4. Forms and Reports services as previously known as WebForms and WebReports. 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. 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. except that the resulting reference object maintains a link to its source object. However.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. but you have to use FORMS_DDL. 1) PROPERTY CLASS . 2. Forms 4. partially. 3. g. e. 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. When-mouse-button-pressed. record groups are separate objects that belong to the form module in which they are defined. 6) What are the types of triggers and how the sequence of firing in text item 6) Triggers can be classified as Key Triggers. Property classes also allow you to make global changes to applications quickly. This setting is typically used for password protection. Key-up.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. NUMBER. in long Raw datatype or BLOB datatype. Post-Text-item. or DATE provided that the total number of columns does not exceed 64K.first_item’) in the Navigational triggers But can use them in the Key-next-item. etc Navigational Triggers: These Triggers are fired as a result of Navigation. The Difference between Key-next and Post-Text is an very important question. property level trigger won't fire. E. Yes . By simply changing the definition of a property class. However. 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. e. We also have event triggers like when –new-form-instance and when-new-block-instance. Record group column names cannot exceed . The sequence of firing in a text item are as follows :: a) pre .g :: Key-next-field. you can change the definition of all objects that inherit properties from that class. Navigational Triggers. Mouse Triggers. 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. Key-Down Mouse Triggers: Mouse Triggers are fired as a result of the mouse navigation.text b) when new item c) key-next d) when validate e) post text 7) Can you store pictures in database? How? 7) Yes. 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. We cannot call restricted procedures like go_to(‘my_block. Key next will not fire unless there is a key event. when-mouse-doubleclicked. Triggers at the lowest level are always given the first preference.g : Pre-text-item. LONG. If item level trigger fires. but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. unlike database tables. Key Triggers: Key Triggers are fired as a result of Key action. 5) What is SECURE property? 5) Hides characters that the operator types into the text item. A record group can have an unlimited number of columns of type CHAR. The item level trigger fires first and then the block and then the Form level trigger. The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type. and lengths from the database columns referenced in the SELECT statement. 11) What are ALERT? 11) An ALERT is a modal window that displays a message notifying operator of some application condition. You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item. you define its Structure and row values at design time. 15) What are timers? When. 14) What is FORMS_MDI_WINDOW? 14) Forms run inside the MDI application window. 16) Can object group have a block? 16) Yes. pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function. data types. After assigning an Oracle Forms variable or item value to a PL/SQL variable. 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. it must also be the appropriate parameter type as defined in the PL/SQL interface. When Mouse Navigate is set to False. Static Record Group A static record group is not associated with a query. Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function. 18) What are user-exits? 18) It invokes 3GL programs. Non-query Record Group A non-query record group is a group that does not have an associated query. record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable. 17) How many types of canvases are there? 17) There are 2 types of canvases called as Content and Stack Canvas. and they remain fixed at runtime. Programmatically. rather. object group can have block as well as program units. 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. Content canvas is the default and the one that is used mostly for giving the base effect.Page 200 of 259 30 characters. navigation. 19) Can you pass values to-and-fro from foreign function? how? 19) Yes. when-timer-expired does not fire? 15) The When-Timer-Expired trigger can not fire during trigger. Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse. . This property is useful for calling a form from another one. but whose structure and values can be modified programmatically at runtime. Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. 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). or transaction processing. The records in a query record group are the rows retrieved by the query associated with that record group. It’s like a plate on which we add items and stacked canvas is used for giving 3 dimensional effects. DLL in the \ORAWIN\BIN directory with the new F45XTB. 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. user exits support DLL on MS-WINDOWS? 22) YES. Key setting unique (default. 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. 22) Does.DLL. or rename the DLL to F45XTB.INVOKE (object obj_type. 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.FALSE.(NON-ORACLE datasource) default .) updateable n-updateable. Cursor mode .define cursor state across transaction Open/close.e. 29) Can you replace default form processing? How? 30) What is transactional trigger property? 30) Identifies a block as transactional control block.database block that oracle forms should manage as transactional block.Page 201 of 259 21) Can you call WIN-SDK thruo' user exits? 21) YES.INI file. method VARCHAR2. Syntax: PROCEDURE OLE2. 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.oracle data source ? How? 26) Yes.DLL. non . Method Is a method (procedure) of the OLE2 object. 25) What is pre-compiler? 25) It is similar to C pre-compiler directives. For applications that will run against ORACLE. i. use the default setting. list list_type:= 0). Locking mode: Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form. 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. 26) Can you connect to non . 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. (FORMS_OLE) 34) What does invoke built-in do? 34) This procedure invokes a method. Parameters: Object Is an OLE2 Automation Object. If you rename the DLL to F45XTB.DLL. replace the existing F45XTB. color. 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. 10) What is OLE Activation style property? 10) Specifies the event that will activate the OLE containing item. between VAT and Property Class? imp 2) Named visual attributes define only font. and pattern of the object at runtime. 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. The form would be generated in unix system by using f45gen my_form. the resulting module hierarchy is known as the call form stack. color. 11) Can u change the mouse pointer? How? 11) Yes. 6) Can u set default font in forms? 6) Yes. You can change the appearance of objects at runtime by changing the named visual attribute programmatically. and any visual attribute properties in the class are ignored. you can display a pre-determined item in a special color when it is part of the current record. 7) Can u have OLE objects in forms? 7) Yes. but you cannot dynamically highlight the current item. 5) Can u change VAT at run time? 5) Yes. and pattern attributes. 9) What r the types of windows (Window style)? 9) Specifies whether the window is a Document window or a Dialog window. property class assignment cannot be changed programmatically. 37) Can u port applications across the platforms? how? 37) Yes we can port applications across platforms.CREATE_ARGLIST function. Consider the form developed in a windows system. Specifies the mouse cursor style. 8) Can u have VBX and OCX controls in forms? 8) Yes. Change windows registry(regedit).Page 202 of 259 List Is the name of an argument list assigned to the OLE2.fmb scott/tiger GUI 1) What is a visual attribute? 1) Visual attributes are the font. . as the input focus changes. color. 36) What is call form stack? 36) When successive forms are loaded via the CALL_FORM procedure. You can programmatically change an object's named visual attribute setting to change the font. and pattern properties that you set for form and menu objects that appear in your application's interface. the named visual attribute settings take precedence. Set form45_font to the desired font. When an object is inheriting from both a property class and a named visual attribute. Use this property to dynamically change the shape of the cursor. 2) Diff. property classes can contain these and any other properties. make sure the frame you are going to move them into is large enough to accept the whole group at once before . if you are reassigning a group of fields. Even though you set the page size in the report properties. but the printer still prints in portrait. This sets the printer orientation. Moving fields around does not change what enclosing object is considered it's parent group. 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. Now all of the fields on the layout can be repositioned regardless of their original parent items.. for unknown and mysterious reasons. Oracle will usually figure what your intent was and assign the object(s) as a child of that frame. (Cntrl . the user's default printer setup will be used. One note though. The alternative in this case is to highlight the field (or fields). Oracle carefully remembers what repeating frame a field was originally placed in and assigns that as it's parent. 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. and then paste it into the desired frame. but I'm still getting a "frequency below it's group" error. first click on the lock button on the speed button bar. I switched the page size to 11x8. unless you actually like starting from scratch every time!?! 8. try dragging it out of all of them. This is my preferred method of changing a field's parent as it works much more consistently then the unlock/lock method.5. To change a field's parent. cut it (cntrl-x). For anyone who wants a consistent look in their reports I strongly recommend building a similar pair to save yourself an ulcer. Oracle will parse the layout and assumes that any item fully enclosed in a repeating frame is a child object of that frame. reptmp_p and reptmp_l (portrait and landscape). You can also set it to either "Landscape" or "Portrait" to force the printer orientation no matter what the user has set as default. I moved this field into that repeating frame. this method does not work. Oracle starts by setting it to "default" which means that no matter how you set the page size.Z or edit. If you then reference a column further down the line of the query structure it will return that error. but if you drag and drop it there before clicking on any other objects. It should now look like an unlocked padlock. 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. This is useful for maintaining the fields. and then click on something else. This can be confirmed again by trying to drag an object out of it's parent.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. These sorts of picky. Whichever frame will not allow it to escape is it's parent. there is a another variable in the system parameters section under the data model in the object navigator called orientation. If you are not exactly sure which repeating frame a field belongs to. The paste does not initially set it into the right frame.undo will put it back where it came from) Sometimes.Page 203 of 259 Reports 2. When you are satisfied with the repositioning click the lock button again to lock the layout. you have just discovered one of the main reasons why good planning goes a long way. 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). not the current object. Creation order is there for critical to the layout process. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent). you are probably going to have to delete and then recreate the objects within the desired frame. As an example. our object will not print. 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. save yourself some typing by creating the new object in the right frame. they should all stay together. 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. 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. 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. 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. However. These are used to alter an object position in the Reports layer ordering. . The key here is that this is about the pages on which the Print Condition Object appears. Last. likewise Last is the last page on which any part of the Print Condition Object is printed. All. Oracle will assign it as a child of whatever it is in at the time. This means that once an object has popped to the front and had a reassignment of parent. move forwards. All but first. The solution is to put the whole row into a regular frame which is page protected. but not all of it? This is due to the way the scan works when Oracle is parsing the layout. the bolded field could get shifted to the next page due to it's bigger footprint. This means that even if you set two fields top-aligned with the same height and font but one of them is bolded. Once you de-select an object that has just been pasted. If you do the paste and then try to grow the frame to fit. On every instance of that repeating frame which is printed entirely within a single page. 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. At best. This means that placing a repeating frame on top of a field but larger than that field fails the ownership criteria. 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. Note that you can only move an object back and forth amongst it's siblings. assume we have created a field inside a repeating frame with Print Condition Object set to 'anchoring object'. bring to front. There is also a second choice (which can also be used as a solution to the above). If the object has triggers attached. copying over the trigger code. this condition is re-evaluated for each instance of the frame. You will find the options Send to back. Go ahead and draw the new frame around the fields you want to have placed in it. For objects inside a repeating frame. You cannot set it back below it's parent. How do I do this easily? Well congratulations. you cannot move it back using these tools. Oracle views First as the first page on which any part of the Print Condition Object is printed. and then deleting the old object 9. What exactly does the "Print Condition" do? The print condition type First. nor in front of it's children. 10. move backwards. Now go to the "Arrange" menu. I must put a repeating frame around these fields. If the tops of all the fields in a row are aligned and the fields are all of the same height and font. however. First. you will have to cut and paste again. All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. Oracle reassigns the new repeating frame as each object's parent as they pop to the front. From this point you have two options. and Print Condition Type set to 'All But First'. I suspect. Why does part of a row sometimes get shifted to the next page.Page 204 of 259 you do the cut/paste. If this technique also fails. 11. g. Why they couldn't catch those problems at compile time I have no idea. but the moment you run the report you will get a nasty error and the report will die. bill_period_id etc. I know that this seems like overkill. if you create a varchar user variable and try to reference it as an SQL condition ( e. 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. 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. Reports locks down the user parameters until the report is finished. The following example will select the most recent invoice date as the default. is simple. For example. Once the Before Report trigger has fired. this statement is fully parsed before the parameter form is opened. That being said. This is done in the "Initial Value" spot on the variable's properties form. you use this to save and change your variable value. 13. and note that it properly handles exceptions to ensure that the report does not arbitrarily die if this default setting fails. 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). However. The secret is that the variable must be initialized to a valid SQL condition before the Data Model will accept it. 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. Oh. Even if you have used a select statement to create a lookup list for the parameter. 12. return (TRUE). there are times when you may wish to allow a user to add any "where" statement they wish. it must return a true or false value. As you can probably guess. assume you have a parameter called p_input_date which is intended to hold an invoice date. you can't. I know you can put a statement into a layout trigger at design time and the compiler will accept it. Only such things as heading objects you want reprinted on multiple pages are normally candidates for fooling around with this setting. there is valid technique to mimic having a user variable which can be changed over the course of the report execution. this technique is a last resort to finding an SQL work around if one exists. Select * from account where :usercondition) you will get an error. such as a date. even though it only chooses between 'first' and 'last'. 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. 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. How do I change a user parameter at runtime from a layout object trigger? Quite simply. exception when others then :p_input_date := null. . Since variables inside a package are both local to that package and persistent over the duration of the run. but it is the most efficient way of handling an issue that is very rarely encountered. Note also that like all report triggers. 1. 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.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. A table type node represents a type created by the SQL statement. Static record group A static record group is not associated with a query. Non-query record groups can be created and modified only at runtime. instead. and lengths from the database columns referenced in the SELECT statement. While these options do work.Set_Field_Char procedure. That being said. 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.set_field_date for numeric or date fields. CREATE TYPE emp_typ AS OBJECT (ename VARCHAR2(30).". Why can't I highlight a bunch of fields and change all their format masks or print conditions at once? You can. MEMBER FUNCTION get_salary RETURN NUMBER. print conditions etc. The syntax is SRW. The type is implied by when the record group is created (at design time or at runtime) and by how the group is defined.Page 206 of 259 return true. Record group types There are three types of record groups: query record groups. Non-query record group A non-query record group is a group that does not have an associated query. and SRW.Set_Field_char(0. It does not change the value held in the cursor and so can not be used for evaluating summary totals. You do not specify the record group type explicitly. for the whole set of objects at once. Oracle gives you a stacked set of the individual properties forms for each of the selected objects. MEMBER PROCEDURE raise(amount NUMBER).set_fileld_num. Table Type nodes Table types appear within the Types node in the Object Navigator. It is generally not allowed to change any values held in the cursor. the attributes of the object appear as subnodes. or change the value of it's objects value. . Static record groups can be created and modified only at design time.2). Also. make changes to the database. they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much. CREATE TYPE emp_tbl AS TABLE OF emp_typ. 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..) and the output of the object that the current trigger is attached to will be replaced by . Query record group A query record group is a record group that has an associated SELECT statement. and they remain fixed at runtime. CREATE TYPE AS TABLE. MAP MEMBER FUNCTION compare RETURN NUMBER). The columns in a query record group derive their default names. it requires changing values individually for each object. and static record groups. but whose structure and values can be modified programmatically at runtime. However. data types. There are also SRW. 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 . The following SQL statements create the object type emp_typ and the table type emp_tbl. Query record groups can be created and modified at design time or at runtime. The records in a query record group are the rows retrieved by the query associated with that record group. If you highlight a bunch of objects and then right click and select "properties. non-query record groups. esalary NUMBER(5. note that this change of value only applies to the formatted output. 14. 15. much slower to run. end. While this may be useful for some things. there is a highly unpublicized method of doing just that using the SRW. If the subtype is an object type or REF object. you define its structure and row values at design time. An object type serves as a template for objects. which is an unordered set of data elements all of the same datatype. User-defined datatypes use the built-in datatypes (such as CHAR. A varying array type specifies a data unit called VARRAY. 3. Bookmark Go to End Frequently Asked Questions (FAQ) Oracle Payables Invoice Processing Release 10. The number of elements in a VARRAY (or its size) is variable. 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. which is an ordered set of data elements all of the same datatype. one column of labels. iSupplier Invoices: How do I use iSupplier Portal Invoice Entry? 2. 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? . 4. FAQ Summary 1. all of the same datatype. 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. VARCHAR2.0 and 11. 11. A nested table has a single column. you need at least four groups: one group must be a cross-product group. There are two categories of user-defined datatypes: object types and collection types. Matrix reports A matrix (crosstab) report contains one row of labels. In SQL * Loader we commonly using delimiters is ‘camas’." 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. An object type specifies the elements (or attributes) that make up a structured data unit like a purchase order. Collection types describe data units that are made up of an indefinite number of elements. and NUMBER) and other user-defined datatypes as the building blocks for datatypes that model the structure and behavior of data in applications. 7.Page 207 of 259 Oracle8 is an object-relational database management system. you must specify a maximum size when you declare the varying array type. What are the Delimiters we are using in the SQL* Loader? Delimiters are used to separate the column values in control file. such as the list of line items. Instructions for the reader: This FAQ document identifies the most frequently reported how-to questions relating to the Oracle Payables Invoice Processing. 6. and the type of that column is a built-in type or an object type. A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database. may be other structured data units. such as determining the total value of a purchase order. Some attributes. 5. two of the groups must be within the cross-product group to furnish the "labels.5(11i) The information in this document has been reviewed and is current as of 22-Nov-2002. and information in a grid format that is related to the row and column labels. An object type also specifies the operations (or methods) you can perform on the data unit. A table type specifies a data unit called a nested table. The collection types are varying array types and table types. However.7. To create a matrix report. Supplier Import: Is it possible to import suppliers from my legacy system into Oracle Payables? 11. Supplier issues a credit memo to correct the problem. reconciles with order and contract information and issues payment. 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. Invoice workbench Payable workbench We usually enter supplier invoice either in Invoice workbench or quick invoice window. Accounts Payable will apply the credit against any open invoices in the system. 9. DO NOT HOLD CREDITS IN THE DEPARTMENT FOR ANY REASON.I? FAQ Details The Invoice document is used to bill the Buyer for services and/or products delivered by the Seller. Setup: What articles. received or consumed goods or services a detailed invoice. 10. or manuals should I read for more information on Expense 13. Credit memo: When you want to adjust an invoice. Description The supplier presents to the customer for the ordered or delivered.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. 14.Page 208 of 259 8. Debit memo: Negative amount invoice created by us and sent to supplier to notifying him about the credit we are recording. 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. The customer disputes the invoice and works with supplier to resolve issue. Report Import (Invoice Import in 10. the customer shall start the process to treat incorrect invoices. If any discrepancy is found. white papers. Once Supplier and Customer agree upon the nature of the dispute. Buyer receives credit memo. Requester: In 11i. AP is divided in to 2 workbenches. document issued by the vendor to record an adjustment against an invoice. 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.7 and 11. Invoice workbench: Contains: • Invoice Batch window • Invoice window . what is the "Requestor" field used for on the Invoice Workbench? 12. Make a copy for your records.AP. Negative = Credit Positive = Debit Verify its correctness. Accounting Date: Date when we are planning to post it to GL ie. • When an invoice requires immediate action.pdf Invoice distribution: It allocates total invoice allowance to various expense or asset accounts. 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: . After entry just import into payable system. For more see page 342 of Oracle payables. Quick invoice window: • Used for quick high volume invoice entry for invoices that don’t requires extensive validation.Page 209 of 259 • Distribution window • Other associated windows When to use: • Incase of complex invoices or invoices that requires online validation. Expanse Reports: Invoice Creation: Invoice Distributions: Account: Company have different COA so follow that hierarchy for each set of item. validation and defaulting will occur during import. GL Date. 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. 58. but is charged to the correct GL account. In some fields we select a value from a predefined set of values. Q1. Purchase document: Use Bank window to define internal bank branch from which you disburse payments. There are two workarounds for this situation: Workaround #1: You need to reverse the distribution line that has the final match hold. Navigation: SetupLookups For more details see Developer’s Guide pg. Lookup Category Lookup type ex. There is no way to manually remove the hold. For each bank account we can define payment document for check. Procurement Family Pack H and Financials Family Pack C (same as 11i. Prepayment. For a complete overview of this new feature including implementation steps and usage instructions. Debit memo. [top] Q2. Using this new feature your suppliers can enter their invoices on-line directly into AP through the iSupplier module. For more details see Developer’s Guide pg. [top] Q3.J) and contains installation instructions for all new features released in 11i.memo. This users guide is current as of Family Pack C (11i. We can either link it to supplier site or we can link it to the invoice. 63. For a lookup type we can define upto 250 Lookup names.6. the system must remove the hold. Match:What do the codes in the Final Match flag mean and what does Final Match do? . Invoice type Allowed values are called Lookup names. EDI or wire transfer and other payment methods. iSupplier Invoices: How do I use iSupplier Portal Invoice Entry? A: iSupplier Invoice entry is a new feature released with one-off patch 2234922. You can then create a new PO line.J). Ex. For More information on Final Match Holds see Note 1026090.payment terms or tax codes.AP. EFT. Credit . Distribution Sets: It is a predefined set of distribution for a repeated or a same set of distribution form a supplier. Standard.Page 210 of 259 Payment: Lookup: It is a predefined values used as a LOV.AP. In some cases we have defined them in the setup windows such as supplier name. Other predefined set of values are Lookup codes. please refer to the 11i Payables User Guide (pages 4-171 through 4-174) available via Metalink. Workaround #2: You can manually create a distribution line on the invoice that is not matched to the PO. There are 2 types of distribution sets. Skeleton Distribution Sets: Leave the % field as 0 so that at the time of invoice creation you ca enter amount in different distribution lines. and match to that line. We can enter –ve % values. 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. When a PO is final matched to an invoice. Note: When you match an invoice to a PO. and/or invoices. You cannot invoice this distribution line.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 to purchase orders. If you choose to create withholding tax invoice manually. too. and enter Mixed as the invoice Type. You can match to an invoice for $-200.Page 211 of 259 A:After you match an invoice to a Purchase Order.1 and the 11i Payables User Guide (pages 10-26 through 10-55). The FINAL_MATCH_FLAG has the following QuickCodes: N No The PO shipment line has not been matched. Payables can automatically create withholding tax invoices. D Done The PO shipment line is closed. You can enter either a positive or negative invoice amount. Enter the invoice or credit/debit memo in the Invoices Summary. [top] Q4. all other invoices for that PO are updated. for more information on Withholding Tax invoice creation. that means you can never match another invoice to that PO. 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. 2. you must choose whether to do this during Approval or during payment processing. For example. If you chose to automatically create withholding tax invoices. which invoice was final matched. Y Yes The PO shipment line has been matched. See: Withholding Tax Payables Options. [top] Q6. How do I create a Withholding Tax invoice? A:After you apply withholding tax to an invoice. and match to a purchase order for $100. AND one of the invoices for this PO has been final matched. [top] Q5. The PO lines that have been matched are closed. Interest: How do I create Interest Invoices? A:Chapter 10 of the 11i Payables User Guide discusses setting up and using Interest Invoices. But when you final match an invoice to a PO. Please see Note 198307. you can enter an invoice for -$100 with Invoice Type Mixed. So you cannot tell from this flag. you can look at the AP_INVOICE_DISTRIBUTIONS_ALL table and observe different codes in the FINAL_MATCH FLAG column. Match: How do I Match Invoices to Purchase Orders? . you can optionally create invoices to remit withheld tax to the tax authority. 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. or you can perform this task manually. Indicate this choice in the Withholding Tax region of the Payables Options window. nothing special happens. To enter a Mixed invoice: 1. create an invoice for each Withholding Tax type invoice distribution on an invoice. Also see Note 198308. 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.AP.J About document for more details.I? A: In Mini-pack I. [top] Q13. For a complete list of the renamed programs see Note: 179837.AP.1 for the most current version of the 11i Payables Users Guide. [top] Q10. Payables will deliver new feature descriptions in the "About" document for each Mini/Family Pack.Page 212 of 259 A: Note 198535.J was the last Payables Mini-Pack for 11i. After Mini-Pack J. Setup: What articles. white papers. What are the MetaLink keywords I should use when searching for Invoice Processing Issues on MetaLink? A: PAYABLES. [top] Q8. or manuals should I read for more information on Invoice Processing? A: Please see the Metalink Note 207154. 11i. iSupplier Portal Invoices. The Payables Approval program has been renamed to prevent confusion with the new workflow and to more accurately reflect its function. Employee Update Program AP. Primary Pay Site. Please follow bug 94383 for up to date status on this request. Invoice Approval Workflow Enhancements. [top] Q11. 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. If you use Invoice Approval Workflow. Note: 11i. Payables will deliver all 11i consolidated patches in Family Packs. INVOICE [top] . This content is presented in the form of a white paper in PDF format. Input Tax Groups [top] Q9. then you can define rules that use this value to generate a hierarchical list of approvers for the invoice.1. APXINWKB.E: Negative Supplier Balance Report. AP. Approval/Validation: What happened to the Invoice Approval option after applying 11i. and confirm online whether the invoice is accurate and should be paid. AP support strongly recommends that you install the corresponding documentation patch for Mini/Family Packs that you apply. Enhanced Matching Controls for Finally Closed Purchase Orders.I: View Currency Details. New Invoice Processing Features by Mini/Family Pack: AP. The 11i Payables User Guide (pages 4-68 through 4-82) also provides a thorough overview of the Invoice Matching process. [top] Q12. Invoice Approval Workflow AP.1 provides detailed instructions for matching purchase orders to Invoices.1. Payables is adding a new workflow named Invoice Approval Workflow that asks approvers to review invoice details. Beginning with 11i.AP. 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. 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. Requestor: In 11i.AP.J will contain the same code release as Financials Family Pack C.J and continuing with Family Packs C+. Please see the 11i. Payment Batch Enhancements.A: Automatic Creation of Debit Memo from RTS.J / Family Pack C: Interest Expense Proration.AP. Click on the patch number to view specific details about the patch. ONE-OFF FOR BASE BUG 2425909. which may or may not be included in recent Mini-Packs or Family Packs. electronic or mechanical. Patch list Summary APXXTR: Expense Report Import (Invoice Import in 10. Bookmark Go to End Patches Guide Oracle Payables Payables Open Interface and Expense Report Import (formerly Invoice Import) Versions 10. 7) Patch 1135567 10. nor does it provide any other warranties or conditions. ONE-OFF FOR BASE BUG 2222486. ONE-OFF FOR BASE BUG 2277148. ONEOFF FOR BASE BUG 1960350. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. ONE-OFF FOR BASE BUG 1135567.0 and 11.1. ONE-OFF FOR BASE BUG 2385900.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. 2) Patch 2222486 11i Import errors with Signal 11 when Prepayment is applied to expense report. ONE-OFF FOR BASE BUG 1858968. [top] IMPORTANT: If you did not find the information you were searching for. including implied warranties and conditions of merchantability or fitness for a particular purpose. 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. This document may not be reproduced or transmitted in any form or by any means.7 Import Allows Invoices to be imported into closed period. Oracle is a registered trademark of Oracle Corporation. please be sure you have reviewed the information provided in the Payables Critical Patch Note. All other product and service names mentioned may be trademarks of their respective owners. ONE-OFF FOR BASE BUG 2606164. Various product and service names referenced herein may be trademarks of Oracle Corporation. 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. 6) Patch 2606164 11i Expense Report Import truncates invoice amount in the Payment Schedules for expense reports. whether expressed orally or implied in law. 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.Page 213 of 259 Q14. 8) Patch 2425909 11i Import fails with Signal 11 after applying patch 2244869. 5) Patch 2199740 11i Import Fails with APP-SQLAP-10916: APIICB/1:ORA 01722:Invalid Number. 3) Patch 2277148 11i Import fails with APP-SQLAP-10916: apiisp/01:ORA-1458:invalid length inside variable character string. 4) Patch 1858968 11i Imported Expense Reports Created with site of Office Instead of Home. for any purpose. Before application of the patches listed in this document. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. without the prior written permission of Oracle Corporation.7 and 11. Oracle Corporation does not warrant that this document is error-free. . .7. 1156.11 Prerequisite Patch Level: 11i. the following errors were reported:Import fails with APP-SQLAP-10916: apiisp/01:ORA-1458: invalid length inside variable character string.10. 4) Patch 2538037 11i Open Interface gives IPV line on invs uploaded w/o unit.AP.I [top] 6) 2606164 Expense Report Import truncates invoice amount in the Payment Schedules for expense reports .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. ONE-OFF FOR BASE BUG 1927155. 2) Patch 2361634 11i APXIIMPT report truncates report header information. ONEOFF FOR BASE BUG 2478471.AP.AP. APXIIMPT: Open Interface Import 1) Patch 2227273 11i Open Interface Import report shows duplicate invoices with the same invoice number.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.AP. 3) Patch 2017593 11i APXIIMPT does not reject invoices matched to PO�s with wrong PO lines.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.AP. Files fixed and version: apiisp.1 for more details on this bug Files fixed and version: apidib. 5) Patch 2442692 11i Invoices not imported even if the dist code concat is valid.lpc 115. Program was terminated by signal 11.Page 214 of 259 9) Patch 2478471 11i Import fails with APP-SQLAP-10916: apiicv/5:ORA-01426: numeric overflow.E Fixed in Mini-Pack or Family Pack: 11i.More information can be found in Note 156780.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.5 Prerequisite Patch Level: 11i.F Fixed in Mini-Pack or Family Pack:11i. Patch Details APXXTR: Expense Report Import (Invoice Import in 10.H.8 Prerequisite Patch Level:N/A Fixed in Mini-Pack or Family Pack:11i. the import program fails with signal 11 error.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. ONE-OFF FOR BASE BUG 2303767.AP.1 Files fixed and version: apxgii. ONE-OFF FOR BASE BUG 2429210.7 and 11. ONE-OFF FOR BASE BUG 2531058. ONE-OFF FOR BASE BUG 2204291.AP.This is bug 2021385 Prerequisite Patch Level: 11i.16 Prerequisite Patch Level: 11i. Files fixed and version: apiicb.lpc 115.lpc 115.lpc 115. Files fixed and version: N/A Prerequisite Patch Level: 11i AP.AP.8 .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. 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.AP.AP.1157.AP.g.rdf 115.7.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. 2244869 and 2214599. Files fixed and version: APXIIMPT. Files fixed and version: apiimptb. Files fixed and version: APXIIMPT.FIN_PF.7.120 Prerequisite Patch Level: 11i.AP.17 Prerequisite Patch Level: There are no Prereq patches included or required for/with this patch Fixed in Mini-Pack or Family Pack: 11i.J Fixed in Mini-Pack or Family Pack: 11i.118 Prerequisite Patch Level: 11i.G Fixed in Mini-Pack or Family Pack:11i.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.99 and the invoice currency and payment currencies are same.J [top] 3) 2017593 APXIIMPT does not reject invoices matched to PO�s with wrong PO lines Download Patch 2017593 Problems fixed by this patch: APXIIMPT does not reject invoices matched to PO�s with wrong PO lines Files fixed and version: apiimptb.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.99.U (11.0.pls Prerequisite Patch Level: No Mini-Pack pre-requisite however must apply one-off 1952655 Fixed in Mini-Pack or Family Pack: 11i.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.AP.AP. e.pls 115. then it was calculating the payment currency invoice amount as 9 instead of 9.N Fixed in Mini-Pack or Family Pack: 10.0 bug fix is included in 11.lpc-115. Files fixed and version: apidbi.rdf 115.G and oneoffs 2222486.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. If the invoice amount is 9.FIN_PF.7. Script: Diagnostic Script that identifies problems posting a transaction (Release 10. 11. Oracle Corporation does not warrant that this document is error-free. 16. All other product and service names mentioned may be trademarks of their respective owners.5).0.Page 216 of 259 Prerequisite Patch Level: 11i. Troubleshooting Summary 15. 11.115. as these are addressed in great detail in the notes referenced at the bottom of this document.. 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 (FAQ�s) Payables Open Interface Import Frequently Asked Questions (FAQ�s) Copyright © 2002 Oracle Corporation.pls 115. 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. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice.5 (11i) The information in this document has been reviewed and is current as of 25-Nov-2002.G Fixed in Mini-Pack or Family Pack: 11i. All rights reserved. Oracle is a registered trademark of Oracle Corporation. 17. Files fixed and version: apiimptb.AP.FIN_PF. without the prior written permission of Oracle Corporation.D [top] IMPORTANT:If you did not find the information you were searching for. including implied warranties and conditions of merchantability or fitness for a particular purpose.FIN_PF.7. This document may not be reproduced or transmitted in any form or by any means. whether expressed orally or implied in law. nor does it provide any other warranties or conditions.G Fixed in Mini-Pack or Family Pack: 11I.0).7. for any purpose.7 Prerequisite Patch Level: 11i.7 and 11. The articles below do not include bugs/patches or FAQ's. Various product and service names referenced herein may be trademarks of Oracle Corporation. Script: Diagnostic Script that identifies transactions that are not transferred to GL (Release 11. .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.AP. Bookmark BookmarkGo to End Troubleshooting Guide Oracle Payables Payables Transfer to GL (Posting) Versions 10.5). . 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. electronic or mechanical. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. Prob: Payables Transfer to General Ledger Report shows No Data Exists (Release 11i) 27.1 help identify problems when posting a transaction. Script: Diagnostice Script that provides table level details of invoices and payments. Error: UNDIST error on some payments when using Automatic Offsets (Release 10. [top] 2. or manuals should I read for more information on Payables Transfer to GL? 32.7 and 11. 23. white papers. but the Journal Import is not importing the data into GL 21. Error: Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.5). This script lists any problems when running the Payables Transfer to GL process in an html file in portrait format. 24. Prob: Payables Transfer to GL was successful. Prob: PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL (Release 10. 30. 29.7 and 11.0). Prob: There are payments and/or invoices that are not posting to GL.0).1. 26. Sol: The scripts found in Note 105929. Script: Diagnostice Script that provides table level details of invoices and payments. and you believe they should post.7 and 11. Prob: The problems and solutions listed in this guide do not answer my question. Sol: Please download and run the APLIST script from Note 148388. 31. 20.0).5). Prob: The Journal Import process fails when kicked off by the Payables Transfer to GL process (Release 10.Page 217 of 259 18.0).1 Troubleshooting Details 1. [top] 3. Script: Diagnostic Script that helps to identify transactions that are not transferred to GL for Release 11. 25. 19.7 and 11. Prob: Payables Transfer to GL program / Accounts Payable Journal Entry Audit Report shows No data found (Release 10.1 to see detailed data information on an invoice or payment. 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. Script: Diagnostic Script that identifies problems posting a transaction for Release 10. Sol: The Closing script is available for download in Note 180165. Error: Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors" (Release 115). This script lists any transactions that are not accounted or transferred to GL in an html file in portrait format.1. Prob: What are the MetaLink keywords I should use when searching for Payables Transfer to GL on MetaLink? 33.7 and 11.5. 22. Error: Payables Transfer to GL errors with APP-10962 APJEL/35 ORA-1458 (Release 10.tmp creation for FND_FILE failed ORA-06512 (Release 11. [top] 4. Prob: What articles.7 and 11.0. Sol: The Posting Diagnostic script is available for download in Note 185935. Error: Closing the AP Accounting Period errors with APP-SQLAP-10741 (Release 11.0). [top] .5. 28. Note: Create Accounting issues are listed separately in Note 131225. Prob: RATE exception when running Payables Transfer to GL. An invoice must be approved and/or have no posting holds in order to be selected for posting. you should run autoapproval and review the hold reports. [top] 9. Invoice Hold Report . Error: In Release 10. You can correct the invalid accounts in this form. Posting Hold Report . [top] 6. (Exceptions can be an inactive accounting flexfield value. Prob: Payables Transfer to GL was successful. Prob: You get a PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL in Release 10. Payables Transfer to General Ledger process errors with APP10962 APJEL/35 ORA-1458 value larger than specified precision allows for this column. Transactions that were selected but encountered some exception are not inserted into the GL_INTERFACE table nor are they updated to �Posted�. Each transaction includes an exception code that explains why it was prevented from posting.0. Sol: Ensure invoices are ready to post. a GL_DATE in an un-opened GL period. If an invoice is approved but will not pay. and more.only displays invoices with holds that prevent posting. if needed. the AP Journal reports are generated to display the results of the posting selection. run Autorate. A period will not close if there are payment batches in a status other than confirmed or canceled.7 and 11. Ensure payments are made.7 and 11. and rerun the Payables Transfer to General Ledger program. you are using Automatic Offsets. and you get an "undist" error on some of the payments. [top] 7. These reports are very important and should be saved.Page 218 of 259 5. [top] 8.only displays invoices with matching holds. Query in this form to show the accounts that are causing the "undist" error.displays all held invoices. Error: In Release 10.1 . but the Journal Import is not importing the data into GL Sol: Examine AP Reports for Exceptions and Correct. They are generated directly from the posting process and can not be rerun at a later date. Sol: Navigate to Payments -> Invalid GL Accounts. 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. its corresponding debits and credits.7 or 11. etc. the GL accounts affected.) After the process is complete. You must insure that all your payment batches have been completed (either confirmed or canceled). It displays the AP transaction. Sol: Please see Note 94351.0. To ensure that your invoices are ready to post.1 [top] 10. Accounts Payable Journal Entry Exception Report This report displays the transactions that encountered an exception during the posting process. Sol: Please review Note 96119. Prob: There are payments and/or invoices that are not posting to GL and you believe they should post.0. Sol: Populate the Daily Rates table for the exchange date. Prob: You get a RATE exception when running Payables Transfer to GL. Accounts Payable Journal Entry Audit Report This report lists the details of the accounting transactions that have been inserted into the GL_INTERFACE table. you should insure that the invoice is due to be paid and that the payment schedule is not on hold. exchange rate missing. Matching Hold Report . 1 [top] 17.1 [top] top 16. white papers.7 and 11. Sol: Please review Note 174638. Sol: Please review Note 107272. GENERAL LEDGER. Error: In Release 11.5. GL [top] 19. the Payables Transfer to General Ledger Report shows No Data Exists. Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.5. Sol: Please review Note 188354. What articles. 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. Prob: The problems and solutions listed in this guide do not answer my question.0.1 [top] 15.0. .7 and 11. which is created when the Payables Accounting Process is run. POST. Prob: In Release 10.Page 219 of 259 [top] 11. Error: In Release 11. POSTING. Sol: If the Troubleshooting list for Payables Transfer to GL does not answer your question.1 [top] 14.7 [top] 12. please click here to log an iTar. Prob: Closing the AP Accounting Period in Release 11. APXGLTRN. GLLEZL. Sol: There is a problem with the accounting for your transactions. Prob: In Release 10. Prob: In Release11.5 errors with APP-SQLAP-10741: This period cannot be closed because there are accounting entries that have not been transferred to GL.1 [top] 13. For additional help troubleshooting accounting problems. Please either review Payables Accounting Process Report. please review Note 131225. [top] 18. Prob: What are the MetaLink keywords I should use when searching for Payables transfer to GL on MetaLink? Sol: APPPST.6 and Note 1012060. Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors".tmp creation for FND_FILE failed ORA-06512. APGLTRANS.5. the Journal Import process fails when kicked off by the Payables Transfer to GL process. or the run the Payables Accounting Entries Report to determine which transactions are accounted incorrectly. Sol: Please review Note 1067036. Payables Transfer to GL program shows 'No data found'. Sol: Please review Note 141706. Script: Diagnostic Script that identifies transactions that are not transferred to GL (Release 11. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document.0 Payables Transfer to GL (Posting) Frequently Asked Questions (FAQ's) 11i Oracle Payables One-Off Patch Directory http://metalink. This document may not be reproduced or transmitted in any form or by any means. Instructions for the reader: This Troubleshooting document identifies the most frequently reported setup and usage problems/errors relating to Payables Transfer to General Ledger. 11. Bookmark Go to End BookmarkGo to End Troubleshooting Guide Oracle Payables Payables Transfer to GL (Posting) Versions 10.1 http://metalink. including implied warranties and conditions of merchantability or fitness for a particular purpose. nor does it provide any other warranties or conditions.7 and 11. Script: Diagnostice Script that provides table level details of invoices and payments.1Copyright © 2002 Oracle Corporation. 43. All other product and service names mentioned may be trademarks of their respective owners. .7 and 11.7. as these are addressed in great detail in the notes referenced at the bottom of this document. All rights reserved. Oracle Corporation does not warrant that this document is error-free. 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 (FAQ�s) 10. Troubleshooting Summary 34. 37.5).com/metalink/plsql/showdoc?db=NOT&id=177591.oracle.0). whether expressed orally or implied in law. 41. Prob: Payables Transfer to GL was successful. .0).oracle. 38. Prob: PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL (Release 10.5). electronic or mechanical. 39. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. Various product and service names referenced herein may be trademarks of Oracle Corporation. and you believe they should post. Prob: There are payments and/or invoices that are not posting to GL. but the Journal Import is not importing the data into GL 40. 35. 36.7 and 11.0).Page 220 of 259 [top] IMPORTANT: If you did not find the information you were searching for.com/metalink/plsql/showdoc?db=NOT&id=177591. Error: UNDIST error on some payments when using Automatic Offsets (Release 10. Error: Payables Transfer to GL errors with APP-10962 APJEL/35 ORA-1458 (Release 10.0).. Oracle is a registered trademark of Oracle Corporation. 42. Prob: RATE exception when running Payables Transfer to GL.7 and 11. 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. 11.7 and 11. Script: Diagnostic Script that identifies problems posting a transaction (Release 10.5 (11i) The information in this document has been reviewed and is current as of 25-Nov-2002. without the prior written permission of Oracle Corporation. for any purpose. The articles below do not include bugs/patches or FAQ's.0. 1 to see detailed data information on an invoice or payment. you should run autoapproval and review the hold reports. . This script lists any transactions that are not accounted or transferred to GL in an html file in portrait format. 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.tmp creation for FND_FILE failed ORA-06512 (Release 11.displays all held invoices.0). Sol: The scripts found in Note 105929. Sol: The Posting Diagnostic script is available for download in Note 185935. Prob: The Journal Import process fails when kicked off by the Payables Transfer to GL process (Release 10. you should insure that the invoice is due to be paid and that the payment schedule is not on hold. Ensure payments are made. white papers. [top] 4.5). Prob: Payables Transfer to GL program / Accounts Payable Journal Entry Audit Report shows No data found (Release 10. [top] 2. [top] 5. This script lists any problems when running the Payables Transfer to GL process in an html file in portrait format. Script: Diagnostic Script that identifies problems posting a transaction for Release 10.1 Troubleshooting Details 1. Error: Closing the AP Accounting Period errors with APP-SQLAP-10741 (Release 11. Script: Diagnostice Script that provides table level details of invoices and payments. Note: Create Accounting issues are listed separately in Note 131225.only displays invoices with holds that prevent posting. Posting Hold Report .Page 221 of 259 44. 47. Sol: The Closing script is available for download in Note 180165.only displays invoices with matching holds. Prob: Payables Transfer to General Ledger Report shows No Data Exists (Release 11i) 46.7 and 11. 49.1.0.1 help identify problems when posting a transaction.7 and 11. or manuals should I read for more information on Payables Transfer to GL? 51. 50. Prob: The problems and solutions listed in this guide do not answer my question.1. Invoice Hold Report . Matching Hold Report .5. Prob: There are payments and/or invoices that are not posting to GL and you believe they should post. Prob: What are the MetaLink keywords I should use when searching for Payables Transfer to GL on MetaLink? 52.0). You must insure that all your payment batches have been completed (either confirmed or canceled). If an invoice is approved but will not pay. 48. A period will not close if there are payment batches in a status other than confirmed or canceled. Sol: Please download and run the APLIST script from Note 148388. An invoice must be approved and/or have no posting holds in order to be selected for posting.5. Error: Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors" (Release 115). Error: Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.5). Sol: Ensure invoices are ready to post.7 and 11. 45. To ensure that your invoices are ready to post. [top] 3. Script: Diagnostic Script that helps to identify transactions that are not transferred to GL for Release 11. Prob: What articles. 7 and 11.7 and 11. [top] 9. its corresponding debits and credits. 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. you are using Automatic Offsets. but the Journal Import is not importing the data into GL Sol: Examine AP Reports for Exceptions and Correct. It displays the AP transaction. the AP Journal reports are generated to display the results of the posting selection.0. Query in this form to show the accounts that are causing the "undist" error. etc. Sol: Please review Note 1067036.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. You can correct the invalid accounts in this form.0.7 [top] 12. Prob: You get a RATE exception when running Payables Transfer to GL. the Payables Transfer to General Ledger Report shows No Data Exists. These reports are very important and should be saved.) After the process is complete.5. if needed. (Exceptions can be an inactive accounting flexfield value. Sol: Please review Note 188354. Sol: Please see Note 94351. and more. Prob: You get a PERIOD exception when transferring tax lines created from Multiple Tax Distributions (MTD) to GL in Release 10. Accounts Payable Journal Entry Exception Report This report displays the transactions that encountered an exception during the posting process. [top] 8. Each transaction includes an exception code that explains why it was prevented from posting.1 [top] .0. exchange rate missing. and rerun the Payables Transfer to General Ledger program. Accounts Payable Journal Entry Audit Report This report lists the details of the accounting transactions that have been inserted into the GL_INTERFACE table. Sol: Populate the Daily Rates table for the exchange date. Transactions that were selected but encountered some exception are not inserted into the GL_INTERFACE table nor are they updated to �Posted�. Error: In Release 10. Sol: Navigate to Payments -> Invalid GL Accounts.Page 222 of 259 [top] 6. Prob: In Release 10. the GL accounts affected. run Autorate.1 [top] 10. Prob: In Release11. and you get an "undist" error on some of the payments. Sol: Please review Note 96119. They are generated directly from the posting process and can not be rerun at a later date. a GL_DATE in an un-opened GL period.6 and Note 1012060. [top] 7. Payables Transfer to GL program shows 'No data found'. Prob: Payables Transfer to GL was successful. Error: In Release 10.7 or 11.1 [top] 11. com/metalink/plsql/showdoc?db=NOT&id=177591.5 errors with APP-SQLAP-10741: This period cannot be closed because there are accounting entries that have not been transferred to GL.1 [top] top 16.0 Payables Transfer to GL (Posting) Frequently Asked Questions (FAQ's) 11i Oracle Payables One-Off Patch Directory http://metalink. or the run the Payables Accounting Entries Report to determine which transactions are accounted incorrectly. POST. the Journal Import process fails when kicked off by the Payables Transfer to GL process. Error: In Release 11. please review Note 131225. Prob: In Release 10. white papers. Sol: Please review Note 107272. Please either review Payables Accounting Process Report.oracle. Error: In Release 11.5. [top] 18.7 and 11.1 http://metalink. please click here to log an iTar.oracle. POSTING. Sol: Please review Note 174638.Page 223 of 259 13. APGLTRANS.1Copyright © 2002 Oracle . which is created when the Payables Accounting Process is run.1 [top] 15. Prob: Closing the AP Accounting Period in Release 11. What articles. Sol: Please review Note 141706. Payables Transfer to General Ledger Report lists some of the transactions as "Accounting entries have accounting entry creation errors".5. 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 (FAQ�s) 10. Payables Transfer to GL exits with Status 1 ORA-20100 File o0000004.7 and 11. Sol: There is a problem with the accounting for your transactions. GLLEZL. 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. For additional help troubleshooting accounting problems. Prob: What are the MetaLink keywords I should use when searching for Payables transfer to GL on MetaLink? Sol: APPPST. Prob: The problems and solutions listed in this guide do not answer my question. APXGLTRN. Sol: If the Troubleshooting list for Payables Transfer to GL does not answer your question. GENERAL LEDGER. GL [top] 19.1 [top] 14.tmp creation for FND_FILE failed ORA-06512.1 [top] 17. [top] IMPORTANT: If you did not find the information you were searching for.0.com/metalink/plsql/showdoc?db=NOT&id=177591. The following notes provide possible fixes for these issues: Note 180167. without the prior written permission of Oracle Corporation. the accounting upgrade script will not pick up those records. 11i Trial Balance Fails after applying AP.5 (11i) The information in this document has been reviewed and is current as of 21-Jun-2002. The note lists the release effected (10. [top] 4. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. zero dollar invoices.0 Trial Balance Does Not Match GL (Note 1021413. canceled invoice.1) Summary: During the upgrade to R11i. 10. Note 189322. The issues may or may not be fixed. Instructions for the reader: This Current Issues Guide provides a list of recently uncovered issues.1 Diagnostic Script for trial balance that often identifies the root cause of out of balance issues. electronic or mechanical.0 or 11i). ALERT: Pre-Upgrade Data Issue that will impact AP Trial Balance in R11i 54.0 the AP Trial Balance report occasionally displays incorrect balances. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice.7. One-Off patches available for Payable Trial Balance (APXTRBAL and APXTRB) 55. 11. Bookmark Go to End Current Issues Oracle Payables Trial Balance Version 10. All rights reserved. This document also includes the most frequently encountered bugs that do not currently have one-off patches available. the �Payments Distribution� tables. These are typically issues arising from recent Mini-Packs/Family Packs or new features. whether expressed orally or implied in law. [top] 2.H Current Issues Details 1. ALERT: Pre-Upgrade Data Issue That Will Impact AP Trial Balance in R11i (Note 157917. Oracle Corporation does not warrant that this document is error-free. All other product and service names mentioned may be trademarks of their respective owners. When certain fields are NULL.7. a description of the problem and contains links to download the patch. Oracle is a registered trademark of Oracle Corporation. This document may not be reproduced or transmitted in any form or by any means..0 and 11. 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.6) Summary: In release 10. 10. for any purpose. etc. One-Off patches available for Payables Trial Balance (APXTRBAL and APXTRB) (Note 200363.0 Trial Balance Does Not Match GL 56. . voided payment/invoice. This causes all related invoice records to appear as UNPAID on the Accounts Payable Trial Balance Report (APXTRBAL).Page 224 of 259 Corporation.7 and 11. 11i Trial Balance Does Not Match GL 57.1 Invoices from merged vendors are duplicated in Trial Balance . This can be due to numerous causes including duplicate invoices. Current Issues Summary 53. duplicate payments. This note contains instructions on how to rebuild the trial balance tables to resolve out of balance issues. nor does it provide any other warranties or conditions.7 and 11. in part. [top] 3. including implied warranties and conditions of merchantability or fitness for a particular purpose. the pre-requisite patches required.7 and 11..1) Summary: This note provides a listing of current one-off patches that are available for Trial Balance issues. Various product and service names referenced herein may be trademarks of Oracle Corporation. the accounting entries for existing payments are built using. 11. 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. whether expressed orally or implied in law.1 Foreign currency invoices show balance of $0. Various product and service names referenced herein may be trademarks of Oracle Corporation. Oracle is a registered trademark of Oracle Corporation. Oracle Corporation does not warrant that this document is error-free.1] Payables Trial Balance Frequently Asked Questions (FAQ's) [Note:106740. Note: 198412. You are familiar with the invoice batch and know that not all of the invoices have been returned. Disclaimer: This document is provided for information purposes only and the contents hereof are subject to change without notice. This occurs when the report is run on an 8. [top] IMPORTANT: If you did not find the information you were searching for. 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.1 Upgraded fully paid invoices with pre-payment applications incorrectly showing on trial balance The following Trial Balance notes are unpublished. Oracle Corporation specifically disclaims any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. Bookmark Fixed font Go to End Doc ID: Note:1068665.1] Payables Trial Balance Troubleshooting Guide [Note:106744. These notes can�t be published externally as they contain data fix scripts. reference the note number listed below in your TAR and upload the results of the aplist11i. .1 Trial Balance shows upgraded paid invoices Note 197446.1 The Liability Account CCID for the payment and the invoice in ap_ae_lines_all are different. Navigation Path: Invoices -> Entry -> Invoices -> Query Invoice Batches -> press the Invoices button -> some invoice records are missing However.1) Summary: The Trial Balance report released with AP.H (Note 200022.Page 225 of 259 Note 187118. The Invoice Payables Option has been set to use Batch Control.1] Payables Trial Balance Setup and Usage Instructions [Note:200512.6 version of the database (error caused a hint in the select statement).You are in Payables and are trying to retrieve all of the invoices for an invoice batch. please review the following Payables Trial Balance information: Payables Trial Balance Interim Patches [Note:200363. all of the invoices are displayed if you inquire on the invoice batch via Invoices -> Inquiry -> Invoice Batches. If you think you are experiencing one of these issues you should log an iTAR. The GL Date Basis has been defined as System Date. This document may not be reproduced or transmitted in any form or by any means. [top] 5.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 ------------------. electronic or mechanical. All rights reserved. .sql script. All other product and service names mentioned may be trademarks of their respective owners. Note:166693.1 Upgraded invoices that had been voided and reissued on same day showing on trial balance.01 after upgrade.1. for any purpose. including implied warranties and conditions of merchantability or fitness for a particular purpose. Note:197629. 11i Trial Balance (APXTRBAL) fails after applying AP.H and higher fails with REP-1419: 'beforereport': PL/SQL program aborted (Error in GET_AP_AX_TRIAL_BAL_DATA). without the prior written permission of Oracle Corporation.1] Copyright © 2003 Oracle Corporation. . nor does it provide any other warranties or conditions. item. OE: Source Code is not set. 2. 2. The account segments or the resulting code combination are not valid. From OE into AR interface tables (running OE's Receivables Interface program) 1. FlexBuilder or the Account Generator is looking to a source (order type. From AR interface tables into AR (running AR's AutoInvoice programs) 1. Order is on hold. 4. 5. The tax code or tax authority has not been set up yet. Missing or invalid supplier accounts.2000 Oracle Corporation. 3. One user found that while they were able to complete this program and produce a record in the AR interface tables. 5. Inspection is required and was not performed. If this is not done. but not yet accepted. Salesperson's accounts or territory are incorrect. Receivables Interface is not running. organization) for the COGS account. and once for the item's acceptance in Inventory to be communicate back to OE. 4. 3. 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. AutoAccounting is looking to a source (item. 2. 4. OE features are set up to allow shipment even without onhand quantities. 2. 2. Cannot be 'User'. salesrep. Order line is on hold. but the account has not yet been assigned to its source. Item Status is changed to prevent transactions in Inventory.) . serial. Item control information is missing (lot. Inventory period is not yet open. transaction type� ) for the necessary accounts. From INV interface tables into INV (running the Inventory manager) 1. All Rights Reserved. It will not even show in the list of values when you run the Receivables interface program. SCOPE & APPLICATION This document is intended to supplement the documentation provided with the application. but Inventory features do not allow negative inventory. 4. The appropriate Remittance Address assignment does not exist. but the account is not yet assigned to its source. 3. Into AR interface tables (running INV's Create Intercompany AR Invoices program) 1. they could successfully import into AR. Missing or invalid freight accounts. Invoice Source is not set up correctly (OE Import Standard or Intercompany). Into AP interface tables (running INV's Create Intercompany AP Invoices program) 1. 3. 2.the conversion type of the intercompany invoice. Bookmark Fixed font Go to End Doc ID: Note:112803. By clearing the record from the pending transactions interface. Intercompany Invoicing Troubleshooting the Interfaces To actually set up and test intercompany invoicing features. 5. Same issue for the Tax Name in AP / Tax Code in AR. revision). Same COGS issues as with the original sales order. they could not import the record (using AR's AutoInvoice Import) into AR. Subinventory and/or locator are wrong. With the manager down. From OE into INV interface tables (running OE's Inventory Interface program) 1. Item/subinventory restriction is changed while the record is in the interface. Inconsistent profile option settings amongst multiorg responsibilities (especially INV: Intercompany Currency Conversion . 3.Page 226 of 259 -------------------------------------------------------------------------------Copyright (c) 1995. Ensure that the Transaction Manager is running before you run "Create Intercompany AR Invoices". a record had been created in INV's pending transactions interface. 4. This can become tricky during integration testing. should be ORDER ENTRY. corresponding to your invoice's bill-to address requirements. TIP: The ID of the record in the "Create Intercompany AR Invoices" request log equals the material transaction ID (helpful for researching issues). 2. COGS segments exist on the source and are valid. Between OE and INV for return processing (running OE's RMA Interface program) 1.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. when both setups and raw data are in a state of flux. 3. and is no longer available. One of the segments of the COGS account has been disabled in GL. 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. 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. then the order line cycle status will show as being interfaced. 4. but the desired code combination is no longer valid. Depending on the order cycle requirements. Listed below are common issues that you may want to consider when troubleshooting records in the interface tables. Legal Notices and Terms of Use. additional patch 1040780--"May" need. only avaible for Rel. 10.7 and 11: ----------------------------------------.11. All Rights Reserved.2 above for 1040780.1.lpc file. if getting ORA-01830 error. but the corresponding GL period is still open. Permanent Solutions for Rel. See Option A. after populating expenditure_item_date field of the ap_expense_report_lines_all table. the result was the closed period date in the GL date column of the AP invoices imported (Invoices/Entry/Invoices). --------. 10. Per developer.7). -------------------------------------------------------------------------------Copyright (c) 1995. since nobody asked for it ) Option B. Currently "D" (Rel. Navigation Path: ---------------. (Currently.7.7 and 11).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. .999563(available for both Rel. To achieve this end. Apply patches. if the weekend/accounting date for the source entity lies in a closed period. Apply Recent Patchset. and expected this date to be GL date in the AP invoice.after importing. 10. [BUG:999563] is included in both patchsets [BUG:1040780] is included in "U" only. -------------------------------------------------------------------------------Copyright (c) 1995.Page 227 of 259 . Legal Notices and Terms of Use. 2. 10.Option A. Solution Description: ===================== Workaround: Import invoices on timely basis: Make sure GL dates in importing invoices are falling into Open AP period. You have entered an open period date as GL date in the Parameter while importing the invoices. Solution Explanation: ===================== Per original patch 892224 (replaced by patch 999563).2000 Oracle Corporation. After applying patch 999563.Apply Recent Patchset. Bookmark Fixed font Go to End Doc ID: Note:1020292. However.2000 Oracle Corporation. 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: ========== . Legal Notices and Terms of Use. Also. code has been commented out in the apicdl.(N)->Other->Requests->Run. 11) and one-off patch 1040780. Rel. --------. 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. you need to request for one-off patch. GL Date for the closed period will cause problem in AP transfer process to GL. For rel. then apply patch 1040780. Currently "U" (Rel. All Rights Reserved. 11 patch was not made. Submit the request ¿Payables Accounting Process¿ 8.Receipt Accrual . a double charge for the expense and a double accrual of liability is created. 9. submit the request ¿Payables Transfer to General Ledger¿ with ¿Submit Journal Import¿ to NO 9.Period End¿ from PO Responsibility 3.Period End report. 2. and then switch to another currency at a later time. 6. 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. .Period End¿ needs to be run. and can change the currency before sending invoices to AP or AR. After successful completion of the aforesaid report. · If an invoice is created for the same item already accrued in General Ledger through Receipts Accrual . 2. Oracle Payables Technical Forum Displayed below are the messages of the selected thread. corresponding payments.Period End report has been completed Steps to enter Invoices / Payments: 1.AP Period has been closed. It is also possible to convert a lease contract from NCU's to Euro. Run the "Journal Import" from GL Responsibility and post the entries. Close the AP period Cautions: · Oracle does not recommend to re-open the AP periods after the Receipts Accrual . Because the conversion is made at the time the currency is changed prior to being sent to AP/AR and then stored. Close the AP Period for which the report ¿Receipts Accrual . Enter the invoices and if required. Swith to AP Responsibility 4. After completing the approvals. Thread Status: Active From: Sam Paper 12-Aug-99 03:57 Subject: AP Invoices/AP Payments AP Invoices/AP Payments . you are able to send payments in one currency for a certain time period. DO NOT run the online ¿Create Accounting¿ 7. Run the report ¿Receipts Accrual . . Open (re-open) the period that was closed in Step 1 5.Page 228 of 259 1. a user can handle payments in Euro.Period End report is completed. there in no need to run Journal Import to get them to GL.sillis@be. Thanks in advance Sam -------------------------------------------------------------------------------From: Oracle. though.Page 229 of 259 Hi. run "AP Transfer to GL". There is no need to print checks. I?m trying to convert historical AP invoices into Oracle (Apps. All! 1.I have no experience with it. though. Make sure that these historical invoices are the only ones selected for the posting. is to create a payment batch that selects these historical invoices and pays to a "dummy" bank. and AP will mark the invoices and payments as posted. Simply delete the posting batch. What you can do once they are imported.Belgium filip. We are about to do the same exercise-so thanks for letting me know if you succeedded or took another way. Then they will be marked paid. but they cannot be imported as paid and posted. -------------------------------------------------------------------------------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. Regards Filip Sillis PriceWaterhouseCoopers .03).pwcglobal.Brussels . Is there?s a safe (and not time consuming) programmatic way to load historical AP payments. Assuming the information is already in GL. To post.com -------------------------------------------------------------------------------From: Mohammad Tauseef 04-Dec-99 12:40 . This doesn't work for partial payments and should be tested first . 11. Carol Erickson 12-Aug-99 04:55 Subject: Re : AP Invoices/AP Payments You can import historical invoices into AP. 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. Additional Information on Reconciling AP to GL: Note 160267. Q: What articles.0 and 11. 11. Q. or manuals should I read for more information on Trial Balance? 4.Checking the Interface Tables” [top] 2. Have you found any solution to the problem yet? -------------------------------------------------------------------------------From: Oracle.} Frequently Asked Questions Oracle Payables Trial Balance 10. Q: What are the MetaLink keywords I should use when searching for Trial Balance on MetaLink? 5. 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). .7. 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 .} . Any invoices or payments with an accounting date AFTER the entered as-of-date will not be displayed on this report.} o\:* {behavior:url(#default#VML). "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.1 “AP Does Not Tie to GL.} w\:* {behavior:url(#default#VML). How is the 11i Trial Balance Different from 10.Page 230 of 259 Subject: Re : AP Invoices/AP Payments Hi.7 and 11.0? 1. Q: What formula should I use to balance AP to GL? 2. I'm in the same boat as you people.1 “How to Reconcile Between Accounts Payable and General Ledger” Note 175057.shape {behavior:url(#default#VML). 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.5 (11i) The information in this document has been reviewed and is current as of 21-Jun-2002 1. white papers. Q: How is the as-of-date used in the "Accounts Payable Trial Balance" report? 3."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. For 10. 2) Approve the Invoice. For More information and a list of reports changed in 11i see AP News Vol. Set auto offset method to None and choose Invoice from the drop down box and check the Allow Adjustments on Paid Invoices check box. APXTRBAL [top] 5. 3) Pay the Invoice from Accounts Payable(AP).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. 4) Interface the invoice to General Ledger(GL) from AP. Steps involved: 1) Create an invoice from Payables Manager GUI. [top] IMPORTANT: If you did not find the information you were searching for.7 and 11.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 ------------------. 6) From Expenditure Inquiry/Actuals screen bring up the expenditure item and try to perform a Transfer/Split/Recalculate Burden Cost.5 (11i): Trial Balance. there is now an option to run the report for a single supplier. All of the enhancements that had been outstanding against the report were reviewed and incorporated into the new report. The new accounting model made it necessary to rewrite the trial balance report. This patch is included in AP patchset T but Grants patchset 1.0: Trial Balance. if relevant. run the PRC:Interface Supplier Invoice from Payables. *** Warnings: Before applying the patch take a back up of the database. Solution Description ------------------. recalculate burden costs. It gives the following error: PA_INV_AUTO_OFFSETS_PAID. Bookmark Fixed font Go to End Doc ID: Note:1078501. white papers. 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. .Page 231 of 259 [top] 3. [top] 4.1D allows up to Q level for AP. 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. 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". 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.7 and 11. 5) From GMS. There is also an option to run the report for a single liability account. Q: What articles.You need to have the following setup in Payables -> Setup -> Options -> Payables. For example.In Grants Management Sytem. 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 (FAQ’s) . Besides this you need to apply an AP one-off server side patch 887905. APXRTB For 11. . 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. Q: How is the 11i Trial Balance Different from 10. 20. If all the supplier accounts have the same site addresses then choose the Supplier with the lowest number. If invoices are cancelled. 8.2000 Oracle Corporation. Bookmark Go to End • • • goal: How to Delete Invoices from AP Tables and Reimport fact: Oracle Payables 10. We are in the process of merging all the multiple accounts into one. Delete each invoice (Delete the invoice by quering up the invoice and then hitting the red X in the tool bar. any changes needed can be made to invoices in AP module.ii I cannot find a supplier or an employee on the database Please send details of the supplier or employee to DP section. which one do I choose? Check the supplier site addresses and choose the supplier whose site address matches your invoice address. All Rights Reserved.Page 232 of 259 -------------------------------------------------------------------------------Copyright (c) 1995. Then hit save to save the deletion) After all the invoices are deleted from the interface table.1 fact: APXIIMPT .7. Option 1. the same invoice numbers cannot be used again. Since the invoices are not posted. 8. then delete the information from the interface tables (using sql plus) and then reload the data and re-import.i Suppliers There is more than one account for the same supplier. OR 2. is the cleanest option and the option recommended by Oracle support.16. Legal Notices and Terms of Use... Two (2) options: 1. Cleanest way to fix issue is to adjust the invoices in the ap module.the invoice numbers will all ready exist for the vendors and cannot be used.7 page 4-116 Payables Invoice Import Program Payables will not import an invoice or expense report more than once.Payables Open Interface Import fix: Per Oracle payables user guide 10. If none of them match your invoice then ask DP section to create a new site. Minimum details required are as follows: • Name and full address . 8. . 9. 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.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. and Find. 10. Please confirm the completion date of the grant and enter a date on or before the grant completion date. • Scroll to the right to view the grant completion date.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.Page 233 of 259 • • 9. 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.i • • 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. See 5. See 5.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.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.i You cannot delete an invoice batch that contains invoices. The account codes for these control accounts are different from the grant codes that you have entered. you must delete the invoices in the batch first. If you want to delete an invoice batch. See further details on COA Philosophy document on the NewFis website .ii 10. 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. 10. If you have used the wrong invoice type then you would have to delete the invoice and re-enter the invoice. Batch Headers How to print batch headers • • • • Select the batch header you want to print by clicking on Query. See 5.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. 10. 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.Page 234 of 259 11.1 button and this brings up the Actions wndow.i.iii 12. • Select Special on the menu options at the top of the window. 11. The code to enter is the one that corresponds with the VAT rate on your invoice.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. and I am not sure of the VAT codes to use Recoverability is now defined at the account code level. 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. if not then make the necessary changes as described in section 4.ii How do I cancel an invoice that has been approved? • • Navigate to the invoices window Select the invoice to be cancelled. Once the deletion is completed save your work. 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. 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 .. • Check that your Invoice total agree with the distribution total. This is necessary because the system would not allow you to enter the same number twice for the same supplier.ii below.i 12. the system would allow you to cancel the invoice. Once the process have been completed save your work • • • • 12.i. 12. 11. • Choose Generate VAT distributions. 12. 12.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. 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. click on the Actions. 11. However. The system then comes up with a note indicating that VAT is being calculated. Please find further details on the VAT overview document on the Newfis website.i Most of our expenses are VAT recoverable.iii I have entered an expense claim with the wrong invoice type. On your invoices screen. 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. 13. 14. 12. Click on the Find button and this takes you to the Requests window. 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.i 14. 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. You do not need to send them to anyone for approval. You may approve more than one batch at a time. Click on the help menu and select View My Request and the Find request window comes up. If not completed click refresh again after a few minutes and click again until completed.iii An invoice was not approved in my batch of 10 invoices.ii . 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. Invoice Approval After running the batch approval process. 13. Distribution details that are not generated from purchase orders can be changed or deleted before the first level approval stage. vi. • After first Level Approval Distributions cannot be amended or deleted once they have been approved. running or completed. See page 45 of your AP training documentation for guidance on how to print reports. then Run. 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. Follow the procedure for adjusting invoices and remember to save your work . This refreshes the screen and you may then check if your invoices have been approved by reviewing the holds placed on them. 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. The system would only allow you to reverse the entries by clicking on the Reverse …1 button.v 13. Another alternative is to view your requests by carrying out the following: iv. 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. v.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.i • Please see the invoice adjustment chart at the end of this document. 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.ii 14. 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. iii The system would ask you to confirm the number of batches to be approved.Page 236 of 259 • 14. 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 . where you will attach this SOB in AP? 15. 1) when you create a table as ‘create table xyz as select * from abc’. What is 2 way . explain. 3 way and 4 way matching? 13.what all are copied from the table xyz? . What is Aging Periods? 9. What is use of AP Accounting Periods? 16. What is a Hold? Explain the types of Hold 18.What is Debit Memo & Credit Memo in Payables? 5. Can you hold the partial payment if yes then how? 21. what is prepayment & steps to apply it to an Invoice ? What are the Distribution Type while entering the Invoice? 3. What is a Payable Document? 10. Can you cancel the invoice? If yes. What is Tolerance? 8. Explain the set up used for Automatic or Manual Supplier Numbering. 20. Which interface tables are used for Invoice Import . 2. You created a set of book . What is Interest Invoice and how it can be created? 17.Page 238 of 259 Questions For Oracle Payables 1. How many key flexfields are there in Payables? 19. What's the difference between the "Payables Open Interface Import" Program and the "Payables Invoice Import" program? 4. What is Proxima Payment Terms? 6. What will accrue in Payables? 7. What are the tables associated with Invoice? 11. How you will transfer payables to general ledger? 14. What are the types of Invoices . give the important columns? 12. 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 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 . 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 . ).ename = b. Change SQL prompt name SQL> set sqlprompt “Manimara > “ Manimara > Manimara > 3.---------1 7782 CLARK 2 7788 SCOTT 3 7839 KING 4 7844 TURNER 7.--------. ename from emp where rowid in (select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start). Example. Enter value for upto: 10 Enter value for Start: 7 ROWNUM EMPNO ENAME --------. Empno Ename 101 Scott 102 Millor 103 Jiyo 104 Smith 5. 0)). or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.Page 241 of 259 Ans : b Oracle Interview Questions and Answers : SQL 1.dv). 2. Output: 1 Scott 2 Millor 3 Jiyo 4 Smith 6.'NA') ----------------------NA 300 . The output like. instead of blank space. Switch to DOS prompt SQL> host 4. I know the nvl function only allows the same data type(ie.ename). How do I write the query? SQL> select nvl(to_char(comm. Output : NVL(TO_CHAR(COMM). 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). number or char or date Nvl(comm.dv=tb. How do I display row number with records? To achive this use rownum pseudocolumn with query. like SQL> SQL> select rownum. Display the records between two range select rownum.'NA') from emp. To see current user name Sql> show user. if commission is null then the text “Not Applicable” want to display. empno. 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 from emp. SQL%ROWCOUNT.sal<=b. : 2. cursor_name%NOTFOUND. PL/SQL construct to identify each and every work are used. because oracle automatically closed the implicit cursor after executing SQL statements.'JSP')) --------.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b. One Thousand Six Hundred only. Display the number value in Words SQL> select sal. SQL%NOTFOUND. Rs. Here SQL%ISOPEN is false. To view installed Oracle version information SQL> select banner from v$version. 13.2) from emp).0) in (select rowid. 1 3 5 Even number of records: select * from emp where (rowid.Page 242 of 259 500 NA 1400 NA NA 8. Eight Hundred only. 1600 Rs. Display Odd/ Even number of records Odd number of records: select * from emp where (rowid. mod(rownum. Three Thousand only. Oracle cursor : Implicit & Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements.')) "Sal in Words" from emp / Salary Sal in Words ------. SAL (TO_CHAR(TO_DATE(SAL.-----------------------------------------------------800 Rs.'j'). For SQL queries returning a single row. cursor_name%ISOPEN 10. Which date function returns number value? months_between . SQL%ISOPEN Tips : 1. 9.1) in (select rowid. cursor_name%ROWCOUNT.----------------------------------------------------800 eight hundred 1600 one thousand six hundred 1250 one thousand two hundred fifty If you want to add some text like. PL/SQL declares all implicit cursors. 'jsp')) from emp. Implicit Cursor attributes Same as explicit cursor but prefixed by the word SQL SQL%Found. 14. Enter value for n: 2 SAL --------3700 12.'J'). (to_char(to_date(sal. SQL> select sal "Salary ". One Thousand Two Hundred Fifty only. Explicit Cursor attributes There are four cursor attributes used in Oracle cursor_name%Found. Find out nth highest salary from emp table SELECT DISTINCT (a.sal)) FROM EMP B WHERE a. the cursor needs to be explicitly declared. 1250 Rs. 11.2) from emp) 2 4 6 15. (' Rs. All are Boolean attributes. For queries that returning more than one row. 'Jsp'))|| ' only.'j'). mod(rownum. '|| (to_char(to_date(sal.sal). the output like. is called as Cursor. What is the maximum number of triggers.can you run Report without Parameter Form? Answer :. Value_Error. What is the output of SIGN function? 1 for positive value. -1 for Negative value. Oracle –Reports 6i 1. What is default Unit of Measurement in Report? Answer : Inch Default Unit of measurement is Inch.Page 243 of 259 16. 10. USER . What is the purpose of Summary Column in Reports? Answer : A performs a computation on another column's data. Which of the following Option is valid for Panel/Print Order Property? in Report Builder? Answer : Across Down/Down Across 6. Invalid_Cursor 18. placeholder column.How many types of Columns are there in Reports6i? Answer : Three There are three types of Columns. Other way to replace query result null value with a text SQL> Set NULL ‘N/A’ to reset SQL> Set NULL ‘’ 19. Formula Column. What are PL/SQL Cursor Exceptions? Cursor_Already_Open. 7. can apply to a single table? 12 triggers. . Any three PL/SQL Exceptions? Too_many_rows. 9. including placeholder columns. What are the more common pseudo-columns? SYSDATE. 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. ROWNUM 20. 8. No_Data_Found. Others 17. 21. summary column. 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. CURVAL.YES Yes it is possible to run the report without parameter form by setting the PARAM value to Null 4. What is the purpose of Formula Columns? Answer : A column performs a user-defined computation on another column(s) data.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. UID. ROWID. NEXTVAL. 0 for Zero. 3. 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. Zero_Error. WHERE.MESSAGE This procedure displays a message with the message number and text that you specify. 3. Between Pages B. Designing New Forms. Define New/Custom Responsibility c. SQL*Loader k. Request Set Stage Function i. Can lexical reference be made in PL/SQL statement? Answer : No 14. Define Logon Users b. HAVING. number.Page 244 of 259 11. Workflow automations Role of System Administrator: a. SQL*Plus 2. After the message is raised and you accept it. This information is maintained in the TCA Registry. Developing PL/SQL stored procedures e. What are bind variables? Ans:-Variable that are used to replace a single value in SQL or PL/SQL. Define Data Groups . After Parameter Form C. 12. Spawned j. Specifically. Oracle Trading Community Architecture (TCA) is a data model that allows you to manage complex information about the parties. Host b. and the network of hierarchical relationships among them. or date. Before Parameter Form D. Developing Interfaces d. Before Reprort Answer : C 15. The message is displayed in the format below. Multi Language Function f. GROUP BY. a. who belong to your commercial community. Execution methods? Ans. Role of Technical Consultant: a. CONNECT BY. Difference between Application Developer and System Administrator? Ans. Oracle Reports g. or customers. Which of the following Procedures displays message number and text that you specify? Answer : SRW. and START WITH clauses of queries. which is the single source of trading community information for Oracle EBusiness Suite applications. Forms and Reports customization c. locations. ORDER BY. the report execution will continue. Immediate c. Is there a way to change the same format mask in a lot of fields in one step? A. Programs and Reports b. Yes Answer : A Select all the Items and change the format mask for all the item once. Java Concurrent Program e. bind references may be used to replace expressions in SELECT. 13. Following of which trigger will fire first? A. Java Stored Procedure d. including organizations. What is TCA (Trading Community Architecture)? Ans. Bind references may not be referenced in FROM clauses or in place of reserved words or clauses. PL/SQL Stored Procedure h. 1. such as a character string. User exits in Reports? Ans. (b) Collect and display additional information for your business as needed. 2. Cloning of OA 4. Profile – Flexfields: Open Descr Window’ (FND_DESCRIPTIVE_FLEXS) 5. Create the report using the report builder. users profile values and location (country) of the site. Request Set and Where do you define it ? Ans. Ex. By using flexfields. Create a concurrent program to that executable.This user exits allows you to use Flex fields in Reports FND FLEXIDVAL . Place the report definition file in the module specific reports directory. Create an executable for the report definition file. Define Printers f. What are Flexfields? Ans. Define Concurrent Managers e. Can be used in AFTER. Associate the concurrent program to a request group. Patches e.This user exit ensures that all the memory allocated for AOL user exits has been freed up properly. Advantages of stages are the ability to execute several requests in parallel and then move sequentially to the next stage. Define/Add new Modules Role of an Apps DBA: a. 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. Key Flexfields: You use key flexfields to define your own structure for many of the identifiers required by Oracle Applications. 6. 3. Defining flexfields enables you to tailor Oracle Applications to your own business needs.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. Installing of Application b. FND SRWINIT . All of the requests in a given stage are executed in parallel. FND_SRWEXIT . Can be used in BEFORE-REPORT Trigger. USER EXITS are used in Oracle APPS to access user profile values and perform proper calculation. FND FLEXSQL . Responsibility: System Administrator . Request sets allow you to submit multiple requests together using multiple execution path. 4. 1. of Other AOL User exits available in Reports are given below. A stage is a component of a request set used to group requests within the set. you can: (a) Structure certain identifiers required by oracle applications according to your own business environment.This user exits allows you to use Flex fields in Reports 7. A Flexfield is a customizable field that opens in a window from a regular Oracle Applications window. Migration d.REPORT Trigger FND FORMAT_CURRENCY To format the currency amount dynamically depending upon the precision of the actual currency value. standard precision. A request set is a collection of reports and /or programs that are grouped together. 5. Report registration process? Ans. Test Network Preferences g. Upgradation c. Routing maintenance of QA f.Page 245 of 259 d. such as a character string. Translate Dependent . and START WITH. you may not need to predefine individual values at all before you can use your flexfield. Registration of PL/SQL with parameters? Ans. you choose how many segments you want to use and what order you want them to appear. When you first define your flexfields. ORDER BY. Bind references may not be referenced in FROM clauses or in place of reserved words or clauses. and concurrent programs that a user. You define your value sets first. 1. 5. CONNECT BY. Independent 3. 4. or date. A request security group is the collection of requests. Translate Independent 8. segments in different structures of the same flexfield. WHERE. You can share value sets across key and descriptive flexfields. operating under a given responsibility. The decisions you make affect how you define your value sets and your values. can select from the Submit Requests window. 3. You also choose how you want to validate each of your segments. You create a bind reference by entering a colon (:) followed immediately by the column or parameter name. ORDER BY. Oracle Application Object Library uses values. Value Sets? Ans. How many groups in Matrix Report? Ans. You typically define your individual values only after your flexfield has been completely defined (and frozen and compiled).Page 246 of 259 Nav: Concurrent -> Set 7(A). GROUP BY. value sets and validation tables as important components of key flexfields. HAVING. Lexical references are placeholders for text that you embed in a SELECT statement. GROUP BY. 11. Attach the concurrent program to that procedure. Create a public synonym for that procedure in the Apps schema. number. bind references may be used to replace expressions in SELECT. Lexical Parameters and Bind Parameters? Ans. CONNECT BY. Dependant 2. Retcode. and even segments within the same flexfield structure. 2. Pair 5. descriptive flexfields. WHERE. Bind references (or bind variables) are used to replace a single value in SQL or PL/SQL. either before or while you define your flexfield segment structures. Specifically. Create a concurrent program. and START WITH clauses of queries. None 4. FlexBuilder. Errbuf 2. Create the executable for that procedure. HAVING. 10. Create the procedure in the module specific schema. Value Validation Types? Ans. 8. You can use lexical references to replace the clauses appearing after SELECT. and Standard Request Submission. Navigation Path: Login – Application Developer -> Application -> Validation -> Set 11(A). 9. Any parameter which are to be passed should be succeeded with these two parameters and have to be registered. Special 6. Define Request Group? Ans. these two parameters are not mentioned. Table 7. request sets. The minimum of groups required for a matrix report are 4. You can also use value sets for report parameters for your reports that use the Standard Report Submission feature. You create a lexical reference by entering an ampersand (&) followed immediately by the column or parameter name. Note: There are two mandatory parameters 1. Depending on what type of value set you use. 1. FROM. You can share value sets among segments in different flexfields. When calling the procedure. You can specify your program as being incompatible with itself. 1. it should run alone. Your list displays the user-friendly name of the program. Run Alone: Indicate whether your program should run alone relative to all other programs in the same logical database.Page 247 of 259 11(B). 12. you can enter any valid application name. Guarantee 14. 1. if your program is incompatible with all programs in its logical database. You can also manually update and enter new information using the Customer windows. Incompatibility in report registration and Run Alone? Ans. Application: Although the default for this field is the application of your concurrent program. Credit Memo 3. The following diagram shows how customer information is imported into the Oracle Receivables tables. AR-Invoices (Class)? Ans. Prepayment 7. In Dependant value set information screen mention the Independent value set name. PO Default 6. Navigation Path: Login -> AOL -> Application -> Validation -> Set Select the validation type as “Dependant” and click on ‘Edit Information’ button. 13. Once customer information is imported into Oracle Receivables. If the execution of your program interferes with the execution of all other programs in the same logical database (in other words. Debit Memo 4. How to define a value set depending on other value set? Ans. including itself). Customer Interface? Ans. Credit Memo 3. and the description of the program. Withholding Tax 9. you can use Customer Interface to import additional data for that customer (such as additional contacts or addresses) and to update existing information. Quick match 8. Deposit 5. Expense Report 5. the short name. AP-Invoice types? Ans. Name: The program name and application you specify must uniquely identify a concurrent program. Chargeback 2. Identify programs that should not run simultaneously with your concurrent program because they might interfere with its execution. Standard 2. Debit Memo 4. Use Customer Interface to import and validate current or historical customer information from other systems into Receivables. Mixed 15. . 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). responsibility. Navigation Path: Login – System Administrator -> Profile -> System Examples: Signon Password Hard to Guess Signon Password Length Set of Books Name Flexfields: Autoskip 18. and user. Your settings affect users as soon as they sign on or change responsibility.) 17. application. Multi Org? Ans. A user profile is a set of changeable options that affect the way your application looks and behaves. you control how Oracle Applications operate by setting user profile options to the values you want. Purchasing. As System Administrator. You can set user profile options at four different levels: site. 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. Employee Details? . What are Profiles? Ans. MRP etc.Page 248 of 259 16. Difference between character and bitmap report? Ans. To get a landscape report. The PostScript file is a set of instructions telling the printer exactly what to print and how to print it. . 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. Postscript is a universal printer language and any postscript printer is able to interpret your different design instructions. 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). for example. If you want a landscape bitmapped report. Bitmapped reports are output as PostScript files. The standard is in effect so a report prints as identically as possible from both conventional and postscript printers. Character mode reports generate ASCII output. specify this either in the Reports Designer or in the execution options of your concurrent program. In postscript. This keeps each operating unit's transaction data separate and secure. In ASCII you cannot dynamically change the font and character size. you can make "C" bold and in a different font and point size than "c".” 20. In Oracle Reports Designer. Both or either could also be bold. a print style is still needed to determine the printer driver used. Enter employee records. Bitmap vs. What is the Multi Org and what is it used for? Ans. AR Invoice Tables? Ans. the Post Script file must be generated as landscape. Bitmap Report? Ans. for example. the APPLICATIONS STANDARDS REQUIRE the report to be designed in ONE FONT/ ONE CHARACTER SIZE. Both or either could also be bold. Use the following query to determine if Muli Org is intalled: “select multi_org_flag from fnd_product_groups. character mode. 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. To avoid confusion. "C" must be in the same font and character size as "c". 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. create a special print style for bitmapped reports and make that the required style for all bitmapped reports in the Define Concurrent Programs form.Page 249 of 259 Ans. In Oracle Reports Designer. Character-Mode Report Printing These sequences contrast the two printing environments. Multi Org or Multiple Organizations Architecture allows multiple operating units and their relationships to be defined within a single installation of Oracle Applications. When you enter an invoice either through the Transaction window or through the AutoInvoice program. 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. "C" can be in a different font and point size than "c". This is because you are generating postscript output. 22. When printing bitmapped reports. In ASCII. To ensure that Payables can create a supplier record during Invoice Import. bitmap mode. Page 250 of 259 23. and the report fails. or if ONFAILURE=COMMIT. 9 10 11 . What is difference between . Report definition file <report name>. 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. SET TRANSACTION READONLY is executed (if specified via the READONLY argument or setting). PO_VENDOR_SITES_ALL 3. AP_INVOICE_LINES_INTERFACE 29.rdf Report runfile <report name>.) COMMITs can occur during this time due to any of the following--user exit with DDL. RA_CUSTOMER_PROFILES_INT_ALL 28. Runtime Parameter Form appears (if not suppressed). SRW. Difference between Global segments and Context-Sensitive segments? Ans. Report Triggers? Ans. AP_INVOICES_INTERFACE 2. BEFORE REPORT 4. 1. 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.DO_SQL with DDL.rdf and . 1. Context-Sensitive segments: Context-Sensitive segments occur depending on the context. After Parameter Form trigger is fired (unless the user cancels from the Runtime Parameter Form). Before Report trigger is fired. COMMIT is executed (if READONLY is specified) to end the transaction. Data conversion Vendor data effected tables? Ans. BETWEEN PAGES 5.rep? Ans. Module related Flex fields? Ans. 1. PO_VENDORS 2. 1. Report is "compiled. Columns used for global segments cannot hold an context-sensitive segments.rep 24. AP Invoice conversion data effected tables? Ans. PO_VENDOR_CONTACTS 27. 26. RA_CUSTOMERS_INTERFACE_ALL 2. After Report trigger is fired. (Note that data can be fetched at any time while the report is being formatted. Gobal Segments: Global segments are segments that appear regardless of context. COMMIT/ROLLBACK/NOACTION is executed based on what was specified via the ONSUCCESS argument or setting. AFTER PARAMETER FORM 3. Data conversion Customer data effected tables? Ans." Queries are parsed. BEFORE PARAMETER FORM 2. The report is executed and the Between Pages trigger fires for each page except the last one. 7.Draw the layout 3. FA). The value is case insensitive. Copy the report file in the appropriate directory. The flexibility of ALERTS allows a database administrator the ability to monitor activities from tablespace sizing to activities associated with particular applications (i. Packages: Packages provide a method of encapsulating and storing related procedures. the keyword or parameter appears here.Right Click on 'MODE' and select 'Properties' Enter 'BITMAP' as the 'Initial Value' and click OK. 6. 4. 6.fmb file in AU_TOP forms directory Place the . Calls to TOKEN( ) and RAISE( ) raise predefined errors for Oracle Workflow that are stored in the WF_RESOURCES table. This is an alternative to raising PL/SQL standard exceptions or custom-defined exceptions. What is Token and used for? Ans. Close the Layout Editor window. 5. Save the report . Syntax procedure TOKEN (token_name in varchar2. 31.Page 251 of 259 30. Create the form using the form builder. Difference between function and procedure? Ans. 32. b) PERIODIC ALERTS are activated on a scheduled basis to monitor database activities or changes. Procedure: Defines an error token and substitutes it with a value. Generate the executable code (. in the concurrent program. token_value in varchar2).Build the query 2.call it 'first. 2.fmx file in Module specific top forms directory. The error messages contain tokens that need to be replaced with relevant values when the error message is raised.fmx) Place the . open up the 'System Parameters' 4. 1. 5. Under Data Model. Form registration setps? Ans. functions. 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.rdf'. Token in Concurrent Program creation : For a parameter in an Oracle Reports program. variables and other package contents. 3. Procedures do not return values which functions return one One Value. Set the FORMAT to POSTSCRIPT and style as A4. GL.e. 33. Register the form with AOL Associate a form function for the form Attach the form function to a menu . Oracle Alerts are used to monitor unusual or critical activity within a designated database. Alerts can be created to monitor a process in the database and to notify a specific individual of the status of the process. AP. 34. 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. 1. you can skip this field. Define Alerts in Apps? Ans. For other types of programs. Steps to Create a Bit Map Report? Ans. Open_Form and New_Form Definitions? Ans. Account Payables: 4. If Row Set Description is empty. If this field is empty. 38.Page 252 of 259 35. and Currency control values.…. General Ledger automatically names ad hoc reports as follows: FSG-AD HOC-<Sequence Generated Number>. You can define ad hoc financial reports as necessary to meet special reporting needs. TKProf a12345. Used rarely. 6. Define a row set.] 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. Choose OK to return to the Run Financial Reports window. . Enter a name for your report Title. Interface Tables details? Ans. Suggestion: We recommend that you delete ad hoc reports periodically to improve system performance. Choose the Define Ad Hoc Report button. 5. 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. To define and run an ad hoc financial report: 1. Enter any additional report information.option2. 2. including Budget. Account Receivables: 3. Navigate to the Run Financial Reports window.trc mytrace. Define a column set. the report title will default to the Row Set Description. TKProf converts the raw trace files into a more readable format SYNTAX: TKProf tracefile outputfile [sort=option][explain=username/password] Ex. Prerequisite : 1.out explain scott/tiger Tracefile The name of the trace statistics file. You do not assign a name to an ad hoc report. This is essential for performance investigation Sys=no TKProf skips recursive SQL and statements run as the SYS user. Call_Form. Instead. 4. 37. 2. An ad hoc report is one you define at the time you run financial reports. which is found in the user_dump_dest directory (Normally $ORACLE_HOME/rdbms/log) Outputfile The name of the output file Sort= [option1. Encumbrance. 1. Adhoc Report? Ans. the report title will default to Row Set Name. 3. Explain Tkprof? Ans. General Ledger : 2. Enter the Row Set and Column Set to use for the report. OPEN_FORM: Opens the indicated 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. Form and Non-Form function? Ans. If the calling form had been called by a higher form. NEW_FORM: Exits the current form and enters the indicated form. Form Builder releases memory (such as database cursors) that the terminated form was using. Form Builder keeps the higher call active and treats it as a call to the new form. Form Builder runs the new form with the same Runform options as the parent form. The calling form is terminated as the parent form. Purchase Order Report Source File : POXPRPOP 1) On Plane paper . Form Builder runs the new form with the same options as the parent form. Form functions have the unique property that you may navigate to them using the Navigate window. that is.Page 253 of 259 CALL_FORM: Runs an indicated form while keeping the parent form active. 39. Use OPEN_FORM to create multiple-form applications.SET_ORG_CONTEXT(81). applications that open more than one form at the same time.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. a function executed from within a form. Subfunction (Non-Form Function): A non-form function (subfunction) is a securable subset of a form's functionality: in other words. Form Builder runs the called form with the same Runform preferences as the parent form. If the parent form was a called 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 . Form (Form Function): A form function (form) invokes an Oracle Forms form. CONFINE MODE Layout editor mode that prevents child objects from being moved or resized on or outside their parent objects. Header level changes d.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. 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. ensuring the position of the first object in relation to the second object. anonymous blocks cannot be referenced by other program units. and adjusts the positions of other layout objects that might otherwise be affected by the repositioning or resizing of the objects. Decode usage f. . Portrait format c.2 Left Description 31 – 70 Alpha Number Left General Report Modifications a. Pre printed stationary b. Line level changes e.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. Since they are unnamed. ANCHORA Layout object used to fix a spot on one object to a spot on another object.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. Plan paper . Zero ‘0’ suppressing g. you must precede the parameter name with an ampersand (&). NULL VALUE = The absence of a value. INSERT MODE = A mode in which each character you enter is inserted at the cursor. the part of a chart template that defines the basic structure of a chart. and (optionally) to guarantee that every row is unique. For a lexical reference. FOREIGN KEY := A value or column in one table that refers to a primary key in another table. pushing the following characters to the right. or until another object explicitly removes it.Page 255 of 259 BOILERPLATE := Text and/or graphics that appear in a report every time it is run. and other package constructs together as a unit in the database or on the client. TEXT_IO package). or DELETE statement is issued against the associated table in the database. INDEX = An optional structure associated with a table that is used by Oracle Server to locate rows of the table quickly. A cursor points only to one row of data at a time. frequency. An internal pointer to data retrieved by a query. PACKAGE FUNCTION = A PL/SQL function provided with the software that can be referenced anywhere within a program unit. GLOBAL VARIABLE = A logical container that exists across an application. In some products this is called "constant" text or graphics. Several packages are also supplied with the Oracle database server for referencing by stored program units (e..g. they also offer increased functionality and database performance. variables. The software provides several built-in packages which contain PL/SQL constructs that can be referenced by client-side program units (e. CURSOR:= 1. UPDATE. or any combination of these. A small icon representing the position of the mouse. LOCAL VARIABLE = A PL/SQL variable declared only within the scope of the current program unit. The opposite of replace mode. depending on the selected tool. a user exit. DBMS_OUTPUT package). but does not determine the way the data is plotted. a layout object used to enclose other layout objects and control the formatting. a SQL statement. and positioning of several objects simultaneously. GROUP FILTER A PL/SQL function that restricts the data fetched by a group. FUNCTION = A PL/SQL subprogram that performs a specified sequence of actions. DATABASE TRIGGER:= A stored PL/SQL block that is implicitly executed when a triggering INSERT. See also: debug trigger. the application maintains the variable until the application is exited. In Report Builder. FORMET TRIGGER :=A PL/SQL function that allows you to dynamically change the formatting attributes of an object.g. Can reside and execute on the client and the database server. While packages provide the database administrator or application developer organizational benefits.. however. LAXICAL REFERENCE = A reference to a parameter used to represent a string of text in a SQL SELECT statement. 2. FORMULA COLUMN := A user-created column that gets its data from a PL/SQL function or expression. and then returns a value. PACKAGE = A method of encapsulating and storing related procedures. FRAME = In Graphics Builder. The shape of the cursor varies. . When an application uses a global variable. functions. 2. you can use built-in subprograms to move the cursor to any row in the data set. PL/SQL = Oracle's proprietary extension to the SQL language. Adds procedural and other constructs to SQL that make it suitable for writing applications. 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. RECORD = One row fetched by a SQL SELECT statement. parameters are used to pass information between components such as Form Builder and Graphics Builder. while rows in which the comparison returns "false" are rejected from the result. RELATIONAL OPERATOR = A symbol used in search criteria to indicate a comparison between two values. The body is optional if the package consists only of declarations. The body is optional if the package consists only of declarations. . data and relations between them are organized in tables. A variable you can change at runtime. line. PROCEDURE = A PL/SQL subprogram that performs a specified sequence of actions. PRIEVIEVE = The interface with which you view and scroll through report output online. 2. A PL/SQL construct used to pass information to a subprogram. which may include private subprograms and datatypes.Page 256 of 259 PACKAGE BODY = Includes the actual implementation of the package. and package specifications and bodies are types of program units. and deleting objects. editing. RECORD GROUP = An internal data structure object with a column/row framework. PLOT TYPE = The type of element used to plot a field on a chart. or symbol. Program units can reside and execute on the client and the database server. See also: stored program unit. In Forms Developer. PROJECT NAVIGATOR = The window containing a hierarchical list of project items for the current session. For example. such as bar. PROGRAM UNIT = A PL/SQL code structure that can be independently recognized and processed by the PL/SQL compiler. subprogram specifications and bodies (procedures and functions). Anonymous blocks. Can reside and execute on the client and the database server. 3." Rows in which the comparison results in "true" are returned in the result (fetched). in the subprogram call MYPROC (x). and integrity constraints. storage and retrieval operations. that belong to the form module in which they are defined. RDBMS = Acronym for Relational Database Management System. the user can choose from two different schema by which to organize the objects. renaming. and enables the user to accomplish several tasks such as creating. .x is a parameter. PARAMETER = 1. 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. PROPERTY = A characteristic of an object that determines the behavior or appearance of that object. In such a database. PACKAGE SPECIFICATION = Includes the actual implementation of the package. which may include private subprograms and datatypes. A database that allows the definition of data structures. The list appears in outline form. Although only one is visible at any time. such as the equal sign in "WHERE DEPTNO = 10. What do you need to do to allow a different user to see your output file? A. Schema objects includes tables. or "fired. with a type of summary. SQL STATEMENT = A SQL instruction to Oracle. VARIABLE = A named object that can be assigned a value and whose assigned value may change over time. DESTYPE). SCHEMA = A collection of related database objects. table.g. and then return control (and possibly arguments) back to Forms Developer. running totals. REPLACE MODE A mode in which each character you type replaces the current character at the cursor. you can use the Selector to choose the top 10 cities based on Sales or those cities whose Sales exceeded Quota by 15 percent.. stored in a relational database or server. . TABLE = A named collection of related information. Such actions may apply to any single file type. in a twodimensional grid that is made up of rows and columns. SYNTEX VARIABLE = One of the variables that are provided with Reports Developer (e. USER EXIT = A way in which to pass control (and possibly arguments) from Forms Developer to another Oracle product or 3GL. Data group D. The opposite of insert mode. using one of the packaged summary functions provided by Report Builder. and other summaries of the data in a report. graph.Which of the following is not associated with a responsibility? A. stored in a relational database or server." upon a specific event. USER DEFINED ACTION = A custom action defined by a Project Builder user. indexes. The Selector also allows you to sort dimension values and to create and retrieve saved selections. SELECTOR = (Oracle Express) A set of tools that you use to choose the dimension values to include. grand totals. Password expiration Answer: D 2. views. and database links. For example. which computes subtotals. stored program units. TRIGGER = A PL/SQL procedure that is executed. Menu B.Page 257 of 259 REPEATING FRAME = A layout object used to display rows of data that are fetched for a group. See also: action. in a twodimensional grid that is made up of rows and columns. synonyms. SQL = A standard interface for storing and retrieving information in a relational database. or dimension list box. pre-defined action. &Logical Page. or to all file types. usually grouped by database userid. SQL is an acronym for Structured Query Language. VISUAL ATTRIBUTE = A named object that can be assigned a value and whose assigned value may change over time. clusters. Request group C. The user must log on as a system administrator. SQL SCRIPT A file containing SQL statements that you can run to perform database administration quickly and easily. SYSTEM ADMINISTRATION 1. A SELECT statement is one type of SQL statement. in a report. for instance. Several SQL scripts are shipped with Oracle products. TABLE TYPE = A named collection of related information. sequences. SUMMARY COLUMN = A column. Stage B. Restrict it by request group C Eliminate the Submit Another Request dialog window D. None of the above Answer: B 8.Which one of the following will be the correct outcome with two include rules in a combined rule? A. Verify C. All of the above Answer: D 9. The user must be logged on with the same responsibility as the user that generated the output file. Responsibility .Which is not a component of a request set? A. D. Request D. All of the above Answer: D 5. When the request group is assigned to a responsibility B. Internal monitor B. When the request group is specified for the Submit Request form C.Page 258 of 259 B. Group C.Which of the following is the overriding level for profile option values? A.Which of the following is not a component of parallel concurrent processing? A. Program will be included if the program is in both of the include rules C. Application C. When the concurrent manager is down B. Deactivate D. When there are not enough requests D. Program will be included if the program is run by one of the two Oracle IDs in the include rules D. When the concurrent manager is coming up C.When will the number of actual processes be less than the number of target processes? A. and the profile option Concurrent: Report Access Level value must be set to Responsibility. Program will be included if the program is in one of the include rules B.How can you customize the SRS process? A. 3. Restart B. When the request group is defined with request sets D. Parameter Answer: B 6. Transaction manager C. Primary node D. Change the form title B. When the request group is defined with stage functions Answer: A 4.When will a request group become a request security group? A. C.Which of the following operations cannot be performed with the internal concurrent manager? A. Secondary node Answer: B 10. 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. Terminate Answer: A 7. Answer: C The user must have the View My Requests form in system administrator mode. Site B. audit tables D. Manual Answer: A 13. Subroutine D. Through the printer type of the selected printer and the selected Answer: A . audit groups. Automatic C. Category B. Execution method C. Default value B. Through the selected print style and the selected printer driver C. User Answer: D 11.Which of the following determines the subdirectory for an executable? A.Which of the following is the correct sequence for setting up database change audits? A. Application name B.Which of the following is not a document sequence type? A.How are output files associated with various printer components? A.Page 259 of 259 D. audit tables. audit groups. Audit trail update tables request. Through the selected printer type and the selected print style D. Oracle Reports parameter D. Execution filename Answer: B 14. Gapless D. Audit groups. audit installation. Audit Installation Answer: B 12. Audit installations. audit groups. audit trail update tables request. Through the printer type of the selected printer and the selected print style B. Audit installation. audit trail update tables request C. audit tables. audit tables. Profile option value C. Value set Answer: C 15.For what is the Token field used? A. audit trail update tables request B. Documents Similar To 3186382-oracleapplicationsfaqsSkip carouselcarousel previouscarousel nextOracle Financials_Real Time Problem & Solutionsuploaded by iam_ritehereOracle Financials for Beginnersuploaded by jhnnrmrz7677490-What-is-Oracle-Financialuploaded by Vidya SagarBasic Concepts in Oracle Financialsuploaded by Dock N DenOracle Financial Functional Questionsuploaded by qeulkiteOracle fusion applications APuploaded by Rai Prashant Kumar RaiOracle Financials Notesuploaded by AbhishekOracle Financials Faqsuploaded by Ajit SamalAR Table Mappinguploaded by Venkatesan RamamoorthyOracle Apps Financialsuploaded by vikasgandraOAF Framework Guideuploaded by Saurabh SonkusareOracle Fusion FA Setupuploaded by ranjeetdonR12 Oracle Financials FAQsuploaded by Amir Javed2 Oracle Finance-Practicaluploaded by NARENDRAoracleuploaded by Ujjawal SinghReceivables TRAINinguploaded by Srinivas GirnalaDumitruGeorgiana(tema5)uploaded by Madalina CorneaOracle Hyperion Financial Managementuploaded by konda83Account Payablesuploaded by tiwari_anupam2003R12 Sequencing in Ledgersuploaded by aggersainOracle - Gl - Manualuploaded by Seifert IoanaOracle Fusion Applications Enterprise Structures Concepts Guideuploaded by Damon RunionAll_In_One__Oracle_Apps_.docuploaded by Umesh Kataria28-technical-interview-questions-in-oracle-appsuploaded by smslcaOracle Fusion Applications Financials Implementation Guide IIuploaded by Balaji ShindeWithholding Tax White Paperuploaded by yasserlionRequester change orderuploaded by mousabmOracle Financials Setups_ General Ledger Interview Questions in R12uploaded by Suman BeemisettyOracle Receivables: Technical & Functional Overviewuploaded by Muhammad LuqmanFooter MenuBack To TopAboutAbout ScribdPressOur blogJoin our team!Contact UsJoin todayInvite FriendsGiftsSupportHelp / FAQAccessibilityPurchase helpAdChoicesPublishersLegalTermsPrivacyCopyrightSocial MediaCopyright © 2018 Scribd Inc. .Browse Books.Site Directory.Site Language: English中文EspañolالعربيةPortuguês日本語DeutschFrançaisTurkceРусский языкTiếng việtJęzyk polskiBahasa indonesiaYou're Reading a Free PreviewDownloadClose DialogAre you sure?This action might not be possible to undo. Are you sure you want to continue?CANCELOK