说到oracle参数文件,那么这是要给非常重要的文件,在数据库启动实例的过程中进行内存、数据库名称等等环境的初始化,只有参数文
之前有很多刚刚开始学习数据库的朋友经常问我参数文件备份恢复以及误操作导致无法启动实例等等问题,我也是一个求道之人,今天写了这篇日志,希望对大家有所帮助,彼此互相学习互相进步。在此记录一下。
说到Oracle参数文件,那么这是要给非常重要的文件,在数据库启动实例的过程中进行内存、数据库名称等等环境的初始化,只有参数文件配置正确那么数据库才能启动实例,进而可以mount and open。
1)参数视图介绍
与参数文件有关的视图有v$parameter,v$spparameter,v$system_parameter,v$parameter2,v$system_parameter2。
v$parameter
v$parameter 视图显示的是当前会话中生效的初始化参数信息,每一个新的会话开始都会从v$system_parameter视图中继承一些参数。可见v$parameter是基于当前会话的,而v$system_parameter是基于实例的。类似于linux的profile环境参数。
V$PARAMETER displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view.
v$spparameter
该参数记录的是在参数文件(spfile)中的参数设置内容,如果参数文件没有使用,那么该参数中的每一个值在ISSPECIFIED列都是false。
V$SPPARAMETER displays information about the contents of the server parameter file. If a server parameter file was not used to start the instance, then each row of the view will contain FALSE in the ISSPECIFIED column.
eg:
SYS@orcl#select sid,name,type,value,isspecified,ordinal from v$spparameter where rownum
SI NAME TYPE VALUE ISSPECIFIED ORDINAL
-- -------------------- ------------------------------ ------------------------------ ------------ ----------
* lock_name_space string FALSE 0
* processes integer 160 TRUE 1
SYS@orcl#create pfile='/opt/oracle/pfile.ora' from spfile;
文件已创建。
SYS@orcl#shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SYS@orcl#startup pfile='/opt/oracle/pfile.ora';
ORACLE 例程已经启动。
Total System Global Area 805875712 bytes
Fixed Size 2148720 bytes
Variable Size 511706768 bytes
Database Buffers 285212672 bytes
Redo Buffers 6807552 bytes
数据库装载完毕。
数据库已经打开。
SYS@orcl#select sid,name,type,value,isspecified,ordinal from v$spparameter where rownum
SI NAME TYPE VALUE ISSPECIFIED ORDINAL
-- -------------------- ------------------------------ ------------------------------ ------------ ----------
* lock_name_space string FALSE 0
* processes integer FALSE 0
SYS@orcl#
一个简单的网上书店系统,有图书管理、会员注册、评论发表、购物车等基本应用,后台有:定单管理、评论管理、用户管理、图书管理等功能模块。为北大青鸟学员练习之用,可以做为入门者的学习参考之用。采用了VS2005的master模板DB_51aspx下为Sql数据库文件,附加即可,注意:除修改web.config中的Sql连接信息以外还要对App_Code/Class1.cs中的Sql登录信息也要做对应的修
0
v$system_parameter
该试图对instance而言的,其他的会话信息都是基于该试图进行“copy”的。
V$SYSTEM_PARAMETER displays information about the initialization parameters that are currently in effect for the instance. A new session inherits parameter values from the instance-wide values.
v$parameter2
该参数文件就是对v$parameter参数中的多项值进行format。
V$PARAMETER2 displays information about the initialization parameters that are currently in effect for the session, with each list parameter value appearing as a row in the view. A new session inherits parameter values from the instance-wide values displayed in the V$SYSTEM_PARAMETER2 view.
Presenting the list parameter values in this format enables you to quickly determine the values for a list parameter. For example, if a parameter value is a, b, then the V$PARAMETER view does not tell you if the parameter has two values (both a and b) or one value (a, b). V$PARAMETER2 makes the distinction between the list parameter values clear.
eg:
SYS@orcl#select name,value from v$parameter where;
NAME VALUE
-------------------- ------------------------------
control_files /opt/oracle/oradata/ORCL/contr
olfile/o1_mf_7q9c8orh_.ctl, /o
pt/oracle/flash_recovery_area/
ORCL/controlfile/o1_mf_7q9c8pc
f_.ctl
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号