How to Install SQL Developer on Linux Mint

No comments
In this post I am going to share the steps for installation of SQL Developer on Linux Mint OS or Ubuntu.

SQL developer will require to jdk as pre-requisites.

Steps:

1. Install jdk 8 or above. 

sudo apt-get install openjdk-8-jdk

It will be installed in below folder

/usr/lib/jvm/java-8-openjdk-amd64

2. SQL Developer which we wil download from Oracle Website would in rpm format. I am going to use alien tool to covert it in debian(deb) format.

sudo apt-get install -y alien

3. Convert the SQL developer rpm to debain format.

himanshu@himanshu-ThinkPad-T430 ~/Downloads $ ls -ltr sqldeveloper-19.2.1.247.2212.noarch.rpm
-rw-rw-r-- 1 himanshu himanshu 420128668 Sep 18 23:46 sqldeveloper-19.2.1.247.2212.noarch.rpm


himanshu@himanshu-ThinkPad-T430 ~/Downloads $ sudo alien sqldeveloper-19.2.1.247.2212.noarch.rpm

Once done we can see below deb file.

himanshu@himanshu-ThinkPad-T430 ~/Downloads $ ls -ltr sqldeveloper_19.2.1-248.2212_all.deb

-rw-r--r-- 1 root root 416469574 Sep 19 00:02 sqldeveloper_19.2.1-248.2212_all.deb


4. Install SQL Developer package now.

You can user GUI to install the package 



or 

Run below command on terminal

himanshu@himanshu-ThinkPad-T430 ~/Downloads $ sudo dpkg -i sqldeveloper_19.2.1-248.2212_all.deb
Selecting previously unselected package sqldeveloper.
(Reading database ... 256436 files and directories currently installed.)
Preparing to unpack sqldeveloper_19.2.1-248.2212_all.deb ...
Unpacking sqldeveloper (19.2.1-248.2212) ...
Setting up sqldeveloper (19.2.1-248.2212) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...


5. Open SQL Developer, First time it will ask for jdk path, please provide same path as done in step 1


himanshu@himanshu-ThinkPad-T430 /usr/local/bin $ ls -ltr sqldeveloper
-rwxr-xr-x 1 root root 34 Sep  5 03:58 sqldeveloper


himanshu@himanshu-ThinkPad-T430 /usr/local/bin $ ./sqldeveloper

 Oracle SQL Developer
 Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.

Default JDK not found
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/himanshu/.sqldeveloper/19.2.1/product.conf
/usr/lib/jvm/java-8-openjdk-amd64



No comments :

Post a Comment

How to create free Oracle Cloud Account

No comments
Oracle provides a free oracle cloud account for 30 days or 300$ free credit usage.
Its quite easy to register for a free account and start using it.

Steps:


1. Open link https://cloud.oracle.com





2. Click on Try for free  and we will see below screen. Provide the required information as requested. I am not sharing any personal info in these screenshots.





3. 


4.  We will need to verify mobile number through OTP received.




5.  Then next steps will be to enter payment details which is mandatory.  Your card will be charged for a specific amount and it will be reversed back after verification.






6. Once payment method is successfully verified, you will be logged into portal. It take 15 minutes to activate the account. We will need to follow steps further as given in mail. It will have required access details.




7. Once you receive credentials via mail, Please login and you are all set to use your Oracle Cloud account.


No comments :

Post a Comment

How to change IP address of an Oracle EBS Environment

No comments

We can follow below steps to change IP address in Oracle Application/EBS environment

Steps:

1. Change the IP Address in the Server.

2. Verify the current ip address setup in the Oracle Applications environment. Connect as apps user into SQL*Plus and run:

select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from fnd_nodes where node_name = upper('&hostname');

3. Run the following command to remove the old ip address from the Oracle Applications tables:

perl $AD_TOP/bin/adgentns.pl appspass=apps contextfile=$APPL_TOP/admin/$CONTEXT_NAME.xml -removeserver 

replace $CONTEXT_NAME for the context file name under the $APPL_TOP/admin directory;

then connect to SQL*Plus as apps user and run:

begin
FND_NET_SERVICES.remove_server('&SID', '&HOSTNAME');
end;
/
commit;
/


replace by the SID of the environment and by the hostname in the environment. Both must be entered in upper case.

4. Run autoconfig to populate the values using the new IP Address.

5. Confirm the ip address has been changed to the new value changed in the step 1:

