How Oracle Queries initialization parameters (iii) V$spparameter differs from Gv$parameter view

Source: Internet
Author: User

Query initialization parameters A lot of ways, such as show PARAMETER, or query V$parameter, here a brief summary.

This article describes the difference between the V$spparameter view and the Gv$parameter view.

The previous article describes the difference between V$system_parameter and V$parameter views, which focuses on queries that initialize parameters in a RAC environment.

As already mentioned, using the show parameter query to see the initialization parameters that the current session can see, this argument is not visible from this command because it is set globally or by the current instance.

Although Oracle provides initialization parameters at the beginning of the gv$, it can be used to query settings on two instances, but it is not so simple.

A simple example:

Sql> Show Parameter Open_cursors

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Open_cursors Integer 300

Sql> alter system Set Open_cursors = Scope = Both sid = ' test1 ';

The system has changed.

Sql> Disc

From Oracle database11genterprise Edition release11.1.0.6.0-64bit Production

With the partitioning, real application clusters, OLAP, Data Mining

and real application testing options disconnected

Sql> Set Instance Test2

Oracle Database11grelease 11.1.0.0.0-production

Sql> Conn SYS as SYSDBA

Enter Password:

is connected.

Sql> alter system Set Open_cursors = Scope = Both sid = ' test2 ';

The system has changed.

Sql> Disc

From Oracle database11genterprise Edition release11.1.0.6.0-64bit Production

With the partitioning, real application clusters, OLAP, Data Mining

and real application testing options disconnected

Sql> Set Instance Local

Oracle database11grelease11.1.0.0.0-production

Sql> Conn/as SYSDBA

is connected.

Now look at the results of different query methods:

Sql> select name, value

2 from V$parameter

3 WHERE name = ' open_cursors ';

NAME VALUE

------------------------------ --------------------------------------------------

Open_cursors 500

Sql> Select inst_id, name, value

2 from Gv$parameter

3 WHERE name = ' open_cursors ';

inst_id NAME VALUE

This article URL address: http://www.bianceng.cn/database/Oracle/201410/45545.htm

---------- ------------------------------ --------------------------------------------------

1 Open_cursors 500

2 Open_cursors 400

Sql> Show Parameter Open_cursors

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Open_cursors Integer 500

sql> Select SID, Name, value

2 from V$spparameter

3 WHERE name = ' open_cursors ';

SID NAME VALUE

---------- ------------------------------ --------------------------------------------------

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.