Bo's Oracle Station

查看: 1327|回复: 0

课程第37次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-8-5 20:49:59 | 显示全部楼层 |阅读模式
2019-08-05
  1. [root@station76 ~]# cd /u01/app/oracle/product/11.2.0/dbhome_1/station76.example.com_orcl/sysman/emd/state/
  2. [root@station76 state]# ls
  3. 0000.dlt
  4. 0001.dlt
  5. 0002.dlt
  6. 0003.dlt
  7. 0004.dlt
  8. 0005.dlt
  9. 83E3D3D75900957545AA951F730DF856_failedLogin.log
  10. 83E3D3D75900957545AA951F730DF856_seg_adv_count.log
  11. adr
  12. corr.save
  13. ORA1578_20190805125138_COM_1.zip
  14. parse-log-D3C70AD90DF7BEA3EF4DCCC90D151E5D
  15. progResUtil.log
  16. snapshot
  17. storage
  18. [root@station76 state]# stat ORA1578_20190805125138_COM_1.zip
  19.   File: `ORA1578_20190805125138_COM_1.zip'
  20.   Size: 7751825         Blocks: 15144      IO Block: 4096   regular file
  21. Device: fb00h/64256d    Inode: 2376966     Links: 1
  22. Access: (0640/-rw-r-----)  Uid: (  602/  oracle)   Gid: (  602/oinstall)
  23. Access: 2019-08-05 12:53:15.845424387 +0800
  24. Modify: 2019-08-05 12:53:15.845424387 +0800
  25. Change: 2019-08-05 12:53:15.845424387 +0800
  26. [root@station76 state]#
复制代码
  1. [root@station76 hm]# ls
  2. HMREPORT_HM_RUN_6351.hm  HMREPORT_HM_RUN_6511.hm  HMREPORT_HM_RUN_6591.hm
  3. HMREPORT_HM_RUN_6431.hm  HMREPORT_HM_RUN_6531.hm  HMREPORT_HM_RUN_6611.hm
  4. HMREPORT_HM_RUN_6451.hm  HMREPORT_HM_RUN_6571.hm
  5. [root@station76 hm]# vim HMREPORT_HM_RUN_6611.hm
复制代码
  1. [root@station76 orcl]# cd hm/
  2. [root@station76 hm]# ls
  3. HMREPORT_HM_RUN_6351.hm  HMREPORT_HM_RUN_6531.hm  HMREPORT_MYRUN1.hm
  4. HMREPORT_HM_RUN_6431.hm  HMREPORT_HM_RUN_6571.hm  HMREPORT_MYRUN2.hm
  5. HMREPORT_HM_RUN_6451.hm  HMREPORT_HM_RUN_6591.hm
  6. HMREPORT_HM_RUN_6511.hm  HMREPORT_HM_RUN_6611.hm
复制代码

  1. RMAN>  run {
  2. 2>  set newname for datafile 5 to '/home/oracle/example.dbf';
  3. 3>  restore datafile 5 from tag '1T-WHOLE-INCR0';
  4. 4> }

  5. executing command: SET NEWNAME

  6. Starting restore at 2019-08-05:13:08:59
  7. using channel ORA_SBT_TAPE_1
  8. using channel ORA_DISK_1

  9. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  10. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  11. channel ORA_SBT_TAPE_1: restoring datafile 00005 to /home/oracle/example.dbf
  12. channel ORA_SBT_TAPE_1: reading from backup piece 3au8bfd9_1_1
  13. channel ORA_SBT_TAPE_1: piece handle=3au8bfd9_1_1 tag=1T-WHOLE-INCR0
  14. channel ORA_SBT_TAPE_1: restored backup piece 1
  15. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:35
  16. Finished restore at 2019-08-05:13:09:35

复制代码
https://www.botangdb.com/forum.php?mod=viewthread&tid=80


关于OPatch:
  1. [oracle@station76 ~]$ unzip p13906496_112030_Linux-x86-64.zip
  2. Archive:  p13906496_112030_Linux-x86-64.zip
  3.    creating: 13906496/
  4.    creating: 13906496/etc/
  5.    creating: 13906496/etc/xml/
  6.   inflating: 13906496/etc/xml/GenericActions.xml
  7.   inflating: 13906496/etc/xml/ShiphomeDirectoryStructure.xml
  8.    creating: 13906496/etc/config/
  9.   inflating: 13906496/etc/config/actions.xml
  10.   inflating: 13906496/etc/config/inventory.xml
  11.   inflating: 13906496/etc/config/deploy.xml
  12.    creating: 13906496/online/
  13.    creating: 13906496/online/files/
  14.    creating: 13906496/online/files/hpatch/
  15.   inflating: 13906496/online/files/hpatch/bug13906496.pch
  16.    creating: 13906496/online/etc/
  17.    creating: 13906496/online/etc/config/
  18.   inflating: 13906496/online/etc/config/actions.xml
  19.   inflating: 13906496/online/etc/config/inventory.xml
  20.   inflating: 13906496/online/etc/config/deploy.xml
  21.    creating: 13906496/online/etc/xml/
  22.   inflating: 13906496/online/etc/xml/ShiphomeDirectoryStructure.xml
  23.   inflating: 13906496/online/etc/xml/GenericActions.xml
  24.   inflating: 13906496/README.txt
  25.    creating: 13906496/files/
  26.    creating: 13906496/files/lib/
  27.    creating: 13906496/files/lib/libserver11.a/
  28.   inflating: 13906496/files/lib/libserver11.a/qertqo.o
  29.   inflating: 13906496/files/lib/libserver11.a/kxfq.o
  30. [oracle@station76 ~]$ ls
  31. 13906496                 Music
  32. backup                   ORA1578_20190805125138_COM_1.zip
  33. backup1                  ORA1578_20190805125139_COM_1.zip
  34. backup2                  oradiag_oracle
  35. backupusers.rcv          p13906496_112030_Linux-x86-64.zip
  36. control10d-after.sql     p6880880_112000_Linux-x86-64.zip
  37. control10d-before.sql    pb.sh
  38. control11b.sql           Pictures
  39. control11c.sql           Public
  40. create_t04209_uname.sql  RMasmcmd.sh
  41. datapumpdir              Templates
  42. Desktop                  test
  43. Documents                test2
  44. Downloads                Videos
  45. example.dbf
  46. [oracle@station76 ~]$ cd 13906496
  47. [oracle@station76 13906496]$ ls
  48. etc  files  online  README.txt
  49. [oracle@station76 13906496]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opat                                                                             ch  -h
  50. Oracle Interim Patch Installer version 11.2.0.3.6
  51. Copyright (c) 2013, Oracle Corporation.  All rights reserved.


  52. Usage: opatch [ -help ] [ -report ] [ command ]

  53.             command := apply
  54.                        lsinventory
  55.                        lspatches
  56.                        napply
  57.                        nrollback
  58.                        rollback
  59.                        query
  60.                        version
  61.                        prereq
  62.                        util

  63. <global_arguments> := -help       Displays the help message for the command.
  64.                        -report     Print the actions without executing.

  65. example:
  66.    'opatch -help'
  67.    'opatch -help -fmw'
  68.    'opatch auto -help'
  69.    'opatch apply -help'
  70.    'opatch lsinventory -help'
  71.    'opatch lspatches -help'
  72.    'opatch napply -help'
  73.    'opatch nrollback -help'
  74.    'opatch rollback -help'
  75.    'opatch prereq -help'
  76.    'opatch util -help'


  77. OPatch succeeded.
  78. [oracle@station76 13906496]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opat                                                                             ch  query  -h
  79. Oracle Interim Patch Installer version 11.2.0.3.6
  80. Copyright (c) 2013, Oracle Corporation.  All rights reserved.


  81. DESCRIPTION
  82.         This operation loads and prints out various information about a patch.
  83.         Parameter patch_location points to where a patch is located.
  84.         For example, if you specify "path", there should be sub-dir.
  85.         "etc/config" under "path".

  86. SYNTAX
  87.         opatch query  [-all] [-is_auto_patch] [-is_translatable_patch]
  88.                       [-get_base_bugs] [-get_component] [-get_os] [-get_date]
  89.                       [-get_patch_language] [-get_patch_type] [-get_patching_mod                                                                             el]
  90.                       [-get_product_family] [-get_update_components] [-has_sql]                                                                              
  91.                       [-is_online_patch]  [-is_patchset_update]
  92.                       [-is_portal_patch] [-is_rolling_patch]
  93.                       [-jre <LOC> ] [-oh <LOC> ]
  94.                       [ <patch_location> ]

  95. OPTIONS
  96.            -all
  97.                 Get everything available about a patch. This is equivalent
  98.                 to setting all available options.

  99.            -is_auto_patch
  100.                 This option says 'true' if the patch is auto-enabled,
  101.                 'false' otherwise.

  102.            -is_translatable_patch
  103.                 This option says 'true' if the patch is translatable,
  104.                 'false' otherwise.

  105.            -get_base_bug
  106.                 Get bugs fixed by the patch

  107.            -get_component
  108.                 Get components touched by the patch.

  109.            -get_update_components
  110.                 Get all components to be upgraded in a Patchset Update.

  111.            -get_date
  112.                 Get patch creation date and time.

  113.            -get_os
  114.                 Get platforms for which this patch could be applied.

  115.            -get_patch_type
  116.                 Get the patch type.

  117.            -get_patching_model
  118.                 Get the patching model.

  119.            -get_patch_language
  120.                 Get the language supported by the patch.

  121.            -get_product_family
  122.                 Get the product family to which the patch belongs.

  123.            -has_sql
  124.                 This option says 'true' if the patch has sql related actions,
  125.                 'false' otherwise.

  126.            -is_online_patch
  127.                 This option says 'true' if the patch is a online patch,
  128.                 'false' otherwise.

  129.            -is_patchset_update
  130.                 This option says 'true' if the patch is a Patchset Update,
  131.                 'false' otherwise.

  132.            -is_portal_patch
  133.                 This option says 'true' if the patch has portal actions,
  134.                 'false' otherwise.

  135.            -is_rolling_patch
  136.                 This option says 'true' if the patch is a rolling patch,
  137.                 'false' otherwise.

  138.            -jre
  139.                 This option tells OPatch to use JRE (java) from the specified
  140.                 location instead of the default location under Oracle Home.

  141.            -oh
  142.                 The oracle home to work on. This takes precedence over the
  143.                 environment variable ORACLE_HOME.


  144. PARAMETERS
  145.         The location of the patch to be queried.
  146.         If the patch location is not specified, then the current directory
  147.         is taken as the patch location.



  148. OPatch succeeded.
  149. [oracle@station76 13906496]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opat                                                                             ch  query  -is_online_patch
  150. Oracle Interim Patch Installer version 11.2.0.3.6
  151. Copyright (c) 2013, Oracle Corporation.  All rights reserved.


  152. Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
  153. Central Inventory : /u01/app/oraInventory
  154.    from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
  155. OPatch version    : 11.2.0.3.6
  156. OUI version       : 11.2.0.4.0
  157. Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/o                                                                             patch2019-08-05_14-08-01PM_1.log

  158. --------------------------------------------------------------------------------
  159. Patch is an online patch: false



  160. OPatch succeeded.
  161. [oracle@station76 13906496]$ cd online
  162. [oracle@station76 online]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch                                                                               query  -is_online_patch
  163. Oracle Interim Patch Installer version 11.2.0.3.6
  164. Copyright (c) 2013, Oracle Corporation.  All rights reserved.


  165. Oracle Home       : /u01/app/oracle/product/11.2.0/dbhome_1
  166. Central Inventory : /u01/app/oraInventory
  167.    from           : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
  168. OPatch version    : 11.2.0.3.6
  169. OUI version       : 11.2.0.4.0
  170. Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/o                                                                             patch2019-08-05_14-08-12PM_1.log

  171. --------------------------------------------------------------------------------
  172. Patch is an online patch: true



  173. OPatch succeeded.
  174. [oracle@station76 online]$
复制代码
  1. [oracle@station76 online]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch  apply  -connectString  orcl:::  -connectString  rcat:::
复制代码
  1. [oracle@station76 online]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch  rollback -i 55555 -connectString orcl::: -connectString rcat:::
复制代码

回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-9 13:00 , Processed in 0.039296 second(s), 33 queries .

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