Operating System - HP-UX
1748233 Members
3546 Online
108759 Solutions
New Discussion юеВ

Re: ORA-06510: PL/SQL: unhandled user-defined exception

 
Fall_2
Occasional Advisor

ORA-06510: PL/SQL: unhandled user-defined exception

Hi,
I have a prog that import csv file into table. When I executed I'm getting an error that I'm not able to figure out, maybe someone will be able to tell me what I doing wrong.
Thanks,
Ibra


SQL> SET SERVEROUTPUT ON
SQL> execute tst_ibra_006.ImpAnyTable( 'd:\Webgate_Ora', 'EP_sys_libibra.exp', '~');
Importing table from file : EP_sys_libibra.exp
EP_sys_libibra
0
BEGIN tst_ibra_006.ImpAnyTable( 'd:\Webgate_Ora', 'EP_sys_libibra.exp', '~'); END;

*
ERREUR ?? la ligne 1 :
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "INTRA.TST_IBRA_006", line 415
ORA-06512: at "INTRA.TST_IBRA_006", line 158
ORA-06512: at line 1
ib
7 REPLIES 7
Brian Crabtree
Honored Contributor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

Unfortunantly, you only posted a striped down version of the package. Can you run the following and post the result to see where the actual error is occuring.

select * line,text from dba_source where line in ('415','158') and name = 'TST_IBRA_006';

Thanks,

Brian
Yogeeraj_1
Honored Contributor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

hi,

also post the output of:

show parameter utl_file_dir

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Indira Aramandla
Honored Contributor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

Hi,

Normally the above errors are caused by the settings of the package ???INTRA.TST_IBRA??? environment variable not matching the 'utl_file_dir' in the init.ora.

Please verify the utl_file_dir parameter. This parameter in the nit.ora must include a directory which is writable by the user.

There can be other causes however. There could be a problem in creating a file in the path you supplied or you are trying to replace existing file, but do not have sufficient permission. Check if you have your path included in the UTL_FILE_DIR parameter in INIT.ORA:

SQL> show parameter utl_file
NAME TYPE VALUE
utl_file_dir string /tmp

Then look for operating system permissions on the directory and file you are trying to create/replace:

Ensure that the user under which the Oracle instance is running has sufficient rights to access this directory. Furthermore, if the file you are trying to create already exists, verify if the owner and file permissions are correct. You need to delete this file or reset file ownership or file permissions. Then you can retry the PL/SQL procedure and the file ownership and permissions:

Hope this helps
Never give up, Keep Trying
Fall_2
Occasional Advisor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

Hi
Thanks to every body who responded to my message. I just got your response and I will get back with you in asap.
Ibra
ib
Fall_2
Occasional Advisor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

Brian from your suggestion this is where the error came from:

SQL> SELECT text
2 FROM user_source
3 WHERE name = 'TST_IBRA_006'
4 AND line = any(415,158);

TEXT
--------------------------------------------------------------------------------
iResult := TST_IBRA_006.IMPORTANYTABLE( sUTLDIR, InFile, sDelim );
RAISE ErrINCOMPAT;
ib
Yogeeraj_1
Honored Contributor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

hi,

This is definitely related to a User-defined exception. Check your exception handlers in the procedure.

Also, check for possible 'catch -all' WHEN_OTHERS exception handlers. Try to handle any exceptions that could be raised in your code explicitly.

hope this helps!

regards
Yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Fall_2
Occasional Advisor

Re: ORA-06510: PL/SQL: unhandled user-defined exception

you rigth yogeeraj because this is what I'm getting now after some changes in my procedure:


SQL> SET SERVEROUTPUT ON
SQL> execute tst_ibra_006.ImpAnyTable( 'd:\Webgate_Ora', 'EP_sys_libibra.exp', '~');
Importing table from file : EP_sys_libibra.exp
EXCEPTION: 1-User-Defined Exception
Data rolled back
Importing done : 0

Proc??dure PL/SQL termin??e avec succ??s.

ib