-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at line 5
Can anyone solve this.
Thanks in advance
Developer.">When i write the following program, i am getting error like: DECLARE vInHandle UTL_FILE.file_type; vNewLine VARCHAR2(250); BEGIN vInHandle := UTL_FILE.Fopen ('D:', 'new.txt', 'R'); LOOP BEGIN UTL_FILE.get_line(vInHandle, vNewLine); dbms_output.put_line(vNewLine); END; END LOOP; UTL_FILE.fclose(vInHandle); END; Error:-DECLARE*ERROR at line 1:ORA-29280: invalid directory path ORA-06512: at "SYS.UTL_FILE", line 18 ORA-06512: at "SYS.UTL_FILE", line 424 ORA-06512: at line 5 Can anyone solve this.Thanks in advanceDeveloper.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
There is a field of type character in the table, but we are storing numeric values like (Roll number) in this field, so if we want to sort the field (in java) according to numbers.How?
by creating a function for sorting in the front end(guessing, i am not sure. plz answer it)
-
What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?
A cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package.A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures.
-
What are the datatypes a available in PL/SQL ?
Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.Some composite data types such as RECORD & TABLE.
-
When is PRE-QUERY trigger executed ?
When Execute-query or count-query Package procedures are invoked.
-
What is the difference between ON-VALIDATE-FIELD trigger and a POST-CHANGE trigger ?
When you changes the Existing value to null, the On-validate field trigger will fire post change trigger will not fire. At the time of execute-query post-change trigger will fire, on-validate field trigger will not fire.
-
When will ON-VALIDATE-FIELD trigger executed ?
It fires when a value in a field has been changed and the field status is changed or new and the key has been pressed. If the field status is valid then any further change to the value in the field will not fire the on-validate-field trigger.
-
How do you trap the error in forms 3.0 ?
using On-Message or On-Error triggers.
-
What are the different types of key triggers ?
Function Key Key-function Key-others Key-startup
-
What are the types of TRIGGERS ?
1. Navigational Triggers. 2. Transaction Triggers.
-
What is a Trigger ?
A piece of logic that is executed at or triggered by a SQL *forms event.
-
-
-
Can a view be updated/inserted/deleted? If Yes under what conditions ?
A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.
-
What is CYCLE/NO CYCLE in a Sequence ?
CYCLE specifies that the sequence continues to generate values after reaching either maximum or minimum value. After pan ascending sequence reaches its maximum value, it generates its minimum value. After a descending sequence reaches its minimum, it generates its maximum.NO CYCLE specifies that the sequence cannot generate more values after reaching its maximum or minimum...
-
If an unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE ?
It won't, Because SYSDATE format contains time attached with it.
-
How will you a activate/deactivate integrity constraints ?
The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE constraint/DISABLE constraint.
-
Where the integrity constraints are stored in Data Dictionary ?
The integrity constraints are stored in USER_CONSTRAINTS.
-
How many LONG columns are allowed in a table ? Is it possible to use LONG columns in WHERE clause or ORDER BY ?
Only one LONG columns is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.
-
What is difference between CHAR and VARCHAR2 ? What is the maximum SIZE allowed for each type ?
CHAR pads blank spaces to the maximum length. VARCHAR2 does not pad blank spaces. For CHAR it is 255 and 2000 for VARCHAR2.
-
What are the data types allowed in a table ?
CHAR,VARCHAR2,NUMBER,DATE,RAW,LONG and LONG RAW.
-
What is ON DELETE CASCADE ?
When ON DELETE CASCADE is specified ORACLE maintains referential integrity by automatically removing dependent foreign key values if a referenced primary or unique key value is removed.
-
What are the usage of SAVEPOINTS ?
SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.
-
What is Referential Integrity ?
Maintaining data integrity through a set of rules that restrict the values of one or more columns of the tables based on the values of primary key or unique key of the referenced table.
-
What is ROWID ?
ROWID is a pseudo column attached to each row of a table. It is 18 character long, blockno, rownumber are the components of ROWID.
-
Explain UNION,MINUS,UNION ALL, INTERSECT ?
INTERSECT returns all distinct rows selected by both queries.MINUS - returns all distinct rows selected by the first query but not by the second.UNION - returns all distinct rows selected by either queryUNION ALL - returns all rows selected by either query, including all duplicates.
-
Difference between SUBSTR and INSTR ?
INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character string of size m in string1, starting from nth position of string1.
-
Explain Connect by Prior ?
Retrieves rows in hierarchical order.e.g. select empno, ename from emp where.
-
What is correlated sub-query ?
Correlated sub query is a sub query which has reference to the main query.
-
What is difference between TRUNCATE & DELETE ?
TRUNCATE commits after deleting entire table i.e., can not be rolled back. Database triggers do not fire on TRUNCATEDELETE allows the filtered deletion. Deleted records can be rolled back or committed.Database triggers fire on DELETE.
-
What are the types of SQL Statement ?
Data Definition Language : CREATE,ALTER,DROP,TRUNCATE,REVOKE,NO AUDIT & COMMIT.Data Manipulation Language: INSERT,UPDATE,DELETE,LOCK TABLE,EXPLAIN PLAN & SELECT.Transactional Control: COMMIT & ROLLBACKSession Control: ALTERSESSION & SET ROLESystem Control : ALTER SYSTEM.
-
What is SAVE POINT ?
For long transactions that contain many SQL statements, intermediate markers or savepoints can be declared which can be used to divide a transaction into smaller parts. This allows the option of later rolling back all work performed from the current point in...
-
What does ROLLBACK do ?
ROLLBACK retracts any of the changes resulting from the SQL statements in the transaction.
-
What does COMMIT do ?
COMMIT makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed.
-
When does a Transaction end ?
When it is committed or Rollbacked.
-
Can cursor variables be stored in PL/SQL tables.If yes how. If not why?
No, a cursor variable points a row which cannot be stored in a two-dimensional PL/SQL table.
-
What is a cursor for loop?
Cursor For Loop is a loop where oracle implicitly declares a loop variable, the loop index that of the same record type as the cursor's record.
-
What are cursor attributes?
%ROWCOUNT%NOTFOUND%FOUND%ISOPEN
-
Difference between an implicit & an explicit cursor.
PL/SQL declares a cursor implicitly for all SQL data manipulation statements, including quries that return only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop.Explicit cursor is a cursor in which the cursor name is explicitly assigned to a SELECT statement via the CURSOR...IS statement. An implicit cursor is used for all SQL statements...
-
What is a cursor?
Oracle uses work area to execute SQL statements and store processing information PL/SQL construct called a cursor lets you name a work area and access its stored information A cursor is a mechanism used to fetch more than one row in a Pl/SQl block.
-
minvalue.sql Select the Nth lowest value from a table
select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name') <'col_name')group by level;Example:Given a table called emp with the following columns:-- id number-- name varchar2(20)-- sal number---- For the second lowest salary:-- select level, min(sal) from emp-- where level=2-- connect by prior sal < sal-- group by level
-
Which is more faster - IN or EXISTS?
EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns a value.
-
There is a string 120000 12 0 .125 , how you will find the position of the decimal place?
INSTR('120000 12 0 .125',1,'.')output 13
-
How will you delete duplicating rows from a base table?
delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); ordelete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.dv=tb.dv);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Explain UNION, MINUS, UNION ALL and INTERSECT
Answer posted by Scott on 2005-05-25 18:32:51: UNION - the values of the first query are returned with the values of the second query eliminating duplicates. MINUS - the values of the first query are returned with duplicates values of the second query removed from the first query. UNION ALL - the values of both queries are returned including all duplicates INTERSECT - only the duplicate...
-
-