In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The procedure for configuring Oracle database control file redundancy:
SQL > set lines 200
SQL > col name for A50
SQL > select * from v$controlfile
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
/ data/cams/control01.ctl NO 16384 692
/ data/cams/control02.ctl NO 16384 992 two control files are found here in one path, which is obviously not safe, and now the control files are redundant.
View spfile information:
SQL > show parameter pfile
NAME TYPE VALUE
-
Spfile string / oradata/oracle/product/11.2.0
/ db_1/dbs/spfilecams.ora close the database and create a pfile file
SQL > create pfile from spfile
SQL >! ls / oradata/oracle/product/11.2.0/db_1/dbs
Hc_cams.dat initcams.ora init.ora lkCAMS orapwcams snapcf_cams.f spfilecams.ora
SQL >! vi / oradata/oracle/product/11.2.0/db_1/dbs/initcams.ora
Modify the content of * .control _ files='/data/cams/control01.ctl','/data/cams/control02.ctl' to
* .create path for control_files='/data/cams/control01.ctl','/file/cams/controlfile/control02.ctl','/backup/cams/controlfile/control03.ctl'
Mkdir-p / file/cams/controlfile
Mkdir-p / backup/cams/controlfile copies the existing control file to the storage path
SQL >! ls / file/cams/controlfile
Control02.ctl
SQL >! ls / backup/cams/controlfile
Control03.ctl starts oracle through pfile and creates a new spfile
SQL > startup pfile='/oradata/oracle/product/11.2.0/db_1/dbs/initcams.ora'
SQL > create spfile from pfile
SQL > shutdown immediate
SQL > startup
Summarize the operation process:
(2) View the path where spfile is located
(3) shut down the database normally
(4) use spfile file to create pfile file
(5) modify the CONTROL_FILES parameter in the pfile file to the latest control file information
(7) start oracle through pfile and create a new spfile
(8) close the database and start the database with spfile parameter file
Other instructions:
(1) if the database is started with pfile and there is no spfile, you can omit the switching process between spfile and pfile and modify pfile directly.
(2) the operation in this paper can not be modified after spfile is converted into pfile, and the CONTROL_FILES parameter information can be changed by using the command alter system set control_files = XXX scope=spfile;.
(3) it is recommended to check the v$controlfile and the physical control file on the server after the modification is completed.
(4) if there are useless control files after the completion of the operation, for example, the original control files are not needed, it is recommended to delete the useless control files after the completion of the operation to avoid system junk files.
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.