Wednesday, 28 December 2016

How to login sudo user in linux

1) sudo -i -u

exp: sudo -i -u oracle

or

2) sudo -su

exp: sudo -su oracle


Difference between Weblogic Production and Development Mode

Development mode:
  1. The default JDK for development domain is SunHOTSPOT.
  2. Admin Server uses an automatically created boot.properties during startup
  3. The debugFlag which is used to start the WebLogic Workshop Debugger is enabled.
  4. You can use the demonstration digital certificates and the demonstration keystores provided by the WebLogic Server security services. With these certificates, you can design your application to work within environments secured by SSL. For more information about managing security, see "Configuring SSL" in Securing WebLogic Server at the following URL: http://download.oracle.com/docs/cd/E13222_01/wls/docs90/secmanage/ssl.html
  5. WebLogic Server instances can automatically deploy and update applications that reside in the domain_name/autodeploy directory (where domain_name is the name of a domain).It is recommended that this method be used only in a single-server development environment.For more information, see "Auto-Deploying Applications in Development Domains" in Deploying Applications to WebLogic Server at the following URL: http://download.oracle.com/docs/cd/E13222_01/wls/docs90/deployment/deploy.html#autodeploy.
  6. When you start a server, the server automatically renames (rotates) its local server log file as server-name.log.n. For the remainder of the server session, the server rotates its local log file whenever the size of the file reaches 500 kilobytes.

Production mode:

  1. The default JDK for production domain is JRockit
  2. If you use the demo certificates for SSL a warning is displayed
  3. Admin Server prompts for username and password during startup
  4. The default maximum capacity for JDBC Datasource is 25
  5. The debugFlag which is used to start the WebLogic Workshop Debugger is disabled.
  6. The auto-deployment feature is disabled, so you must use the WebLogic Server Administration Console, the WebLogic DeployerTOOL, or the WebLogic Scripting Tool (WLST)
  7. A server rotates its local log file after the size of the file reaches 5000 kilobytes. When the server is configured for production mode, by default, all versions of the log files are retained. Administrators may want to customize the number 

How to Change Weblogic Domain MODE to Production and Development

How to Change Weblogic Domain MODE to Production and Development

Last week i experienced a little task to change the "Production mode" settings to TRUE in weblogic domain. Setting up the mode to true was easy and straight forward but a little trick comes where for some reasons we had to rollback that change to test some issues.

If you want to know what are the differences between the two modes check this post

To configure all servers in a domain to run in production mode:
  1. Login to Weblogic Console
  2. In the left pane of the WebLogic Console, under Domain Structure, select the domain name.
  3. Select Configuration > General and select the Production Mode checkBOX.
  4. Click Save, and then, to activate these changes, in the Change Center, click Activate Changes.
  5. Start and stop any servers that are currently running.

