29 April 2010

How to Set the DB on the archive log mode ?

1- log on the db (database) as sys dba

>sqlplus >username/password as sysdba

2- shutdown the DB immediate

>sqlplus shutdown immediate

3-start db in mount state

>sqlplus startup mount

4-alter database archive log

5-alter database open

How to switch to another user!!!

Need to become a different Oracle database user? There is a way to login into a another user's
account without knowing their password:

1. Find out the encrypted password for the user

SQL> select username, password from dba_users where username = 'USERNAME';

USERNAME PASSWORD
------------ ------------------------------
USERNAME 6B4712549D4DA963

Save the encrypted password value somewhere i.e. in a text file

2. Change user's password to a temporary password

SQL> alter user USERNAME identified by 'password';

3. Do whatever you had to do as that user

4. Change user's password back to the original

SQL> alter user USERNAME identified by values '6B4712549D4DA963';



do not forget to use the word 'values' here, else this won't work!




.