How Do I Place an Oracle Database Log File to a Self-Defined Directory
Answer
- Log in to the eSight server as the root user.
In the two-node cluster scenario, perform the following operations on the active and standby servers. For details about how to switch services from the active server to the standby server, see Common Operations and Configuration > Common HA System Operations > Manual Switchover Between Active and Standby Servers in the Maintenance Guide.
- Change the owner directory of the self-defined directory (for example, /log/for/oracle/) to oracle. The self-defined directory must exist.
# chown -R oracle:dba /log/for/oracle/
- Ensure that you can open the directory using the oracle account, and has read and write permissions. If not, run the following command:
# chmod 700 /log/for/oracle/ # chmod 755 /log/for/ # chmod 755 /log/
- Switch to the oracle user and run the following commands in SQLPLUS:
# su - oracle $ sqlplus / as sysdba > alter system set log_archive_duplex_dest='/log/for/oracle/' scope=both;
- Check the result.
> archive log list
If the Archive destination field displays as /log/for/oracle/, the setting is successful.