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