COMPLETE RECOVERY IN NOARCHIVELOG MODE
1. User creation:Create user kk identified by kk.
2. You check Archive or noarchivelog mode:
Archive log list If it is archivelog mode you change to noarchivelog mode:
Alter database noarchivelog;
3. Create new tablespace :
Create tablespace abc datafile’d:\app\oracle\oradata\orcl\abc.dbf’ size 50m;
4. Allocate space for user:
Alter user kk identified by kk default tablespace abc quota unlimited on abc account unlock;
5. Grant sessions to the users:
Grant create session ,create any table ,select any table to kk;
6. To connect the user:
Conn kk/kk
7. Create emp table and insert the values into the table.
8. Give the commit statement
9. Count the values:
Select count(*) from emp;
10.shutdown immediate
11.startup nomount
12. Backup the database:
Host copy D:\app\oracle\oradata\orcl\*.* E:\backup1\
13. alter database mount;
14. alter database open;
15. conn kk/kk
16. insert the values into the emp table
17. commit;
18. select count(*) from emp;
19. shutdown immediate
20. open the datafile abc and corrupt by physically D :\app\oracle\oradata\orcl\abc.dbf 21.open the above abc notepad ,press ctl+a delete all and then save it as same name in same place
22. startup mount
23. host copy E:\backup1\*.* D:\app\oracle\oradata\orcl\
24.select * from v$recover_file;
25. set auto recovery on
26. recover datafile 5;
27. select * from v$recover_file;
28. alter database open;
29.conn kk/kk 30 select count(*) from emp;
No comments:
Post a Comment