Friday, November 6, 2015

syntax error: unterminated quoted string literal


I have encountered below “sql syntax error” during data import into HANA Dynamic Tiering

* 257: sql syntax error: unterminated quoted string literal: line 1 col 13 (at pos 13) SQLSTATE: HY000
Here are the possible reasons for this error

1. You will see this error when data file name is wrong in the control file

2. The “quote” is not closed properly in the IMPORT command.

For ex:-
HANA=>IMPORT FROM '/hana/shared/DT/HDB00/work/employee.txt.ctl
As you see quote is not ended properly in above command

3. when data file is empty

Regards,
Satishbabu Gunukula, Oracle ACE

RMAN.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old

I have created a 12c Database recently and when trying to register database I have received below warning message

RMAN> Register Database
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
RMAN-00571: ======================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ======================================================
RMAN-03002: failure of register command at 11/04/2015 10:12:11RMAN-06429: RCVCAT database is not compatible with this version of RMAN


I tried to upgrade the database and I have received below error

RMAN> upgrade catalog;
RMAN-00571: ======================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ======================================================
RMAN-07539: insufficient privileges to create or upgrade the catalog schema


It looks like more privileges needed to upgrade the catalog schema. But In 12c do not grant any privileges manually to upgrade catalog. Instead you need to run below script provided by oracle

$ sqlplus sys/xxxx@RMANCAT as sysdba
SQL> @$ORACLE_HOME/rdbms/admin/dbmsrmansys.sql


Once you run above scripts, now you can upgrade the catalog

$ rman TARGET / CATALOG rman/xxxxx@RMANCAT

RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade

RMAN> upgrade catalog;

recovery catalog upgraded to version 12.01.00.02
DBMS_RCVMAN package upgraded to version 12.01.00.02
DBMS_RCVCAT package upgraded to version 12.01.00.02.

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

Hope this helps

Regards
Satishbabu Gunukula, Oracle ACE

Friday, August 7, 2015

[SAP][ODBC Driver]Non-space text found after ending quote


I have encountered below error during data import into HANA Dynamic Tiering

* 403: internal error: [SAP][ODBC Driver]Non-space text found after ending quote
-- (dblib/db_RecScanner.cxx 2657) SQLSTATE: HY000


I found that data has quotes (“) which is causing the issue. But didn’t find any forum/link related to this error in HANA DT or solution.

At this situation SLT can help, I have used SLT to load the data and was able to load successfully.

During research I found that few users encountered same issue during the data import into SYBASE
They propose below recommendations

- Remove quotes from all values in data file
- TURN OFF the QUOTES as QUOTES ON is default.

Refer below link for more info for SYBASE error
https://scn.sap.com/thread/3638327

Other possible errors you may encounter:

* 403: internal error: [SAP][ODBC Driver]Cannot convert PatKey to a integer(10) (column EMPLOYEE_ID) SQLSTATE: HY00

Possible solution: Please choose appropriate data type.

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

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

Thursday, July 23, 2015

Why Virtual Private Catalog?

Hi Everyone,

My articles published in Oracle Experts website media "Allthingsoracle.com" by RedGate

Please see the below link.

Article: Why Virtual Private Catalog?

This article will help you to understand

  • What is Virtual Private Catalog
  • How to secure the boundaries between DBA's
  • How to segregate the duties in an Enterprise Environment.

I hope you will like the article and it will be helpful to you.

Please leave your valuable comments.

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