Search code examples
oracle11guser-management

Cannot create Oracle user with specific password


In Oracle I tried this query

create user ACT_APP 
    identified by password 
    profile APP_PROFILE 
    default tablespace TS_MODULE_D 
    temporary tablespace TEMP;

after sending this query and i got these 2 errors.

  1. password verification for the specified password failed
  2. Password should contain at least one digit, one character and one punctuation

So I modified my query to

create user ACT_APP 
    identified by !234qwer 
    profile APP_PROFILE 
    default tablespace TS_MODULE_D 
    temporary tablespace TEMP;

But I got another error

missing or invalid option


Solution

  • From the manual:

    Passwords must follow the rules described in the section "Database Object Naming Rules"

    !234qwer is not a valid object name because of the leading ! therefor it needs to be enclosed in double quotes:

    create user ACT_APP 
        identified by "!234qwer"
        profile APP_PROFILE 
        default tablespace TS_MODULE_D 
        temporary tablespace TEMP;