m6米乐安卓版下载-米乐app官网下载
暂无图片
5
暂无图片
暂无图片
暂无图片

nbu异机恢复oracle数据库备份 -m6米乐安卓版下载

原创 fakedba 2023-07-17
1136

一、恢复原因

客户的几套oracle数据库都采用nbu做的备份,这次要求做一次季度的恢复演练,验证一下备份数据的有效性。

所以写下这篇文章,供大家参考,有不对的地方也请指正!

注:以下涉及客户环境真实信息都已做了替换。


二、环境介绍

1、nbu服务端:

centos 7.6

nbu server 7.7.3 (netbackup_7.7.3_linuxr_x86_64.tar.gz)

2、异机客户端:

oracle linux 7.3

oracle db 11.2.0.4(版本跟源库一致)

nbu client 7.7.3 (netbackup_7.7.3_clients2.tar.gz)


三、恢复操作

1、服务端要点

要通过nbu做异机恢复要建一个 no.restrictions 文件,解除异机数据恢复的限制。

[root@nbusrv ~]# mkdir /usr/openv/netbackup/db/altnames
[root@nbusrv ~]#
[root@nbusrv ~]# touch /usr/openv/netbackup/db/altnames/no.restrictions
[root@nbusrv ~]#
[root@nbusrv ~]# ll /usr/openv/netbackup/db/altnames/no.restrictions
-rw-r--r-- 1 root root 0 mar  7  2020 /usr/openv/netbackup/db/altnames/no.restrictions

2、异机端要点

异机端装好db软件,建好监听,再建一个空实例,实例名与源库相同。建实例是为了得到参数文件,恢复时不用手动创建。

将数据库关闭再启动到nomount状态:

[oracle@dbtest ~]$ sqlplus / as sysdba
sql*plus: release 11.2.0.4.0 production on thu jul 13 15:39:32 2023
米乐app官网下载 copyright (c) 1982, 2013, oracle.  all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options
sql> shutdown immediate;
database closed.
database dismounted.
oracle instance shut down.
sql>
sql> startup nomount
oracle instance started.
total system global area 4943876096 bytes
fixed size                  2261688 bytes
variable size             989859144 bytes
database buffers         3942645760 bytes
redo buffers                9109504 bytes
sql>
sql> exit
disconnected from oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options


删除没用的文件:

