9.7.3.3.1 Running Commands Manually

You can use SQL*Plus to manually run the commands to set the ownership of the test master data files.

The following commands are run in SQL*Plus.
  1. If the operating system user you are granting access to is not added as a user on the disk group, then add the user.

    Note:

    When enabling access control, all software owners that are running databases must be added as a user to the disk group.

    For example, to add the user SCOTT as an owner of the DATA disk group, use the following command:

    SQL> ALTER DISKGROUP DATA ADD USER 'scott';
    
  2. Make the operating system user the owner of the test master's data files:
    SQL> ALTER DISKGROUP DATA SET OWNERSHIP OWNER='scott' FOR FILE
      '+DATA/TESTMASTER/DATAFILE/system.257.865863315';
    
    SQL> ALTER DISKGROUP DATA SET OWNERSHIP OWNER='scott' FOR FILE
      '+DATA/TESTMASTER/DATAFILE/sysaux.258.865863317';
    
    SQL> ALTER DISKGROUP DATA SET OWNERSHIP OWNER='scott' FOR FILE 
      '+DATA/TESTMASTER/DATAFILE/sysext.259.865863317';
    
    SQL> ALTER DISKGROUP DATA SET OWNERSHIP OWNER='scott' FOR FILE 
      '+DATA/TESTMASTER/DATAFILE/tbs_1.256.865863315';