select NODE_NAME, STATUS, NODE_MODE, NODE_ID,SERVER_ADDRESS, HOST, DOMAIN, WEBHOST, VIRTUAL_IP from fnd_nodes where node_name = upper('&hostname');

No comments :

Post a Comment

How to enable USB in VirtualBox

No comments
In this post we would be discussing how to enable inside a machine built on VirtualBox. By default the USB functionality will not work.

Steps to enable USB


1)Download the Extension Pack from virtualbox link given below.  
Link:https://www.virtualbox.org/wiki/Downloads

2) Install VirtualBox Extension
    a) Open Virtual Box
    b) Go to File>Preferences
    

   c) A new window will open and we need to select extension from left tab.
     

  d) Click on "+" sign and browse/select the extension pack which was downloaded.

   e) Click on install and accept license agreement. It will prompt for sudo password. Once done          
       installation would be  done.



  f) User running VirtualBox must belong to the vboxuser group.

    

  g) Now Restart you system and start virtual machine and mount USB device from the list.

      We can now easily use the USB device as per need.


No comments :

Post a Comment

How to check Clock synchronization between cluster nodes in RAC

2 comments
We can use below to check the clock/time synchronization between nodes in RAC cluster. The crs alert log will also point out thee synchronization issue between the nodes.


Script:

cd $GRID_HOME/bin 
./cluvfy comp clocksync -n all

Output:

Verifying Clock Synchronization across the cluster nodes
Oracle Clusterware is installed on all nodes.
CTSS resource check passed
Query of CTSS for time offset passed

CTSS is in Observer state. Switching over to clock synchronization checks using NTP


Starting Clock synchronization checks using Network Time Protocol(NTP)...
NTP configuration file "/etc/ntp.conf" existence check passed
Liveness check passed for "ntpd"
Check for NTP daemon or service alive passed on all nodes
Check of common NTP Time Server passed
Clock time offset check passed

Clock synchronization check using Network Time Protocol(NTP) passed


Oracle Cluster Time Synchronization Services check passed

Verification of Clock Synchronization across the cluster nodes was successful.



Check whether ctss or ntp is running

crsctl check ctss 

CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
Observer means – Time sync between nodes are taken care by NTP

Active means – Time sync between nodes are taken care by CTSS

2 comments :

Post a Comment

Query to find out the status of Interface Managers

1 comment
We can use below query to check the status for interface managers.

SELECT x.process_type "Name",
  DECODE(
  (SELECT '1' FROM fnd_concurrent_requests cr,
    fnd_concurrent_programs_vl cp,
    fnd_application a WHERE cp.concurrent_program_id = cr.concurrent_program_id
  AND cp.concurrent_program_name                     = x.process_name
  AND cp.application_id                              = a.application_id
  AND a.application_short_name                       = x.process_app_short_name
  AND phase_code                                    != 'C'
  ),'1','Active','Inactive') "Status",
  x.worker_rows "Worker Rows",
  x.timeout_hours "Timeout Hours",
  x.timeout_minutes "Timeout Minutes",
  x.process_hours "Process Interval Hours",
  x.process_minutes "Process Interval Minutes",
  x.process_seconds "Process Interval Seconds"
FROM
  (SELECT mipc.process_code ,
    mipc.process_status ,
    mipc.process_interval ,
    mipc.manager_priority ,
    mipc.worker_priority ,
    mipc.worker_rows ,
    mipc.processing_timeout ,
    mipc.process_name ,
    mipc.process_app_short_name ,
    a.meaning process_type ,
    FLOOR(mipc.process_interval    /3600) process_hours ,
    FLOOR((mipc.process_interval   - (FLOOR(mipc.process_interval/3600) * 3600))/60) process_minutes ,
    (mipc.process_interval         - (FLOOR(mipc.process_interval/3600) * 3600) - (FLOOR((mipc.process_interval - (FLOOR(mipc.process_interval/3600) * 3600))/60) * 60)) process_seconds ,
    FLOOR(mipc.processing_timeout  /3600) timeout_hours ,
    FLOOR((mipc.processing_timeout - FLOOR(mipc.processing_timeout/3600) * 3600)/60) timeout_minutes
  FROM mtl_interface_proc_controls mipc,
    mfg_lookups a
  WHERE a.lookup_type = 'PROCESS_TYPE'
  AND a.lookup_code   = mipc.process_code
  ) x
  -- WHERE x.PROCESS_TYPE = 'Cost Manager' -- uncomment this to display only the cost manager
