search
HomeDatabaseMysql Tutorial参数文件视图
参数文件视图Jun 07, 2016 pm 03:22 PM
oracleparameterdocumentfriendNowKnowview

用过Oracle的朋友都知道,现在绝大部分Oracle数据库使用的是基于服务器的参数文件。对于查询当前数据库实例级别,system级别,session级别参数的具体设置有些时候很容易混淆。本文主要介绍了Oracle数据库参数使用的相关视图(V$PARAMETER,V$PARAMETER2,V$SY

用过Oracle的朋友都知道,现在绝大部分Oracle数据库使用的是基于服务器的参数文件。对于查询当前数据库实例级别,system级别,session级别参数的具体设置有些时候很容易混淆。本文主要介绍了Oracle数据库参数使用的相关视图(V$PARAMETER,V$PARAMETER2,V$SYSTEM_PARAMETER,V$SYSTEM_PARAMETER2,V$SPPARAMETER),以及通过查询Oracle视图来获得不同情形下的参数值并进行对比。

 1、对比有关参数视图

b、V$PARAMETER2

c、V$SYSTEM_PARAMETER

d、V$SYSTEM_PARAMETER2

e、V$SPPARAMETER

a、查看session级别的参数
--基于session级别可以直接使用show parameter 方式
--演示环境
scott@USBO> select * from v$version where rownum<2;

BANNER
-------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

scott@USBO> show parameter cursor_shar

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
cursor_sharing                       string                            EXACT

scott@USBO> select name,value,isses_modifiable,issys_modifiable,isinstance_modifiable
  2  from v$parameter where name=&#39;cursor_sharing&#39;;

NAME                           VALUE           ISSES_MODIFIABL ISSYS_MODIFIABLE            ISINSTANCE_MODI
------------------------------ --------------- --------------- --------------------------- ---------------
cursor_sharing                 EXACT           TRUE            IMMEDIATE                   TRUE

scott@USBO> alter session set cursor_sharing=&#39;SIMILAR&#39;;   --->上面的查询可知session级别为true,即可修改

Session altered.

scott@USBO> show parameter cursor_shar   -->再次查看,修改已经生效

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
cursor_sharing                       string                            SIMILAR

b、查看基于实例级别的参数
--基于实例级别的参数需要通过V$SYSTEM_PARAMETER访问
scott@USBO> select name,value from v$system_parameter where name=&#39;cursor_sharing&#39;;

NAME                           VALUE
------------------------------ ---------------
cursor_sharing                 EXACT            --->可以看到此时的值依旧是exact,并没有受到之前修改的影响

scott@USBO> alter system set cursor_sharing=&#39;FORCE&#39;;   --->将参数cursor_sharing进行基于系统级别进行修改

System altered.

scott@USBO> show parameter cursor_sharing              --->此时可以看到当前session级别该参数从system级别派生

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
cursor_sharing                       string                            FORCE 

scott@USBO> alter session set cursor_sharing=&#39;EXACT&#39;;  --->再次基于session级别进行修改   

Session altered.

scott@USBO> show parameter cursor_shar     --->此时查询到session的值变为EXACT,那system级别呢?肯定是FORCE,大家自行验证

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
cursor_sharing                       string                            EXACT 

c、演示v$parameter与v$parameter2的差异
scott@USBO> show parameter control_files;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
control_files                        string                            /u03/database/usbo/oradata/con
                                                                       trol01.ctl, /u03/database/usbo
                                                                       /oradata/control02.ctl
scott@USBO> select name,value from v$parameter where name=&#39;control_files&#39;;

NAME                           VALUE
------------------------------ ------------------------------------------------------------
control_files                  /u03/database/usbo/oradata/control01.ctl, /u03/database/usbo
                               /oradata/control02.ctl

--查询v$parameter2时,对于存在多个参数值的参数,在这个视图中分为多行进行列出,如下
--对于v$system_parameter与v$system_parameter2存在类似的情形,不再演示
scott@USBO> select name,value from v$parameter2 where name=&#39;control_files&#39;;

NAME                           VALUE
------------------------------ ------------------------------------------------------------
control_files                  /u03/database/usbo/oradata/control01.ctl
control_files                  /u03/database/usbo/oradata/control02.ctl

d、关于v$spparameter
--该视图可以用于判断当前数据库使用的是pfile还是spfile来启动
scott@USBO> select distinct isspecified from v$spparameter;

ISSPECIFIED
------------------
TRUE                       --->第一个值为TRUE,spfile启动
FALSE

goex_admin@MFTST> select distinct isspecified from v$spparameter;

ISSPEC
------
FALSE                     --->为false,pfile文件启动数据库  

goex_admin@MFTST> select name,value from v$spparameter where name=&#39;control_files&#39;;  

NAME                      VALUE
------------------------- ------------------------------------------------------------
control_files                                                                      --->由于为pfile启动,所以查询不到任何信息

goex_admin@MFTST> select count(*) from v$spparameter where isspecified=&#39;TRUE&#39;;

  COUNT(*)
----------                              --->列isspecified没有一个值为TRUE,同样是因为使用了pfile
         0 

对于spfile启动下的v$spparameter,对于存在多个参数值的参数,在这个视图中也分为多行进行列出         
scott@USBO> select name,value from v$spparameter where name=&#39;control_files&#39;;

NAME                           VALUE
------------------------------ ------------------------------------------------------------
control_files                  /u03/database/usbo/oradata/control01.ctl
control_files                  /u03/database/usbo/oradata/control02.ctl
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP 5.4版本新功能:如何使用callable类型提示参数接受可调用的函数或方法PHP 5.4版本新功能:如何使用callable类型提示参数接受可调用的函数或方法Jul 29, 2023 pm 09:19 PM

PHP5.4版本新功能:如何使用callable类型提示参数接受可调用的函数或方法引言:PHP5.4版本引入了一项非常便利的新功能-可以使用callable类型提示参数来接受可调用的函数或方法。这个新功能使得函数和方法可以直接指定相应的可调用参数,而无需进行额外的检查和转换。在本文中,我们将介绍callable类型提示的使用方法,并提供一些代码示例,

产品参数是什么意思产品参数是什么意思Jul 05, 2023 am 11:13 AM

产品参数是指产品属性的意思。比如服装参数有品牌、材质、型号、大小、风格、面料、适应人群和颜色等;食品参数有品牌、重量、材质、卫生许可证号、适应人群和颜色等;家电参数有品牌、尺寸、颜色、产地、适应电压、信号、接口和功率等。

i9-12900H参数评测大全i9-12900H参数评测大全Feb 23, 2024 am 09:25 AM

i9-12900H是14核的处理器,使用的架构和工艺都是全新的,线程也很高,整体的工作都是很优秀的,一些参数都有提升特别的全面,是可以给用户们带来极佳体验的。i9-12900H参数评测大全评测:1、i9-12900H是14核的处理器,采用了q1架构以及24576kb的制程工艺,提升到了20个线程。2、最大的CPU频率是1.80!5.00ghz,整体主要取决于工作的负载。3、相比较价位来说还是特别合适的,性价比很不错,对于一些需要正常使用的伙伴来说非常的合适。i9-12900H参数评测大全性能跑分

C++程序以给定值为参数,找到双曲正弦反函数的值C++程序以给定值为参数,找到双曲正弦反函数的值Sep 17, 2023 am 10:49 AM

双曲函数是使用双曲线而不是圆定义的,与普通三角函数相当。它从提供的弧度角返回双曲正弦函数中的比率参数。但要做相反的事,或者换句话说。如果我们想根据双曲正弦值计算角度,我们需要像双曲反正弦运算一样的反双曲三角运算。本课程将演示如何使用C++中的双曲反正弦(asinh)函数,使用双曲正弦值(以弧度为单位)计算角度。双曲反正弦运算遵循以下公式-$$\mathrm{sinh^{-1}x\:=\:In(x\:+\:\sqrt{x^2\:+\:1})},其中\:In\:是\:自然对数\:(log_e\:k)

PHP Warning: in_array() expects parameter的解决方法PHP Warning: in_array() expects parameter的解决方法Jun 22, 2023 pm 11:52 PM

在开发过程中,我们可能会遇到这样一个错误提示:PHPWarning:in_array()expectsparameter。这个错误提示会在使用in_array()函数时出现,有可能是因为函数的参数传递不正确所导致的。以下我们来看看这个错误提示的解决方法。首先,需要明确in_array()函数的作用:检查一个值是否在数组中存在。该函数的原型为:in_a

机器学习超参数调优总结(PySpark ML)机器学习超参数调优总结(PySpark ML)Apr 08, 2023 pm 07:21 PM

ML中的一个重要任务是模型选择,或者使用数据为给定任务找到最佳的模型或参数。这也称为调优。可以对单个的估计器(如LogisticRegression​)进行调优,也可以对包括多种算法、特性化和其他步骤的整个pipeline​进行调优。用户可以一次调优整个Pipeline​,而不是分别调优 Pipeline 中的每个元素。ML中的一个重要任务是模型选择,或者使用数据为给定任务找到最佳的模型或参数。这也称为调优。可以对单个的Estimator​(如LogisticRegression​)进行调优,也

100亿参数的语言模型跑不动?MIT华人博士提出SmoothQuant量化,内存需求直降一半,速度提升1.56倍!100亿参数的语言模型跑不动?MIT华人博士提出SmoothQuant量化,内存需求直降一半,速度提升1.56倍!Apr 13, 2023 am 09:31 AM

大型语言模型(LLM)虽然性能强劲,但动辄几百上千亿的参数量,对计算设备还是内存的需求量之大,都不是一般公司能承受得住的。量化(Quantization)是常见的压缩操作,通过降低模型权重的精度(如32bit降为8bit),牺牲一部分模型的性能来换取更快的推理速度,更少的内存需求。但对于超过1000亿参数量的LLM来说,现有的压缩方法都无法保持模型的准确率,也无法在硬件上高效地运行。最近,麻省理工学院和英伟达的研究人员联合提出了一个通用后训练的量化(GPQ, general-purpose po

必填参数缺失什么意思必填参数缺失什么意思Sep 19, 2023 pm 03:08 PM

必填参数缺失是指在进行某项操作或者调用某个函数时,必要的参数没有被提供或者没有被正确地传递。在编程中,函数通常会需要一些输入参数来完成特定的任务,必须在调用函数时被提供,如果这些必填参数没有被提供,系统就无法理解如何执行函数,因此会报错或者无法继续执行。必填参数缺失在编程中是一个常见的错误,解决这个问题的方法是检查调用函数的代码,确保所有必填参数都被正确地提供等等。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment