Test the asm acl permission control.

Source: Internet
Author: User

Test the asm acl permission control.
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 10 m;

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,200 9, Oracle. All rights reserved.

Connected:
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 saved med
ORA-15242: cocould 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.

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.