ORDER BY 1;

1 comment :

Post a Comment

ORA-04023: Object could not be validated or authorized

No comments
While running any queries, or after creating any view,procedures we may start getting ORA-04023 errors.

Error:
ORA-04023: Object could not be validated or authorized

We may also see ORA-00001 errors in  alert log file parallely.

If we have RAC database and then we may see ORA-04023 error only on one of the nodes which would be specific to instance or node

Cause:
This would be due to shared pool corruption.

Solution:

SQL> alter system flush shared_pool;

or bounce the database or specific instance.

If this does not solve the issue, we need to contact Oracle Support for further details.

No comments :

Post a Comment

Installing and Creating Oracle Database 12c on OEL 6.4

No comments
In this post I am going to share the steps for installation off Oracle Database 12c on Oracle Enterprise Linux 6.4.

Software and resources which will be used:

1. Virtual Box 6.0
2. Oracle Enterprise Linux 6.4
3. Oracle Database 12c(12.1.0.2)

Configuration of Virtual Machine:

OS: OEL 6.4
RAM: 5 GB
Hard Disk: 60GB

Oracle Virtual Box installation and Oracle Enterprise Linux steps I will not be sharing here as I have already shared those in my older posts.Please refer link below.

1. Oracle Virtual Box Installation Steps
2. Creating Virtual Machine Steps
3. Installing Oracle Linux Steps
4. Installing Oracle Linux Steps Continued Steps
5. Installing Guest Addition in Machine Steps(Only Guest addition steps needs to be performed from the post).
6. Once the Machine is Prepared Below is the configuration ScreenShot.



















7. We will install pre-requisite RPM's required for Oracle installation as below command. This would be done from root user.
# yum install oracle-rdbms-server-12cR1-preinstall -y

8. Once the rpm installation is done, as OS user with name oracle will be created. Change the password for  oracle user.







9. Add vboxsf group to user oracle. This is optional step. I am doing this step as I will keep by Orace database base software in shared folder between host system.

[root@myprimarydb Desktop]# usermod -aG vboxsf oracle
[root@myprimarydb Desktop]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf),54322(dba)

10. Disable firewall



















11. Edit /etc/selinux/config, here change the parameter SELINUX=disabled
#vi /etc/selinux/config

12. Now set the hostname, and edit /etc/hosts. I will assign IP on eth1 adapter i.e. my Host Only Adapter for hostname.





13. Make sure below values are setup in configuration files.




/etc/security/limits.conf:
---------------
 * hard nofile 65536
 * soft nofile 4096
 * hard nproc 16384
 * soft nproc 2047
 * hard stack 16384
 * soft stack 10240
 
14. Reboot the server.

15. Unzip the database software and execute runInstaller.

drwxr-xr-x. 7 oracle oinstall       4096 Jul  7  2014 database
-rwxr-x---. 1 oracle oinstall 1014530602 May 27 23:14 linuxamd64_12102_database_2of2.zip
-rwxr-x---. 1 oracle oinstall 1673544724 May 27 23:14 linuxamd64_12102_database_1of2.zip


[oracle@ebsoam u02]$ cd database/
[oracle@ebsoam database]$ ls
install  response  rpm  runInstaller  sshsetup  stage  welcome.html
[oracle@ebsoam database]$ ./runInstaller
 

16. I will not mention much about below screenshot as they are self explanatory.

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 7328 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 19999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-05-27_11-22-37PM. Please wait ...

























Run the mentioned script as root user and then click OK to proceed with remaining installation.
 
 




Installation is Done.

No comments :

Post a Comment

How to Cleanup failed EBS R12.2 installation

No comments

If we are trying to  install R12.2 EBS, there may be cases that we end up in error during installation. We need to fix the error and then restart the Rapid wiz from beginning as there is no rapidwiz -restart option available with 12.2.

If the installation fails we need to perform the following steps to clean up a failed installation:


1. Restart the server or make sure to kill ALL oracle and applmgr processes.
2. Backup and then delete all contents(files/folders) from  the /tmp directory.
3. Backup and then delete all contents(files/folders)  from the oraInventory directory.
4. Backup and then delete BEA under installation user $HOME.
5. Backup and then delete all contents(files/folders)  the install directory- Database / Application Base directory
6. Ensure the correct oraInventory is present and run rapidwiz again to start installation.

No comments :

