Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

I was able to login to an Oracle Cloud machine with the public IP using Putty but when connecting using MobaXterm had issues with the graphical output e.g. xclock or the Oracle Installer.

Made some changes to the sshd_config file to allow X11Forwarding for the graphical output and changed PasswordAuthentication to "no".


Using a private authentication key to access the servers so the password should not be needed.

Putty worked as expected but MobaXterm came back with

Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

Edited the /etc/ssh/sshd_config file and c
hanged PasswordAuthentication and ChallengeResponseAuthentication to yes and restarted the sshd daemon.


#/bin/systemctl restart sshd.service

Connecting now as expected.

Thinking this needs more investigation - strange that Putty and MobaXterm behave differently.

KIling Oracle DB Connections

Had to kill an application user with thousands of connections from different app servers.

The code from the link below did the job with a slight amendment.

https://www.oracledocs.com/generating-query-to-kill-session-from-sql_id/

SELECT 'alter system kill session '
|| ''''
|| SID
|| ','
|| SERIAL#
|| ' immediate ;'
FROM v$session
WHERE sql_id = '&sql_id';

For RAC instances

SELECT 'alter system kill session '
|| ''''
|| SID
|| ','
|| SERIAL#
|| ',@'
|| inst_id
|| ''''
|| ' immediate ;'
FROM gv$session
where username='APP_USER' and machine in ('evc01','evc02','evc03')

Simply spooled the output - checked it was what we wanted - changed the .lst file to .sql and used that to kill all the sessions. Hit an ORA-00031 error when killing the session - Burleson gives more detail.

ORA-00031: session marked for kill.

Cause: The session specified in an ALTER SYSTEM KILL SESSION command cannot be killed immediately (because it is rolling back or blocked on a network operation), but it has been marked for kill. This means it will be killed as soon as possible after its current uninterruptible operation is done.

Action: No action is required for the session to be killed, but further executions of the ALTER SYSTEM KILL SESSION command on this session may cause the session to be killed sooner.

Monitoring Golden Gate using OEM

I was asked to look at monitoring Oracle Golden Gate but unfortunately the environment was already up and running, which was a pity as I would have probably went down the JAgent route. However, that seems more suited for a new build and trying to put it on retrospectively as least for the build I was working on was going to be a pain.

My colleague found this from "dbasolved" which is excellent.

https://www.dbasolved.com/2014/01/yet-another-way-to-monitor-oracle-goldengate-with-oem12c/

It uses this perl script behind the scenes; which in itself is nothing exciting but does the job.

#!/usr/bin/perl -w
#
#
use strict;
use warnings;
#Static Variables
my $gghome = “/oracle/app/product/12.1.2/ggate”;
#Program
my @buf = `$gghome/ggsci << EOF
info all
EOF`;
foreach (@buf)
{
if(/EXTRACT/||/REPLICAT/)
{
s/\s+/\|/g;
print $_.”\n”;
}
}