In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Source db side:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_SID=ygdg
Data file location: / u01/app/oracle/oradata/ygdg
Target db side:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_SID=ygdg
Data file location: / u01/app/oracle/oradata/ygdg
[1. Original library rman backup]
[oracle@oraclelinux rman] $cat rman_for_dg.sh
Export ORACLE_SID=ygdg
Export ORACLE_BASE=/u01/app/oracle
Export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
Export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
Rman target=/ log='/u01/ygtest/fullbackup.log' startup pfile='/software/pfileygdg.ora'
SQL > create spfile from pfile='/software/pfileygdg.ora'
SQL > shutdown immediate
SQL > startup nomount
However, if some parameters are not modified, ORA-, will appear. Don't worry, just correct whatever you see, as follows:
SQL > startup pfile='/software/pfileygdg.ora'
The ORACLE routine has been started.
Total System Global Area 221331456 bytes
Fixed Size 2251856 bytes
Variable Size 163578800 bytes
Database Buffers 50331648 bytes
Redo Buffers 5169152 bytes
ORA-00201: control file version 11.2.0.4.0 incompatible with ORACLE version 11.2.0.0.0
ORA-00202: control file:'/ u01AccessUniverse oradataUniverse control 01.ctl'
Analysis: check that the compatible value in the parameter file is 11.2.0.0.0, which conflicts with the value in the control file
Resolve:
SQL > create spfile from pfile='/software/pfileygdg.ora'
The file has been created.
SQL > shutdown immediate
ORA-01507:?
The ORACLE routine has been closed.
Solution: after modifying the compatible parameter of the spfile file, start using spfile
SQL > startup nomount
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file'/ u01qapplash oracle.product11.2.0anddbbin1anddbsActioninitygdg.ora'
The way to solve this problem is to go to the cd / u01/app/oracle/admin/ygdg/pfile/ directory and change the init.ora.25201817331
Copy to the dbs directory:
Cp init.ora.25201817331 / u01/app/oracle/product/11.2.0/db_1/dbs/initygdg.ora
SQL > startup nomount
The ORACLE routine has been started.
Total System Global Area 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 536874104 bytes
Database Buffers 285212672 bytes
Redo Buffers 6586368 bytes
SQL > exit
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 disconnect
[7. Restore control file]
[oracle@localhost database] $rman target=/
Recovery Manager: Release 11.2.0.4.0-Production on Monday March 5 19:20:26 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: YGDG (not mounted)
RMAN > set dbid=2428115541
RMAN > restore controlfile from'/ software/ygtest/CTL_YGDG_55_1_969977274.bak'
RMAN > alter database mount
[8. Specify the directory where the backup files are located]
RMAN > catalog start with'/ software/ygtest'
[9. Restore and restore database]
RMAN > run {
Set newname for datafile 1 to "/ u01/app/oracle/oradata/ygdg/system01.dbf"
Set newname for datafile 2 to "/ u01/app/oracle/oradata/ygdg/sysaux01.dbf"
Set newname for datafile 3 to "/ u01/app/oracle/oradata/ygdg/undotbs01.dbf"
Set newname for datafile 4 to "/ u01/app/oracle/oradata/ygdg/users01.dbf"
Set newname for datafile 5 to "/ u01/app/oracle/oradata/ygdg/test01.dbf"
Set newname for tempfile 1 to "/ u01/app/oracle/oradata/ygdg/temp01.dbf"
SQL "ALTER DATABASE RENAME FILE'/ u01ActionActionoradata Universe" ygdgUniqredo01a.logarithm'to'/ u01applicaloradataActionoradata'"
SQL "ALTER DATABASE RENAME FILE'/ u01ActionActionoradata Universe" ygdgUniqredo02a.logarithm'to'/ u01applicaloradataActionoradata'"
}
RMAN > run {
Restore database
SWITCH DATAFILE ALL
Recover database
} # update control file with new filenames
Note: 1. Original library execution
SQL > select 'set newname for datafile' | | a.FILE# | |'to "'| | a.NAME | |';'
From v$datafile a union all select 'set newname for tempfile' | | a.FILE# | |'to "'| | a.NAME | |'"; 'from v$tempfile a
'SETNEWNAMEFORDATAFILE' | | A.FILE# | |' TO "'| | A.NAME | |';'
Set newname for datafile 1 to "/ u01/app/oracle/oradata/ygdg/system01.dbf"
Set newname for datafile 2 to "/ u01/app/oracle/oradata/ygdg/sysaux01.dbf"
Set newname for datafile 3 to "/ u01/app/oracle/oradata/ygdg/undotbs01.dbf"
Set newname for datafile 4 to "/ u01/app/oracle/oradata/ygdg/users01.dbf"
Set newname for datafile 5 to "/ u01/app/oracle/oradata/ygdg/test01.dbf"
Set newname for tempfile 1 to "/ u01/app/oracle/oradata/ygdg/temp01.dbf"
6 rows have been selected.
SQL >
SELECT 'SQL "ALTER DATABASE RENAME FILE' | | a.MEMBER | |'to'| | a.MEMBER | |'"; 'FROM v$logfile a
SQL "ALTER DATABASE RENAME FILE''/ u01ax to
'' / u01qqappqqoraclePlacedoradataUniplicygdgUniplicateredo01a.logically'"
SQL "ALTER DATABASE RENAME FILE''/ u01Applicationoradata to
'' / u01qqappqqoraclePlacedoradataUniplicygdgUniplicateredo02a.logically'"
two。 Use newnam for datafile to modify different file paths
3.switch datafile all is used to update the data file path and online log file path in the restored controlfile, otherwise an error RMAN-06094 will be reported in recover.
[oracle@localhost database] $sqlplus / as sysdba
SQL > select status from v$instance
STATUS
MOUNTED
SQL > alter database open resetlogs
The database has changed.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.