ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML
Cause : DDL operations like creation tables, views etc. and transaction control statements such as commit/rollback cannot be performed inside a query or a DML statement.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Ensure that the offending operation is not performed or use autonomous transactions to perform the operation within the query/DML operation.
Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.