Home
Search results “Userenv context oracle”
Userenv function in oracle
 
04:02
This session tells you what is userenv function in oracle and how to use it.
Views: 176 kiran sethy
Oracle Application Context
 
06:29
Creación de un contexto de aplicación que verifica el id del empleado de cualquier usuario que inicia sesión en la base de datos.
Views: 508 Sebastián Yandún
2MTT: Using SYS_CONTEXT to Secure Your Database Environment | Rob Lockard
 
02:50
Database expert Rob Lockard put in a lot of practice to deliver his 2 Minute Tech Tip on using SYS_CONTEXT to help secure your database environment -- and the effort paid off. Rob crosses the finish line with time to spare. Rob will be presenting at ODTUG Kscope 2015: http://kscope15.com/component/seminar/seminarslist#A%20Holistic%20Approach%20to%20Database%20Security Rob is also speaking at the Oracle User Group Estonia's Harmony 15 conference in June: https://www.ouge.eu/wp/2015/01/harmony-2015-call-for-papers/
How to implement VPD in Oracle Database (Part 2)
 
07:28
How to implement VPD (Virtual Private Database) in Oracle Database(9i,10g,11g,12c) Enterprise Edition. PART 2 Video. links: Part 1 https://youtu.be/JVvtvh3cN1I Part 2 https://youtu.be/xLcin_Wgbvs Part 3 https://youtu.be/mE1cSbmEwnQ Now we will conn to sec_adm user : ------------------ CONNECT sec_adm/sec_adm; This table will contain the user access info. CREATE TABLE users (id VARCHAR2(30) NOT NULL, ouser VARCHAR2(30) NOT NULL, first_name VARCHAR2(50) NOT NULL, last_name VARCHAR2(50) NOT NULL); INSERT INTO users VALUES ('HR','USER1','User','One'); INSERT INTO users VALUES ('FINANCE','USER2','User','Two'); COMMIT; conn schemaowner/schemaowner GRANT SELECT, INSERT ON user_data TO user1, user2; Now we will create the context package: ---------------------------------------- CONNECT sec_adm/sec_adm; CREATE CONTEXT SCHEMAOWNER USING context_package; CREATE OR REPLACE PACKAGE context_package AS PROCEDURE set_context; END; / Next we create the context_package body which will actually set the user context. CREATE OR REPLACE PACKAGE BODY context_package IS PROCEDURE set_context IS v_ouser VARCHAR2(30); v_id VARCHAR2(30); BEGIN DBMS_SESSION.set_context('SCHEMAOWNER','SETUP','TRUE'); v_ouser := SYS_CONTEXT('USERENV','SESSION_USER'); BEGIN SELECT id INTO v_id FROM users WHERE ouser = v_ouser; DBMS_SESSION.set_context('SCHEMAOWNER','USER_ID', v_id); EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_SESSION.set_context('SCHEMAOWNER','USER_ID', 0); END; DBMS_SESSION.set_context('SCHEMAOWNER','SETUP','FALSE'); END set_context; END context_package; / SHOW ERRORS Next we make sure that all users have access to the Context_Package. GRANT EXECUTE ON context_package TO schemaowner,user1,user2; Create Login Trigger Next we must create a trigger to fire after the user logs onto the database. CONNECT sec_adm/sec_adm; CREATE OR REPLACE TRIGGER set_security_context AFTER LOGON ON DATABASE BEGIN context_package.set_context; END; / SHOW ERRORS
Views: 261 OracleDBA
How to implement VPD in Oracle Database (Part 3)
 
