Friday, August 7, 2015

2: general error: Table does not exist SQLSTATE: HY000


I was importing data into HANA Dynamic Tiering and encountered below error.

* 2: general error: Table does not exist SQLSTATE: HY000

You will see this error if TABLE NAME is wrong. I have verified that table exists in the database but still see same issue and I have verified the syntax of the control file and everything looks good.

IMPORT DATA INTO TABLE "dtuser"."employee" FROM '/hana/shared/DT/HDB00/work/employee.txt'
RECORD DELIMITED BY '\n'
FIELD DELIMITED BY '|'
OPTIONALLY ENCLOSED BY '"'
ERROR LOG '/hana/shared/DT/HDB00/work/employee.log'

I see that user and table name is in lower case. I have modified the control file to use upper case for user/ table name and I was able to IMPORT successfully.

Other possible errors you may encounter:  
  • 2: general error: Cannot open the file, /hana/shared/DT/HDB00/work/employee.txt SQLSTATE: HY000
Possible solution: The file name is wrong or path may be in correct. You need to correct the same 
  • 2: general error: Cannot open Control file, /hana/shared/DT/HDB00/work/employee.ctl
Possible solution: The control file name is wrong or control file path may be incorrect

Regards
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

2 comments: