oraclecontrolfile路径修改

SQL> startup;
ORACLE instance started.

10年积累的网站制作、网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计制作后付款的网站建设流程,更有滴道免费网站建设让你可以放心的选择与我们合作。

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> ho
[oracle@athena ~]$ cd $ORACLE_HOME
[[oracle@athena db_home1]$ cd dbs/
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:12 hc_athena.dat
-rw-r--r-- 1 oracle oinstall     921 Feb 26 21:18 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:12 spfileathena.ora
[oracle@athena dbs]$ cat initathena.ora -------------------pfile
athena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','/s01/oracle/fast_recovery_area/athena/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=940
*.undo_tablespace='UNDOTBS1'
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:12 hc_athena.dat
-rw-r--r-- 1 oracle oinstall     921 Feb 26 21:18 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:12 spfileathena.ora
[oracle@athena dbs]$ cat spfileathena.ora -----spfile
C"R8$4j3CC"aathena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','CC"<}/s01/oracle/oradata/athena/control03.ctl','/s01/oracle/fast_recovery_area/athena/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.log_archive_dest_1='location=/oracle/archive1/'
*.log_archive_format='arch_%d_%t_%r_%s.log'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*CC"ka.remote_login_passwordfile='EXCLUSIVE'
*.sessions=940
*.undo_tablespace='UNDOTBS1'
[oracle@athena dbs]$
[oracle@athena dbs]$ cd /s01/oracle/oradata/athena/
[oracle@athena athena]$ ll
total 5699580
-rw-r----- 1 oracle oinstall   89137152 Aug 20 20:12 chenjh.dbf
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:15 control01.ctl
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:15 control03.ctl
-rw-r----- 1 oracle oinstall  328343552 Aug 20 20:12 example01.dbf
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo01.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo02.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo03.log
-rw-r----- 1 oracle oinstall  587210752 Aug 20 20:12 sysaux01.dbf
-rw-r----- 1 oracle oinstall  744497152 Aug 20 20:12 system01.dbf
-rw-r----- 1 oracle oinstall   30416896 Jun 23 21:54 temp01.dbf
-rw-r----- 1 oracle oinstall   99622912 Aug 20 20:12 undotbs01.dbf
-rw-r----- 1 oracle oinstall 3803717632 Aug 20 20:12 users01.dbf
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> ho
[oracle@athena athena]$ cd /s01/oracle/oradata/athena/
[oracle@athena athena]$ ll
total 5699580
-rw-r----- 1 oracle oinstall   89137152 Aug 20 20:16 chenjh.dbf
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:16 control01.ctl
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:16 control03.ctl
-rw-r----- 1 oracle oinstall  328343552 Aug 20 20:16 example01.dbf
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo01.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:16 redo02.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo03.log
-rw-r----- 1 oracle oinstall  587210752 Aug 20 20:16 sysaux01.dbf
-rw-r----- 1 oracle oinstall  744497152 Aug 20 20:16 system01.dbf
-rw-r----- 1 oracle oinstall   30416896 Jun 23 21:54 temp01.dbf
-rw-r----- 1 oracle oinstall   99622912 Aug 20 20:16 undotbs01.dbf
-rw-r----- 1 oracle oinstall 3803717632 Aug 20 20:16 users01.dbf
[oracle@athena athena]$ cp control01.ctl control04.ctl-----------增加控制文件
[oracle@athena athena]$ ll
total 5709116
-rw-r----- 1 oracle oinstall   89137152 Aug 20 20:16 chenjh.dbf
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:16 control01.ctl
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:16 control03.ctl
-rw-r----- 1 oracle oinstall    9748480 Aug 20 20:16 control04.ctl
-rw-r----- 1 oracle oinstall  328343552 Aug 20 20:16 example01.dbf
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo01.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:16 redo02.log
-rw-r----- 1 oracle oinstall   52429312 Aug 20 20:12 redo03.log
-rw-r----- 1 oracle oinstall  587210752 Aug 20 20:16 sysaux01.dbf
-rw-r----- 1 oracle oinstall  744497152 Aug 20 20:16 system01.dbf
-rw-r----- 1 oracle oinstall   30416896 Jun 23 21:54 temp01.dbf
-rw-r----- 1 oracle oinstall   99622912 Aug 20 20:16 undotbs01.dbf
-rw-r----- 1 oracle oinstall 3803717632 Aug 20 20:16 users01.dbf
[oracle@athena athena]$ cd $ORACLE_HOME
[oracle@athena db_home1]$ cd dbs/
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:16 hc_athena.dat
-rw-r--r-- 1 oracle oinstall     921 Feb 26 21:18 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:12 spfileathena.ora
[oracle@athena dbs]$ vi spfileathena.ora
[oracle@athena dbs]$ vi spfileathena.ora
[oracle@athena dbs]$ cat init.ora
#
# $Header: rdbms/admin/init.ora /main/23 2009/05/15 13:35:38 ysarig Exp $
#
# Copyright (c) 1991, 1997, 1998 by Oracle Corporation
# NAME
#   init.ora
# FUNCTION
# NOTES
# MODIFIED
#     ysarig     05/14/09  - Updating compatible to 11.2
#     ysarig     08/13/07  - Fixing the sample for 11g
#     atsukerm   08/06/98 -  fix for 8.1.
#     hpiao      06/05/97 -  fix for 803
#     glavash    05/12/97 -  add oracle_trace_enable comment
#     hpiao      04/22/97 -  remove ifile=, events=, etc.
#     alingelb   09/19/94 -  remove vms-specific stuff
#     dpawson    07/07/93 -  add more comments regarded archive start
#     maporter   10/29/92 -  Add vms_sga_use_gblpagfile=TRUE
#     jloaiza    03/07/92 -  change ALPHA to BETA
#     danderso   02/26/92 -  change db_block_cache_protect to _db_block_cache_p
#     ghallmar   02/03/92 -  db_directory -> db_domain
#     maporter   01/12/92 -  merge changes from branch 1.8.308.1
#     maporter   12/21/91 -  bug 76493: Add control_files parameter
#     wbridge    12/03/91 -  use of %c in archive format is discouraged
#     ghallmar   12/02/91 -  add global_names=true, db_directory=us.acme.com
#     thayes     11/27/91 -  Change default for cache_clone
#     jloaiza    08/13/91 -         merge changes from branch 1.7.100.1
#     jloaiza    07/31/91 -         add debug stuff
#     rlim       04/29/91 -         removal of char_is_varchar2
#   Bridge     03/12/91 - log_allocation no longer exists
#   Wijaya     02/05/91 - remove obsolete parameters
#
##############################################################################
# Example INIT.ORA file
#
# This file is provided by Oracle Corporation to help you start by providing
# a starting point to customize your RDBMS installation for your site.
#
# NOTE: The values that are used in this file are only intended to be used
# as a starting point. You may want to adjust/tune those values to your
# specific hardware and needs. You may also consider using Database
# Configuration Assistant tool (DBCA) to create INIT file and to size your
# initial set of tablespaces based on the user input.
###############################################################################

# Change '' to point to the oracle base (the one you specify at
# install time)

db_name='ORCL'
memory_target=1G
processes = 150
audit_file_dest='/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/flash_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest=''
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files = (ora_control1, ora_control2)
compatible ='11.2.0'
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:16 hc_athena.dat
-rw-r--r-- 1 oracle oinstall     921 Feb 26 21:18 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:12 spfileathena.ora
[oracle@athena dbs]$ cat initathena.ora
athena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','/s01/oracle/fast_recovery_area/athena/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=940
*.undo_tablespace='UNDOTBS1'
[oracle@athena dbs]$ vi initathena.ora
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:22:40 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup initathena.ora
SP2-0714: invalid combination of STARTUP options
SQL> ho
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:16 hc_athena.dat
-rw-r--r-- 1 oracle oinstall    1007 Aug 20 20:22 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:12 spfileathena.ora
[oracle@athena dbs]$ pwd
/s01/oracle/proudct/11.2.0.1/db_home1/dbs
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:24:21 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora';
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> select * from v$controlfile;

STATUS NAME            IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
 /s01/oracle/oradata/athena/control01.ctl       NO       16384        594
 /s01/oracle/fast_recovery_area/athena/control02.ctl      NO       16384        594
 /s01/oracle/oradata/athena/control03.ctl       NO       16384        594
 /s01/oracle/oradata/athena/control04.ctl       NO       16384        594

SQL> ho
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:27:33 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> col name for a60
SQL> select * from v$controlfile;

STATUS NAME            IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
 /s01/oracle/oradata/athena/control01.ctl       NO       16384        594
 /s01/oracle/oradata/athena/control03.ctl       NO       16384        594
 /s01/oracle/fast_recovery_area/athena/control02.ctl      NO       16384        594

SQL> ho
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:45:53 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora';---默认从pfile启动
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
ORA-00214: control file '/s01/oracle/oradata/athena/control01.ctl' version 2617 inconsistent with file '/s01/oracle/oradata/athena/control04.ctl' version 2602------版本不对,原因是复制控制文件的时候数据库没有关闭


SQL> ho
[oracle@athena dbs]$ cd /s01/oracle/oradata/athena/
[oracle@athena athena]$ cp control01.ctl control04.ctl;
[oracle@athena athena]$ sqplus /nolog
bash: sqplus: command not found
[oracle@athena athena]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:48:46 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> startup^H^H
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile=''/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
LRM-00109: could not open parameter file ''/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
ORA-01078: failure in processing system parameters
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> ho
c[oracle@athena athena]$ cd $ORACLE_HOME
[[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:50 hc_athena.dat
-rw-r--r-- 1 oracle oinstall    1007 Aug 20 20:22 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:50 spfileathena.ora
[oracle@athena dbs]$ cat spfileathena.ora
C"y!$s3CC"aathena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','CC"<}/s01/oracle/oradata/athena/control03.ctl','/s01/oracle/fast_recovery_area/athena/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.log_archive_dest_1='location=/oracle/archive1/'
*.log_archive_format='arch_%d_%t_%r_%s.log'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*CC"ka.remote_login_passwordfile='EXCLUSIVE'
*.sessions=940
*.undo_tablespace='UNDOTBS1'
CC"FeCC"EeCC"DeC[oracle@athena dbs]$ Xshell
bash: Xshell: command not found
[oracle@athena dbs]$
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:50 hc_athena.dat
-rw-r--r-- 1 oracle oinstall    1007 Aug 20 20:22 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:50 spfileathena.ora
[oracle@athena dbs]$ cat initathena.ora
athena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','/s01/oracle/fast_recovery_area/athena/control02.ctl','/s01/oracle/oradata/athena/control03.ctl','/s01/oracle/oradata/athena/control04.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=940
*.undo_tablespace='UNDOTBS1'
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:51:31 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.

SQL> sl
SP2-0042: unknown command "sl" - rest of line ignored.
SQL> select * from v$controlfile;

STATUS NAME            IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
 /s01/oracle/oradata/athena/control01.ctl       NO       16384        594
 /s01/oracle/oradata/athena/control03.ctl       NO       16384        594
 /s01/oracle/fast_recovery_area/athena/control02.ctl      NO       16384        594

SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
ORA-00214: control file '/s01/oracle/oradata/athena/control01.ctl' version 2647 inconsistent with file '/s01/oracle/oradata/athena/control04.ctl' version 2632


SQL> ho
[oracle@athena dbs]$ shutdown immediate;
bash: shutdown: command not found
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:55:31 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> ho
[oracle@athena dbs]$ cd $ORACLE_HOME
[oracle@athena db_home1]$ cd dbs/
[oracle@athena dbs]$ ls
hc_athena.dat  initathena.ora  init.ora  lkATHENA  orapwathena  snapcf_athena.f  spfileathena.ora
[oracle@athena dbs]$ cd ~
[oracle@athena ~]$ cd ..
[oracle@athena home]$ cd oracle/
[oracle@athena ~]$ ll
total 0
[oracle@athena ~]$ cd/s01
bash: cd/s01: No such file or directory
[oracle@athena ~]$ cd /s01/
controlbak.txt  oracle/         oraInventory/  
[oracle@athena ~]$ cd /s01/oracle/oradata/
[oracle@athena oradata]$ ll
total 4
drwxr-x--- 2 oracle oinstall 4096 Aug 20 20:16 athena
[oracle@athena oradata]$ cd athena/
[oracle@athena athena]$ cp control01.ctl control04.ctl
[oracle@athena athena]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:57:21 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba;
Connected to an idle instance.
SQL> startup pfile='/s01/oracle/proudct/11.2.0.1/db_home1/dbs/initathena.ora'
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> SQL> create spfile from pfile;

File created.

SQL> ho
c[oracle@athena athena]$ cd $ORACLE_HOME
[oracle@athena db_home1]$ cd dbs/
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 20:58 hc_athena.dat
-rw-r--r-- 1 oracle oinstall    1007 Aug 20 20:22 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 20:58 spfileathena.ora
[oracle@athena dbs]$ cat spfileathena.ora
C"??u3CC"aathena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','CC">/s01/oracle/fast_recovery_area/athena/control02.ctl','/s01/oracle/oradata/athena/control03.ctl','/s01/oracle/oradata/athena/control04.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=94CC"6,0
*.undo_tablespace='UNDOTBS1'
CC"FeCC"EeCC"DeC[oracle@athena dbs]$ Xshell
bash: Xshell: command not found
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 20:59:22 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    633343360 bytes
Database Buffers   197132288 bytes
Redo Buffers      2396160 bytes
Database mounted.
Database opened.
SQL> ho
[oracle@athena dbs]$ cd $ORACLE_HOME
[oracle@athena db_home1]$ LL
bash: LL: command not found
[oracle@athena db_home1]$ cd dbs/
[oracle@athena dbs]$ ll
total 9560
-rw-rw---- 1 oracle oinstall    1544 Aug 20 21:00 hc_athena.dat
-rw-r--r-- 1 oracle oinstall    1007 Aug 20 20:22 initathena.ora
-rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
-rw-r----- 1 oracle oinstall      24 Oct 25  2013 lkATHENA
-rw-r----- 1 oracle oinstall    1536 Oct 25  2013 orapwathena
-rw-r----- 1 oracle oinstall 9748480 Jul  8 23:07 snapcf_athena.f
-rw-r----- 1 oracle oinstall    3584 Aug 20 21:00 spfileathena.ora
[oracle@athena dbs]$ cat spfileathena.ora
C"??Vu3CC"aathena.__db_cache_size=197132288
athena.__java_pool_size=4194304
athena.__large_pool_size=4194304
athena.__oracle_base='/s01/oracle'#ORACLE_BASE set from environment
athena.__pga_aggregate_target=335544320
athena.__sga_target=503316480
athena.__shared_io_pool_size=0
athena.__shared_pool_size=289406976
athena.__streams_pool_size=0
*.audit_file_dest='/s01/oracle/admin/athena/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/s01/oracle/oradata/athena/control01.ctl','CC">/s01/oracle/fast_recovery_area/athena/control02.ctl','/s01/oracle/oradata/athena/control03.ctl','/s01/oracle/oradata/athena/control04.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='athena'
*.db_recovery_file_dest='/s01/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/s01/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=athenaXDB)'
*.memory_target=838860800
*.open_cursors=300
*.processes=850
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=94CC"6,0
*.undo_tablespace='UNDOTBS1'
CC"FeCC"EeCC"DeC[oracle@athena dbs]$ Xshell
bash: Xshell: command not found
[oracle@athena dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 20 21:00:51 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> col name for a60
SQL> select * from v$controlfile;

STATUS NAME            IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------------------------------------------ --- ---------- --------------
 /s01/oracle/oradata/athena/control01.ctl       NO       16384        594
 /s01/oracle/fast_recovery_area/athena/control02.ctl      NO       16384        594
 /s01/oracle/oradata/athena/control03.ctl       NO       16384        594
 /s01/oracle/oradata/athena/control04.ctl       NO       16384        594

SQL>

 


分享题目:oraclecontrolfile路径修改
本文网址:http://hbruida.cn/article/gphpjh.html