12:04
How to implement VPD (Virtual Private Database) in Oracle Database(9i,10g,11g,12c) Enterprise Edition. PART 3 Video. Links: Part 1 https://youtu.be/JVvtvh3cN1I Part 2 https://youtu.be/xLcin_Wgbvs Part 3 https://youtu.be/mE1cSbmEwnQ Create Security Policies In order for the context package to have any effect on the users interaction with the database, we need to define a security_package for use with the security policy. This package will tell the database how to treat any interactions with the specified table. CREATE OR REPLACE PACKAGE security_package AS FUNCTION user_data_insert_security(owner VARCHAR2, objname VARCHAR2) RETURN VARCHAR2; FUNCTION user_data_select_security(owner VARCHAR2, objname VARCHAR2) RETURN VARCHAR2; END security_package; / Next we create the security_package body. CREATE OR REPLACE PACKAGE BODY Security_Package IS FUNCTION user_data_select_security(owner VARCHAR2, objname VARCHAR2) RETURN VARCHAR2 IS predicate VARCHAR2(2000); BEGIN predicate := '1=2'; IF (SYS_CONTEXT('USERENV','SESSION_USER') = 'SCHEMAOWNER') THEN predicate := NULL; ELSE predicate := 'USER_ID = SYS_CONTEXT(''SCHEMAOWNER'',''USER_ID'')'; END IF; RETURN predicate; END user_data_select_security; FUNCTION user_data_insert_security(owner VARCHAR2, objname VARCHAR2) RETURN VARCHAR2 IS predicate VARCHAR2(2000); BEGIN predicate := '1=2'; IF (SYS_CONTEXT('USERENV','SESSION_USER') = 'SCHEMAOWNER') THEN predicate := NULL; ELSE predicate := 'USER_ID = SYS_CONTEXT(''SCHEMAOWNER'',''USER_ID'')'; END IF; RETURN Predicate; END user_data_insert_security; END security_package; / SHOW ERRORS Next we make sure that all users have access to the Security_Package. GRANT EXECUTE ON security_package TO schemaowner,user1,user2; Apply Security Policies to Tables The DBMS_RlS package is used to apply the security policay, implemented by security_package, to the the relevant tables. BEGIN DBMS_RLS.add_policy('SCHEMAOWNER', 'USER_DATA', 'USER_DATA_INSERT_POLICY', 'SEC_ADM', 'SECURITY_PACKAGE.USER_DATA_INSERT_SECURITY', 'INSERT', TRUE); DBMS_RLS.add_policy('SCHEMAOWNER', 'USER_DATA', 'USER_DATA_SELECT_POLICY', 'SEC_ADM', 'SECURITY_PACKAGE.USER_DATA_SELECT_SECURITY', 'SELECT'); END; / Test VPD Finally, test that the VPD is working correctly. Now we will do the test CONNECT user1/user1 INSERT INTO schemaowner.user_data (column1, user_id) VALUES ('User 1', 'HR'); INSERT INTO schemaowner.user_data (column1, user_id) VALUES ('User 2', 'FINANCE'); COMMIT; CONNECT user2/user2 INSERT INTO schemaowner.user_data (column1, user_id) VALUES ('User 1', 'HR'); INSERT INTO schemaowner.user_data (column1, user_id) VALUES ('User 2', 'FINANCE'); COMMIT; CONNECT schemaowner/schemaowner SELECT * FROM schemaowner.user_data; Checking the select option: ------------------------ CONNECT user1/user1 SELECT * FROM schemaowner.user_data; CONNECT user2/user2 SELECT * FROM schemaowner.user_data; Thats all for now
Views: 180 OracleDBA
Virtual Private Database -Row level- Part I- database security
 
13:20
Virtual private database, oracle 11g, dbms_session, sys_context, context, dbms_Rls, column masking, row level security, package, function, log on trigger, dr. girija, dr.girija narasimhan, security database
Views: 1411 Dr. Girija Narasimhan
Virtual Private Database
 
04:49
Views: 138 TEJA A
j2ee017-HttpSession Intorduction
 
27:35
----------------------------------------------------------------- Best regard Apps-Stuff Muhammad Yassein - Cairo - Egypt http://www.apps-stuff.com follow us on Facebook - Twitter with Appsstuff
Views: 1489 Appsstuff Middleware
How to Set Environment Variables in Windows
 
01:27
Follow this step by step tutorial to learn how to set environment variables from system settings in the windows operating system. Don't forget to check out our site http://howtech.tv/ for more free how-to videos! http://youtube.com/ithowtovids - our feed http://www.facebook.com/howtechtv - join us on facebook https://plus.google.com/103440382717658277879 - our group in Google+ In this tutorial, you will learn how to set environment variables in windows. Operating systems require environment variables as settings and configurations for several processes. Although these variables are automatically defined or initialized during the installation of the system or specific software, in windows, to set environment variables manually is not a difficult task. That's because windows allows us to manually add, remove or edit environment variables through system settings according to our requirements. Step # 1 -- Opening environment variables In windows, to set environmental variables, you can take two paths. Either we can go to control panel, then access the system security option, and then the system option. Or we can simply right click on My Computer and select its properties. Once we are in the system window, select the advanced system settings from the list on the left side. A new window will pop up. Over here, click on the environment variables button near the bottom of this window and you can now access the Windows environment variables. Step # 2 -- Adding a variable In this window there are two sets of environment variables, one is the "user variables", and the other is the "system variables". Choose the new button in the user variables section to open the "define a new variable" dialog window. Over here, you will be required to define the variable name as anything you wish to set, such as temporary and then define its value as the path to the directory. With that done, let's complete this process by pressing OK. Your new environment variable has been created now. Step # 3 -- Editing and removing a variable To edit an environment variable, click on it, and then click on the edit button to open a dialog window. Here we can edit the name and value of the variable. Likewise to remove an environment variable, simply click on the variable and then click on the delete button. Once all the definitions are complete, close the window and restart your computer to allow the operating system to load these settings on boot. And that's basically all you need to know for how to set environment variables in windows.

Generic cialis usa net reputational risk
Allopurinol abz 100 mg tabletten
Klor con 10 meq generic lipitor
Generic name for lexapro 2012 presidential election
Motrin 200 mg posologie metronidazole