Open winningpanthers opened 7 years ago
Are you talking about an existing DB or do you need to do it after DB creation. you can use an exec and subscribe to opatch
i installed binaries, applied opatch upgrade, and then 2 opatches and then created DB. and noticed the DB patches were showing up with opatch lsinventory but not on the newly created DB. Not sure if this is working as expected?
strange , you should suspect that opatch also updates the catalog scripts and starter db's. maybe it only works with a dbt template.
that may be it. We are adding this to work around the issue . exec { 'Datapatch': command => "${whatever_directory}/datapatch", refreshonly => true, Oradb::Opatchupgrade { notify => Exec['Datapatch'], }
If you are building a 12.1 database in a patched Oracle Home, Oracle doesn't run datapatch after the database build. You have to run it separately. This feature is fixed in 12.2.
interesting, didn't know that. also in case of a dbt template
thanks
Here is the Oracle Support note 12.1:DBCA(Database Creation) does not execute “datapatch” (Doc ID 2084676.1)
Had to add similar extra run of datapatch after database build for 12.1 with puppet. As mentioned it is fixed in 12.2 build.
Changes for OEM if you are using it to deploy databases with Cloud Control. Datapatch is not Executed on Databases Created from Cloud Control (Doc ID 2158546.1)
so this command => "${whatever_directory}/datapatch"
will it detect if it is already applied, if not how can I detect it, plus do you need to provide db connect info
is the question around how to make this idempotent?
indeed
onlyif => "echo SELECT patch_id, version, status, bundle_id, bundle_series FROM dba_registry_sqlpatch; | sqlplus / as sysdba | grep
ah ok, that is bad. I try to stay away for connecting to the DB, then I need to read dbora , set all the variables , login , check the patch. Already doing something like this for RCU prefix check.
We can do something like that. can you run this as a DBA user? and do you have a working example of what you execute in sqlplus
I think this can be run as a dba user. I have to check.
On Wed, Aug 9, 2017 at 3:41 PM, Edwin Biemond notifications@github.com wrote:
ah ok, that is bad. I try to stay away for connecting to the DB, then I need to read dbora , set all the variables , login , check the patch. Already doing something like this for RCU prefix check.
We can do something like that. can you run this as a DBA user? and do you have a working example of what you execute in sqlplus
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biemond/biemond-oradb/issues/181#issuecomment-321360402, or mute the thread https://github.com/notifications/unsubscribe-auth/AS0hGG_ElMvwp1yxYp6rXIe4CbT2HN-Hks5sWgtPgaJpZM4Os2OT .
sorry, thanks. before I close this. Is there a place where I can hardcode this datapatch command to be run right after opatch? any advise how do I work around this issue?