January 28, 2013

Error,account is locked,Warning you no longer connected to Oracle,Problem when connecting to HR account in Oracle database

Following are the Steps that how we can unlock any Database User Account(eg. HR).
Before Unlocking any user account that user must be in the Database and must be Locked and to unlock that user you need DBA(Database Administrator) Privileges that's why I firstly connected as SYSDBA.


Press win+R( For Run) and type cmd then ok.then you need to write SQLPLUS/NOLOG as shown below to reach SQL Command Line.
OR
you can directly go to SQL Command Line
Start-> All programs-> Oracle 10g Express Edition -> Run SQL Command Line
Why we need to Unlock HR User:
When you try to work(eg. create table) with HR User First Time then you wouldn't be able to connect HR User because by default it remains Locked that's why we need to unlock it.

you can also see this error while connecting to HR Locked Account.
"Error,account is locked,Warning, you no longer connected to Oracle"
 C:\>SQLPLUS/NOLOG  
 SQL>CONN/AS SYSDBA  
 connected  
 SQL>CONN HR/HR  
 Error,account is locked  
 warning,you no longer connected to oracle  
 SQL>CONN/AS SYSDBA  
 connected  
 SQL>ALTER USER HR IDENTIFIED BY HR;  
 user altered  
 SQL>ALTER USER HR ACCOUNT UNLOCK;  
 user altered  
 SQL>ALTER USER HR IDENIFIED BY HR ACCOUNT UNLOCK;  
 user altered  
 SQL>CONN HR/HR  
 connected    

0 comments:

Disclaimer

We shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its response or damage to your system. We do not guarantee that the integrity or security of this communication has been maintained or that this communication is free of viruses, interceptions or interferences. Anyone communicating with us by email accepts the risks involved and their consequences. We accept no liability for any damage caused by any virus transmitted by this site.