As we are reusing the Production server, we have to Shutdown the Database and remove it from the OraTab:
DatabaseName: orcl
$Asset=Get-PPDMassets -type ORACLE_DATABASE -filter 'name eq "orcl"'
$Asset
# Note you can also add the Server name if you have multiple DB Assets with te same Name...
# $Asset=Get-PPDMassets -type ORACLE_DATABASE -filter 'details.database.clusterName eq "oracle01.demo.local" and name eq "orcl"'
we will need the oracle Credenitials from Lesson 5.1 If you fva enot done, follow te instructions to create Create Oracle Credentials
If you have created the Credentials but the are not scoped to a Variable, do
$OraCreds=Get-PPDMcredentials -filter 'name eq "oracle"'
To get all Copies of an asset, or use custom filters, use Get-PPDMassetcopies
$Asset | Get-PPDMassetcopies | ft
$copyObject=$Asset | Get-PPDMlatest_copies
$OraHost=Get-PPDMhosts -type APP_HOST -filter 'name eq "oracle01.demo.local"'
$Parameter = @{
'copyobject' = $CopyObject
'appServerID' = $Asset.details.database.appServerId
'HostID' = $OraHost.id
'crossCheckBackup' = $true
'OraCredObject' = $OraCreds
'targetSid' = "orcl"
'targetInstallLocation' = "/opt/oracle/product/18c/dbhomeXE"
}
Restore-PPDMOracle_OIM_copies @Parameter
Get-PPDMactivities -PredefinedFilter PROTECTION_JOBS -pageSize 5
Once you identified you activity, do
(Get-PPDMactivities -ID <your activity id> ).steps
you may want to repeat the Command or create a loop that monitors the activities ( will be handled in an Advanced Session later)
To view the Restored Copy State (Instant Access Session), do
Get-PPDMexported_copies
You can modify the exported copy expiration using
Get-PPDMexported_copies | Set-PPDMexported_copies -days 6
Get-PPDMexported_copies | Remove-PPDMexported_copies
Get-PPDMactivities <task from remove job>
«Module 5 Lesson 4 This Concludes Module 5 Lesson 5 Module 5 Lesson 3»