Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the parameter file location of Grid software ASM by 11gR2

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What this article shares to you is about how 11gR2 modifies the parameter file location of Grid software ASM, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article, not to say much, follow the editor to have a look.

1.Standalone environment.

Cd / u01/app/11.2.0/grid/bin

#. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA01.dg

ONLINE ONLINE ncappweb2

Ora.LISTENER.lsnr

ONLINE ONLINE ncappweb2

Ora.OCRVDISK.dg

ONLINE ONLINE ncappweb2

Ora.asm

ONLINE ONLINE ncappweb2 Started

Ora.ons

OFFLINE OFFLINE ncappweb2

Cluster Resources

Ora.cssd

1 ONLINE ONLINE ncappweb2

Ora.diskmon

1 OFFLINE OFFLINE

Ora.evmd

1 ONLINE ONLINE ncappweb2

Ora.mtorcl.db

1 ONLINE ONLINE ncappweb2 Open

The above is the Standalone single database environment created by default. Using ASM as the storage method, OCRVDISK stores the parameter files of the ASM instance.

If you do not want to use ASM as the storage method for ASM instance parameter files in the Standalone single instance database environment, it is recommended that you first create an ASM disk group according to the default requirements, and the parameter files of ASM instances will be stored in the ASM disk group, such as the OCRVDISK disk group above. Then migrate the parameter files of the ASM instance to the local file system in the following ways.

two。 Use srvctl modify asm to modify the SPFILE location.

# pwd

/ u01/app/11.2.0/grid/bin

#. / srvctl modify asm-h

Modifies the configuration for ASM.

Usage: srvctl modify asm [- l] [- p] [- d]

-l Listener name

-p Server parameter file path

-d ASM diskgroup discovery string

-h Print usage

#. / srvctl config asm

ASM home: / u01/app/11.2.0/grid

ASM listener: LISTENER

Spfile: + OCRVDISK/asm/asmparameterfile/registry.253.793652513

ASM diskgroup discovery string:

# su-grid

$cd / u01/app/11.2.0/grid/dbs/

$ls

Ab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM

There is currently no SPFILE parameter file for the ASM instance.

$srvctl modify asm-p / u01/app/11.2.0/grid/dbs/spfile+ASM.ora

The operation of srvctl modify asm must be done under the grid user.

3. Restart Grid to verify the effect of modify.

#. / crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ncappweb2'

CRS-2673: Attempting to stop 'ora.OCRVDISK.dg' on' ncappweb2'

CRS-2673: Attempting to stop 'ora.mtorcl.db' on' ncappweb2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on' ncappweb2'

CRS-2677: Stop of 'ora.mtorcl.db' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on' ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on' ncappweb2' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on' ncappweb2' succeeded

CRS-2677: Stop of 'ora.OCRVDISK.dg' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on' ncappweb2'

CRS-2677: Stop of 'ora.asm' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on' ncappweb2'

CRS-2677: Stop of 'ora.cssd' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on' ncappweb2'

CRS-2677: Stop of 'ora.evmd' on' ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

#. / crsctl start has

CRS-4123: Oracle High Availability Services has been started.

#. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA01.dg

ONLINE ONLINE ncappweb2

Ora.LISTENER.lsnr

ONLINE ONLINE ncappweb2

Ora.OCRVDISK.dg

ONLINE ONLINE ncappweb2

Ora.asm

ONLINE ONLINE ncappweb2 Started

Ora.ons

OFFLINE OFFLINE ncappweb2

Cluster Resources

Ora.cssd

1 ONLINE ONLINE ncappweb2

Ora.diskmon

1 OFFLINE OFFLINE

Ora.evmd

1 ONLINE ONLINE ncappweb2

Ora.mtorcl.db

1 ONLINE ONLINE ncappweb2 Open

#. / srvctl config asm

ASM home: / u01/app/11.2.0/grid

ASM listener: LISTENER

Spfile: / u01/app/11.2.0/grid/dbs/spfile+ASM.ora

ASM diskgroup discovery string:

# su-grid

$sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:50:55 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Automatic Storage Management option

SQL > show parameter spfile

NAME TYPE

VALUE

-

Spfile string

Connect to the ASM instance, but do not see that the SPFILE parameter is specified.

4. Delete the disk group that stores the ASM instance parameter file.

#. / srvctl remove diskgroup-g ocrvdisk-f

$sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:54:08 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Automatic Storage Management option

SQL > drop diskgroup ocrvdisk including contents

Diskgroup dropped.

Delete the OCRVDISK disk group.

Observe the Grid restart effect after the 5.DROP OCRVDISK disk group.

#. / crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ncappweb2'

CRS-2673: Attempting to stop 'ora.mtorcl.db' on' ncappweb2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on' ncappweb2'

CRS-2677: Stop of 'ora.mtorcl.db' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on' ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on' ncappweb2'

CRS-2677: Stop of 'ora.asm' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on' ncappweb2'

CRS-2677: Stop of 'ora.cssd' on' ncappweb2' succeeded

CRS-5014: Agent "/ u01/app/11.2.0/grid/bin/oraagent.bin" timed out starting process "/ u01/app/11.2.0/grid/bin/lsnrctl" for action "stop": details at "(: CLSN00009:)" in "/ u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log"

CRS-5017: The resource action "ora.LISTENER.lsnr stop" encountered the following error:

(CLSN00009:) Utils:execCmd aborted. For details refer to "(: CLSN00108:)" in "/ u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2677: Stop of 'ora.LISTENER.lsnr' on' ncappweb2' succeeded

CRS-2679: Attempting to clean 'ora.LISTENER.lsnr' on' ncappweb2'

CRS-2681: Clean of 'ora.LISTENER.lsnr' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on' ncappweb2'

