0

I want to display welcome message when ever a oracle schema try to login database using TOAD or PLSQL developer only

  • 1
    "PL/SQL Developer" is a third party IDE separate from SQL Developer, the Oracle tool that you've tagged this question with. I assume you mean SQL Developer. What problem are you trying to solve? Neither TOAD nor SQL Developer really support a "message of the day" function. You may be able to add some scripting on the different client machines to display a message but I suspect that is not what you are trying to achieve. – Justin Cave Feb 27 '19 at 19:34
1

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.
  • Can I restrict specific schema for example john from login database who only use TOAD and SQL Developer. I can't change password of this schema because it run application. I just want to restrict developers from login using this schema – M.AZ Feb 28 '19 at 14:31
  • for TOAD how to use OCI drivers? – M.AZ Feb 28 '19 at 15:06
  • @M.AZ - Restrict Schema? no. The BANNER idea comes from 1980's (or earlier) requirements for using a computer/database in government facilities (AFAIK). Either everybody sees it or nobody sees it. Reminder: Only the client software that can handle the BANNER will display a BANNER. – Michael Kutz Feb 28 '19 at 16:35
  • @M.AZ - Try using TOAD as-is. Let me know if it works. – Michael Kutz Feb 28 '19 at 16:42
2

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

enter image description here

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
  • This message will display to everyone.Didn't test on toad but tested on 11gr2 on Linux. – Sam Feb 27 '19 at 20:06
  • any special driver configuration? I've only seen "use OCI" in my google search. – Michael Kutz Feb 27 '19 at 20:10
  • Can I restrict specific schema for example john from login database who only use TOAD and SQL Developer. I can't change password of this schema because it run application. I just want to restrict developers from login using this schema. – M.AZ Feb 28 '19 at 14:26
  • Over the years people have asked about restricting logon based on the client application. It can be done, but it's like putting a padlock on a tent ... easily defeated. If you _cannot_change the password "because an application uses it", then your security profile is very weak. You should be able to change the password at will, and easily inform the application of what the new password is. – EdStevens Feb 28 '19 at 22:41
  • Check this link limit access – Sam Mar 1 '19 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.