Thursday, September 17, 2020

 We installed a Fusion Middleware report and Forms 12.2.1.2.0 on a Linux Server.

This was a single node Reports and Forms servers.
After disabling the Non SSL Listen Port, we get below error in logs while starting the Managed Server with only SSL ports enabled.

####<Oct 27, 2017, 2:38:23,265 PM CEST> <Info> <Deployer> <host01.example.com> <WLS_FORMS> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <728708fe-00a1-4078-bb31-f12fb2c6beae-00000030> <1509107903265> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-149060> <Module dms.war of application DMS Application [Version=12.2.1.1.0] successfully transitioned from STATE_ACTIVE to STATE_ADMIN on server WLS_FORMS.>
####<Oct 27, 2017, 2:38:23,765 PM CEST> <Critical> <WebLogicServer> <host01.example.com> <WLS_FORMS> <main> <<WLS Kernel>> <> <728708fe-00a1-4078-bb31-f12fb2c6beae-00000031> <1509107903765> <[severity-value: 4] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000386> <Server subsystem failed. Reason: A MultiException has 4 exceptions. They are:
1. java.lang.AssertionError: No replication server channel for WLS_FORMS
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.cluster.replication.ReplicationService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.cluster.singleton.SingletonServicesBatchManager errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.cluster.singleton.SingletonServicesBatchManager
 
A MultiException has 4 exceptions. They are:
1. java.lang.AssertionError: No replication server channel for WLS_FORMS
2. java.lang.IllegalStateException: Unable to perform operation: post construct on weblogic.cluster.replication.ReplicationService
3. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of weblogic.cluster.singleton.SingletonServicesBatchManager errors were found
4. java.lang.IllegalStateException: Unable to perform operation: resolve on weblogic.cluster.singleton.SingletonServicesBatchManager
at org.jvnet.hk2.internal.Collector.throwIfErrors(Collector.java:89)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:249)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:666)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused By: java.lang.AssertionError: No replication server channel for WLS_FORMS
at weblogic.cluster.replication.ReplicationManagerServerRef.initialize(ReplicationManagerServerRef.java:128)
at weblogic.cluster.replication.ReplicationManagerServerRef.<clinit>(ReplicationManagerServerRef.java:84)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at weblogic.rmi.internal.BasicRuntimeDescriptor.getServerReferenceClass(BasicRuntimeDescriptor.java:496)
at weblogic.rmi.internal.BasicRuntimeDescriptor.createServerReference(BasicRuntimeDescriptor.java:452)
at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:193)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:173)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:107)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:90)
at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:252)
at weblogic.cluster.replication.ReplicationServicesImplBase.exportSelf(ReplicationServicesImplBase.java:17)
at weblogic.cluster.replication.ReplicationManager.startService(ReplicationManager.java:305)
at weblogic.cluster.replication.ReplicationService.start(ReplicationService.java:46)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1262)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:332)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:693)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:78)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:211)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:234)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:357)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:232)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2020)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:666)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
>
####<Oct 27, 2017, 2:38:23,815 PM CEST> <Notice> <WebLogicServer> <host01.example.com> <WLS_FORMS> <main> <<WLS Kernel>> <> <728708fe-00a1-4078-bb31-f12fb2c6beae-00000031> <1509107903815> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000365> <Server state changed to FAILED.>

Even if no cluster is used, the default Reports and Forms domain configuration creates a WebLogic Cluster.

To solve “Servers do not have a common channel to communicate over” errors do the following steps as administrator

  1. Login into the Administration Console
  2. Expand the Environment tab and navigate to Clusters
  3. Select the and click ‘Replication’ subtab in the Configuration TAB
  4. Find Replication Channel, check box beside “Secure Replication Enabled” (to set it as true)
  5. Save
  6. Rerun the steps 2 to 5 for all clusters
  7. Activate the changes
  8. Restart the full WebLogic domain

or in WLST:
Start wlst.sh and connect to the WebLogic Domain

connect('user','password','t3s://host01.example.com:7002')
 
startEdit()
 
cd('/Clusters/cluster_forms')
cmo.setClusterType('none')
cmo.setPersistSessionsOnShutdown(false)
cmo.setReplicationChannel('ReplicationChannel')
cmo.setSecureReplicationEnabled(true)
 
save()
activate()

Rerun the same for the reports_cluster

Once done restart the full WebLogic Domain


https://blog.dbi-services.com/new-installed-fusion-middleware-12c-reports-or-forms-weblogic-servers-fails-to-start-after-configuring-ssl/

Tuesday, May 5, 2020

How to add minutes to date in excel sheet




if you want to add one minute to cell, use this formula:=A2+1/1440, if you want to add one second to cell, use this formula: =A2+1/86400.



How To Quickly Add Hours/Minutes/Second To Date And Time In Excel?

