Welcome message for oracle schema
-
23-01-2021 - |
Question
I want to display welcome message when ever a oracle schema try to login database using TOAD or PLSQL developer only
Solution
HOWTO configure the banner
In the sqlnet.ora
file on the server, set the values for:
- SEC_USER_AUDIT_ACTION_BANNER
- SEC_USER_UNAUTHORIZED_ACCESS_BANNER
You may have to restart the database for the changes to take affect.
Application Requirements
The application must:
- use the OCI driver
- fetch the banner (using OCI calls)
display the banner
Oracle Call Interface (OCI) applications can make use of OCI features to retrieve this banner and display it to the user.
The quote is from Oracle Documentation.
Servers cannot force clients to do something.
Will it work with ...?
- SQL Plus - Yes. See Sam's post
- SQL Developer - Yes. See Sam's post
- PLSQL Developer - unknown. You'll have to use the OCI driver and try it.
- TOAD - unknown. You'll have to use the OCI driver and try it.
OTHER TIPS
Create a text file along with the message to be displayed.Example I created a text file with a message
C:>type welcome.txt
======================================================
Welcome Banner
yada yada yada yada yada.......................
======================================================
modify sqlnet.ora pointing to the location of text file
SEC_USER_AUDIT_ACTION_BANNER=C:\welcome.txt
C:\sql>sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Feb 27 13:34:02 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
======================================================
Welcome Banner
yada yada yada yada yada.......................
======================================================
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
login to remote db on Linux (created welcome text on Linux server)
C:\sql>sqlplus test/test@upgr
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Feb 27 14:15:08 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
======================================================
Welcome Banner
This is remote linux server 11gR2
yada yada yada yada yada.......................
======================================================
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options