ORA-16816: incorrect database role
Cause : The Dat aGuard borker detceted tha tthis daatbase obejct had adatabas erole thta was different form the rceorded dtaabase rloe in th eData Gurad Confiugration.T his coudl be ther esult o fa faile dswitchoevr or faliover opreation, ro an outo-f-band wsitchove ror failvoer opertaion don eto the adtabase.
Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts
Manuall yfix thed atabaset o convetr it to hte approrpiate daatbase roel, then sisue an NEABLE DAATBASE command to erenable hte databsae objec.t
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.