VNC Viewer : The connection was refused by the computer

When trying to connect to VNC server from VNC viewer, the following error occurs:



$ /usr/bin/vncserver

$ ps -efa | grep -i VNC

Provide Both Host and Port in VNC Viewer

VNC Server :

How To Install Oracle Client In Silent Mode Using Response File

Due to X-Window unavailability, installation of 12.2 Oracle client has to be done through silent mode with response file.

Subscribe to get access

Read more of this content when you subscribe today.

Database Logon Trigger to Block Sessions from Some Users using Toad,SQL Developer….

Here is an example of  database logon trigger for blocking specific users from accessing database through tools like  Toad or SQL Developer tools, etc.

Subscribe to get access

Read more of this content when you subscribe today.

Any database users with “ADMINISTER DATABASE TRIGGER” will bypass the database logon trigger.


Grant succeeded.

SQL> connect testuser
Enter password:

ORA-02085: database link DBLINK_TEST connects to TESTDB

If parameter global_names =TRUE, the database link name has to match the remote database name.

Try to query a remote table through a database link:

SQL> select count(*) from testuser.test@dblink_test;
select count(*) from testuser.test@dblink_test;
ERROR at line 1:
ORA-02085: database link UDBLINK_TEST connects to TESTDB


Check database parameter global_names =TRUE. If parameter global_names =TRUE, the database link name has to match the remote database name( TESTDB).


Turn off  global_names in session level, then it should be ok.

SQL>alter session set global_names=false;
Session altered.

SQL>select count(*) from testuser.test@dblink_test;


How to Download Oracle Patches From Oracle Support By Using WGET or CURL

1) Set up global variables :

export MOS_PASSWORD="Password"

export PROXYUSER="testuser"
export PROXYPASSWD="Password123"
export USERAGENT="Mozilla/5.0"
export use_proxy=on
export http_proxy=""
export https_proxy=""
export COOK=$HOME/$.cookie

2) The following command to authenticate uses HTTP/HTTPS:

$wget --proxy-user=${PROXYUSER} --proxy-password=${PROXYPASSWD} 
--http-user=${MOS_USER} --http-password=${MOS_PASSWORD} 
--save-cookies=$COOK --keep-session-cookies --no-check-certificate 
2018-02-26 14:35:17 URL: 
[118] -> "download.1" [1]

3) Get all supported platforms and language codes:

a) Output the query result into a temp file:

$wget --proxy-user=${PROXYUSER} --proxy-password=${PROXYPASSWD} 
--no-check-certificate --load-cookies=$COOK 
-O $HOME/output.tmp -q

$ ls -l $HOME/output.tmp
-rw-r----- 1 testuser users 4528477 Feb 26 14:41 /home/testuser/output.tmp

b) Extract the Platform and Language Code, here we are only interested in platform “226P<—>Linux x86-64″ with default English language:

$ grep -A200 "<select name=plat_lang"  /home/testuser/output.tmp |
 grep "^<option"|awk -F "[\">]" '{print $2 "<--->" $4}' |
 |grep -v "<--->selected"

537P<--->Acme Packet 1100
529P<--->Acme Packet 3820
541P<--->Linux ARM 64-bit
214P<--->Linux Itanium
525P<--->Linux SPARC
46P<--->Linux x86
226P<--->Linux x86-64
912P<--->Microsoft Windows (32-bit)
208P<--->Microsoft Windows Itanium (64-bit)
539P<--->Microsoft Windows Phone
233P<--->Microsoft Windows x64 (64-bit)
117L<--->Traditional Chinese (ZHT)
116L<--->Turkish (TR)
37L<--->UK English (GB)
39L<--->Ukrainian (UK)
43L<--->Vietnamese (VN)
999L<--->Worldwide Spanish (ESW)

4) Get URLs of patch 6880880 for Linux X86-64 platform.

$wget --proxy-user=${PROXYUSER} --proxy-password=${PROXYPASSWD} 
--no-check-certificate --load-cookies=$COOK 
=patch&patch_number=6880880&plat_lang=226P" -O $HOME/output1.tmp -q

$ ls -ltr $HOME/output1.tmp
-rw-r----- 1 tetsuser users 4544310 Feb 26 15:44 /home/testuser/output1.tmp

$ grep "Download/process_form" output1.tmp | sed 's/ //g' | sed "s/.*href=\"//g" | sed "s/\".*//g"

5) Download the patch by using URL from step 4):


$ curl -b $COOK -c $COOK --insecure --output 
-L ""

  % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 90.8M 100 90.8M 0 0 5008k 0 0:00:18 0:00:18 --:--:-- 20.7M


$ wget --load-cookies=$COOK --save-cookies=$COOK --keep-session-cookies 
--no-check-certificate -O 
Proxy request sent, awaiting response... 200 OK
Length: 95262503 (91M) [application/zip]
Saving to: `'

100%[=================================================================================================>] 95,262,503 21.9M/s in 16s

2018-02-26 17:57:20 (5.65 MB/s) - `' saved [95262503/95262503]

6) Validate the download zip file:

OPatch patch of version for Oracle software releases 12.1.0.x 
(installer) and 12.2.0.x (JAN 2018) (Patch)

p6880880_122010_Linux-x86-64.zip90.8 MB(95262503 bytes)

a) “unzip -t”

$ unzip -t
 testing: OPatch/ OK
 testing: OPatch/operr.bat OK
 testing: OPatch/ OK
No errors detected in compressed data of

b) MD5 “md5sum”

$ md5sum

c) SHA-1 “sha1sum”

$ sha1sum

d)SHA-256 “sha256sum”

$ sha256sum