About Me

My photo
India
Hey there, lovely people! I'm Hemant Menaria, and I'm passionate about programming. Having completed my MCA in 2011, I've delved into the world of coding with fervor. I believe in sharing knowledge, making complex concepts easy to grasp for everyone. JAVA, PHP, and ANDROID hold a special place in my heart, and I spend most of my time immersed in them. Currently, I'm deeply engaged in API/Webservice frameworks and crafting Hybrid mobile applications to enhance flexibility in the digital realm. If you ever find yourself stuck with a programming challenge, feel free to reach out to me at +91-8955499900 or drop me a line at hemantmenaria008@gmail.com. I'm always eager to help fellow enthusiasts navigate the intricacies of coding!

Thursday, June 17, 2021

Forget oracle database username or password

 

Forget oracle database username or password

Recover oracle database username and password


Step-1: open sqlplus.

Step-2: type- connect / as sysdba   and password will be blank so just enter.

Step-3: Now you can see SQL> 

Step-4: To get all user type following query-

    SQL> select username,password from dba_users;

now find the user which you have created from the shown list and reset password by following query-

    SQL> alter user username identified by password;

Here username is the user for which you want to reset the password.


Create new user-

Step-1: open sqlplus.

Step-2: type- connect / as sysdba   and password will be blank so just enter.

Step-3: Now you can see SQL> 

Step-4 :To create new user type following query-

create user NewUserName identified by password

note: if you get "create user invalid common user or role name" error then just change the session by type following query-

    alter session set "_ORACLE_SCRIPT"=true;   

and try again to create user by step-4.

Step-5: Grant Previlage to oracle user (With DBA power)-

    GRANT CONNECT, RESOURCE, DBA TO NewUserName;

To grant all role to user-

    GRANT ALL PRIVILEGES TO NewUserName;


No comments:

Post a Comment