- 数据库安装参考步骤1--14
https://www.cnblogs.com/baixisuozai/p/17852235.html
- 创建初始pfile文件
$ vim init.umpay.ora
文件内容:
umpay.__java_pool_size=4194304
umpay.__large_pool_size=4194304
umpay.__oracle_base='/DataBase/app/oracle'#ORACLE_BASE set from environment
umpay.__pga_aggregate_target=167772160
umpay.__sga_target=243269632
umpay.__shared_io_pool_size=0
umpay.__shared_pool_size=176160768
umpay.__streams_pool_size=8388608
*.audit_file_dest='/DataBase/app/oracle/admin/orcl/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/DataBase/app/oracle/oradata/orcl/control01.ctl','/DataBase/app/oracle/flash_recovery_area/orcl/control02.ct
l'
*.db_block_size=8192
*.db_domain=''
*.db_name='orcl'
*.db_recovery_file_dest='/DataBase/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/DataBase/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=umpayXDB)'
*.log_archive_dest_1='location=/DataBase/app/oracle/archive'
*.memory_max_target=4966055936
*.memory_target=4966055936
*.open_cursors=300
*.pga_aggregate_target=2475687936
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=2475687936
*.shared_pool_size=2147483648
*.undo_tablespace='UNDOTBS1'
【可以从rman备份的spfile文件中获取以上配置信息】
- 根据pfile文件,创建对应的文件目录
mkdir /DataBase/app/oracle
mkdir /DataBase/app/oracle/admin/orcl/adump
mkdir /DataBase/app/oracle/oradata/orcl/
mkdir /DataBase/app/oracle/flash_recovery_area/orcl/
mkdir /DataBase/app/oracle/flash_recovery_area
mkdir /DataBase/app/oracle/archive
- 使用配置文件启动数据库
sqlplus / as sysdba
shutdown immediate
startup nomount pfile='/home/oracle/init.umpay.ora';
- 恢复控制文件
$ rman target /
RMAN> restore controlfile from '/home/oracle/backup/ctl_be2c88dk_1_1_20231124.ctl';
RMAN> alter database mount;
- 恢复数据库
RMAN> crosscheck backup;
RMAN> crosscheck archivelog all;
RMAN> delete noprompt expired backup;
RMAN> delete noprompt expired archivelog all;
RMAN> catalog start with '/home/oracle/backup/';
Do you really want to catalog the above files (enter YES or NO)? YES //【输入YES】
cataloging files...
cataloging done
RMAN> crosscheck backup;
RMAN> restore database;
RMAN> recover database;
unable to find archived log
archived log thread=1 sequence=22421
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/24/2023 15:51:36
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 22421 and starting SCN of 505305385
【修改命令如下,再次执行。】
RMAN> recover database until scn=505305385;
- 启动数据库
export ORACLE_SID=orcl
sqlplus / as sysdba
SQL> alter database open resetlogs;
SQL> shutdown immediate;
SQL> startup mount;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/DataBase/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora'
解决办法:
把可用的pfile文件覆盖报错文件
$ cp /home/oracle/init.umpay.ora /DataBase/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora
SQL> alter database open;
- 创建数据库监听文件
$ vim listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.21)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /DataBase/app/oracle
$ vim tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.21)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
- 启动数据库监听进程
lsnrctl start
标签:umpay,DataBase,app,数据备份,orcl,oracle,RMAN,Oracle11G
From: https://www.cnblogs.com/baixisuozai/p/17854038.html