You can see the settings on the following screen shot after making change you should be able to see the following messages in log files.



    Reminder: Once the mode set to PRODUCTION you cannot change it from Weblogic Console

    So here are the steps to configure all servers in a domain back to development mode. Weblogic server stores its information in a configuration file.

    1. Stop the servers running in a domain.
    2. Open the config.xml file location under MIDDLEWARE_HOME/domains/domain_name/config
    3. Change the production-mode entry to false and save the file and exit
    4. Start all servers you should be able to see the following message on console.
     
      P.S  you can also set the value PRODUCTION_MODE to true or false in setDomainEnv.sh file but if you want to backout the change you need to change the config.xml file

      Monday, 19 December 2016

      Weblogic 12c Patset oracle support url


      Weblogic 12c Patset oracle support url:

      https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=196802839970007&parent=SrDetailText&sourceId=3-13735269988&id=1470197.1&_afrWindowMode=0&_adf.ctrl-state=1dd36srce2_89

      https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=164943360603461&parent=DOCUMENT&sourceId=2194543.1&id=2203916.1&_afrWindowMode=0&_adf.ctrl-state=wt3il02qi_53#babhicfj

      Tuesday, 13 December 2016

      Apply one-off patch using opatch utility

      Apply one-off patch using opatch utility#

      1. Copy the patch on to /u9000/soa_soasuite_shared/source/ and unzip the patch
      unzip p16199894_111170_Generic.zip
      
      2. Set Environment Variables, such 
      as the Home to be patched and the PATH 

      export ORACLE_HOME=/u9000/app/oracle/product/fmw/oracle_common
      export PATH=$PATH:$ORACLE_HOME/OPatch
      which opatch
      
      
      3. Verify the existing patches to the Oracle Home by issuing the below 
      command before and after patching. 

      opatch lsinventory
      
      4. Change the Directory to he PATCH_TOP and apply 
      patches to the Oracle Home by issuing the below command 

      cd /u9000/soa_soasuite_shared/source/16199894
      opatch apply
      
      
      

      or

      ../../OPatch/opatch apply

      Upgrade Oracle Forms and Reports JDK to match with Weblogic Server JDK#

      1. Shutdown all the Service on the Server 
      
      
      2. Move the Existing Oracle Forms and Reports JDK to a different name 
      mv /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk /u9000/app/oracle/product/jdk1.7.0_25/old_java
      
      3. Copy the Weblogic JDK to the Oracle Forms and Reports Home 
      cp -rp /u9000/app/oracle/product/jdk1.7.0_25 /u9000/app/oracle/product/fmw/Oracle_FRHome1
      mv /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk1.7.0_25 /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk
      
      
      4. Restart the Services on the Server 

      Sunday, 4 December 2016

      JDK UPGRADE for weblogic 12.1.1.0.12

      JDK UPGRADE for weblogic 12.1.1.0.12 :

      1. Stop complete weblogic domain including Admin and managed server.
      2. Take backup of below mentioned files before any change.


      $ORACLE_HOME/oracle_common/common/bin/commEnv.sh
      $ORACLE_HOME/wlserver/.product.properties
      $ORACLE_HOME/utils/uninstall.sh
      $DOMAIN_HOME/bin/setDomainEnv.sh
      $DOMAIN_HOME/nodemanager/nodemanager.properties


      3.Download jdk1.7.0_101(jdk-7u101-linux-x64.tar) from oracle support.


      4.Replace path from /u9000/app/oracle/product/jdk1.7.0_25 to new path /u9000/app/oracle/product/jdk1.7.0_101 in below files.


      $ORACLE_HOME/oracle_common/common/bin/commEnv.sh
      $ORACLE_HOME/wlserver/.product.properties
      $ORACLE_HOME/utils/uninstall.sh
      $DOMAIN_HOME/bin/setDomainEnv.sh
      $DOMAIN_HOME/nodemanager/nodemanager.properties


      5.Restart all weblogic services and verify new jdk path by command "ps -ef|grep java"

      while restarting if you get any issue with SSL, then we need to copy cacerts file from old jdk to new jdk and restart the all servcies.

      ROLLBACK STEPS:
      #
      1.Stop all weblogic services.
      2.Restore backup of JDK directory.
      3.Restore the below files which has been backed up before upgrade.
      $ORACLE_HOME/oracle_common/common/bin/commEnv.sh
      $ORACLE_HOME/wlserver/.product.properties
      $ORACLE_HOME/utils/uninstall.sh
      $DOMAIN_HOME/bin/setDomainEnv.sh
      $DOMAIN_HOME/nodemanager/nodemanager.properties
      4.Restart all services.
      --------------------------------------------------------------------------------------------------------------------
      Upgrade Oracle Forms and Reports JDK to match with Weblogic Server JDK#

      1. Shutdown all the Service on the Server
      2. Move the Existing Oracle Forms and Reports JDK to a different name
      mv /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk /u9000/app/oracle/product/jdk1.7.0_25/old_java
      3. Copy the Weblogic JDK to the Oracle Forms and Reports Home
      cp -rp /u9000/app/oracle/product/jdk1.7.0_25 /u9000/app/oracle/product/fmw/Oracle_FRHome1
      mv /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk1.7.0_25 /u9000/app/oracle/product/fmw/Oracle_FRHome1/jdk
      4. Restart the Services on the Server