?
Solved

Getting an ORA-00972: identifier is too long error when creating an index with multibyte characters using SQLPLUS

Posted on 2009-12-17
5
Medium Priority
?
2,017 Views
Last Modified: 2013-12-07
I'm trying to create an index on a table that has multibyte characters in the table name and also field names.  The index is created correctly if I execute it using Oracle SQL Developer or Tora.  

But, when i issue the query using sqlplus, I get an "ORA-00972: identifier is too long error".  Below is the query.  

create index AP_V”NDÜR_05 on AP_V”NDÜR(V”NDÜR_ID, R”MIT_ADDR”SS_ID)

The characters in the .sql file that contains the create index statement looks correct when I view them in Putty. The file was created in Notepad++ with the UTF8 encoding set.  I also created a second test file directly on the server using vi.  Neither worked.  Even issuing the query directly in sqlplus without piping in a file failed.

I'm out of ideas so I'd appreciate any ideas the community can provide.
0
Comment
Question by:jrram
  • 4
5 Comments
 
LVL 17

Expert Comment

by:CSecurity
ID: 26076608
Do this:
set NLS_LANG=american_america.al32utf8
then run sqlplus / as sysdba .......... etc.
0
 
LVL 17

Expert Comment

by:CSecurity
ID: 26076613
If it's Linux, you need:
SET NLS_LANG=american_america.al32utf8
EXPORT NLS_LANG

then in same shell run sqlplus
0
 
LVL 13

Author Comment

by:jrram
ID: 26076770
Thanks, it worked for me.  Below is the code I used:

[beta@test ~]$ export NLS_LANG="american_america.al32utf8"
[beta@test ~]$ sqlplus schema/password < create_index_file.sql
 
Is there anyway to run an equivalent command after I log into SQLPlus so it only affects that session?  Maybe an alter session command?
0
 
LVL 17

Accepted Solution

by:
CSecurity earned 1000 total points
ID: 26077034
No, you can concat commands in single line:

export NLS_LANG="american_america.al32utf8" ; sqlplus schema/password < create_index_file.sql
0
 
LVL 17

Expert Comment

by:CSecurity
ID: 26077038
You can't do that after logging into sqlplus.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question