ORA-01220: file based sort illegal before database is open
Cause : A query issued against a fixed table or view required a temporary segment for sorting before the database was open. Only in-memory sorts are supported before the database is open.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Re-phrase the query to avoid a large sort, increase the values of the SORT_AREA_SIZE and/or SORT_AREA_RETAINED_SIZE initialization parameters to enable the sort to be done in memory.
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.