Description The environment variables ORACLE_HOME and ORACLE_SID determine the instance to which the program connects, and ASMCMD establishes a bequeath connection to it, in the same manner as a SQLPLUS / AS SYSASM. The user must be a member of the OSASM group.
If Flex ASM is enabled, the ASMCMD connects to any one of the ASM instances running in the cluster. The connection to ASM instance does not depend on the environment variables ORACLE_HOME and ORACLE_SID. The ASMCMD alert log shows to which instance ASMCMD is connected to. If the user wants to connect to a specific ASM instance, --inst option should be used to specify the instance name.
Specifying the -V option prints the asmcmd version number and exits immediately.
Specifying the --nocp option disables connection pooling feature for ASMCMD.
Specifying the -v option prints extra information that can help advanced users diagnose problems.
Specify the --privilege option to choose the type of connection. There are only two possibilities: connecting as SYSASM or as SYSDBA.
The default value if this option is unspecified is SYSASM.
Specifying the -p option allows the current directory to be displayed in the command prompt, like so:
ASMCMD [+DATA/ORCL/CONTROLFILE] >
Specifying the --discover option uses discovery string obtained from Listener, does not use ORACLE_SID.
[command] specifies one of the following commands, along with its parameters.
Type "help [command]" to get help on a specific ASMCMD command.
ASMCMD> lsaudconfigparams Type Parameter Name Parameter Value AUDIT FILE MAX SIZE 10000 AUDIT FILE MAX SIZE 10000 AUDIT FILE MAX AGE 5 AUDIT FILE MAX AGE 5 AUDIT_TRAIL_WRITE_MODE QUEUED WRITE MODE AUDIT_TRAIL_WRITE_MODE ASMCMD> showclustermode ASM cluster : Flex mode disabled ASMCMD> showclusterstate Normal ASMCMD> showversion ASM version : 12.1.0.2.0 ASMCMD> spbackup usage: spbackup help: help spbackup ASMCMD> ASMCMD> help spbackup spbackup Backs up an Oracle ASM SPFILE to a back up file.
Synopsis spbackup
Description The options for the spbackup command are described below: source - specifies the source file name destination - specifies the destination file name spbackup should be used when you want to make single or multiple backups of an SPFILE in the same or different disk group without creating an SPFILE in target disk group. Note the following about the use of spbackup: spbackup can back up an Oracle ASM SPFILE from a disk group to a disk group or to an operating system file. spbackup can back up an Oracle ASM SPFILE from an operating system file to a disk group or to an operating system file. spbackup can back up an Oracle ASM SPFILE when the SPFILE is being used by an open Oracle ASM instance. spbackup can make multiple backups of an Oracle ASM SPFILE in the same disk group. spbackup does not affect the GPnP profile. The back up file that is created is not a special file type and is not identified as an SPFILE. This back up file cannot be copied with spcopy. To copy this back up file, use the ASMCMD cp command. To make a copy of a back up file in a disk group that is identified as a SPFILE file: 1. Use the ASMCMD cp command to copy the back up file from the disk group to an operating system file. 2. Use the ASMCMD spcopy command to copy the operating system file to a disk group.
Examples The following are examples of the spbackup command. The first example backs up the SPFILE in the DATA disk group. The second example backs up the SPFILE from the DATA disk group to the FRA disk group. ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181 +DATA/spfileBackASM.bak ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181 +FRA/spfileBackASM.bak
See Also cp spcopy
ASMCMD> help chtmpl chtmpl Changes the attributes of a template.
Description The options for the chtmpl command are described below. -G diskgroup - Name of the disk group. template - Name of the template to change. --striping {coarse | fine} - Striping specification, either coarse or fine. --redundancy { high | mirror | unprotected} - Redundancy specification, either high, mirror, or unprotected. --primary { hot | cold } - Intelligent Data Placement specification for primary extents, either hot or cold region. --secondary { hot | cold } - Intelligent Data Placement specification for secondary extents, either hot or cold region. At least one of these options is required: --striping, --redundancy, --primary, --secondary.
Examples The following is an example of the chtmpl command that updates the mytemplate template of the DATA disk group. The redundancy attribute is set to high and the striping attribute is set to fine. ASMCMD [+]>chtmpl -G DATA --redundancy high --striping fine mytemplate
No comments:
Post a Comment