Post a Comment

FND_DIAGNOSTICS Is Invalid In Oracle Apps R12.2

No comments
Error:

FND_DIAGNOSTICS is invalid in EBS 12.2 with 12C database.

When we Compile the object the following error is observed:

Alter package APPS.FND_DIAGNOSTICS compile body;

Warning: Package Body altered with compilation errors.

SQL> show errors;
Errors for PACKAGE BODY APPS.FND_DIAGNOSTICS:

LINE/COL ERROR
-------- -----------------------------------------------------------------
1839/17 PL/SQL: SQL Statement ignored
1839/31 PL/SQL: ORA-00942: table or view does not exist
1841/9 PL/SQL: Statement ignored
1841/14 PLS-00364: loop index variable 'X' use is invalid

Solution:

1. Add grant to DBA_DATAPUMP_JOBS view;
sqlplus / as sysdba
SQL> grant select on dba_datapump_jobs to apps;
SQL> alter package APPS.FND_DIAGNOSTICS compile body;


2. Verify that the FND_DIAGNOSTICS object is valid:


SQL> select object_name,status from dba_objects where object_name like 'FND_DIAGNOSTICS';

No comments :

Post a Comment

ORA-04063: Package Body "APPS.AD_ZD_ADOP" Has Errors when running adop

No comments
While running adop prepare,  the error is encountered on APPS.AD_ZD_ADOP . When checking further the package body is in invalid state.


Error:

When we try to compile manually, we observe below error.


SQL> alter package APPS.AD_ZD_ADOP compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY APPS.AD_ZD_ADOP:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2686/3 PL/SQL: Statement ignored
2686/7 PLS-00201: identifier 'SYS.DBMS_METADATA_UTIL' must be declared


Solution:


1. Connect as sysdba and 
   grant execute on DBMS_METADATA_UTIL to apps;
2. alter package APPS.AD_ZD_ADOP compile body;

The package should be compiled normally now.

No comments :

Post a Comment

Which note pad to use on LinuxMint(Installing Geany)

No comments
 A free and open source product, Geany is available for all desktop platforms such as Windows, Linux, OS X etc.



To Install Geany on Linux Mint use below command

sudo apt-get install geany 

No comments :

Post a Comment

Query to find the Sessions which are generating High Archive Logs

No comments
To find sessions generating lots of redo, we can use below query,


Query:

SELECT s.sid, s.serial#, s.username, s.program,
  si.block_changes
  FROM gv$session s, gv$sess_io si
  WHERE s.sid = si.sid

  ORDER BY 5 desc;

BLOCK_CHANGES indicates how many blocks have been changed by the session. High values indicate a session generating lots of redo.

No comments :

Post a Comment

Force apply patch in R12.2 using ADOP Utility

No comments
If we want to apply a patch again which was earlier applied in Oracle EBS R12.2 then we need to use force apply option.

Syntax:

adop phase=apply patches= options=forceapply

No comments :

Post a Comment

OMS 13c agent installation failed with "The referenced database doesn't contain a valid management Repository."

No comments
OEM 13c installation failed with "The referenced database doesn't contain a valid management Repository."
This is occuring as my previous installation failed due to space issue, so there were database objects already created earlier which needs to be cleaned.

Error:

 "The referenced database doesn't contain a valid management Repository."





Solution :

Properly clean the database before using it again as a OMS database :-


1. Drop sysman related schemas.

DROP USER SYSMAN CASCADE; 

DROP USER SYSMAN_OPSS CASCADE;
DROP USER SYSMAN_MDS CASCADE;
DROP USER SYSMAN_APM CASCADE;
DROP USER SYSMAN_RO CASCADE;

DROP USER SYSMAN_BIPLATFORM CASCADE;
DROP USER SYSMAN_STB CASCADE;
 

2. Remove Synonyms related to sysman accounts :-

DECLARE
  CURSOR l_syn_csr IS
    SELECT 'DROP ' ||
      CASE owner
        WHEN 'PUBLIC'
          THEN 'PUBLIC SYNONYM '
        ELSE 'SYNONYM ' || owner || '.'
      END ||
      synonym_name AS cmd
    FROM
      dba_synonyms
    WHERE
      table_owner IN (
        'SYSMAN',
        'SYSMAN_MDS',
        'MGMT_VIEW',
        'SYSMAN_BIP',
        'SYSMAN_APM',
        'BIP',
        'SYSMAN_OPSS',
        'SYSMAN_RO'
      );
