12C-OCP升级1z-060-020

You are administering a database stored in Automatic Storage management (ASM). The
files are stored in the DATA disk group. You execute the following command:
SQL > ALTER DISKGROUP data ADD ALIAS ‘+data/prod/myfile.dbf’ FOR ‘+data/prod/myfile.dbf’
What is the result?
 
A. The file ‘+data.231.54769’ is physically relocated to ‘+data/prod’ and renamed as ‘myfile.dbf’. 
B. The file ‘+data.231.54769’ is renamed as ‘myfile.dbf’, and copied to ‘+data/prod’. 
C. The file ‘+data.231.54769’ remains in the same location and a synonym 'myfile.dbf' is created. 
D. The file ‘myfile.dbf’ is created in ‘+data/prod’ and the reference to ‘+data.231.54769’ in the data dictionary removed. 
 
Answer: C

答案解析
Use this clause to create an alias name for an Oracle ASM filename. The alias_name
consists of the full directory path and the alias itself. 
别名就是外号,比如说当系统自动产生的名称太过复杂不怎么好记,DBA可以通过别名,为它创建一个简单化的名称,而又不会对其现有名称造成任何影响。ASM中创建别名是通过alter diskgroup的alias子句实现,支持增加/修改/删除等多项操作。V$ASM_ALIAS视图中可以查询到当前实例中创建的别名。 
例如,增加别名: 
09:10:23 sys@kiwi> select name from v$datafile;
NAME
----------------------------------------------------------------------------------------------------------------------------------
+DATA/KIWI/DATAFILE/system.258.906850731
+DATA/KIWI/DATAFILE/test.268.906861531
+DATA/KIWI/DATAFILE/sysaux.257.906850669
+DATA/KIWI/DATAFILE/undotbs1.260.906850807
+DATA/KIWI/DATAFILE/example.266.906850863
+DATA/KIWI/DATAFILE/users.259.906850807

09:10:45 idle> alter diskgroup data add alias '+DATA/KIWI/DATAFILE/test.dbf' for '+DATA/KIWI/DATAFILE/test.268.906861531';

ASMCMD> ls -l
Type      Redund  Striped  Time             Sys  Name
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    EXAMPLE.266.906850863
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    SYSAUX.257.906850669
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    SYSTEM.258.906850731
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    TEST.268.906861531
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    UNDOTBS1.260.906850807
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  Y    USERS.259.906850807
DATAFILE  UNPROT  COARSE   MAR 29 03:00:00  N    test.dbf => +DATA/KIWI/DATAFILE/TEST.268.906861531


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值