Friday, October 9, 2026
  • About Us
  • Contact
DBAInsight
  • Guides
    • 23ai
    • RMAN
    • 26ai
    • Patch Update
    • RMAN
    • MySQL
    • Oracle GoldenGate
  • Cloud Technology
  • Case Studies
  • Troubleshooting
  • Training & Certification
NEWSLETTER
No Result
View All Result
DBAInsight
Home Guides

ORA-02153: Invalid VALUES Password String – Why It Happens and How to Fix It (CREATE USER)

January 16, 2026
in Guides
0
ORA-02153
0
SHARES
484
VIEWS

If you’ve ever migrated users between Oracle databases or tried to recreate a user exactly as it existed in another environment, you’ve probably used the IDENTIFIED BY VALUES clause. It looks simple, but one small formatting issue can instantly break the process and throw this error:

ORA-02153: invalid VALUES password string

Table of Contents

Toggle
    • Related posts
    • How to Transition from IT Support to Oracle Database Administration
    • Oracle 19c Time Zone Upgrade: DSTv32 to DSTv44
  • What Is ORA-02153?
  • The Problematic Command (What Went Wrong)
  • The Root Cause: Line Breaks in the Password Hash
    • Oracle Is Extremely Strict Here
  • The Corrected Command (Why It Worked)
    • Why This Works
  • Understanding the S: and T: Prefixes
  • Common Scenarios Where ORA-02153 Appears
    • 1. User Migration Between Databases
    • 2. Copy-Paste from Emails or Documents
    • 3. SQL*Plus Formatting Issues
    • 4. Scripted User Creation
  • Best Practices to Avoid ORA-02153
    • ✅ Always Keep the Hash on One Line
    • ✅ Copy Carefully from DBA_USERS
    • ✅ Prefer ALTER USER IDENTIFIED BY PASSWORD
    • ✅ Validate Quotes
  • Should You Still Use IDENTIFIED BY VALUES?
  • Oracle Version Note (Important)
  • Final Thoughts
    • Related Articles

Related posts

How to Transition from IT Support to Oracle Database Administration

How to Transition from IT Support to Oracle Database Administration

October 5, 2026
timezone

Oracle 19c Time Zone Upgrade: DSTv32 to DSTv44

October 1, 2026

In this blog, we’ll break down why this error happens, what Oracle actually expects, and how you fixed it correctly—in a way that’s practical, human-friendly, and SEO-optimized for DBAs working in real production environments.

ORA-02153

What Is ORA-02153?

ORA-02153 occurs when Oracle cannot parse or validate the password hash provided in the IDENTIFIED BY VALUES clause during a CREATE USER or ALTER USER operation.

This clause is not for plain-text passwords. It is meant for internal Oracle password hashes, usually copied from:

  • DBA_USERS.PASSWORD
  • DBA_USERS.SPARE4
  • Export / migration scripts
  • Legacy user recreation scripts

When Oracle sees something it doesn’t like in that hash string, it immediately stops with ORA-02153.


The Problematic Command (What Went Wrong)

Here’s the original command that failed:

CREATE USER "TEST" IDENTIFIED BY VALUES 'S:C295FF98A656B6AB0C9B348D01BC69B
B25BA9CF22A59F550363E87F2DD43;T:889819978B7B73643DEA8DC0CA165B14C6CB53B96E829ABC
C2A910966E69DDB5E2EAB85A4C264A06431B1D24E05995258BBE77C2725438493B9B6721677693C4
3CF360E4E88B5924D2CCAB3C5AC26C0D'
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP";

And Oracle responded with:

ORA-02153: invalid VALUES password string

At first glance, the password string looks valid. It contains both:

  • S: → SHA-1 / legacy password hash
  • T: → 12c+ password version hash

So what’s the issue?


The Root Cause: Line Breaks in the Password Hash

The real problem is subtle but critical:

👉 The password hash was broken across multiple lines.

Oracle expects the entire IDENTIFIED BY VALUES string to be:

  • A single continuous string
  • With no spaces
  • With no line breaks
  • With no hidden characters

Even though SQL*Plus visually allows multi-line input, Oracle internally treats line breaks as invalid characters inside the password hash.

Oracle Is Extremely Strict Here

Unlike SQL or PL/SQL syntax, password hashes are binary-safe strings. Oracle does not attempt to “fix” or normalize them. If the hash does not match the exact expected format, you get ORA-02153.


The Corrected Command (Why It Worked)

Here is the corrected version that executed successfully:

CREATE USER "TEST"
IDENTIFIED BY VALUES 'S:C295FF98A656B6AB0C9B348D01BC69BB25BA9CF22A59F550363E87F2DD43;T:889819978B7B73643DEA8DC0CA165B14C6CB53B96E829ABCC2A910966E69DDB5E2EAB85A4C264A06431B1D24E05995258BBE77C2725438493B9B6721677693C43CF360E4E88B5924D2CCAB3C5AC26C0D'
DEFAULT TABLESPACE "USERS"
TEMPORARY TABLESPACE "TEMP";

