Problems and solves

Oracle Problems and Solutions: A Troubleshooting Guide

Dear Readers,

Throughout my years working with Oracle databases and tools, I have encountered several common errors that can be frustrating for developers and DBAs. In this post, I am sharing practical solutions to three specific problems that I have successfully resolved through research and testing.


Problem 1: SYSDATE Does Not Match the System Date

There is a problem where the Oracle SYSDATE function displays a wrong date compared to the actual system date. After searching and testing, I found the solution.

The Fix: You must reset the FIXED_DATE parameter to NONE.

SQL> ALTER SYSTEM SET fixed_date = none;
  2  /
 
System altered.

SQL> SELECT SYSDATE FROM dual;
 
SYSDATE
-------------------
15-11-2017 10:53:40

Problem 2: Connecting Oracle Forms 6i with Database 10g/11g XE

When you try to connect Oracle Forms 6i to an Oracle 11g Express Edition (XE) database, the connection may hang or the Forms Builder may force close.

The Cause: It is a CHARACTER SET mismatch. Oracle 11g XE uses the Unicode character set AL32UTF8. However, Forms 6i does not support this and requires UTF8 or WE8MSWIN1252 (Oracle, 2026).

Because 11g XE does not allow you to change the character set during installation, migrating data with special characters can cause errors like ORA-12899.

The Fix: Alter the database character set using the INTERNAL_USE command.

C:\Windows\system32> CD C:\oraclexe\app\oracle\product\11.2.0\server\bin
C:\oraclexe\app\oracle\product\11.2.0\server\bin> SET ORACLE_HOME=C:\oraclexe\app\oracle\product\11.2.0\server
C:\oraclexe\app\oracle\product\11.2.0\server\bin> SET ORACLE_SID=XE
C:\oraclexe\app\oracle\product\11.2.0\server\bin> SQLPLUS/NOLOG

SQL> CONN SYS/SYSTEM11g AS SYSDBA
Connected.
SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP RESTRICT
ORACLE instance started.
Database mounted.
Database opened.

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE WE8MSWIN1252;
Database altered.

SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> STARTUP
ORACLE instance started.
Database mounted.
Database opened.

SQL> SELECT * FROM v$nls_parameters WHERE parameter LIKE '%CHARACTERSET%';

PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_CHARACTERSET
WE8MSWIN1252

NLS_NCHAR_CHARACTERSET
AL16UTF16

Problem 3: Case-Sensitive Passwords in Oracle 11g

Case-sensitive passwords (and auditing) are a default feature of newly created Oracle 11g databases. If existing legacy applications struggle to authenticate, you can turn off this functionality.

The Fix: Use the ALTER SYSTEM command to turn off SEC_CASE_SENSITIVE_LOGON.

SQL> SHOW PARAMETER SEC_CASE_SENSITIVE_LOGON

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     TRUE

SQL> ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
System altered.

Example: If the parameter is TRUE, creating a user with a mixed-case password will require the exact case to log in.

CONN / AS SYSDBA
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = TRUE;

CREATE USER test2 IDENTIFIED BY Test2;
GRANT CONNECT TO test2;

-- Correct case: Success
SQL> CONN test2/Test2
Connected.

-- Incorrect case: Failure
SQL> CONN test2/test2
ERROR:
ORA-01017: invalid username/password; logon denied

Best regards,

Yasser

References

Oracle. (2026). Database administrator's guide: Character sets (26). Oracle Help Center. https://docs.oracle.com/en/database/oracle/oracle-database/26/admin/character-sets.html

No comments:

Post a Comment