The command Start-OracleLogTruncationJob
lets you start a log truncation job for a specified Oracle instance on a protected server.
Usage
The usage for the command is as follows:
Start-OracleLogTruncationJob -core [host name] -user [user name] -password [password] -protectedserver [name | IP address] -instancename [instance SID] -deletionpolicy [automatic | keepnewest | keepspecificnumber] -retentionduration [duration value] -retentionunit [day | week | month | year] -numberoffiles [number of archive files to create]
Command Options
The following table describes the options available for the Start-OracleLogTruncationJob
command:
Option | Description |
---|---|
-? |
Display this help message. |
-core |
Optional. Remote Core host machine IP address (with an optional port number). By default, the connection is made to the Core installed on the local machine. |
-user |
Optional. The user name for the remote Core host machine. If you specify a user name, you must also provide a password. If none is provided, then the credentials for the logged-on user are used. |
-password |
Optional. The password to the remote Core host machine. If you specify a password, you also have to provide a user name. If none is provided, then the credentials for the logged-on user are used. |
-protectedserver |
Use this option to specify the protected machine for which you want to enable Oracle log truncation as a nightly job. |
-instancename |
The name of the Oracle instance for which you want to start log truncation. |
-deletionpolicy |
Optional. This option must be represented by one of the following values:
|
-retentionduration |
Optional. This value determines the length of time to keep a log before truncating and is constrained to positive integer values. If using the "keepnewest" value of the -deletionpolicy option, a retention duration value is required. |
-retentionunit |
Optional. This option identifies the time unit for the -retentionduration option. It must be represented by one of the following values:
|
-numberoffiles |
Optional. This option sets the number of recent archive log files to keep. If using the "keepspecificnumber" value of the -deletionpolicy option, a number of files value is required. |
Examples:
Start the Oracle log truncation job for the ORCL instance on a specified protected server:
>Start-OracleLogTruncationJob -core 10.10.127.42 -user admin -password 676df#df -protectedserver 10.10.34.88 -instancename ORCL
Start the Oracle log truncation job for the ORCL instance on a specified protected server and configure the deletion policy as "keepnewest" with the logs kept for 10 days:
>Start-OracleLogTruncationJob -protectedserver 10.10.34.88 -instancename ORCL -deletionpolicy keepnewest -retentionduration 10 -retentionunit day