In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Cross-version upgrade (10.2.0.5 to 11.2.0.3)
Version 10.2.0.5: ORACLE_BASE: / oracle/u01/app/oracle
ORACLE_HOME: / oracle/u01/app/oracle/product/10.2/db_1
Version 11.2.0.3: ORACLE_BASE: / oracle/u02/app/oracle
ORACLE_HOME: / oracle/u02/app/oracle/product/10.2/db_1
Description: newly installed 11g software, use the new software to hang the original 10g library.
Upgrade steps:
1. Make sure that the database has been fully backed up before upgrading. If you do not make a backup, do not upgrade.
2. Can the feasibility be upgraded? What are the requirements for upgrading? Does the application support the new version? Pre-migrate to see if the application meets the requirements?
First look at the upgrade diagram to see if you can upgrade, higher than 10.2.0.2 before you can directly upgrade to the 11gR2 version.
3. Install the high version of the database to the new installation directory, in this case, the / oracle/u02/app/oracle directory.
4. Start the original database, create the pfile file a.txt, and store the file under / tmp.
5. Run the pre-upgrade script (recommended script) and the 11g version run the ORACLE_HOME/rdbms/admin/utlu112i.sql script. Note: ORACLE_HOME is the installation directory of the ORACLE software.
6. Modify the / tmp/a.txt file according to the script recommendations, modify the tablespace size, empty the Recycle Bin, and collect statistics.
7. Close the applications related to the original database and close the database.
8. Use orcle users to copy the ORACLE_BASE/admin folder under the lower version installation directory to 11g ORACLE_BASE.
9. Modify the oracle user environment variable to change ORACLE_BASE and ORACLE_HOME to the higher version installation directory.
10. Use root users to modify the / etc/oratab file and / etc/oraInst.loc file to change the related path to the path of the new version.
11. Start the database to upgrade mode using the / tmp/a.txt parameter file, rebuild the spfile file, and run the upgrade script to upgrade the database. The database shuts down automatically after the upgrade is completed.
12. Rebuild the oraInventory directory after the upgrade is completed.
Delete the original software installation directory.
Specific implementation:
1. Check whether the database has been fully backed up, and if no backup has been made, do not upgrade.
2. Study the feasibility of upgrading and confirm the following problems.
Can the database be upgraded?
What are the requirements for upgrading?
Does the application support the new version of the database?
Do a pre-migration to see if the application can meet the requirements.
Look up the information (official documentation) to see if you can upgrade. Versions higher than 10.2.0.2 can be upgraded directly to the 11gR2 version.
The above problems can not be upgraded until they are confirmed to be feasible.
3. Install the high version of the database to the new installation directory, in this case, the / oracle/u02/app/oracle directory.
Note: the upgrade of oracle11g is a new installation, upgrading from low version (9i or 10g) to 11g or from 11g low version to 11g high version is a new installation.
4. Start the original database and create the pfile file (/ tmp/a.txt).
Note: the pfile file is the parameter file of the database, which records the pga, sga, control file location and other information of the database. Used when starting the database.
The pfile file is created here to start the original database with the new version of the database software.
Oracle users log in to the system and link to the database.
Sqlplus / as sysdba; Note: oracle users execute this command to link to the database.
SQL > startup Note: start the database and an error will be reported if the database is already started.
SQL > create pfile='/tmp/a.txt' from spfile; Note: create a new parameter file / tmp/a.txt
5. Run the pre-upgrade script (recommended script), which is used to check what parameters need to be modified when the database is upgraded.
SQL > spool / tmp/test.txt Note: open spool and store the sql statements executed after the command and the results in the / tmp/test.txt file.
SQL > @ / oracle/u02/app/oracle/product/10.2/db_1/rdbms/admin/utlu112i.sql
SQL > spool off
6. View the / tmp/test.txt file, modify the / tmp/a.txt file as prompted, modify the tablespace size, empty the Recycle Bin, and collect statistics.
Modify the / tmp/a.txt file:
Delete all lines at the beginning of the original instance name.
Delete the line starting with .background _ dump_dest
Delete the line starting with .user _ dump_dest
Delete the line starting with .core _ dump_dest
Add. Diagnostic_dest='/oracle/u02/app/oracle'
Increase the size of the sga_target and pga_aggregate_target parameters as recommended in the / tmp/a.txt file.
Modify the value of .passport: .compatible='11.2.0.0.0'
Modify the path of .audit _ file_dest: .audit_file_dest='/oracle/u02/app/oracle/admin/fsdb/adump'
Modify the size of the tablespace.
SQL > select file_name,tablespace_name,bytes/1024/1024 from dba_data_files; to view the size of each tablespace data file.
SQL > select file_name,tablespace_name,bytes/1024/1024 from dba_temp_files; to view the datafile size of the temp tablespace.
SQL > alter database datafile'/ oradata/fsdb/sysaux01.dbf' resize 500m; modify the sysaux tablespace data file size to 500m.
SQL > alter database tempfile'/ oradata/fsdb/temp01.dbf' resize 400m; modify the temp tablespace data file size to 400m.
Empty the Recycle Bin:
SQL > purge dba_recyclebin
SQL > purge user_recyclebin
Collect statistics:
SQL > execute dbms_stats.gather_dictionary_stats
The size of the modification should be based on the recommendations in the / tmp/test.txt file.
7. Close the application and the original database.
SQL > shutdown immediate
8. Oracle users copy the admin folder under the ORACLE_BASE directory of oracle10g to ORACLE_BASE under 11g.
Cp-r / oracle/u01/app/oracle/admin / oracle/u02/app/oracle
9. Oracle user modifies oracle user's environment variable to change ORACLE_HOME and ORACLE_BASE to 11g installation directory.
Vi / home/oracle/.bash_profile Note: edit environment variables for oracle users
Export ORACLE_BASE=/oracle/u02/app/oracle
Export ORACLE_HOME=/oracle/u02/app/oracle/product/10.2/db_1 note: the modified content of the latter two behaviors
10. Use root users to modify the / etc/oratab file and / etc/oraInst.loc file to change the related path to the 11g path.
Vi / etc/oratab Note: modify the / etc/oratab file, which is related to whether the oracle database is booted or not.
Fsdb:/oracle/u02/app/oracle/product/10.2/db_1:N note: make changes to this line to change the path to 11g.
Vi / etc/oraInst.loc Note: modify the / etc/oraInst.loc file, which controls the storage path of the oraInventory.
Inventory_loc=/oracle/u02/app/oracle/oraInventory Note: modify the oraInventory storage path to 11g.
Use the / tmp/a.txt parameter file to start the database into upgrade mode, create a new spfile file, and run the upgrade script. The database shuts down automatically after completion.
The oracle user logs in to the empty instance. Sqlplus / as sysdba
SQL > startup upgrade pfile='/tmp/a.txt'; Note: start the database to upgrade mode using the / tmp/a.txt parameter file.
SQL > create spfile from pfile='/tmp/a.txt'; Note: create a new spfile file to make it easy to start the database later.
SQL > @? / rdbms/admin/catupgrd.sql Note: execute the upgrade script to complete the upgrade of the database.
12. Rebuild the oraInventory directory.
Oracle users go to the $ORACLE_HOME/oui/bin directory and execute the following command
. / runInstaller-slient-attachHome ORACLE_HOME= "/ oracle/u02/app/oracle/product/10.2/db_1" ORACLE_HOME_NAME= "oracleHome"
Note: the ORACLE_HOME,ORACLE_HOME_NAME whose ORACLE_HOME is 11g software can be specified arbitrarily and will not have any effect.
Restart the database after execution, check the database version, and see if the database is normal.
13. Delete the installation directory of 10g database after confirming that it is normal.
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.