In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "Oracle modification control file path method", in the daily operation, I believe that many people have doubts on the method of Oracle modification control file path. The editor consulted all kinds of data and sorted out a simple and easy-to-use operation method. I hope it will be helpful to answer the doubt of "Oracle modification control file path method". Next, please follow the editor to study!
Control file-binary file, which plays an important role in database startup and database operation.
Parameter file-pfile can be edited by text
Spfile binary files, not text editable
Here are two ways to modify the control file
# 1 #
If pfile='' is specified in startup, Oracle will use the file you specified as the startup parameter file. If pfile is not specified, Oracle will first go to the default directory ($ORACLE_HOME/) to find spfileSID.ora. If not, find spfile.ora. If still not, find initSID.ora. This is the previous static parameter file. If not, find init.ora. If it is not found, at this time, the startup will have the error that the parameter file cannot be found, and the instance name will be dynamically registered to the listening service.
Move the corresponding controlfile to the target path. Since the path of control01.ctl has not changed, mv: prompt does not affect the operation.
[oracle@sink dbs] $mv / u01/app/oracle/oradata/sink/control01.ctl / u01/app/oracle/oradata/sink/control01.ctl
Mv: `/ u01Accord oradata are the same file sinkAccord control01.ctl' oradata` / u01qapapax oradataplicationoradatacontrol 01.ctl` are the same file
[oracle@sink dbs] $mv / u01/app/oracle/fast_recovery_area/sink/control02.ctl / u01/app/oracle/oradata/sink/control02.ctl
Be sure to close the database before moving the control file, otherwise a series of errors will occur later.
13:35:03 SYS @ sink > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
13:36:03 SYS @ sink >
Go to the path of vim editing control file under $ORACLE_HOME/dbs path and then: wq save exit (w save Q exit Q! Forced exit)
[oracle@sink dbs] $pwd
/ u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@sink dbs] $vim initsink.ora
* .audit_file_dest='/u01/app/oracle/admin/sink/adump'
* .audit_trail='db'
* .compatible='11.2.0.4.0'
* .control_files='/u01/app/oracle/oradata/sink/control01.ctl','/u01/app/oracle/oradata/sink/control02.ctl'
* .db_block_size=8192
* .db_create_file_dest='+DATA'
We have just modified pfile, but spfile has not changed, so first specify to use pfile to start the database
13:41:29 SYS @ sink > startup pfile=$ORACLE_HOME/dbs/initsink.ora
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 553651280 bytes
Database Buffers 276824064 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
13:42:13 SYS @ sink >
Check the path information of the controlifle at this time. OK, yes, so the pifle is successful.
13:42:13 SYS @ sink > col name for A55
13:43:50 SYS @ sink > select name from v$controlfile
NAME
/ u01/app/oracle/oradata/sink/control01.ctl
/ u01/app/oracle/oradata/sink/control02.ctl
2 rows selected.
Elapsed: 00:00:00.00
13:44:01 SYS @ sink >
Use pfile to generate spifle, because pfile is successful, but spifle has not been modified and has not yet taken effect. It is started with spfile by default, so this operation is reasonable.
13:44:01 SYS @ sink > create spfile from pfile
File created.
Elapsed: 00:00:00.02
13:46:59 SYS @ sink >
PS: if the database starts with spfile, and then you are executing create spfile from pfile, you will get an error
ORA-32002: cannot create SPFILE already being used by the instance
The database shuts down normally, then startup does not specify any parameters and spfile exists in the database, so oracle starts with spfile by default
13:46:59 SYS @ sink > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
13:52:08 SYS @ sink > startup
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 553651280 bytes
Database Buffers 276824064 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
13:52:22 SYS @ sink >
After startup, the path of the control file was queried and found to have been successfully transferred, so the path of the control file was modified successfully.
13:52:22 SYS @ sink > select name from v$controlfile
NAME
/ u01/app/oracle/oradata/sink/control01.ctl
/ u01/app/oracle/oradata/sink/control02.ctl
2 rows selected.
Elapsed: 00:00:00.00
13:53:51 SYS @ sink >
At this point, on the "Oracle modification control file path method" study is over, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.