You are on page 1of 15

Oracle /Dev 2000 Test - 1. 1. Which of the following objects hold the trigger definition of a database trigger a.

User_objects b. User_source c. User_triggers d. User_tables 2. Which of the following is not an advantage of using packages a. b. c. d. Modularity Information hiding Efficient storage Better performance

3. A packaged function can assert maximum purity levels by specifying one of the following in PRAGMA_RESTRICT_REFERENCES a. b. c. d. RNDS, WNDS, WNPS, RNPS, RNPS, RNDS, RNDS, RNDS, WNPS RNPS RNPS WNPS

4. Package P1 refers another package P2. The specification of P2 has been changed and compiled. P1 is not recompiled. What will happen if we try to execute P1 a. The error is existing state of package is discarded b. The package P1 is automatically compiled c. The timestamp of package P2 has been changed 5. What built-in package should be used to schedule batch jobs automatically a. b. c. d. DBMS_JOB DBMS_SQL_JOB DBMS_SCHEDULE DBMS_JOB_SCHEDULE

6. What should be added in the following trigger definition to make it insert a row in t2 table for every insertion in t1 table CREATE OR REPLACE TRIGGER Test_Trig BEFORE INSERT ON T1 BEGIN INSERT INTO T2 VALUES (:old.col1) ; END ; a. b. c. d. for each row for every row for all rows nothing needs to be added

7. How do you add a value to a Check constraint of a column a. b. c. d. alter alter alter It is table t1 modify table t1 modify constraint con1 not possible to constraint con1 add value('M') ; con1 add value ('M') ; add value('M') ; add a value without dropping the existing constraint.

8. Which statement would you use to remove the EMP_NO_PK Primary key constraint and all depending constraints from the EMP table a. b. c. D. ALTER TABLE emp DROP PRIMARY KEY CASCADE ALTER TABLE emp DELETE PRIMARY KEY CASCADE. MODIFY TABLE emp DROP CONSTRAINT emp_no_pk CASCADE. ALTER TABLE emp DROP PRIMARY KEY emp_no_pk CASCADE.

9. Review the following SQL Statement and find errors if any . SQL> create table emp1 2 ( empno number(4) constraint emp_no_pk primary key, 3 ename varchar2(30) not null, 4 sal number(7,2), 5 deptno number(2) references dept(deptno) 6 )disable primary key Note: Dept table already exists with deptno column as a primary Key. a. b. c. d. Error in Error in Error in No Error line 2 line 5 line 6 in the Statement . Executes successfully

10. What is the result of the query ? SELECT * FROM EMP WHERE ROWNUM > 5 a. b. c. d. All the rows apart from the first 5 rows are displayed All rows are fetched from the table SQL error will occur saying Invalid column name No rows will be selected

11. How can you get a detail block name in a form which has a Master-Details blockusing relations a. b. c. d. e. GET_BLOCK_PROPERTY GET_FORM_PROPERTY GET_RELATION_PROPERTY GET_RELATION_BLOCK_PROPERTY GET_APPLICATION_PROPERTY

12. What is the datatype used in forms to declare a canvas variable a. b. c. d. e. Viewgroup Viewid Viewport Varchar2 Canvas.

13. Which following package is used to load data into the table from the flat files a. b. c. d. TOOLS_IO ORA_FFI DBMS_OUTPUT TEXT_IO

e. UTIL_FILE 14. Consider the following trigger CREATE OR REPLACE TRIGGER emp_count AFTER DELETE ON EMP FOR EACH ROW DECLARE N INTEGER ; BEGIN SELECT COUNT(*) INTO n FROM EMP ; DBMS_OUTPUT.PUT_LINE('There are now ' || n || 'employees') ; END ; What happens if the SQL statement is issued DELETE FROM EMP WHERE EMPNO = 7499 a. b. c. d. Integrity constraint violated - Parent key not found Table EMP is mutating trigger / function may not see it Cannot execute EMP from within stored procedure No errors

