Saturday, 13 October 2018

Configure VSFTPD in Linux Redhat/Oracle Linux



yum install vsftpd

Then  Modify /etc/vsftpd/vsftpd.conf:

listen=YES   # Default no
listen_ipv6=NO   # Default YES

Tuesday, 9 October 2018

REP-51019: System user authentication is missing


System user authentication is missing.
Error:
REP-51019: System user authentication is missing.
Solution:
First take a back/rename up of your rwserver.conf original file.

Some changes required in rwserver.conf
remove security tag from


to


And
Comment the line below from
to

Monday, 1 October 2018

Rename multiple file names to lower case in Unix / Linux

for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done

Diagnostic Data Collection For Oracle Database Cloud Service Instances dbaas_diag_tool.pl


Collect diagnostic logs without TFA logs
[root@pgrddbcsprod logs]# /var/opt/oracle/misc/dbaas_diag_tool.pl --diagdir /u03/logs/
LogFile: /var/opt/oracle/log/dbaas_diag/dbaas_diag_2018-10-01_08:22:18.log
diag_root_dir=/u03/logs//dbaas_diag_1538382138
ACTION: Created Diagnostic collection tar files /u03/logs//dbaas_diag_1538382138.tar.gz00* . Please send it to support team

To upload the file:
[root@pgrddbcsprod logs]# curl -T /u03/logs/dbaas_diag_1538382138.tar.gz000 -u "m.almasri@tahaluf.ae" ftps://transport.oracle.com/issue/3-18432210211/

Enter host password for user 'm.almasri@tahaluf.ae':
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100  135M    0     0  100  135M      0   426k  0:05:25  0:05:25 --:--:--  313k
[root@pgrddbcsprod logs]#


Sunday, 30 September 2018

Monitor Oracle PaaS VM machine disk usage shell script


0 * * * *  sh /home/oracle/dbascripts/monitor_disk.sh


#!/bin/bash
echo `date` >> /tmp/cron.txt
LIMIT='90'
#Here we declare variable LIMIT with max of used space

DIR='/u03'
#Here we declare variable DIR with name of directory

MAILTO='M.Allam@tahaluf.ae,n.abuaqoulah@tahaluf.ae,m.almasri@tahaluf.ae'

#Here we declare variable MAILTO with email address
SUBJECT="Backup Mount point $DIR disk usage"

#Here we declare variable SUBJECT with subject of email
MAILX='mailx'

#Here we declare variable MAILX with mailx command that will send email
which $MAILX > /dev/null 2>&1

#Here we check if mailx command exist
if ! [ $? -eq 0 ]
#We check exit status of previous command if exit status not 0 this mean that mailx is not installed on system

then
          echo "Please install $MAILX"
#Here we warn user that mailx not installed
          exit 1
#Here we will exit from script
fi
cd $DIR
#To check real used size, we need to navigate to folder
USED=`df -Pl  | grep $DIR  | grep "^/dev" | awk '{print $5}' | sed "s/%//"`
#This line will get used space of partition where we currently, this will use df command, and get used space in %, and after cut % from value.
if [[ $USED -gt $LIMIT ]]
#If used space is bigger than LIMIT
then
      echo "Current Disk Space utilization is $USED% which needs your attention" | $MAILX -s "$SUBJECT" "$MAILTO"
#This will print space usage by each directory inside directory $DIR, and after MAILX will send email with SUBJECT to MAILTO
fi

Friday, 28 September 2018

DBaaS get current backup configurations

/var/opt/oracle/bkup_api/bkup_api get config --file=mycurrentconfig.cfg --dbname=ORCL 


How to Update the Cloud Tooling(dbaastools) on Database Cloud Service


Connect as the “opc” user to the compute node

login as: opc
Authenticating with public key "imported-openssh-key".

Start a root-user command shell:

[opc@ABC ~]$ sudo -s

Check whether any cloud tooling updates are available:

