Wednesday, December 12, 2018

How to Configure Tiger VNC Server on Linux 7

How to Configure Tiger VNC Server on Linux 7

Applies to:
            Oracle Enterprise Linux – Version: 7

Description:
            After successful installation of Oracle Linux 7, I need to configure VNC for remote access.

Solution:
            To configure Tiger VNC server on Oracle Linux 7 follow the simple steps:
           
To check the required rpm’s:
[root@testora ~]# rpm –qa |grep tigervnc

Install tigervnc-server
[root@testora ~]# yum install tigervnc-server –y
             
To create a user for VNC:
[root@testora ~]# adduser vncuser
[root@testora ~]# passwd vncuser
 
[root@testora ~]# su - vncuser
[vncuser@testora ~]$ vncpasswd
Password:
Verify:
[vncuser@testora ~]$ exit
[root@testora ~]#

Copy the following file:
[root@testora ~]# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@\:1.service

Edit the copied file.
[root@testora ~]# vi /etc/systemd/system/vncserver@\:1.service
At the end of the file, you will find the lines like below.

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target

Replace <USER> with your real user, in my case, i replaced with a user called “vncuser”

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l vncuser -c "/usr/bin/vncserver %i"
PIDFile=/home/vncuser/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target

Add TCP Port in Firewall config:
[root@testora ~]# firewall-cmd --permanent --zone=public --add-port=5901/tcp
[root@testora ~]# firewall-cmd --reload

Reload the systemctl daemon as root
[root@testora ~]# systemctl daemon-reload

Start the VNC service as root.
[root@testora ~]# systemctl start vncserver@\:1.service

To check the status of vncserver:
[root@testora ~]# systemctl status vncserver@\:1.service
â vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-12-11 10:58:07 PKT; 6s ago
  Process: 9681 ExecStart=/usr/sbin/runuser -l vncuser -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 9673 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
 Main PID: 9723 (Xvnc)
   CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
           ⣠9723 /usr/bin/Xvnc :1 -desktop testora.test.org:1 (vncuser)...

Dec 11 10:58:04 testora.test.org systemd[1]: Starting Remote desktop ser...
Dec 11 10:58:07 testora.test.org systemd[1]: Started Remote desktop serv...
Hint: Some lines were ellipsized, use -l to show in full.


Enable it on system startup as root.
[root@testora ~]# systemctl enable vncserver@\:1.service

If the above procedure did not work, do the following:
[root@testora ~]# rm –rf /tmp/.X*-lock
[root@testora ~]# rm –rf /tmp/.X11-unix/X*
[root@testora ~]# systemctl restart vncserver@\:1.service

OR do the following:
[root@testora ~]# vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth:  file /root/.Xauthority does not exist

New 'testora.test.org:1 (root)' desktop is testora.test.org:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/testora.testt.org:1.log

Now you can access your Linux server from any client using VNC Viewer.






Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Thursday, November 29, 2018

How to Recreate Oracle Enterprise Manager - Database Control Repository


How to Recreate Oracle Enterprise Manager - Database Control Repository

Applies to:
            Enterprise Linux – Version: 5
            Oracle Database 11gR1
            Oracle EBS R12.1

Description:
            After Cloning of EBS, Oracle Enterprise Manager is not started.

Solution:
            To recreate the Database Control Repository do the following simple steps:
           
            Make sure that the Database environment is properly set.
            To check ORACLE_HOME and ORACLE_SID values properly set:
           
            [oraprod@ebsdev ~]$ echo $ORACLE_HOME
            /d01/oracle/TEST/db/tech_st/11.1.0

            [oraprod@ebsdev ~]$ echo $ORACLE_SID
            TEST
            
[oraprod@ebsdev ~]$ sqlplus / as sysdba
SQL> drop user sysman cascade;
SQL> drop role mgmt_user;
SQL> drop user mgmt_view cascade;
SQL> drop public synonym mgmt_target_blackouts;
SQL> drop public synonym setemviewusercontext;
SQL> drop public synonym mgmt_availability;

SQL> DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE
IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/
exit

Remove the following directories:
[oraprod@ebsdev ~]$ rm -rf $ORACLE_HOME/host_sid/
[oraprod@ebsdev ~]$ rm –rf $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid

  
To create the DB control and repository:

[oraprod@ebsdev ~]$ emca -config dbcontrol db -repos create

STARTED EMCA at Nov 28, 2018 11:38:28 AM
EM Configuration Assistant, Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: TEST
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user: Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /d01/oracle/TEST/db/tech_st/11.1.0

Local hostname ................ ebsdev.karachi.org
Listener port number ................ 1521
Database SID ................ TEST
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 28, 2018 11:39:53 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /d01/oracle/TEST/db/tech_st/11.1.0/cfgtoollogs/emca/TEST/emca_2018_11_28_11_38_28.log.
Nov 28, 2018 11:39:54 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 28, 2018 11:47:34 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 28, 2018 11:47:39 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 28, 2018 11:48:24 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 28, 2018 11:48:26 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Nov 28, 2018 11:48:26 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Nov 28, 2018 11:48:32 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Nov 28, 2018 11:48:33 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 28, 2018 11:48:43 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 28, 2018 11:48:44 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 28, 2018 11:49:04 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 28, 2018 11:49:05 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://ebsdev.karachi.org:1158/em <<<<<<<<<<<
Nov 28, 2018 11:49:07 AM oracle.sysman.emcp.EMDBPostConfig invoke
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 28, 2018 11:49:07 AM
[oraprod@ebsdev ~]$ 