15. Why does this statement fail when executed CREATE OR REPLACE TRIGGER CALC_TEAM_AVG AFTER INSERT ON PLAYER BEGIN INSERT INTO PLAYER_BAT_STAT (PLAYER_ID, SEASON_YEAR, AT_BATS, HITS) VALUES(:NEW.ID, 1997, 0, 0) ; END ; a. This is a b. This is a c. This is a statement d. This is a manipulation row level trigger and therefore cannot reference :new statement level trigger and therefore cannot reference :new row level trigger and therefore cannot perform data manipulation statement level trigger and therefore cannot perform data statements.

16. You have now created a view v1 on the table emp, now alter table emp and add a column t, what will happen to the view a. b. c. d. the new column t is not seen. the new column t is seen. view becomes invalidated. you cannot alter a table after the view is created.

17. You have a table emp, examine the following sql statement, CREATE SEQUENCE EMP ; Will the above statement work. a. True b. False

18. Which of the following cannot be defined in visual attribute a. b. c. d. Font size Background color Font Height Font style

19. What is the advantage of having program units in a client side library a. The library need not be recompiled in case any change is made to the program unit b. Modularity c. Easier access d. All the above e. None of the above 20. What is the order of firing of triggers written to a text item a. b. c. d. KEY-NEXT-ITEM, WHEN-VALIDATE-ITEM, POST-TEXT-ITEM WHEN-VALIDATE-ITEM, KEY-NEXT-ITEM, POST-TEXT-ITEM POST-TEXT-ITEM, KEY-NEXT-ITEM, WHEN-VALIDATE-ITEM WHEN-VALIDATE-ITEM, POST-TEXT-ITEM, KEY-NEXT-ITEM

21. How will you determine the menu object's current value a. b. c. d. Using Using Using Using COPY builtin Direct reference Name_In built in System variable

22. Which menu item type would you create with predefined functionality a. b. c. d. Plain Check Separator Magic

23. Choose the correct sequence of firing triggers given below 1. 2. 3. 4. a. b. c. d. e. PRE_FORM WHEN_NEW_FORM_INSTANCE ON_LOGON WHEN_NEW_ITEM_INSTANCE 2,1,3,4 2,1,4,3 1,2,3,4 1,2,4,3 3,1,2,4

24. When Modal is set to True, the one of the following property is ignored a. b. c. d. Title Window size Window state Moveable

25. When editing a text item, how do you change the editor as WORDPAD? a. In the property sheet of the text item change system editor to Wordpad. b. Change FORMS45_EDITOR parameter in the oracle Environment. c. Using forms menu Tools -> Options -> Runtime Options. d. It is not possible to change the system editor. 26. Which built-in is used to find the user who has currently logged on to the application a. b. c. d. Get_form_property() logon() Get_application_property() get_user()

27. You can pass parameter of a form when an application executes through a. open_form, call_form, run_product, new_form b. open_form,go_form,call_form, new_form. c. open_form,call_form,go_form, new_form. 28. How do you refer a incremental value of sequence x in a form property palette ? a. b. c. d. e. assign the default assign the default assign the default assign the default not possible value value value value as as as as :sequence.x.nextval :x.nextval nextval.x x.nextval

29. The Sales department requested a report to allow customers to enter a stock number and then display the number of items in inventory. You use an after parameter form trigger to validate the stock number before the report executes. If the trigger returns a false value what will happen ? a. Execution of the report will halt. b. The customer will be returned to the parameter form. c. The report will execute but no data will be displayed. 30. You are developing a product report to list the name and the picture of all the products in the PRODUCT table. The Layout of each item is a repeating frame that contains one fixed field and an image. You anchor the image to the name field. Which pagination property should you select to keep the name field and the image on the same logical page ? a. Page protect on the image.

b. Page protect on the name field. c. Keep with Anchoring Object property on the image d. Keep with Anchoring Object property on the name field. 31. You need to execute the employee report in REPORTS Ver 2.5 from the Operating System in the batch mode. Which executable should You use to accomplish this task? a. b. c. d. R25RUN R25DES R25CONV R25MREP

