| 
		
			| Configure Oracle database to display a warning banner [message #656600] | Wed, 12 October 2016 08:48  |  
			| 
				
				
					| youngb912 Messages: 56
 Registered: October 2007
 Location: New York
 | Member |  |  |  
	| I need to have our databases display warning messages whenever a user connect. This should be applicable whether the connection is from SQLPlus, or other tools such as SQL Developer. Is this possible? The message will be something like this - 
 This system contains proprietory information.
 - Users' actions are monitored and audited.
 - Unauthorized use of the system is prohibited.
 
 Versions:
 11.2.0.4
 Redhat Linux and Windows 2008
 
 
  
 
 [mod-edit:  message inserted into message body by bb]
 
 [Updated on: Wed, 12 October 2016 15:12] by Moderator Report message to a moderator |  
	|  |  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  | 
	| 
		
			| Re: Configure Oracle database to display a warning banner [message #656657 is a reply to message #656600] | Thu, 13 October 2016 10:18   |  
			| 
				
				
					| youngb912 Messages: 56
 Registered: October 2007
 Location: New York
 | Member |  |  |  
	| I was able to find a solution which I will test this week. It involves an Oracle Call Interface (oci) where the database user receives the warning message when authenticating or connecting to a front-end system that includes or covers the Oracle DBMS. It involves adding the following lines to the sqlnet.ora file: 
 SEC_USER_AUDIT_ACTION_BANNER = [banner file location/directory]
 SEC_USER_UNAUTHORIZED_ACCESS_BANNER = [banner file/directory]
 |  
	|  |  | 
	| 
		
			| Re: Configure Oracle database to display a warning banner [message #656663 is a reply to message #656657] | Thu, 13 October 2016 14:00   |  
			| 
				
				|  | Michel Cadot Messages: 68770
 Registered: March 2007
 Location: Saint-Maur, France, https...
 | Senior MemberAccount Moderator
 |  |  |  
	| Thanks, this is indeed something interesting which works well in SQL*Plus. I added these 2 lines to sqlnet.ora:
 
 Each file contains only one line:SEC_USER_AUDIT_ACTION_BANNER=C:\SEC_USER_AUDIT_ACTION_BANNER.txt
SEC_USER_UNAUTHORIZED_ACCESS_BANNER=C:\SEC_USER_UNAUTHORIZED_ACCESS_BANNER.txt
 Then I restart the database and:This is from <parameter name>.
 For the moment I didn't see how to do it with JDBC programs.SQL> connect michel/michel
This is from SEC_USER_UNAUTHORIZED_ACCESS_BANNER.
This is from SEC_USER_AUDIT_ACTION_BANNER.
Connected.
SQL> 
 
 [Updated on: Thu, 13 October 2016 14:24] Report message to a moderator |  
	|  |  | 
	|  | 
	|  | 
	| 
		
			| Re: Configure Oracle database to display a warning banner [message #656696 is a reply to message #656663] | Fri, 14 October 2016 12:53   |  
			| 
				
				|  | Michel Cadot Messages: 68770
 Registered: March 2007
 Location: Saint-Maur, France, https...
 | Senior MemberAccount Moderator
 |  |  |  
	| It also works with OCI C program: 
 Code is attached.C:\>OCIBanner
Setting up the environment...
Connecting...
Connected.
Checking for access and audit banners...
Access banner:
This is from SEC_USER_UNAUTHORIZED_ACCESS_BANNER.
Audit banner:
This is from SEC_USER_AUDIT_ACTION_BANNER.
Disconnecting...
Freeing handles...
C:\>(Good exercise for me who did not write OCI C code since last millennium.)
 
 
 
	
	 Attachment: OCIBanner.c (Size: 5.55KB, Downloaded 2848 times)
 [Updated on: Fri, 14 October 2016 14:43] Report message to a moderator |  
	|  |  | 
	|  | 
	|  |