Wednesday, June 03, 2009

ORA-01741: illegal zero-length identifier

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

This is another curious error message that i presume is rare to be seen twice in your life.
alter session set tracefile_identifier="";

ORA-01741: illegal zero-length identifier
Oracle accepts the double quotes as string delimiter, but not when there is nothing in between.
In fact it is perfectly possible to execute:
alter session set tracefile_identifier="xyz";

select value
from v$parameter
where name = 'tracefile_identifier';

VALUE
-----
xyz

In order to set the session parameter to a null value, single quotes must be used:
alter session set tracefile_identifier='';
Note also that ALTER SESSION, unlike ALTER SYSTEM, doesn't come with an ALTER...RESET... clause.

See message translations for ORA-01741 and search additional resources.

No comments:

Post a Comment

I appreciate your comment however bear in mind that I might not have the time to reply soon.
Normally I do not reply to all comments but I am glad if you found something useful or if you learned something new, in that case I strongly encourage you to promote the article with the +1 google button.
Flavio