32. After you retrieve the cause of a detail report failure using the SRW.GETERR_RUN function, which function or procedure will you use to display the error on the screen? a. b. c. d. SRW.BREAK SRW.MESSAGE SRW.PROGRAM_ABORT SRW.DISPLAY_ERROR

33. You create an inventory report using the master/detail group left layout style. In the layout model editor, which setting should you use to ensure that objects within the master repeating frame can not be moved outside their parent? a. b. c. d. Flex Mode on Flex Mode off Confine mode on Confine mode off

34. You are modifying the sales report and need to alter the default page width setting. In which window will you make the change to the report? a. b. c. d. Layout Editor Tools Option Object Navigator Reports Properties

35. You execute two reports . The first report id currently running. How could you delete the second report from the queue without terminating the first report? a. b. c. d. Delete the report from the reports.log file. Select Actions -> Show Log in the reports server window. Select Actions -> Remove Job in the reports server window. Click the cancel report button on the reports progress dialog box.

36. Which built-in in a form calls another form in a new session a. b. c. d. e. OPEN_FORM NEW_FORM CALL_FORM SESSION_FORM RUN_PRODUCT

37. Which database object called as the duplicate of the database objects residing in a remote place

a. b. c. d. e.

Views Public Synonyms Snapshots Aliases Clusters

38. What is the necessary condition to build a block (in forms) based on a stored procedure a. b. c. d. It It It It should should is not should not have an order by clause be a single record block possible to create a block based on a stored procedure have atleast one OUT variable of type Pl/Sql table or REFCURSOR

39. What built-in package should be used to create tables dynamically a. b. c. d. DBMS_SQL DBMS_DDL DBMS_PIPE DBMS_JOB

40. You used the TRUNCATE command on EMP table. Which two results are true ? a. b. c. d. e. f. The The The All All The TRUNCATE command can be rolled back. EMP table definition still exists. EMP table definition does not exixts. EMP table constraints have been dropped. EMP table constraints have been disabled. storage space held by the EMP table was released. ..

set2 Oracle /Dev 2000 Test - 2.

1. A stored program unit needs to write its output to a text file. Which of the following oracle packages can be used to accomplish this a. b. c. d. DBMS_OUTPUT UTL_FILE TEXT_IO DBMS_PIPE

2. Procedures P1 and P2 call another stored procedure P3. If P3 is altered and compiled what happens to procedures P1 & P2 a. b. c. d. P1 P1 P1 P1 & & & & P2 P2 P2 P2 are still valid are marked invalid immediately becomes invalid when they are first executed next time become invalid when P3 is executed next time

3. What is the word which needs to be added to a database function to invoke it

from SQL*Plus a. b. c. d. PRAGMA_EXECPTION_INIT PRAGMA_RESTRICT_REFERENCES PRAGMA_FUNCTION_INIT PRAGMA_FUNCTION_REFERENCES

4. What is the necessary condition to build a block (in forms) based on a stored procedure a. b. c. d. It It It It should should is not should not have an order by clause be a single record block possible to create a block based on a stored procedure have atleast one OUT variable of type Pl/Sql table or REFCURSOR

5. What built-in package should be used to create tables dynamically a. b. c. d. DBMS_SQL DBMS_DDL DBMS_PIPE DBMS_JOB

6. You used the TRUNCATE command on EMP table. Which two results are true ? a. b. c. d. e. f. The The The All All The TRUNCATE command can be rolled back. EMP table definition still exists. EMP table definition does not exixts. EMP table constraints have been dropped. EMP table constraints have been disabled. storage space held by the EMP table was released.

7. Which option in the CREATE INDEX command may substantially reduce the time required to create a large index. a. b. c. d. RECOVERABLE CLUSTER UNRECOVERABLE PARALLEL

8. SELECT sal * 1.10 "Salary", sal * 1.10 + comm "Total Compensation" FROM EMP ; What is the result of this statement a. Only the new salary of all employees is displayed b. The new salary and total compensation for each employee is displayed c. The total compensation value is not displayed for employees that do not receive a commission d. A zero total compensation value is displayed for employees that do not receive a commission 9. Which one is not the pseudocolumn used in select statement ?

