Oracle 10 Gb control file (2) -- add control file

Source: Internet
Author: User


In oracle 10 Gb, a database is created. By default, three control files are created: control01.ctl, control02.ctl, and control03.ctl. You can manually add some control files to the database. When the data is opened, we can use show parameter control in sqlplus to view the current control file. SQL> show parameter control NAME TYPE VALUE types ------------- ------------------------------ control_file_record_keep_time integer 7control_files string/u01/app/oracle/oradata/orcl/c ontrol01.ctl, /u01/app/oracle/oradata/orcl/control02.ctl,/u 01/app/oracle/oradata/orcl/con trol03.ctl. In the following experiment, we will add a control file control04.ctl. First, we shut down the current database through shutdown immediate. SQL> shutdown immediate; www.2cto.com Database closed. database dismounted. ORACLE instance shut down. go to the control file directory (/u01/app/oracle/oradata/orcl) and copy the control file control04.ctl. [Oracle @ www orcl] $ cp control01.ctl control04.ctl [oracle @ www orcl] $ lltotal 1448720-rw-r ----- 1 oracle oinstall 7389184 Apr 8 0control01.ctl-rw-r ----- 1 oracle oinstall 7389184 Apr 8 008 control02.ctl-rw-r ----- 1 oracle oinstall 7389184 Apr 8 0:08 control03.ctl-rw-r ----- 1 oracle oinstall 7389184 Apr 8 0:10 control04.ctl ............. ...................... because the specified information of control file is in pfile or spfile So we need to modify pfile and spfile in the following ways. Run the following command in sqlplus to create a pfile using the current spfile file: SQL> create pfile = '/home/oracle/init. ora 'from spfile; File created. an init is generated in the oracle user's home directory. ora: Use the vi command to modify the file. The red part is the file name and path of the newly added control file. After modification, the file name and path are modified as follows. TSH1. _ db_cache_size = 104857600TSH1. _ java_pool_size = 4192134tsh1. _ large_pool_size = 4192134tsh1. _ shared_pool_size = 121634816TSH1. _ streams_pool_size = 8388608 *. audit_file_dest = '/u01/app/oracle/admin/orcl/adump '*. audit_trail = 'db', 'extended '*. background_dump_dest = '/u01/app/oracle/admin/orcl/bdump '*. compatible = '10. 2.0.1.0 '*. control_files = '/u01/app/oracle/oradata/orcl/control01.ctl', '/u01/app/oracle/oradat A/orcl/control02.ctl ','/u01/app/oracle/oradata/orcl/control03.ctl ', '/u01/app/oracle/oradata/orcl/control04.ctl' # Restore Controlfile *. core_dump_dest = '/u01/app/oracle/admin/orcl/cdump '*. db_block_size = 8192 www.2cto.com *. db_domain = ''*. db_file_multiblock_read_count = 16 *. db_name = 'orcl '*. db_recovery_file_dest_size = 31457280000 *. db_recovery_file_dest = '/home/oracle/area /'*. dispatchers = '(PROTOCOL = TCP) (SERVI CE = orclXDB )'*. job_queue_processes = 10 *. log_archive_dest_1 = 'location =/u01/arch '*. log_archive_dest_2 = 'location =/u01/arch2 '*. log_archive_dest_state_2 = 'delete '*. open_cursors = 300 *. pga_aggregate_target = 81788928 *. processes = 150 use the modified pfile to create a spfile, as shown below. SQL> create spfile from pfile = '/home/oracle/init. ora'; after File created. spfile is created successfully, we can start to open our database, as shown below. SQL> startup ORACLE instance started. total System Global Area 247463936 bytesFixed Size 1218772 bytesVariable Size 138413868 bytesDatabase Buffers 104857600 bytesRedo Buffers 2973696 bytesDatabase mounted. database opened. run the show parameter control Command to check whether the control file is successfully added, as shown below. SQL> show parameter control; www.2cto.com NAME TYPE VALUE =----------- using control_file_record_keep_time integer 7control_files string/u01/app/oracle/oradata/orcl/c ontrol01.ctl, /u01/app/oracle/oradata/orcl/control02.ctl,/u 01/app/oracle/oradata/orcl/con trol03.ctl, /u01/app/oracle/or adata/orcl/control04.ctl from the above results, our control04.ctl Added successfully. Thinking: We have successfully added a control file through the above method. Similarly, we can also delete a control file using this method. As mentioned in Oracle 10g control file (1, can we remove the missing control file from the spfile through this method? Obviously yes, but this is obviously not a good method. First, it is too complicated, and second, it is not safe. Author SkyWorld

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.