Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Character set issue

ronald_2017Dec 20 2024 — edited Dec 20 2024

Hello All,

I changed database character set and NLS_LANG parameter in regedit. The data in my table got corrupted.Then I tried to change it back but it didn't change.

Also, when I was in CDB$ROOT the error messages look fine. However, it looks corrupted in pdb.

SQL> SELECT
  2      SYS_CONTEXT('USERENV','CON_NAME') CON_NAME,
  3      SYS_CONTEXT('USERENV','CON_ID') CON_ID,
  4      SYS_CONTEXT('USERENV','DB_NAME') DB_NAME
  5  FROM DUAL;

CON_NAME   CON_ID     DB_NAME
---------- ---------- ----------
CDB$ROOT   1          orcl

SELECT * FROM NLS_DATABASE_PARAMETERS;

SELECT * FROM NLS_INSTANCE_PARAMETERS;

SELECT * FROM NLS_SESSION_PARAMETERS;

I switch to PDB

SQL> alter session set container = ORCLPDB;

Oturum de?istirildi.

SQL> SELECT
  2      SYS_CONTEXT('USERENV','CON_NAME') CON_NAME,
  3      SYS_CONTEXT('USERENV','CON_ID') CON_ID,
  4      SYS_CONTEXT('USERENV','DB_NAME') DB_NAME
  5  FROM DUAL;

CON_NAME   CON_ID     DB_NAME
---------- ---------- ----------
ORCLPDB    3          ORCLPDB

SELECT * FROM NLS_DATABASE_PARAMETERS;

SELECT * FROM NLS_INSTANCE_PARAMETERS;

SELECT * FROM NLS_SESSION_PARAMETERS;

In addition, when I run the following code the error message looks clear.

However, when I run in PDB it looks corrupted.

Also, data in my table in the PDB, looks corrupted.

What do you suggest?

Thanks in advance.

Comments
Post Details
Added on Dec 20 2024
5 comments
151 views