a. b. c. d. e.

ROWID ROWNUM LEVEL UNIQUE CURRVAL

10. Which of the following is suited correctly to eliminate the duplicate rows a. b. c. d. e. Using update & rownum Using rowid & update Using delete & rowid All the above None of the above

11. How can you replace the oracle defined server error messages with your own messages in forms a. b. c. d. Using Using Using Using ON_ERROR Trigger irself Error_code & Error_text built-in SQLCODE & SQLERRM builtins Prama_Exeception_Init built-in

12. Which built-in in a form calls another form in a new session a. b. c. d. e. OPEN_FORM NEW_FORM CALL_FORM SESSION_FORM RUN_PRODUCT

13. Which database object called as the duplicate of the database objects residing in a remote place a. b. c. d. e. Views Public Synonyms Snapshots Aliases Clusters

14. To recompile a trigger manually, the command used is a. b. c. d. Alter trigger trigger_name compile ; Alter trigger trigger_name recompile ; Alter trigger trigger_name ; None of the above

15. You need to restrict the DML operations on a view by a. b. c. d. by using grant option. force condition no force condition with_option_check

16. Examine the following sql statement and find if there is an error and if so in which line 1 2 3 4 5 a. b. c. d. e. create or replace force view t1 as select deptno, avg(Sal) avg from emp group by deptno having avg(SAl) >= 1000 order by deptno 1 2 3 4 5

17. Which of the following cannot be placed in an object group in Forms 4.5 a. b. c. d. Trigger Program Units Property Classes Visual attributes

18. If we have a program unit with the same as a backend procedure, what will take precedence in a call to the procedure in a form a. b. c. d. Server procedure takes precedence Local procedure takes precedence Cannot create a program unit with the same name as a backend procedure The server procedure gets invalidated

19. In a when-validate-trigger of an item, the following code is written. What is the error DECLARE V_dummy VARCHAR2(1) ; BEGIN V_dummy := 2 ; SELECT 'Y' INTO V_dummy FROM DUAL ; GO_BLOCK('BLOCK1') ; END ; a. b. c. d. V_dummy has been assigned twice Cannot assign number to VARCHAR field GO_BLOCK cannot be used in When-validate-Item No Exception has been handled.

20. Can a form have more than one menu attached to it at the same time a. Yes b. No c. Sometimes 21. Which menu item type would you create to group menu claims a. Plain b. Check c. Magic

d. Separator 22. Which button property does not allow the navigation to its own block a. b. c. d. Set Set Set Set Navigable to False Mouse Navigate to False Next Navigation to False Previous Navigation to False

23. How do you change the alert style at Runtime a. b. c. d. SET_ALERT_PROPERTY Property Class Visual Attribute Not possible to change the alert style

24. You want to simulate a spreadsheet. Which combination should you consider to create this form, so that it will be easy to read and use a. One window with one stacked canvas b. One canvas with one content canvas c.One window with one content canvas and one stacked canvas d.Two windows, one for the content canvas and one for the stacked canvas 25. You have a folder with a set of icon files. How do you make forms recognize the path of your folder to search for icon files. a. b. c. d. Add the path In the forms Add the path Move all the in FORMS45_ICON parameter in oracle environment. property sheet,add the path of your folder. in the TK23_ICON parameter in oracle environment. icons from the folder to the oracle bin folder.

26. How do you find the nls_language used in your Application a. get_nls_language() b. get_application_property() c. find_language() e. user_nls_language() 27. How do you delete a dynamically created parameter list a. destroy_parameter_list(listname) b. delete_parameter_list(listname) c. drop_parameter_list(listname) 28. Form parameters are variables of type a. char, number, date b. char, number, boolean 29. You are creating the sales report to be run in both bitmapped and character mode environments. What should you do before selecting the default layout ? a. b. c. d. Modify Modify Define Remove the the the any report page size . MODE system parameter character mode settings. borders, buttons or graphics.

