|
|
|
|
Re: How i can prevent backup for specific IP Address [message #407940 is a reply to message #407647] |
Fri, 12 June 2009 07:52 |
eng.oracle
Messages: 48 Registered: December 2007
|
Member |
|
|
Okay, thank's for replaying
-- In another way ..
I need to prevent Any one have prevliage to make backup to make it from out side of company.
For Exceample :
IF range of ip address between 10.20.60.1 to 10.20.60.255 then
let user to make backup
else
message('Sorry you must be in a company to make backup.');
end if;
That's all
|
|
|
Re: How i can prevent backup for specific IP Address [message #407946 is a reply to message #407940] |
Fri, 12 June 2009 08:44 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I'm guessing you have only a vague grasp on what 'making a backup' involves.
The standard ways of making a backup (Hot backup, cold backup & RMAN) all require you to have access to the server and/or to priviliged accounts in Oracle.
Many people consider (wrongly) that an Export DMP file is a backup - is this what you're trying to stop?
Are you saying that you're in a position where people from outside the company can easily connect to your databases?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How i can prevent backup for specific IP Address [message #407979 is a reply to message #407647] |
Fri, 12 June 2009 11:37 |
eng.oracle
Messages: 48 Registered: December 2007
|
Member |
|
|
This some information about
SYS_CONTEXT is the function which returns information of the current session. It replaces the traditional USERENV function which is kept only for backward compatibility in Oracle 10g. Essentially it returns all the parameter values which were available through USERENV function.
SYS_CONTEXT take two arguments: namespace and the associated parameter. Oracle provides built-in namespace USERENV which returns information about the current session. Most common examples are getting osuser or getting session user, NLS values, IP Address etc. for the current session. Here is an example for few of the parameter values.
SQL Code
SQL> SELECT SYS_CONTEXT('USERENV','SESSION_USER') Session_User,
2 SYS_CONTEXT('USERENV','LANGUAGE') Language,
3 SYS_CONTEXT('USERENV','NLS_DATE_FORMAT') Date_Format,
4 SYS_CONTEXT('USERENV','Module') Module,
5 SYS_CONTEXT('USERENV','Action') Action
6 FROM DUAL; SESSION_USER LANGUAGE DATE_FORMAT MODULE ACTION
-------- -------------------- ------ ------- -------
SCOTT AMERICAN_AMERICA.WE8MSWIN1252 DD-MON-RR SQL*Plus
As mentioned earlier, these are few of the parameters. For complete list of parameters refer to Oracle manual. Value for parameters 'Module' and 'Action' can be set using dbms_application_info package to track the activity more precisely in the session. We will cover it in detail in another blog entry.
One can create user defined context using CREATE CONTEXT syntax. Specific attributes can also be assigned to the user defined context using DBMS_SESSION.set_context procedure. You can refer to Oracle SQL Reference manual for detailed explantion of how to create context and assign attribute to it. The session information can be useful for auditing purpose or for determining certain action based on certain parameter value. It also helps in determining the language specific parameters for current session.
.
.
.
To help others programmer
|
|
|
|
|