[root@ABC opc]# dbaascli dbpatchm --run -list_tools
DBAAS CLI version 1.0.0
Executing command dbpatchm --run -list_tools -cli
/var/opt/oracle/patch/dbpatchm -list_tools -cli
Subroutine sync_dg_standby redefined at /var/opt/oracle/patch/dbpatchm line 7383.
Starting DBPATCHM
Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-06-09_14:46:24.log
Config file is /var/opt/oracle/patch/dbpatchm.cfg

INFO: cdb is set to : yes
INFO: dbversion detected : 18000
INFO: patching type : psu




Patchid : 18.2.3.1.0_180606.0000
dbpatchm Execution completed

Check your current version of cloud tooling:

[root@ABC opc]# rpm -qa|grep -i dbaastools
dbaastools-1.0-1+18.2.3.1.0_180530.0000.x86_64

Download and apply the patch containing the cloud tooling update:

patch-id is the patch ID you located in the previous step
[root@ABC opc]# dbaascli dbpatchm --run -toolsinst -rpmversion=18.2.3.1.0_180606.0000
DBAAS CLI version 1.0.0
Executing command dbpatchm --run -toolsinst -rpmversion=18.2.3.1.0_180606.0000 -cli
/var/opt/oracle/patch/dbpatchm -toolsinst -rpmversion=18.2.3.1.0_180606.0000 -cli
Subroutine sync_dg_standby redefined at /var/opt/oracle/patch/dbpatchm line 7383.
Use of uninitialized value in concatenation (.) or string at /var/opt/oracle/patch/dbpatchm line 5016.
Starting DBPATCHM
Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-06-09_14:48:28.log
Config file is /var/opt/oracle/patch/dbpatchm.cfg

INFO: cdb is set to : yes
INFO: dbversion detected : 18000
INFO: patching type : psu

INFO: existing dbaastools version - dbaastools-1.0-1+18.2.3.1.0_180530.0000.x86_64

INFO: updated dbaastools rpm to - dbaastools-1.0-1+18.2.3.1.0_180606.0000.x86_64
dbpatchm Execution completed

[root@ABC opc]#

Verify the Updated Version

[root@ABC opc]# rpm -qa|grep -i dbaastools
dbaastools-1.0-1+18.2.3.1.0_180606.0000.x86_64

Check Available Updates

[root@ABC opc]# dbaascli dbpatchm --run -list_tools
DBAAS CLI version 1.0.0
Executing command dbpatchm --run -list_tools -cli
/var/opt/oracle/patch/dbpatchm -list_tools -cli
Subroutine sync_dg_standby redefined at /var/opt/oracle/patch/dbpatchm line 7383.
Starting DBPATCHM
Logfile is /var/opt/oracle/log/dbpatchm/dbpatchm_2018-06-09_14:58:16.log
Config file is /var/opt/oracle/patch/dbpatchm.cfg

INFO: cdb is set to : yes
INFO: dbversion detected : 18000
INFO: patching type : psu




No applicable dbaastools rpms found
dbpatchm Execution completed

Reset the backup configuration

[root@ABC opc]# /var/opt/oracle/ocde/assistants/bkup/bkup
Starting BKUP
Logfile is /var/opt/oracle/log/bkup/bkup_2018-06-09_15:00:12.log
Config file is /var/opt/oracle/ocde/assistants/bkup/bkup.cfg
dbname: ORCL
Dataguard configuration
Enabled: 0
Mode: PRIMARY
INFO : No backup strategy enabled.
Looking for previous configuration:
Directory : /home/oracle/bkup/ORCL
 -> obkup
 -> Found: 1 files
 -> Moving previous configuration to /home/oracle/bkup/ORCL_20180609150026
No initial bkup of PFILE needed.
Common RMAN Config
Instantiating obkup
Instantiating dbcfg.spec
Updating Control File Record Keep Time
Enabling block change tracking
Updating RMAN defaults
INFO: Archivelog management enabled.
Adding entry to crontab
Accessing to your Database ID ..
The DBaaS instance database id is: 1505878300
Deleting unencrypted autobackups.
#### Completed Execution.
[root@ABC opc]#
If you are updating cloud tooling on a database deployment hosting a Data Guard
configuration, repeat the preceding steps on the other compute node of the
deployment.

Number of Visitors