Translate

17 Haziran 2014 Salı

Oracle HR table unlock

install oracle
http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
open cmd

C:>sqlplus

sign in with system and your password(which you choose while you install oracle DB)

C:>sqlplus
C>Enter User Name: system
C>Enter Password:  ............ (write here hr but you can't see because of security)

if you successfully sign in

pattern:
ALTER USER hr ACCOUNT UNLOCK IDENTIFIED BY Password;


SQL>ALTER USER hr ACCOUNT UNLOCK IDENTIFIED BY hr;

Or

SQL>ALTER USER hr IDENTIFIED BY  hr;
now we gave password to hr user
but we didn't unlock user
SQL> ALTER USER hr USER UNLOCK;

now it is ready to use




second way
SQL> connect /as sysdba
SQL> select username, account_status from dba_users;
SQL> alter user hr account unlock; # Unlock the locked account
SQL> alter user hr identified by hr; # Open the expired account
Or:
SQL> alter user hr identified by hr account unlock; #Unlock and open in a single statement
SQL> connect hr/hr
If you couldn't start db


Hiç yorum yok:

Yorum Gönder

Bu Blogda Ara