CRS-2677: Stop of 'ora.evmd' on' ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

#

#. / crsctl start has

CRS-4123: Oracle High Availability Services has been started.

#. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA01.dg

ONLINE ONLINE ncappweb2

Ora.LISTENER.lsnr

ONLINE ONLINE ncappweb2

Ora.asm

ONLINE ONLINE ncappweb2 Started

Ora.ons

OFFLINE OFFLINE ncappweb2

Cluster Resources

Ora.cssd

1 ONLINE ONLINE ncappweb2

Ora.diskmon

1 OFFLINE OFFLINE

Ora.evmd

1 ONLINE ONLINE ncappweb2

Ora.mtorcl.db

1 ONLINE ONLINE ncappweb2 Open

The ASM instance starts normally.

$cd $GRID_HOME/dbs

$ls

Ab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM

As you can see from the output above, the srvctl modify asm command does not create a SPFILE parameter file for the instance, but the srvctl add asm command creates a parameter file for the default value for the ASM instance, which is different, so we can also modify the location of the ASM parameter file by executing the srvctl remove asm and srvctl add asm commands, and also create a parameter file for the corresponding location.

As you can see from the above example, even if there is no parameter file for the ASM instance, the ASM instance can still start normally, and Oracle should set the default startup parameters for the ASM instance.

# su-grid

$sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 09:57:49 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Automatic Storage Management option

SQL > show parameter spfile

NAME TYPE

VALUE

-

Spfile string

The SPFILE parameter value still does not exist.

6. Create the SPFILE file manually.

SQL > create spfile from memory

File created.

$ls

Ab_+ASM.dat hc_+ASM.dat init.ora orapw+ASM spfile+ASM.ora

$

$

$strings spfile*.ora

*. _ _ large_pool_size=12M

*. _ aggregation_optimization_settings=0

*. _ always_anti_join='CHOOSE'

*. _ always_semi_join='CHOOSE'

*. _ and_pruning_enabled=TRUE

*. _ b_tree_bitmap_plans=TRUE

*. _ bloom_filter_enabled=TRUE

*. _ bloom_folding_enabled=TRUE

*. _ bloom_pruning_enabled=TRUE

*. _ complex_view_merging=TRUE

*. _ compression_compatibility='11.2.0'

*. _ connect_by_use_union_all='TRUE'

*. _ convert_set_to_join=FALSE

*. _ cost_equality_semi_join=TRUE

*. _ cpu_to_io=0

*. _ dimension_skip_null=TRUE

*. _ eliminate_com

Mon_subexpr=TRUE

.

7. Restart Grid.

#. / crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ncappweb2'

CRS-2673: Attempting to stop 'ora.mtorcl.db' on' ncappweb2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on' ncappweb2'

CRS-2677: Stop of 'ora.mtorcl.db' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.DATA01.dg' on' ncappweb2'

CRS-2677: Stop of 'ora.DATA01.dg' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on' ncappweb2'

CRS-2677: Stop of 'ora.asm' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on' ncappweb2'

CRS-2677: Stop of 'ora.cssd' on' ncappweb2' succeeded

CRS-5014: Agent "/ u01/app/11.2.0/grid/bin/oraagent.bin" timed out starting process "/ u01/app/11.2.0/grid/bin/lsnrctl" for action "stop": details at "(: CLSN00009:)" in "/ u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log"

CRS-5017: The resource action "ora.LISTENER.lsnr stop" encountered the following error:

(CLSN00009:) Utils:execCmd aborted. For details refer to "(: CLSN00108:)" in "/ u01/app/11.2.0/grid/log/ncappweb2/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2677: Stop of 'ora.LISTENER.lsnr' on' ncappweb2' succeeded

CRS-2679: Attempting to clean 'ora.LISTENER.lsnr' on' ncappweb2'

CRS-2681: Clean of 'ora.LISTENER.lsnr' on' ncappweb2' succeeded

CRS-2673: Attempting to stop 'ora.evmd' on' ncappweb2'

CRS-2677: Stop of 'ora.evmd' on' ncappweb2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ncappweb2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

#. / crsctl start has

CRS-4123: Oracle High Availability Services has been started.

#. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA01.dg

ONLINE ONLINE ncappweb2

Ora.LISTENER.lsnr

ONLINE ONLINE ncappweb2

Ora.asm

ONLINE ONLINE ncappweb2 Started

Ora.ons

OFFLINE OFFLINE ncappweb2

Cluster Resources

Ora.cssd

1 ONLINE ONLINE ncappweb2

Ora.diskmon

1 OFFLINE OFFLINE

Ora.evmd

1 ONLINE ONLINE ncappweb2

Ora.mtorcl.db

1 ONLINE ONLINE ncappweb2 Open

# su-grid

$sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 11 10:06:20 2012

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Automatic Storage Management option

SQL > show parameter spfile

NAME TYPE

VALUE

-

Spfile string

/ u01/app/11.2.0/grid/dbs/spfil

E+ASM.ora

SQL > show parameter disk

NAME TYPE

VALUE

-

Asm_diskgroups string

DATA01

Asm_diskstring string

SQL > alter system set asm_diskstring='/dev/rhdisk*'

System altered.

SQL > show parameter disk

NAME TYPE

VALUE

-

Asm_diskgroups string

DATA01

Asm_diskstring string

/ dev/rhdisk*

As can be seen from this example, to modify the ASM parameter file location of the existing environment, first create a SPFILE file in a new location, then use the srvctl modify asm command to adjust the location of the SPFILE, and finally restart the Grid software to verify the effect of the ASM parameter location modification.

The above is how 11gR2 modifies the parameter file location of Grid software ASM. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report