Funda 2 > Online Back - 12th May

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Funda 2 > Online Back - 12th May as PDF for free.

More details

  • Words: 974
  • Pages: 7
sql> --------- online backup sql> sql> sql> archive log list database log mode no archive mode automatic archival disabled archive destination d:\oracle oldest online log sequence 6 current log sequence 8 sql> --------- we want to set database in archive mode sql> sql> ----- archival mode is also want to enabled it will enabled in mount stage only sql> sql> shutdown immediate; database closed. database dismounted. oracle instance shut down. sql> startup mount; oracle instance started. total system global area 135338868 fixed size 453492 variable size 109051904 database buffers 25165824 redo buffers 667648 database mounted. sql> alter database archivelog;

bytes bytes bytes bytes bytes

database altered. sql> alter database open; database altered. sql> -archive log list sp2-0734: unknown command beginning "-archive l..." - rest of line ignored. sql> archive log list database log mode archive mode automatic archival disabled archive destination d:\oracle oldest online log sequence 6 next log sequence to archive 8 current log sequence 8 sql> sql> select * from v$log; group# thread# sequence# bytes members arc status ---------- ---------- ---------- ---------- ---------- --- ---------------first_change# first_tim ------------- --------1 1 8 104857600 1 no current 317411 12-may-08 2 1 276786 10-may-08 3

1

6

104857600

1 yes inactive

7

104857600

1 yes inactive

276793 10-may-08 sql> set linesize 200; sql> set pagesize 200; sql> / group# thread# sequence# first_change# first_tim

bytes

members arc status

---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1 317411 12-may-08

1

8

104857600

1 no

current

2 276786 10-may-08

1

6

104857600

1 yes inactive

3 276793 10-may-08

1

7

104857600

1 yes inactive

sql> alter system switch logfile; system altered. sql> / system altered. sql> select * from v$log; group# thread# sequence# first_change# first_tim

bytes

members arc status

---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1 317411 12-may-08

1

8

104857600

1 no

inactive

2 319539 12-may-08

1

9

104857600

1 no

inactive

3 319610 12-may-08

1

10

104857600

1 no

current

sql> archive log list database log mode archive mode automatic archival disabled archive destination d:\oracle oldest online log sequence 8 next log sequence to archive 8 current log sequence 10 sql> alter system switch logfile; alter system switch logfile

* error at line 1: ora-01089: immediate shutdown in progress - no operations are permitted sql> -------- for open another session sql> sql> ------- archive process should enabled by using log_archive_start=true scope=spfile sql> sql> ------then shutdown immediate ... sql> sql> ---- the orginal seesion get dissconnected... sql> sql> ----- then startup the database sql> sql> startup ora-12571: tns:packet writer failure sql> conn sys/oracle as sysdba connected to an idle instance. sql> startup oracle instance started. total system global area

135338868 bytes

fixed size variable size database buffers

453492 bytes 109051904 bytes 25165824 bytes

redo buffers

667648 bytes

database mounted. database opened. sql> sql> sql> sql> ------- online backup sql> sql> sql> select * from v$backup; file# status

change# time

---------- ------------------ ---------- --------1 not active

0

2 not active

0

3 not active

0

4 not active

0

5 not active

0

6 not active

0

7 not active

0

8 not active

0

10 not active

0

9 rows selected. sql> select name from v$datafile where ts#=8; name -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------d:\oracle\oradata\iimdba\tools01.dbf sql> select name from v$datafile where ts#=9; name -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------d:\bkp\users01.dbf sql> alter tablespace users online; tablespace altered. sql> alter tablespace users begin backup; tablespace altered. sql> select * from v$backup; file# status

change# time

---------- ------------------ ---------- --------1 not active

0

2 not active

0

3 not active

0

4 not active

0

5 not active

0

6 not active

0

7 not active

0

8 not active 9 active 10 not active

0 320541 12-may-08 0

10 rows selected. sql> host sql> alter tablespace users end backup; tablespace altered. sql> select * from v$backup; file# status

change# time

---------- ------------------ ---------- --------1 not active

0

2 not active

0

3 not active

0

4 not active

0

5 not active

0

6 not active

0

7 not active

0

8 not active

0

9 not active 10 not active 10 rows selected. sql> alter system switch logfile; system altered. sql> / system altered. sql> / system altered. sql> /

320541 12-may-08 0

system altered. sql> / system altered. sql> / system altered. sql> alter tablespace users offline; tablespace altered. sql> shutdown immediate; database closed. database dismounted. oracle instance shut down. sql> startup oracle instance started. total system global area fixed size variable size database buffers redo buffers

135338868 bytes 453492 bytes 109051904 bytes 25165824 bytes 667648 bytes

database mounted. database opened. sql> alter tablespace users online; alter tablespace users online * error at line 1: ora-01157: cannot identify/lock data file 9 - see dbwr trace file ora-01110: data file 9: 'd:\bkp\users01.dbf' sql> alter tablespace users rename datafile 'd:\bkp\users01.dbf' to 'd:\bkp\users02.dbf'; tablespace altered. sql> alter tablespace users online; alter tablespace users online * error at line 1: ora-01113: file 9 needs media recovery ora-01110: data file 9: 'd:\bkp\users02.dbf' sql> recover tablespace users; ora-00279: change 320541 generated at 05/12/2008 09:57:13 needed for thread 1 ora-00289: suggestion : d:\oracle\bkp10.1 ora-00280: change 320541 for thread 1 is in sequence #10

specify log: {=suggested | filename | auto | cancel} auto ora-00279: change 320713 generated at 05/12/2008 09:58:43 needed for thread 1 ora-00289: suggestion : d:\oracle\bkp11.1 ora-00280: change 320713 for thread 1 is in sequence #11 ora-00278: log file 'd:\oracle\bkp10.1' no longer needed for this recovery ora-00279: ora-00289: ora-00280: ora-00278:

change 320791 generated at 05/12/2008 09:59:02 needed for thread 1 suggestion : d:\oracle\bkp12.1 change 320791 for thread 1 is in sequence #12 log file 'd:\oracle\bkp11.1' no longer needed for this recovery

ora-00279: ora-00289: ora-00280: ora-00278:

change 320795 generated at 05/12/2008 09:59:07 needed for thread 1 suggestion : d:\oracle\bkp13.1 change 320795 for thread 1 is in sequence #13 log file 'd:\oracle\bkp12.1' no longer needed for this recovery

log applied. media recovery complete. sql> alter tablespace users online; tablespace altered. sql> sql> spool off

Related Documents