[Translated from mos] despite specifying a destination, the asmcmd cp command still creates a file under + DATA/ASM, mosasmcmd

Source: Internet
Author: User

[Translated from mos] despite specifying a destination, the asmcmd cp command still creates a file under + DATA/ASM, mosasmcmd
Despite specifying the destination, the asmcmd cp command still creates a file under + DATA/ASM

Reference Original:
ASMCMD Cp Creates Files In + DATA/ASM Instead Of Destination Specified (Doc ID 1488934.1)


Applicable:
Oracle Database-Enterprise Edition-Version 11.2.0.3 and later
Information in this document applies to any platform.


Symptoms:
In version 11.2.0.3, use the cp command of asmcmd to copy files from the file system to asm,
The files created in asm are created under + DATA/ASM/DATAFILE, and an alias for this file is created under + DATA/DB/DATAFILE.

Cause:
This behavior is attributed to the alias (alias). Although the oracle db Development Department is improving bug 12640351,
This bug is 12640351: ASMCMD NEEDS PARAMETER TO COPY FILES INTO A GIVEN SYSTEM ALIAS

Solution:

Use DBMS_FILE_TRANSFER or RMAN to copy the file until the following is implemented in future release.

One requirement is to copy database files (data files, control files, etc.) to the specified directory in asm.
Therefore, you need to add an additional parameter for the cp command to specify the system alias.
If you copy an object to asm, asm will create an alias under + DISKGROUP/your_specific_path/. The object to which the alias points is copied to + DISKGROUP/ASM.
Although the file should be under + DISKGROUP/your_specific_path. The following is an example:

ASMCMD> cp/oracle/C15/sapbackup/cntrlC15.dbf + DATA/C15/CONTROLFILE/cntrlC15.dbf
Copying/oracle/C15/sapbackup/cntrlC15.dbf->
+ DATA/C15/CONTROLFILE/cntrlC15.dbf
ASMCMD> ls-l
Type Redund Striped Time Sys Name
Controlfile unprot fine feb 03 08:00:00 Y Current.295.737125033
N cntrlC15.dbf => + DATA/ASM/CONTROLFILE/cntrlC15.dbf. 332.742121853

The oracle db development department is looking for a method: either copy the file to the correct directory or system alias (not '+/ASM/...'), or add a parameter for cp.

At the same time, the work und is to use DBMS_FILE_TRANSFER or RMAN, which copies the files to the correct destination.
Role of the ASM command in linux

Oracle 10R2 releases the asmcmd tool to manage files stored in asm.
1. To use the asmcmd command, you must first start the asm instance. Otherwise, the following error occurs: rac2-> asmcmd-p
A ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory (dbd error: OCISessionBegin) 2. when using asmcmd, you must specify ORACLE_HOME and ORACLE_SID. Note that ORACLE_SID is the sid of asm. Otherwise, the following error occurs: rac2-> asmcmd-p.
A ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory (dbd error: OCISessionBegin) 3. The asmcmd command has the following functions:
With p, asmcmd will display the current path: rac2-> asmcmd-p
ASMCMD [+]> ls
DG1/
RECOVERDEST/
ASMCMD [+]> cd DG1
ASMCMD [+ DG1]> ls
DEVDB/
ASMCMD [+ DG1]> cd DEVDB
ASMCMD [+ DG1/DEVDB]> without p, the current path is not displayed: rac2-> asmcmd
ASMCMD> ls
DG1/
RECOVERDEST/
ASMCMD> cd DG1
ASMCMD> ls
DEVDB/
ASMCMD> cd DEVDB
ASMCMD> 4. For other related parameters, use help to view ASMCMD [+]> help
Asmcmd [-p] [command]

The environment variables ORACLE_HOME and ORACLE_SID determine
Instance to which the program connects, and ASMCMD establishes
Bequeath connection to it, in the same manner as a SQLPLUS/
SYSDBA. The user must be a member of the SYSDBA group.

Specifying the-p option allows the current directory to be displayed
In the command prompt, like so:

ASMCMD [+ DATAFILE/ORCL/CONTROLFILE]>

[Command] specifies one of the following commands, along with its
Parameters.

Type "h... the remaining full text>
 

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.