測試ASM ACL 許可權控制。

來源:互聯網
上載者:User

測試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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.