For instance, you have a list of dates and times in a worksheet, and now you want to add the same hours/minutes/seconds to these cells which are mixed with date and time. You can use formulas to solve this task, but here I can tell you another trick to quickly attain this goal in Excel.

 Using Formulas To Add Hours/Minutes/Seconds To Datetime

In Excel, generally, you may use the formulas to add hours, minutes or seconds to the datetime cells.
1. Select the cell next to the first cell of the datetime list, and then type this formula =A2+1/24 into it, press Enter key and drag the auto fill handle over the cell needed this formula. See screenshots.
doc add hour minute second 2
doc add hour minute second 3
2. Then right click to select Format Cells from the context menu. And in the Format Cells dialog, under Number tab, select Custom from the Category list, then typem/d/yyyy hh:mm:ss into the Type textbox. See screenshots:
doc add hour minute second 4doc add hour minute second 5
3. Click OK. Then you can see each date and time cell is added one hour.
doc add hour minute second 6
Notes:
1. If you want to add one minute to cell, use this formula:=A2+1/1440, if you want to add one second to cell, use this formula: =A2+1/86400.
2. In above formulas, 1 indicates to add one hour or one minute or one second, you can change it as you need.
3. If you want to add hours, minutes and second to a date simultaneously, you can use this formula =A2+TIME(23,23,34), this means to add 23 hours, 23 minutes and 34 seconds to a date cell. But with this formula, you cannot add time over 24 hours.

Easily Add Days/Years/Month/Hours/Minutes/Seconds To A Datetime In Excel

Supposing you have a date time format data in a cell, and now you need to add a number of days, years, months, hours, minutes, or seconds to this date. Normally, using formula is the first method for all Excel users, but it’s hard to remember all formulas. With Kutools for Excel’s Date & Time Helper utility, you can easily add days, years, months, or hours, minutes or seconds to a date time, moreover, you can caculate the date difference, or the age based on a given birthday without remembering the formula at all. Click for full-featured free trial in 30 days!
doc add hour minute second
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.

 Using A Handy Tool To Add Hours/Minutes/Seconds To Datetime

With above method is very easy, but here I can introduce another easier way to you, do you want to have a try?
To free install Kutools for Excel, you can use the powerful utility -- Date & Time helper to add hours, minutes or seconds without remembering.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 
After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)
1. Select a cell to put the adding result, and click Kutools > Formula Helper > Date & Time helper. See screenshot:
doc add time 1
2. In the Date & Time Helper dialog, check Add option, click doc select button 1 to select a cell that you use to add time,  then type the number of hours, minutes and seconds you want to add in the Enter number or select cells which contain values you want to add section, you can preview the adding result in Result section See screenshot:
doc add hour minute second 8
3. Click Ok, then drag the autofill handle over cells needed the formula, see screenshot:
doc add hour minute second 9
doc kutools date time helper 4


The Best Office Productivity Tools

Kutools For Excel Solves Most Of Your Problems, And Increases Your Productivity By 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple SheetsBatch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed Interface To Office, And Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom

Thursday, April 23, 2020

ORA-00060 Single-Resource Deadlock Occurs on Autonomous Transaction (Doc ID 1511700.1)

n this Document
Purpose
Scope
Details
 What is an Autonomous Transaction?
 Characteristics of Autonomous Transactions
 Autonomous Transactions and Deadlocks
  Example of Autonomous Deadlock
  ORA-60 Deadlock Trace File
References

APPLIES TO:

Oracle Database - Personal Edition - Version 8.1.7.0 and later
Oracle Database - Enterprise Edition - Version 8.1.7.0 and later
PL/SQL - Version 8.1.7.0 and later
Oracle Database - Standard Edition - Version 8.1.7.0 and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.

PURPOSE

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
 This document explains how deadlocks may occur with autonomous transactions

SCOPE

 This is article is intended for DBA's, Application Users and Support Engineers using autonomous transactions

DETAILS

What is an Autonomous Transaction?

An autonomous transaction is an independent transaction that can be called from within another transaction (called the main transaction). The autonomous transaction allows you to suspend the calling (main) transaction and then start the autonomous transaction to perform SQL operations and commit or undo them completely independently. Once the autonomous transaction is complete, you can then resume the calling transaction. An autonomous transaction is totally independent of the main transaction that called it. It is useful for actions that must be performed independently, regardless of whether the calling transaction commits or rolls back. For example, in a stock purchase transaction, you may want to commit customer data regardless of whether the overall stock purchase goes through.

Characteristics of Autonomous Transactions

Autonomous transactions have the following characteristics:
  • The autonomous transaction does not see uncommitted changes made by the main transaction and does not share locks or resources with the main transaction.
  • Changes in an autonomous transaction are visible to other transactions upon commit of the autonomous transactions. Thus, users can access the updated information without having to wait for the main transaction to commit.
  • Autonomous transactions can start other autonomous transactions. There are no limits, other than resource limits, on how many levels of autonomous transactions can be called.