Result:

User created.

Why This Works

  • The entire password hash is on a single line
  • No whitespace inside the quoted string
  • S: and T: sections are preserved exactly
  • Oracle can validate the hash successfully

Understanding the S: and T: Prefixes

When you see something like this:

S:<hash>;T:<hash>

It means:

  • S: → Older password version (pre-12c compatibility)
  • T: → 12c+ password version (mandatory in newer releases)

Modern Oracle databases (12c, 19c, 21c, 23ai) require the T: hash. If it’s missing or malformed, user authentication may fail—or user creation may fail outright.


Common Scenarios Where ORA-02153 Appears

This error is very common in real DBA work, especially during:

1. User Migration Between Databases

Copying password hashes manually from DBA_USERS output.

2. Copy-Paste from Emails or Documents

Line wrapping silently inserts newlines or spaces.

3. SQL*Plus Formatting Issues

Terminal width causes hashes to wrap visually.

4. Scripted User Creation

Password string accidentally broken across lines in shell or SQL scripts.


Best Practices to Avoid ORA-02153

✅ Always Keep the Hash on One Line

Even if it’s very long—one line only.

✅ Copy Carefully from DBA_USERS

Use SQL like:

SET LONG 100000
SET PAGESIZE 0
SET LINESIZE 200

✅ Prefer ALTER USER IDENTIFIED BY PASSWORD

When possible, let users reset passwords instead of migrating hashes.

✅ Validate Quotes

Make sure there is:

  • One opening '
  • One closing '
  • No extra characters in between

Should You Still Use IDENTIFIED BY VALUES?

Honestly? Only when absolutely necessary.

Oracle does not recommend this method unless:

  • You are doing a controlled migration
  • Passwords must remain unchanged
  • Users cannot reset passwords

For most environments, it’s safer and cleaner to:

CREATE USER TEST IDENTIFIED BY StrongPassword123;

And force a password reset later if needed.


Oracle Version Note (Important)

In newer versions of Oracle Corporation databases (19c, 21c, 23ai):

  • Password versions are stricter
  • Legacy hashes may be rejected
  • Missing or malformed T: hashes cause failures

Always ensure the source and target databases are compatible in terms of password versions.


Final Thoughts

ORA-02153 is one of those errors that looks confusing but is actually very simple once you know the rule:

Oracle password hashes must be copied exactly, on a single line, with zero formatting changes.

In your case, nothing was wrong with the hash itself—the issue was purely line breaks inside the IDENTIFIED BY VALUES string.

Fix that, and Oracle is happy again.


Related Articles

  • ORA-01652: Unable to Extend Temp Segment in Temporary Tablespace – Fix Guide
  • ORA-04030: Out of Process Memory in PGA – Oracle Memory Fix Guide
  • ORA-01578: ORACLE Data Block Corruption Detected – Fix and Recovery Guide
  • How to Monitor and Tune Oracle Undo Tablespace (Avoid ORA-01555 & ORA-30036)
Tags: Invalid VALUES Password StringORA-02153Oracle Database
Previous Post

ORA-12547 in Oracle 23ai: TNS Lost Contact Caused by Incorrect ORACLE_HOME (Trailing Slash Issue)

Next Post

Oracle 19c and 23ai Support Extended: Complete Support Timeline, Upgrade Strategy, and What DBAs Should Do Next

Next Post
Oracle 19c & 23ai Support Extended

Oracle 19c and 23ai Support Extended: Complete Support Timeline, Upgrade Strategy, and What DBAs Should Do Next

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POPULAR NEWS

  • Oracle Patch 38632161: Step-by-Step Guide to Upgrade Oracle 19c to Release Update 19.30

    Oracle Patch 38632161: Step-by-Step Guide to Upgrade Oracle 19c to Release Update 19.30

    0 shares
    Share 0 Tweet 0
  • How To Download And Install The Latest OPatch

    0 shares
    Share 0 Tweet 0
  • Oracle Database 19.32 Release Update (RU) Patching Guide – Patch 39472050

    0 shares
    Share 0 Tweet 0
  • How to Install Oracle 19c Database on Red Hat Enterprise Linux 9

    0 shares
    Share 0 Tweet 0
  • Installing Oracle Database 26AI on Red Hat Enterprise Linux 9

    0 shares
    Share 0 Tweet 0
  • About Us
  • Contact

© 2026 DBAInsight - Smarter Databases. Sharper Insights. DBAInsight.

No Result
View All Result
  • Home
  • Cloud & Modern DBs
  • Guides
  • Cloud Technology
  • Case Studies
  • Troubleshooting
  • Training & Certification

© 2026 DBAInsight - Smarter Databases. Sharper Insights. DBAInsight.

Add as a preferred source on Google
Add as preferred source on Google