30. You create a single query group above salary report using the following query: SELECT empno,ename,deptno,sal FROM emp WHERE hiredate < TO_DATE('January 1, 2000','Month dd, YYYY'); You need to modify the report to add a summary column for the salary values in each department. Using the data model editor, how could you accomplish this task? a. Add a formula column outside the groups and create a PL/SQL function to compute the results b. Add a summary column to the master group, select sal as the source column , use the sum function and reset the value by g_deptno c. Add a summary column outside the groups, select the sal as the source column, use the sum function and reset the value by g_deptno. d. Add a placeholder column outside the groups, select sal as the source column, use the sum function and reset the value by g_deptno. 31. Your goal is to reduce the amount of network traffic generated by the sales application in your client server environment . which design issue will you consider when creating the inventory report for the sales application ? a. b. c. d. Remove unused frames. Use transparent fill Minimize the number of queries Remove unnecessary format triggers

32. You are creating an application for the Spanish users, but prefer to develop using English. Which NLS variable should you set when testing to ensure the runtime messages output in Spanish. a. b. c. d. NLS_LANG USER_NLS_LANG NLS_TERRITORY DEVELOPER_NLS_LANG

33. The oracle server will be shutdown today between 5PM and 6PM for hardware maintenance. You need to review the reports that are scheduled to run during this hour. How would you view jobs that are scheduled to run at a future time? a. b. c. d. Use Use Use You the current jobs icon in the Queue Manager. the Scheduled jobs icon in the Queue Manager the R30CLI command line with the SCHEDULE parameter. cannot view a job until it has been executed.

34. You are preparing to create an inventory report for your application. The Application will be run on three different platforms. Which of the following file types should you use when creating the report definition. a. b. c. d. .rex .rep .rdf .rdx

35. You created a procedure and stored it as a report level program unit within the sales report. What is the best way to reuse the procedure within the report? a. b. c. d. Copy the code into a PL/SQL Library. Copy the code into an Object Library. Reference the code to the report level program unit. Use the PL/SQL Editor to copy the code by cutting and pasting.

36. You create a function to change the color of a value in the Salary Column of the employee report if the value is greater than 2500 . Which component of the SRW package will apply the format mask to the salary column. a. b. c. d. SRW.SET_ATTR SRW.ATTR.MASK SRW.ATTR.STYLE SRW.ATTR.GCOLOR

37. A packaged function can assert maximum purity levels by specifying one of the following in PRAGMA_RESTRICT_REFERENCES a. b. c. d. RNDS, WNDS, WNPS, RNPS, RNPS, RNDS, RNDS, RNDS, WNPS RNPS RNPS WNPS

38. How do you add a value to a Check constraint of a column a. b. c. d. alter alter alter It is table t1 modify table t1 modify constraint con1 not possible to constraint con1 add value('M') ; con1 add value ('M') ; add value('M') ; add a value without dropping the existing constraint.

39. How can you get a detail block name in a form which has a Master-Details blockusing relations a. b. c. d. e. GET_BLOCK_PROPERTY GET_FORM_PROPERTY GET_RELATION_PROPERTY GET_RELATION_BLOCK_PROPERTY GET_APPLICATION_PROPERTY

40.What is the datatype used in forms to declare a canvas variable a. b. c. d. e. Viewgroup Viewid Viewport Varchar2 Canvas.

Answers SET 1 1. 2. 3. 4. c c b c

5. a 6. a 7. b 8. a 9. b 10. d 11. c 12. c 13. d 14. b 15. b 16. a 17. a 18. c 19. d 20. a 21. c 22. d 23. c 24. d 25. b 26. c 27. a 28. a 29. b 30. c 31. a 32. b 33. c 34. d 35. c 36. a 37. c 38. d 39. a 40. b,f SET II 1. A 2. B 3. B 4. D 5. A 6. B, F 7. C 8. C 9. D 10. C 11. D 12. A 13. C 14. A 15. D 16. E 17. B 18. B 19. C 20. B 21. D 22. B

23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40.

B C C B A A C B C B B C C A B B C A

You might also like