[oracle@dbtest ~]$ cd $oracle_base
[oracle@dbtest oracle]$
[oracle@dbtest oracle]$ cd oradata/orcl/
[oracle@dbtest orcl]$ ll
total 15668
-rw-r----- 1 oracle oinstall     9748480 jul 13 15:39 control01.ctl
-rw-r----- 1 oracle oinstall    20979712 jul 12 22:00 temp01.dbf
-rw-r----- 1 oracle oinstall    52429312 jul 13 15:43 redo01.log
-rw-r----- 1 oracle oinstall    52429312 jul 12 22:03 redo02.log
-rw-r----- 1 oracle oinstall    52429312 jul 13 08:30 redo03.log
-rw-r----- 1 oracle oinstall   702554112 jul 13 15:43 sysaux01.dbf
-rw-r----- 1 oracle oinstall   796925952 jul 13 15:43 system01.dbf
-rw-r----- 1 oracle oinstall    78651392 jul 13 15:43 undotbs01.dbf
-rw-r----- 1 oracle oinstall     5251072 jul 13 15:43 users01.dbf
[oracle@dbtest orcl]$ rm -f ./*
[oracle@dbtest orcl]$ ll
total 0
[oracle@dbtest orcl]$ cd ../../
[oracle@dbtest oracle]$ ll
total 0
drwxr-x---  5 oracle oinstall  48 jun 27 21:25 admin
drwxr-xr-x  5 oracle oinstall  45 mar  7 14:24 cfgtoollogs
drwxr-xr-x  2 oracle oinstall   6 jun 27 21:27 checkpoints
drwxrwxr-x 11 oracle oinstall 119 mar  7 12:41 diag
drwxr-x---  8 oracle oinstall  90 jun 27 21:25 fast_recovery_area
drwxr-x---  5 oracle oinstall  48 jun 27 21:25 oradata
drwxrwxr-x  3 oracle oinstall  19 mar  7 10:12 product
[oracle@dbtest oracle]$
[oracle@dbtest oracle]$ ll fast_recovery_area/orcl/
total 9520
-rw-r----- 1 oracle oinstall 9748480 jul 13 15:39 control02.ctl
[oracle@dbtest oracle]$
[oracle@dbtest oracle]$ rm -f fast_recovery_area/orcl/control02.ctl
[oracle@dbtest oracle]$
[oracle@dbtest oracle]$ ll fast_recovery_area/orcl/
total 0

3、异机端列出备份集

回到root用户下操作:

[root@dbtest ~]# cd /usr/openv/netbackup/bin/
[root@dbtest bin]#
[root@dbtest bin]# ./bplist -c 192.168.1.10 -s nbusrv -t 4 -s 07/12/2023 -e 07/13/2023 -l -r /
-rw-rw---- oracle    asmadmin     33554432 jul 13 02:08 /orcl_cntrl_20536_1_1142042924
-rw-rw---- oracle    asmadmin    199229440 jul 13 02:07 /orcl_al_20535_1_1142042868
-rw-rw---- oracle    asmadmin    982515712 jul 13 02:07 /orcl_al_20534_1_1142042868
-rw-rw---- oracle    asmadmin    900202496 jul 13 02:07 /orcl_al_20533_1_1142042868
-rw-rw---- oracle    asmadmin    991166464 jul 13 02:07 /orcl_al_20532_1_1142042823
-rw-rw---- oracle    asmadmin    965476352 jul 13 02:07 /orcl_al_20531_1_1142042822

按需求列出时间点备份集信息,这里只截取部分内容,主要获取控制文件备份集名称 /orcl_cntrl_20536_1_1142042924 。


4、异机端执行恢复

回到oracle用户下,确认db是nomount状态:

[oracle@dbtest ~]$ lsnrctl status
lsnrctl for linux: version 11.2.0.4.0 - production on 13-jul-2023 16:04:30
米乐app官网下载 copyright (c) 1991, 2013, oracle.  all rights reserved.
connecting to (description=(address=(protocol=ipc)(key=extproc1521)))
status of the listener
------------------------
alias                     listener
version                   tnslsnr for linux: version 11.2.0.4.0 - production
start date                08-mar-2023 09:39:23
uptime                    127 days 6 hr. 25 min. 6 sec
trace level               off
security                  on: local os authentication
snmp                      off
listener parameter file   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
listener log file         /u01/app/oracle/diag/tnslsnr/dbtest/listener/alert/log.xml
listening endpoints summary...
  (description=(address=(protocol=ipc)(key=extproc1521)))
  (description=(address=(protocol=tcp)(host=dbtest.novalocal)(port=1521)))
services summary...
service "orcl" has 1 instance(s).
  instance "orcl", status blocked, has 1 handler(s) for this service...
the command completed successfully
[oracle@dbtest ~]$
[oracle@dbtest ~]$ sqlplus / as sysdba
sql*plus: release 11.2.0.4.0 production on thu jul 13 16:08:57 2023
米乐app官网下载 copyright (c) 1982, 2013, oracle.  all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options
sql> select status from v$instance;
status
------------
started
sql> exit
disconnected from oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options


恢复控制文件命令:

run {
allocate channel ch00 type 'sbt_tape';
send 'nb_ora_serv=nbusrv,nb_ora_client=192.168.1.10';
restore controlfile from '/orcl_cntrl_20536_1_1142042924';   ## 这里填写获取的控制文件备份集名称。
sql 'alter database mount';
release channel ch00;
}


登录rman,恢复控制文件:

[oracle@dbtest ~]$ rman target /
recovery manager: release 11.2.0.4.0 - production on thu jul 13 16:11:05 2023
米乐app官网下载 copyright (c) 1982, 2011, oracle and/or its affiliates.  all rights reserved.
connected to target database: orcl (not mounted)
rman>
rman> run {
allocate channel ch00 type 'sbt_tape';
send 'nb_ora_serv=nbusrv,nb_ora_client=192.168.1.10';
restore controlfile from '/orcl_cntrl_20536_1_1142042924';
sql 'alter database mount';
release channel ch00;
}2> 3> 4> 5> 6> 7>
using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: sid=156 device type=sbt_tape
channel ch00: veritas netbackup for oracle - release 7.7.3 (2016051915)
sent command to channel: ch00
starting restore at 13-jul-23
channel ch00: restoring control file
channel ch00: restore complete, elapsed time: 00:00:35
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
finished restore at 13-jul-23
sql statement: alter database mount
released channel: ch00

恢复完,库处于mount状态。

 

恢复数据文件命令:

run {
allocate channel ch00 type 'sbt_tape';
allocate channel ch01 type 'sbt_tape';
allocate channel ch02 type 'sbt_tape';
allocate channel ch03 type 'sbt_tape';
send 'nb_ora_serv=nbusrv,nb_ora_client=192.168.1.10';
set until time = "to_date('2023-07-13 02:00:00','yyyy-mm-dd hh24:mi:ss')";  ## 填写要恢复的时间点。
set newname for database to '/data/orcl/%b';
restore database;
switch datafile all;
recover database;
release channel ch00;
release channel ch01;
release channel ch02;
release channel ch03;
}


这里碰到一个报错:

rman> run {
allocate channel ch00 type 'sbt_tape';
allocate channel ch01 type 'sbt_tape';
allocate channel ch02 type 'sbt_tape';
allocate channel ch03 type 'sbt_tape';
send 'nb_ora_serv=nbusrv,nb_ora_client=192.168.1.10';
set until time = "to_date('2023-07-13 02:00:00','yyyy-mm-dd hh24:mi:ss')";
set newname for database to '/data/orcl/%b';
restore database;
switch datafile all;
recover database;
release channel ch00;
release channel ch01;
release channel ch02;
release channel ch03;
}5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16>
allocated channel: ch00
channel ch00: sid=156 device type=sbt_tape
channel ch00: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch01
channel ch01: sid=189 device type=sbt_tape
channel ch01: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch02
channel ch02: sid=221 device type=sbt_tape
channel ch02: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch03
channel ch03: sid=3 device type=sbt_tape
channel ch03: veritas netbackup for oracle - release 7.7.3 (2016051915)
sent command to channel: ch00
sent command to channel: ch01
sent command to channel: ch02
sent command to channel: ch03
executing command: set until clause
executing command: set newname
starting restore at 13-jul-23
starting implicit crosscheck backup at 13-jul-23
released channel: ch00
released channel: ch01
released channel: ch02
released channel: ch03
rman-00571: ===========================================================
rman-00569: =============== error message stack follows ===============
rman-00571: ===========================================================
rman-03002: failure of restore command at 07/13/2023 16:20:24
rman-06091: no channel allocated for maintenance (of an appropriate type)


网上搜到办法,以下处理过程:

rman> delete obsolete device type disk;
starting implicit crosscheck backup at 13-jul-23
allocated channel: ora_disk_1
channel ora_disk_1: sid=156 device type=disk
allocated channel: ora_disk_2
channel ora_disk_2: sid=189 device type=disk
allocated channel: ora_disk_3
channel ora_disk_3: sid=221 device type=disk
allocated channel: ora_disk_4
channel ora_disk_4: sid=3 device type=disk
crosschecked 3 objects
crosschecked 3 objects
crosschecked 4 objects
crosschecked 3 objects
finished implicit crosscheck backup at 13-jul-23
starting implicit crosscheck copy at 13-jul-23
using channel ora_disk_1
using channel ora_disk_2
using channel ora_disk_3
using channel ora_disk_4
crosschecked 1 objects
crosschecked 1 objects
crosschecked 1 objects
crosschecked 1 objects
finished implicit crosscheck copy at 13-jul-23
searching for all files in the recovery area
cataloging files...
no files cataloged
rman retention policy will be applied to the command
rman retention policy is set to redundancy 1
released channel: ora_disk_1
released channel: ora_disk_2
released channel: ora_disk_3
released channel: ora_disk_4
allocated channel: ora_disk_1
channel ora_disk_1: sid=156 device type=disk
allocated channel: ora_disk_2
channel ora_disk_2: sid=189 device type=disk
allocated channel: ora_disk_3
channel ora_disk_3: sid=221 device type=disk
allocated channel: ora_disk_4
channel ora_disk_4: sid=3 device type=disk
deleting the following obsolete backups and copies:
type                 key    completion time    filename/handle
-------------------- ------ ------------------ --------------------
backup set           19772  28-jun-23
  backup piece       19772  28-jun-23          /backup/rman/orcl0628/orcl_20230628_3373971864.199931
backup set           19778  28-jun-23
  backup piece       19778  28-jun-23          /backup/rman/orcl0628/orcl_20230628_spfile_gu1vqu9b_1_1.rman
do you really want to delete the above objects (enter yes or no)? yes
deleted backup piece
backup piece handle=/backup/rman/orcl0628/orcl_20230628_3373971864.199931 recid=19772 stamp=1140683139
deleted 1 objects
deleted backup piece
backup piece handle=/backup/rman/orcl0628/orcl_20230628_spfile_gu1vqu9b_1_1.rman recid=19778 stamp=1140685099
deleted 1 objects
rman>
rman> allocate channel for maintenance device type 'sbt_tape';
released channel: ora_disk_1
released channel: ora_disk_2
released channel: ora_disk_3
released channel: ora_disk_4
allocated channel: ora_maint_sbt_tape_1
channel ora_maint_sbt_tape_1: sid=156 device type=sbt_tape
channel ora_maint_sbt_tape_1: veritas netbackup for oracle - release 7.7.3 (2016051915)


重新执行恢复:

rman> run {
allocate channel ch00 type 'sbt_tape';
allocate channel ch01 type 'sbt_tape';
allocate channel ch02 type 'sbt_tape';
allocate channel ch03 type 'sbt_tape';
send 'nb_ora_serv=nbusrv,nb_ora_client=192.168.1.10';
2> 3> 4> 5> set until time = "to_date('2023-07-13 02:00:00','yyyy-mm-dd hh24:mi:ss')";
set newname for database to '/data/orcl/%b';
restore database;
switch datafile all;
recover database;
release channel ch00;
release channel ch01;
release channel ch026> ;
release channel ch03;
}7> 8> 9> 10> 11> 12> 13> 14> 15> 16>
allocated channel: ch00
channel ch00: sid=189 device type=sbt_tape
channel ch00: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch01
channel ch01: sid=221 device type=sbt_tape
channel ch01: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch02
channel ch02: sid=3 device type=sbt_tape
channel ch02: veritas netbackup for oracle - release 7.7.3 (2016051915)
allocated channel: ch03
channel ch03: sid=33 device type=sbt_tape
channel ch03: veritas netbackup for oracle - release 7.7.3 (2016051915)
sent command to channel: ora_maint_sbt_tape_1
sent command to channel: ch00
sent command to channel: ch01
sent command to channel: ch02
sent command to channel: ch03
executing command: set until clause
executing command: set newname
starting restore at 13-jul-23
creating datafile file number=9 name=/data/orcl/test_tabspace.397.1038571005
creating datafile file number=12 name=/data/orcl/test_tabspace.951.1038571005
creating datafile file number=23 name=/data/orcl/test_tabspace.387.1038571005
channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00015 to /data/orcl/test_tabspace.954.1038571005
channel ch00: reading from backup piece orcl_bk_19792_1_1140213632
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00041 to /data/orcl/test_tabspace.1150.1108547591
channel ch01: reading from backup piece orcl_bk_19797_1_1140214348
channel ch02: starting datafile backup set restore
channel ch02: specifying datafile(s) to restore from backup set
channel ch02: restoring datafile 00003 to /data/orcl/undotbs1.361.1038565947
channel ch02: restoring datafile 00016 to /data/orcl/test_tabspace.262.1038571005
channel ch02: restoring datafile 00032 to /data/orcl/test_tabspace.1097.1081805359
channel ch02: restoring datafile 00048 to /data/orcl/test_tabspace.1157.1108547687
channel ch02: restoring datafile 00049 to /data/orcl/test_tabspace.1206.1124186593
channel ch02: reading from backup piece orcl_bk_20517_1_1142036125
channel ch03: starting datafile backup set restore
channel ch03: specifying datafile(s) to restore from backup set
channel ch03: restoring datafile 00019 to /data/orcl/test_tabspace.358.1038571005
channel ch03: restoring datafile 00025 to /data/orcl/test_tabspace.993.1039103463
channel ch03: restoring datafile 00035 to /data/orcl/test_tabspace.1143.1099745951
channel ch03: restoring datafile 00045 to /data/orcl/test_tabspace.1154.1108547597
channel ch03: restoring datafile 00052 to /data/orcl/test_tabspace.1220.1138266035
channel ch03: reading from backup piece orcl_bk_20519_1_1142036126


等待恢复任务完成,任务可以在nbu administration console看到:



恢复完成提示缺少归档,那就recover到提示的scn即可:

channel ch01: restore complete, elapsed time: 00:00:25
archived log file name=/data/arch/3_11171_1038566043.dbf thread=3 sequence=11171
archived log file name=/data/arch/4_10219_1038566043.dbf thread=4 sequence=10219
archived log file name=/data/arch/4_10220_1038566043.dbf thread=4 sequence=10220
archived log file name=/data/arch/1_21099_1038566043.dbf thread=1 sequence=21099
archived log file name=/data/arch/3_11172_1038566043.dbf thread=3 sequence=11172
archived log file name=/data/arch/2_11282_1038566043.dbf thread=2 sequence=11282
unable to find archived log
archived log thread=2 sequence=11283
released channel: ch00
released channel: ch01
released channel: ch02
released channel: ch03
rman-00571: ===========================================================
rman-00569: =============== error message stack follows ===============
rman-00571: ===========================================================
rman-03002: failure of recover command at 07/14/2023 18:35:04
rman-06054: media recovery requesting unknown archived log for thread 2 with sequence 11283 and starting scn of 16983905730736
rman>
rman> recover database until scn 16983905730736;  ## 手动恢复到提示的scn点。
starting recover at 15-jul-23
allocated channel: ora_disk_1
channel ora_disk_1: sid=189 device type=disk
allocated channel: ora_disk_2
channel ora_disk_2: sid=221 device type=disk
allocated channel: ora_disk_3
channel ora_disk_3: sid=3 device type=disk
allocated channel: ora_disk_4
channel ora_disk_4: sid=33 device type=disk
starting media recovery
media recovery complete, elapsed time: 00:00:08
finished recover at 15-jul-23

5、恢复后开库处理

由于异机端存放文件的路径和源库不同,所以要先处理redo。

登录数据库,可以看到redo的路径是源库的路径:

[oracle@dbtest ~]$ sqlplus / as sysdba
sql*plus: release 11.2.0.4.0 production on sat jul 15 21:45:20 2023
米乐app官网下载 copyright (c) 1982, 2013, oracle.  all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production
with the partitioning, olap, data mining and real application testing options
sql>
sql> set pagesize 50 linesize 300
col member for a48
select * from v$logfile;sql> sql>
    group# status  type    member                                           is_
---------- ------- ------- ------------------------------------------------ ---
         3         online   data/orcl/onlinelog/group_3.605.1038566047   no
         2         online   data/orcl/onlinelog/group_2.604.1038566045   no
         1         online   data/orcl/onlinelog/group_1.363.1038566043   no
        10         online   data/orcl/onlinelog/group_10.352.1038566137  no
        11         online   data/orcl/onlinelog/group_11.351.1038566139  no
        12         online   data/orcl/onlinelog/group_12.382.1038566141  no
         7         online   data/orcl/onlinelog/group_7.261.1038566143   no
         8         online   data/orcl/onlinelog/group_8.405.1038566145   no
         9         online   data/orcl/onlinelog/group_9.425.1038566145   no
         4         online   data/orcl/onlinelog/group_4.426.1038566147   no
         5         online   data/orcl/onlinelog/group_5.418.1038566149   no
         6         online   data/orcl/onlinelog/group_6.404.1038566151   no


rename一下redo,改成异机端的路径:

alter database rename file ' data/orcl/onlinelog/group_3.605.1038566047' to '/data/orcl/group_3.605.1038566047';
alter database rename file ' data/orcl/onlinelog/group_2.604.1038566045' to '/data/orcl/group_2.604.1038566045';
alter database rename file ' data/orcl/onlinelog/group_1.363.1038566043' to '/data/orcl/group_1.363.1038566043';
alter database rename file ' data/orcl/onlinelog/group_10.352.103856613' to '/data/orcl/group_10.352.103856613';
alter database rename file ' data/orcl/onlinelog/group_11.351.103856613' to '/data/orcl/group_11.351.103856613';
alter database rename file ' data/orcl/onlinelog/group_12.382.103856614' to '/data/orcl/group_12.382.103856614';
alter database rename file ' data/orcl/onlinelog/group_7.261.1038566143' to '/data/orcl/group_7.261.1038566143';
alter database rename file ' data/orcl/onlinelog/group_8.405.1038566145' to '/data/orcl/group_8.405.1038566145';
alter database rename file ' data/orcl/onlinelog/group_9.425.1038566145' to '/data/orcl/group_9.425.1038566145';
alter database rename file ' data/orcl/onlinelog/group_4.426.1038566147' to '/data/orcl/group_4.426.1038566147';
alter database rename file ' data/orcl/onlinelog/group_5.418.1038566149' to '/data/orcl/group_5.418.1038566149';
alter database rename file ' data/orcl/onlinelog/group_6.404.1038566151' to '/data/orcl/group_6.404.1038566151';


resetlog开库:

sql> alter database open resetlogs;
database altered.


同样处理一下temp路径:

sql> col name for a50
col tablespace_name for a25
col file_name for a39
select tablespace_name,file_name,bytes/1024/1024 file_size,autoextensible from dba_temp_files;
sql>
status  enabled    name                                                file_size
------- ---------- -------------------------------------------------- ----------
online  read write  data/orcl/tempfile/temp.606.1038566051                  0

sql>
sql> alter tablespace temp add tempfile '/data/orcl/temp.606.1038566051' size 500m autoextend on next 100m maxsize 32767m;
tablespace altered.

sql>
sql> alter database tempfile ' data/orcl/tempfile/temp.606.1038566051' drop;
database altered.

sql> select tablespace_name,file_name,bytes/1024/1024 file_size,autoextensible from dba_temp_files;
tablespace_name           file_name                                file_size aut
------------------------- --------------------------------------- ---------- ---
temp                      /data/orcl/temp.606.1038566051            500 yes

sql>
sql> select status,enabled, name, bytes/1024/1024 file_size from v_$tempfile;
status  enabled    name                                                file_size
------- ---------- -------------------------------------------------- ----------
online  read write /data/orcl/temp.606.1038566051                       500


顺手关掉归档:

sql> archive log list;
database log mode              archive mode
automatic archival             enabled
archive destination            /data/arch
oldest online log sequence     1
next log sequence to archive   1
current log sequence           1
sql>
sql> shutdown immediate;
database closed.
database dismounted.
oracle instance shut down.
sql>
sql> startup mount;
oracle instance started.
total system global area 4943876096 bytes
fixed size                  2261688 bytes
variable size             989859144 bytes
database buffers         3942645760 bytes
redo buffers                9109504 bytes
database mounted.
sql>
sql> alter database noarchivelog;
database altered.
sql>
sql> alter database open;
database altered.
sql>
sql> archive log list;
database log mode              no archive mode
automatic archival             disabled
archive destination            /data/arch
oldest online log sequence     1
current log sequence           1


最后检查状态:

sql> show parameter name;
name                                 type        value
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name               string
db_file_name_convert                 string
db_name                              string      orcl
db_unique_name                       string      orcl
global_names                         boolean     false
instance_name                        string      orcl
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      orcl
sql>
sql> select name,open_mode from v$database;
name                                            open_mode
---------------------------------------------- --------------------
orcl                                            read write
[oracle@dbtest ~]$ lsnrctl status
lsnrctl for linux: version 11.2.0.4.0 - production on 15-jul-2023 22:07:37
米乐app官网下载 copyright (c) 1991, 2013, oracle.  all rights reserved.
connecting to (description=(address=(protocol=ipc)(key=extproc1521)))
status of the listener
------------------------
alias                     listener
version                   tnslsnr for linux: version 11.2.0.4.0 - production
start date                08-mar-2023 09:39:23
uptime                    129 days 12 hr. 28 min. 13 sec
trace level               off
security                  on: local os authentication
snmp                      off
listener parameter file   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
listener log file         /u01/app/oracle/diag/tnslsnr/dbtest/listener/alert/log.xml
listening endpoints summary...
  (description=(address=(protocol=ipc)(key=extproc1521)))
  (description=(address=(protocol=tcp)(host=dbtest.novalocal)(port=1521)))
services summary...
service "orcl" has 1 instance(s).
  instance "orcl", status ready, has 1 handler(s) for this service...
service "orclxdb" has 1 instance(s).
  instance "orcl", status ready, has 1 handler(s) for this service...
the command completed successfully


异机数据恢复到这里就完成了,剩下的交给应用方验证数据。












最后修改时间:2023-07-18 10:42:21
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【米乐app官网下载的版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

网站地图