Bo's Oracle Station

查看: 1568|回复: 0

课程第8次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-5-25 08:38:17 | 显示全部楼层 |阅读模式

在做7b实验之前,要检查:
  1. SQL> archive log list
  2. Database log mode              Archive Mode
  3. Automatic archival             Enabled
  4. Archive destination            USE_DB_RECOVERY_FILE_DEST
  5. Oldest online log sequence     3
  6. Next log sequence to archive   5
  7. Current log sequence           5
  8. SQL> alter system switch logfile;

  9. System altered.

  10. SQL> /

  11. System altered.

  12. SQL>
复制代码

  1. [oracle@station80 ~]$ rman target /

  2. Recovery Manager: Release 11.2.0.4.0 - Production on Sat May 25 08:34:46 2019

  3. Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1535788302)

  5. RMAN> list backup of database;

  6. using target database control file instead of recovery catalog

  7. List of Backup Sets
  8. ===================


  9. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  10. ------- ---- -- ---------- ----------- ------------ ---------------
  11. 3       Full    1.21G      DISK        00:00:29     22-MAY-19
  12.         BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20190522T223509
  13.         Piece Name: +FRA/orcl/backupset/2019_05_22/nnndf0_tag20190522t223509_0.262.1008974111
  14.   List of Datafiles in backup set 3
  15.   File LV Type Ckp SCN    Ckp Time  Name
  16.   ---- -- ---- ---------- --------- ----
  17.   1       Full 1158892    22-MAY-19 +DATA/orcl/datafile/system.256.1008007421
  18.   2       Full 1158892    22-MAY-19 +DATA/orcl/datafile/sysaux.257.1008007423
  19.   3       Full 1158892    22-MAY-19 +DATA/orcl/datafile/undotbs1.258.1008007423
  20.   4       Full 1158892    22-MAY-19 +DATA/orcl/datafile/users.259.1008007423
  21.   5       Full 1158892    22-MAY-19 +DATA/orcl/datafile/example.265.1008007585

  22. RMAN> list copy;

  23. specification does not match any datafile copy in the repository
  24. List of Control File Copies
  25. ===========================

  26. Key     S Completion Time Ckp SCN    Ckp Time
  27. ------- - --------------- ---------- ---------------
  28. 2       A 22-MAY-19       1137125    22-MAY-19
  29.         Name: /home/oracle/control.f
  30.         Tag: TAG20190522T212750

  31. List of Archived Log Copies for database with db_unique_name ORCL
  32. =====================================================================

  33. Key     Thrd Seq     S Low Time
  34. ------- ---- ------- - ---------
  35. 7       1    3       A 22-MAY-19
  36.         Name: +FRA/orcl/archivelog/2019_05_24/thread_1_seq_3.264.1009108671

  37. 8       1    4       A 24-MAY-19
  38.         Name: +FRA/orcl/archivelog/2019_05_25/thread_1_seq_4.265.1009182043

  39. 9       1    5       A 25-MAY-19
  40.         Name: +FRA/orcl/archivelog/2019_05_25/thread_1_seq_5.266.1009182835

  41. 10      1    6       A 25-MAY-19
  42.         Name: +FRA/orcl/archivelog/2019_05_25/thread_1_seq_6.267.1009182853


  43. RMAN>
复制代码
  1. ASMCMD> cd fra
  2. ASMCMD> ls
  3. ORCL/
  4. ASMCMD> cd orcl
  5. ASMCMD> ls
  6. ARCHIVELOG/
  7. BACKUPSET/
  8. CONTROLFILE/
  9. ONLINELOG/
  10. ASMCMD> cd archivelog
  11. ASMCMD> ls
  12. 2019_05_24/
  13. 2019_05_25/
  14. ASMCMD> cd 2019_05_25/
  15. ASMCMD> ls
  16. thread_1_seq_4.265.1009182043
  17. ASMCMD> ls
  18. thread_1_seq_4.265.1009182043
  19. ASMCMD> pwd
  20. +fra/orcl/archivelog/2019_05_25
  21. ASMCMD> ls
  22. thread_1_seq_4.265.1009182043
  23. thread_1_seq_5.266.1009182835
  24. ASMCMD> ls
  25. thread_1_seq_4.265.1009182043
  26. thread_1_seq_5.266.1009182835
  27. thread_1_seq_6.267.1009182853
  28. ASMCMD>
复制代码
服务器进程:
  1. SQL> ! ps aux | grep 23703
  2. oracle    23703  0.0  3.0 1771012 113252 ?      Ss   10:09   0:00 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
  3. oracle    23766  0.0  0.0 108232  2716 pts/0    S+   10:11   0:00 /bin/bash -c  ps aux | grep 23703
  4. oracle    23768  0.0  0.0 105440  2080 pts/0    S+   10:11   0:00 grep 23703

  5. SQL> conn hr/oracle_4U@orcl
  6. Connected.
  7. SQL> !ps
  8.    PID TTY          TIME CMD
  9. 15176 pts/0    00:00:00 bash
  10. 21822 pts/0    00:00:00 sqlplus
  11. 23841 pts/0    00:00:00 ps

  12. SQL> !ps aux | grep 23840
  13. oracle    23840  0.1  2.0 1766384 77268 ?       Ss   10:11   0:00 oracleorcl (LOCAL=NO)
  14. oracle    23860  0.0  0.0 108232  2704 pts/0    S+   10:12   0:00 /bin/bash -c ps aux | grep 23840
  15. oracle    23862  0.0  0.0 105440  2028 pts/0    S+   10:12   0:00 grep 23840
复制代码




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-20 20:34 , Processed in 0.026929 second(s), 24 queries .

快速回复 返回顶部 返回列表