测试ASM ACL 权限控制。
分类: 数据库 2011-11-07 11:23 15人阅读 举报
测试ASM ACL 权限控制。
on the oracle:
SQL> show user
USER is "SYS"
SQL> select name from v$database;
NAME
---------
ORCL
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/users.259.766156881
+DATA/orcl/datafile/undotbs1.258.766156879
+DATA/orcl/datafile/sysaux.257.766156879
+DATA/orcl/datafile/system.256.766156877
+DATA/orcl/datafile/example.264.766157087
+DATA/orcl/datafile/undotbs2.265.766157357
+DATA/orcl/datafile/undotbs3.269.766236417
7 rows selected.
SQL> create tablespace tbs datafile '+ACFS' size 10m;
Tablespace created.
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/orcl/datafile/users.259.766156881
+DATA/orcl/datafile/undotbs1.258.766156879
+DATA/orcl/datafile/sysaux.257.766156879
+DATA/orcl/datafile/system.256.766156877
+DATA/orcl/datafile/example.264.766157087
+DATA/orcl/datafile/undotbs2.265.766157357
+DATA/orcl/datafile/undotbs3.269.766236417
+ACFS/orcl/datafile/tbs.259.766320739
8 rows selected.
SQL> alter tablespace tbs offline;
Tablespace altered.
ON ASM:
[grid@host01 ~]$ . oarenv
-bash: oarenv: No such file or directory
[grid@host01 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM2
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/grid
[grid@host01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 4 10:50:43 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select * from v$asm_user;
no rows selected
SQL> alter diskgroup acfs set attribute='access_control.enabled'='true';
alter diskgroup acfs set attribute='access_control.enabled'='true'
*
ERROR at line 1:
ORA-15214: missing or invalid attribute specification
SQL> alter diskgroup acfs set attribute 'access_control.enabled'='true';
alter diskgroup acfs set attribute 'access_control.enabled'='true'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15242: could not set attribute access_control.enabled
ORA-15238: true is not a valid value for attribute access_control.enabled
ORA-15283: ASM operation requires compatible.rdbms of 11.2.0.0.0 or higher
SQL> alter diskgroup acfs set attribute 'compatible.rdbms'='11.2.0.0.0';
Diskgroup altered.
SQL> alter diskgroup acfs set attribute 'access_control.enabled'='true';
Diskgroup altered.
SQL> alter tablespace tbs online;
alter tablespace tbs online
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: '+ACFS/orcl/datafile/tbs.259.766320739'
ON ASM:
SQL> alter diskgroup acfs add user 'oracle';
Diskgroup altered.
ON DB.
SQL> alter tablespace tbs online;
Tablespace altered.
阅读(1591) | 评论(0) | 转发(0) |