пятница, 10 сентября 2021 г.

Modifying EM Metric Threshold in bulk

1. Login.

./emcli login -username=sysman

2. Select from oms repository.

select './emcli modify_threshold -target_name="'||A.target_name||'" -target_type="oracle_database" -metric="sizeOfOSAuditFiles" -column="FILE_SIZE" -warning_threshold="1000" -critical_threshold="2000" -force' from sysman.MGMT$METRIC_COLLECTION A
where A.target_type='oracle_database' and A.metric_name='sizeOfOSAuditFiles'

3. Execute the result.

понедельник, 2 августа 2021 г.

SYSMAN issue - ORA-25226: dequeue failed, queue SYSMAN.MGMT_ADMINMSG_BUS is not enabled for dequeue

SYSMAN issue:

java.sql.SQLException: ORA-25226: dequeue failed, queue SYSMAN.MGMT_ADMINMSG_BUS is not enabled for dequeue

ORA-06512: at "SYSMAN.EM_ADMINMSG_BUS", line 294

ORA-06512: at line 1


Solution:

Stop the OMS.

exec dbms_aqadm.start_queue('SYSMAN.EM_PC_TP',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_LOADERJOB_QUEUE',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_ADMINMSG_BUS',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_GROUP_EVENT_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_JOB_STATUS_UPD_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_LOADER_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_EVENT_BUS',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_TASK_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_CNTR_QUEUE',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_HOST_PING_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_NOTIFY_INPUT_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.MGMT_NOTIFY_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_NOTIFY_Q',true,true);

exec dbms_aqadm.start_queue('SYSMAN.EM_SYSTEM_EVENT_Q',true,true);

Start the OMS.


PS:

select 'exec dbms_aqadm.start_queue(''SYSMAN.'||name||''',true,true);' from all_queues 

where trim(enqueue_enabled) = 'NO' 

and owner='SYSMAN'

and queue_type='NORMAL_QUEUE'


среда, 3 июня 2020 г.

Oracle Free Cloud credit card issues

Oracle said:
we do not accept virtual cards or prepaid cards.
(мы не принимаем виртуальные и препэйд карты)

Check your card
Prepaid option must No
(Prepaid должен быть No)

nginx upgrade from 1.12 to 1.15

# rpm -qa| grep nginx
nginx-filesystem-1.12.2-2.el7.noarch
nginx-mod-http-xslt-filter-1.12.2-2.el7.x86_64
nginx-mod-http-perl-1.12.2-2.el7.x86_64
nginx-mod-http-geoip-1.12.2-2.el7.x86_64
nginx-mod-mail-1.12.2-2.el7.x86_64
nginx-1.12.2-2.el7.x86_64
nginx-all-modules-1.12.2-2.el7.noarch
nginx-mod-stream-1.12.2-2.el7.x86_64
nginx-mod-http-image-filter-1.12.2-2.el7.x86_64

cd /etc/yum.repos.d/
vi nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1

mkdir /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > /etc/systemd/system/nginx.service.d/override.conf

yum update nginx

systemctl daemon-reload
systemctl restart nginx
systemctl status nginx
netstat -plunt | grep nginx

#  rpm -qa| grep nginx
nginx-filesystem-1.12.2-2.el7.noarch
nginx-mod-http-xslt-filter-1.12.2-2.el7.x86_64
nginx-mod-http-perl-1.12.2-2.el7.x86_64
nginx-mod-http-geoip-1.12.2-2.el7.x86_64
nginx-mod-mail-1.12.2-2.el7.x86_64
nginx-all-modules-1.12.2-2.el7.noarch
nginx-1.15.10-1.el7_4.ngx.x86_64
nginx-mod-stream-1.12.2-2.el7.x86_64
nginx-mod-http-image-filter-1.12.2-2.el7.x86_64

четверг, 28 марта 2019 г.

firewalld whitelist multiple sources



firewall-cmd --new-zone=mssql
firewall-cmd --zone=mssql --add-service=mssql

firewall-cmd --new-ipset=mssql_set --type=hash:net
firewall-cmd --ipset=mssql_set --add-entry=10.1.1.1
firewall-cmd --ipset=mssql_set --add-entry=172.16.1.0/24
firewall-cmd --zone=mssql --add-source=ipset:mssql_set

firewall-cmd --runtime-to-permanent

четверг, 14 марта 2019 г.

ESXi 5.5 MegaCli offline disk issue


cd /opt/lsi/MegaCLI
./MegaCli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log
./MegaCli -PDOnline -PhysDrv [252:1] -aALL

Physical Disk: 1
Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 11
WWN: (deleted)
Sequence Number: 23
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 1
Last Predictive Failure Event Seq Number: 6711
PD Type: SAS

Raw Size: 68.366 GB [0x88bb992 Sectors]
Non Coerced Size: 67.866 GB [0x87bb992 Sectors]
Coerced Size: 67.054 GB [0x861c000 Sectors]
Sector Size:  0
Firmware state: Online, Spun Up
Device Firmware Level: HPDG
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000c500231b7f85
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: (deleted)
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive:  Not Certified
Drive Temperature :32C (89.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : Yes