Thursday, February 24, 2011

CSS-00120: failed to enumerate tables to scan

Problem
I had spent hours trying to figure out the cause of following errors when I was running the following command:

$csscan   TABLE=SYS.SQL_VERSION$ FROMCHAR=WE8MSWIN1252 TOCHAR=AL32UTF8 LOG=instchkc CAPTURE=N PROCESS=1 ARRAY=1024000


......................
Enumerating table to scan...
ORA-00942: table or view does not exist
CSS-00150: failed to enumerate table
CSS-00120: failed to enumerate tables to scan
Scanner terminated unsuccessfully.

Cause
Finally, I checked following values and found out inconsistencies:
[oracle@cash admin]$ which csscan
/u01/11.2.0/grid/bin/csscan
[oracle@cash admin]$ which sqlplus
/u01/11.2.0/grid/bin/sqlplus
[oracle@cash admin]$ echo $ORACLE_HOME
/u02/oracle/product/11.2.0/dbhome_1


According to this note - Installing and configuring Csscan in 10g and 11g (Database Character Set Scanner) [ID 745809.1]:
"Then the wrong cminst.sql was runned. For example using csscan from an 10.2.0.4 client but the Csminst.sql that was used is the one from the 10.2.0.1 database oracle home. Please run the Csminst.sql from the actual csscan home."


Because the "csscan" executed was the one under "/u01/11.2.0/grid/bin/csscan, rather than the one under $ORACLE_HOME/bin/csscan (/u02/oracle/product/11.2.0/dbhome_1/bin/csscan), and the "csminst.sql" script was executed from "/u02/oracle/product/11.2.0/dbhome_1/rdbms/admin", this inconsistency caused the above errors.

Solution
After I reset the "PATH" environment values, the errors were gone.
-----Before change

[oracle@sting ~]$ echo $PATH
/u01/11.2.0/grid/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/opt/dell/srvadmin/bin:/u02/oracle/product/11.2.0/dbhome_1/bin:/home/oracle/bin:.


--After change
[oracle@sting ~]$ . .bash_profile
[oracle@sting ~]$ echo $PATH
/u02/oracle/product/11.2.0/dbhome_1/bin:/u01/11.2.0/grid/bin:/home/oracle/bin:/u01/11.2.0/grid/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/opt/dell/srvadmin/bin:/u02/oracle/product/11.2.0/dbhome_1/bin:/home/oracle/bin:..


--Rerun csscan

[oracle@sting ~]$ $ORACLE_HOME/bin/csscan   TABLE=SYS.SQL_VERSION$ FROMCHAR=WE8M


Character Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Thu Feb 24 16:05
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
Username: sys/Thunder1 as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
Enumerating table to scan...
. process 1 scanning SYS.SQL_VERSION$[AAAACVAABAAAASgAAA]
Creating Database Scan Summary Report...
Creating Individual Exception Report...
Scanner terminated successfully.



Related Links

  1. Installing and configuring Csscan in 10g and 11g (Database Character Set Scanner) [ID 745809.1]
  2. Changing the Database Character Set ( NLS_CHARACTERSET ) [ID 225912.1]
  3. Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) [ID 260192.1]
  4. The National Character Set ( NLS_NCHAR_CHARACTERSET ) in Oracle 9i, 10g and 11g [ID 276914.1]
  5. Csscan output explained [ID 444701.1]
  6. Which Character Set Supports Which Language [ID 62421.1]
  7. AL32UTF8 / UTF8 (Unicode) Database Character Set Implications [ID 788156.1]
  8. Choosing between WE8ISO8859P1, WE8ISO8859P15 or WE8MSWIN1252 as NLS_CHARACTERSET [ID 264294.1]


Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home