AutoUpgrade New Features: A Very Easy Way To Generate A Config File

I use AutoUpgrade everyday. Wake me up in the middle of the night and I can write one for you in the dark.

… But it might not be the case for everyone.

So, here’a quick way to generate an AutoUpgrade config file.

Auto Config

  1. Set the environment to the Oracle Database you want to patch or upgrade:
    $ env | grep ORA
    ORACLE_SID=UPGR
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/19
    
  2. Call AutoUpgrade with -auto_config parameter:
    java -jar autoupgrade.jar -auto_config
    
    • You can also specify the database using the -sid <mydb> parameter.
  3. AutoUpgrade creates a sample config file named auto_config.cfg.
    • It is a basic config file with the most essential parameters already filled out from the environment, like sid, source_home and logging directories.
    • If you have multiple candidate Oracle homes, AutoUpgrade adds all of them as a comment, and you can easily select the one you want
      #upg1.target_home=/u01/app/oracle/product/21
      #upg1.target_home=/u01/app/oracle/product/23
      
    • All other parameters are added as comments with a description on their usage. You can uncomment those that you need.
  4. Use AutoUpgrade to patch or upgrade your Oracle Database.

Final Words

If you need a more elaborate config file, you can also try MarcusAutoUpgrade Composer.

Happy AutoUpgrading!

2 thoughts on “AutoUpgrade New Features: A Very Easy Way To Generate A Config File

  1. Hi Daniel,

    I tried the auto_config feature for a 12.2 environment on Windows. Even though I set ORACLE_SID, ORACLE_BASE and ORACLE_HOME correctly, running java -jar autoupgrade.jar -auto_config gave “AutoUpgrade autoconfig is unable to determine Oracle SID automatically”. The auto_config.cfg was still created but with generic content and not fitting for the actual current environment. Same happened with or without setting the -sid parameter, too.

    Is this a problem in Windows or am I maybe missing something? I haven’t had the opportunity to test on Linux yet.

    Best regards,

    Susanne

    Like

Leave a comment