Oracle Enterprise Manager is working fine now.

             


Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ


Friday, November 2, 2018

Error Message PRVF-7532 Missing Packages elfutils-libelf-devel and pdksh


Error Message PRVF-7532 Missing Packages elfutils-libelf-devel and pdksh

Applies to:
            Oracle Enterprise Linux – Version: 7 64-bit
            Oracle Database 11gR2 11.2.0.4

Description:
            I am going to install Oracle Database 11gR2 on OEL-7 64-bit but Oracle Universal Installer going to fail with following error messages in installAction.log file:
Error Message: PRVF-7532: Package “elfutils-libelf-devel” is missing
Error Message: PRVF-7532: Package “pdksh” is missing

Solution:
            You can resolved the above issue by following simple steps:
·         Copy the Oracle Database source media from DVD to local Disk <path>/database
·         Go to the path:
cd <path>/database/stage/cvu/cv/admin
·         Backup cvu_config file:
cp cvu_config cvu_config_bak
·         Edit the cvu_config file and change the following line:
CV_ASSUME_DISTID=OEL4
To
CV_ASSUME_DISTID=OEL6
·         Save the cvu_config file
·         cd <path>/database
·         ./runInstaller

Now it is working fine and complete the installation successfully.






Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ



Monday, October 29, 2018

Unable to start HTTP server, error while loading shared libraries: libdb.so.2

Applies to:

Oracle Enterprise Linux – Version: 5.8
Oracle EBS R12.1.3

Description:

After cloning EBS R12 successfully, when I am going to start the services, find that the HTTP_Server is down. I have tried to restart the HTTP service, but could not start. All services of Oracle EBS going to startup normal except HTTP server:


Solution:


Find the following error in HTTP server log file:


There is missing some libraries.
Shutdown all EBS services and create a link for missing library as below:
Find that the library libdb.so.2 not exists. So create the link as below:


Now start all services and retest the issue:


HTTP Server is started normal, Oracle EBS is up and running now.

Your comments, especially which will help us improve the functionality, will be greatly appreciated.

How to reset change SYS user password in Oracle Database


How to reset/change SYS user password in Oracle Database

Applies to:
            Oracle Enterprise Linux – Version: 7
            Oracle Database 11g

Description:
            I want to reset/change SYS user password in Oracle Database 11gR2.

Solution:
            You can reset/change SYS password by following simple steps:

Open a terminal and type the command
Sqlplus /nolog
SQL> connect / as sysdba

Once connected to the Database you can reset/change the SYS user password:

SQL> alter user sys identified by <new_password>;



Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ



Wednesday, October 10, 2018

How to Change Default Port of Oracle Database Listener


How to Change Default Port of Oracle Database Listener       

Applies to:
            Oracle Enterprise Linux – Version: 7
            Oracle Database 11gR2
           
Description:
I want to change the default port of Oracle Database Listener.

Solution:
            To change the default port of Oracle Database Listener do the following steps:
1.    Stop Oracle Database Listener
#   lsnrctl stop
2.    Open $ORACLE_HOME/network/admin/listener.ora file and change the port from default 1521 to 1530 or as you wish
3.    Open $ORACLE_HOME/network/admin/tnsnames.ora file and change the port from default 1521 to 1530 or as you wish to change
4.    Re-start the listener
# lsnrctl start
5.    Login to Database as sysdba
# sqlplus / as sysdba
SQL> alter system set local_listener=”(ADDRESS=(PROTOCOL=TCP) (HOST=localhost) (PORT=1530))”;
SQL> alter system register;
Exit;
6.    lsnrctl stop
7.    lsnrctl start

Oracle Database Listener Port has been changed from 1521 to 1530





Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

Wednesday, October 3, 2018

ORA-39213 Metadata processing is not available


ORA-39213 Metadata processing is not available
           
Applies to:
            Oracle Enterprise Linux – Version: 7
            Oracle Database 11gR2
           
Description:
Expdp utility going to failed with following error:
ORA-39213: Metadata processing is not available
After some research I found that it is caused by the XSL stylesheets not setup/load properly.

Solution:
To fix the problem do the following steps:
Connect AS SYSDBA and execute the following to reload the stylesheets:
SQL> execute dbms_metadata_util.load_stylesheets;

Re-test the expdp, now it is working fine.

           


Your comments, especially which will help us improve the functionality, will be greatly appreciatedJ

How to Extend Swap space on LVM Disk Linux

How to Extend Swap space on LVM Disk Linux   Applies to:             Oracle Database 12.2             Oracle Linux 7 Description: ...