Autonomous Transactions and Deadlocks

As stated above, the parent and child transactions are independent of each other and therefore act as separate transactional entities. Consequently, all the rules regarding locking between two transactions apply. If a parent transaction locks a resource needed by the child transaction then a deadlock situation occurs because the main transaction is momentarily suspended while the child autonomous transaction is active. The child transaction is in turn waiting for the main transaction to free the locked resource. We therefore have a situation where the parent transaction cannot progress until the autonomous transaction completes and the autonomous transaction is waiting for the parent transaction to free the locked resource. In this case, the offending statement will automatically be rolled back with an "ORA-00060: deadlock detected while waiting for resource" error raised within the child and a trace file is created as for all ORA-60 deadlocks. As there is actually only one session involved in the deadlock, the deadlock graph in the trace file contains a single-resource graph as seen below in the ORA-60 Deadlock Trace File
The only solution in this case to rewrite the code in order to avoid deadlock situations. Try to design your code such that two independent transactions do not need to accessing the same lock at the same time or if possible  commit or rollback a transaction before and after the autonomous transaction. Another possibility is to add exception handling routines to the PL/SQL code. For more information on PL/SQL error handling see:
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)
11 PL/SQL Error Handling

 Example of Autonomous Deadlock

 -- Login to user/password , create table and populate --
sqlplus user/password
CREATE TABLE test_emp AS SELECT * FROM emp;
INSERT INTO test_emp
VALUES      (9999,
             '<User>',
             99,
             99,
             SYSDATE,
             10000,
             0,
             10);

COMMIT;

-- Create Procedure using autonomous transaction -- 
CREATE OR replace PROCEDURE Proc_a
AS
  PRAGMA autonomous_transaction;
BEGIN
    UPDATE test_emp
    SET    sal = sal + 5000
    WHERE  empno = 9999;

    COMMIT;
END;
/

-- Create Main Procedure --
CREATE OR REPLACE PROCEDURE Main_p
AS
BEGIN
    UPDATE test_emp
    SET    comm = 5000
    WHERE  empno = 9999;

    proc_a;

    COMMIT;
END;
/

-- Call Main Procedure --
SQL> exec main_p
BEGIN main_p; END;

*
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
ORA-06512: at "PROC_A", line 5
ORA-06512: at "MAIN_P", line 4
ORA-06512: at line 1 


 ORA-60 Deadlock Trace File

As with other occurrences of ORA-60 deadlocks, a trace file is created that includes a deadlock graph and information on the session.
With an autonomous transaction, there is only one session involved and the deadlock graph contains only one row where both blocker and waiter are the same session as shown in the following example:
Autonomous_deadlock_graph
As well as the deadlock graph, the trace file contains PROCESS STATE information. The information below shows different sections of the trace file that may be of interest:
Deadlock Trace file
Self deadlock can occur for a number of diverse reasons. Usually the deadlock is a standard application deadlock introduced in a single session by some means. However if you encounter such a deadlock that does not match this profile then the recommended action is to consider create a Service Request with Support having collected trace diagnostics using the following article:

Document 1552194.1 ORA-00060 Deadlock Graph Not Matching any Examples: Suggested Next Steps

Tuesday, April 21, 2020

Retrieve Apps password in R12 or Forgot Apps Password in R12

Retrieve Apps password in R12 or Forgot Apps Password in R12


Steps to retrieve forgotten apps password in R12

Step 1 : login to DB-Node

sqlplus / as sysdba

STEP 2 : Create Function for to decrypt the encrypted password


SQL> create FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
/

Function created.

STEP 3 : (Query for password)


SQL> select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME='GUEST';


Output

ENCRYPTED_FOUNDATION_PASSWORD
--------------------------------------------------------------------------------
ZG37E123746712BDB2D99E048FE44AE662F2713E2EDB443391BABA0414CADDB7A2E6DD45BBAFA7270A663E5EEBA837F5548A

STEP 4:

SELECT apps.decrypt_pin_func('GUEST/ORACLE','ZG37E123746712BDB2D99E048FE44AE662F2713E2EDB443391BABA0414CADDB7A2E6DD45BBAFA7270A663E5EEBA837F5548A') from dual;




Output

APPS.DECRYPT_PIN_FUNC('GUEST/ORACLE','ZG37E123746712BDB2D99E048FE44AE662F2713E2EDB443391BABA0414CADDB7A2E6DD45BBAFA7270A663E5EEBA837F5548A')
--------------------------------------------------------------------------------
DEMONSTRATE

STEP 5: (Test apps password)

SQL> conn apps/DEMONSTRATE;
Connected.

CHEERS :)

Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)

  Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...