BEGIN
  FOR l_syn_rec IN l_syn_csr LOOP
    BEGIN
      EXECUTE IMMEDIATE l_syn_rec.cmd;
    EXCEPTION
      WHEN OTHERS THEN
        dbms_output.put_line( '===> ' || l_syn_rec.cmd );
        dbms_output.put_line( sqlerrm );
    END;
  END LOOP;
END;
/


3. Removing remaining Objects and tablespaces :-

DROP USER mgmt_view CASCADE;
DROP TABLESPACE mgmt_ecm_depot_ts INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_tablespace   INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
DROP TABLESPACE mgmt_ad4j_ts      INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;


4.  As proper database cleaning using RepManager dropall didn't happen, so we have to clean up the registry details :-

DELETE
  FROM
    schema_version_registry
  WHERE
    (comp_name,owner) IN (
      ('Authorization Policy Manager','SYSMAN_APM'),
      ('Metadata Services','SYSMAN_MDS'),
      ('Oracle Platform Security Services','SYSMAN_OPSS')
    );
commit;


5. Retry with the installation, it should complete successfully.

No comments :

Post a Comment

Running FS_CLONE give error at ADOPValidationUtils.pm

No comments
 When we are running fs_Clone below error is seen.

ERROR:

[UNEXPECTED]Error occurred running "perl /u01/app/applmgr/SAI/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/txkADOPValidations.pl  -contextfile=/u01/app/applmgr/SAI/fs1/inst/apps/SAI_funoracleapps/appl/admin/SAI_funoracleapps.xml -patchctxfile=/u01/app/applmgr/SAI/fs2/inst/apps/SAI_funoracleapps/appl/admin/SAI_funoracleapps.xml -phase=fs_clone -logloc=/u01/app/applmgr/SAI/fs_ne/EBSapps/log/adop/51/20190502_132432/fs_clone/validate/funoracleapps -promptmsg=hide"
    [UNEXPECTED]Error 1 occurred while Executing txkADOPValidation script on funoracleapps

Checking log further below error is noticed.

Use of uninitialized value $result in split at /u01/app/applmgr/SAI/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 1294.
No such file or directory at /u01/app/applmgr/SAI/fs1/EBSapps/appl/au/12.0.0/perl/TXK/ADOPValidationUtils.pm line 230.






Solution:

1) Run below query to verify the patch context file entry is present or not.

select distinct(PATH) from FND_OAM_CONTEXT_FILES where NAME not in ('TEMPLATE','METADATA','config.txt') and CTX_TYPE='A' and (status is null or upper(status) in ('S','F')) and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') = 'patch';

no rows selected




2) To fix this issue we need to upload the patch context file


a) Source your PATCH file system
. EBSapps patch

[applmgr@funoracleapps ~]$ echo $FILE_EDITION
patch

Get the value of your patch context file.


[applmgr@funoracleapps ~]$ echo $CONTEXT_FILE
/u01/oracle/SAI/fs2/inst/apps/SAI_funoracleapps/appl/admin/SAI_funoracleapps.xml

b) Source the RUN filesystem
and  Execute the following command on the run filesystem to upload the patch context file to the database.

$ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer \
action=upload \
contextfile='Enter Your Full Patch Context XML File Location as per step 1' \
logfile=/tmp/patchctxupload.log


[applmgr@funoracleapps ~]$ echo $FILE_EDITION
run

[applmgr@funoracleapps ~]$ $ADJVAPRG oracle.apps.ad.autoconfig.oam.CtxSynchronizer \
> action=upload \
> contextfile=/u01/oracle/SAI/fs2/inst/apps/SAI_funoracleapps/appl/admin/SAI_funoracleapps.xml \
> logfile=/tmp/patchctxupload.log
Enter the APPS password:


Note: the context file parameter should point to the physical location of the patch context file in your system.

3) Run the following query and it should return one entry for the recently uploaded context file.

select distinct(PATH) from FND_OAM_CONTEXT_FILES where NAME not in ('TEMPLATE','METADATA','config.txt') and CTX_TYPE='A' and (status is null or upper(status) in ('S','F')) and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') = 'patch';

PATH
-----
/u01/oracle/SAI/fs2/inst/apps/SAI_funoracleapps/appl/admin/SAI_funoracleapps.xml


4) Run the fs_clone again and it should complete successfully.

No comments :

Post a Comment