This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Error starting at line 25 in command:
fileID := UTL_FILE.FOPEN ('D:\srikanth.txt', 'srikanth.txt', 'R');
UTL_FILE.GET_LINE (fileID, strbuffer);
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 29
ORA-06512: at "SYS.UTL_FILE", line 448
ORA-06512: at line 6
29280. 00000 - "invalid directory path"
*Cause: A corresponding directory object does not exist.
*Action: Correct the directory object parameter, or create a corresponding
directory object with the CREATE DIRECTORY command.
To access a directory in PL/SQL, you need to create a named directory object. It is done using CREATE DIRECTORY command, which is also hinted in your error message. Oracle then allows admin to grant permissions on this object, which is how access to directories can be secured in Oracle. The first parameter of the UTL_FILE.FOPEN function must be the name of the directory object.