SQL & PL/SQL :: Create Trigger That Will Fire Whenever Any User Will Access Schema Of Oracle

Oct 31, 2011

I would like to create a trigger that will fire whenever any user will access to a Schema of Oracle DB (for each and every login). regardless the access will be through an application or SQLPLUS and this trigger must insert the below information into a table.

1) IP address
2) Machine Name
3) login time
4) logout time
5) name of accessed schema

writing this trigger and creating the table that will hold the required data.

View 6 Replies


ADVERTISEMENT

How To Fire A Schema Trigger From Outside Schema

Sep 24, 2012

A user is using an ad hoc tool similar to SQL Developer called PeopleSoft Application Designer.

He creates a connection to the db, then issues an alter session set current_schema = 'restricted_schema'. The connected user does not have direct privileges on the "restricted_schema" which they call SYSADM.

After changing the schema context in that manner he creates objects in SYSADM. A schema trigger is then fired and grants privileges on the new objects created in SYSADM. Doing the same in either SQL Plus or SQL Developer does not fire the schema trigger.

I think SQL Plus and SQL Dev are working as they should. Altering the session like that does not change your identity - just the schema context. But, when you examine v_$session, the connection with this other tool looks exactly the same as one from SQL Plus or SQL Dev when changing the schema context in the session.

Instead of trying to figure out what this other tool is doing, is there any way for that schema trigger to fire when using this process from one of our tools?

View 6 Replies View Related

Server Administration :: Create / Drop User / Schema In Another Oracle Database Through Apex

Jul 7, 2012

Through an Oracle Apex application I need to create/drop a user/schema in another Oracle database. i.e., create/drop user remotely using an Oracle Apex application.

View 12 Replies View Related

PL/SQL :: Create Trigger To Insert Data From One User To Another User In Same Database?

Apr 16, 2013

I Created One Trigger as Follows

CREATE OR REPLACE TRIGGER TRIGGER1
BEFORE INSERT
ON table1
FOR EACH ROW

[code]......

Here , I Want To Insert The Data From My User To Test User . In This Situation When I Execute The Above Trigger It Shows The Error PL/SQL: ORA-00942: table or view does not exist

View 3 Replies View Related

Create One Trigger Before DML On All Schema Tables

Nov 28, 2011

We have an application is must be connected to our database for specific requirements in our company but this application has a very bug thing as we must write the super DB password "Like HR password as example" clear in some files and these files must be shared so developers can use the HR password to do any action !!! I know that this application is a problem but we have to install

I can do this by creating trigger on each table will restrict DML. As example: if the operating system user is XXX, the trigger restrict the action. But not logic at all to create more than 1000 triggers on schema (This will impact badly on DB performance).

So, i need to create one trigger to fire before doing any DML on all schema tables. As example: If "MMM" the administrator operating system user trying to do insert action, he can do the action. BUT If "DEV" the developer operating system user trying to do insert action, the trigger must fire here to restrict this action.

Be noted also, i need this trigger not depend on any specific tool like Toad as any user can simply rename the exe file for toad then he can pass the trigger. At least, trigger must depend on (Operating system user & Action_type)

View 11 Replies View Related

Manually Fire A Trigger

Sep 10, 2010

I disable the triggers when I program. what the program is doing behind the scenes. So if I insert into a table, the trigger would fire and insert into another table. Disabling the triggers shows me that I need to insert into both tables. This also allows me to have the primary key in my conversion tables match the database.

With that being said, can I tell the trigger to fire after the fact?

View 1 Replies View Related

Trigger To Fire Whenever Update Happens?

Jan 17, 2013

I need a trigger to fire whenever an update happens. Seems easy, but there are several problems there:

- I need it to fire in case both :OLD and :NEW are the same value. i.e. I've got "5" currently in the field, and I update and set the same field to "5" again.

View 1 Replies View Related

Security :: Create User With Full Access On Default Tablespace?

Aug 12, 2011

i have been trying to create a user with full access on default Tablespace so that i can access all the objects without any restrictions for the new user.

View 7 Replies View Related

Security :: How To Create User Under Schema

Dec 5, 2012

To make users under one schema.

1) user should have access of all objects with limited privileges.

How can i make it under schema?

View 3 Replies View Related

How To Create A User (Owner Of Coeus Schema)

Dec 9, 2010

On the database instance where you want to install Coeus, create a user who will be the owner of Coeus schema. This user should have at least the following privileges. CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE USER, CREATE ROLE, CREATE SEQUENCE, CREATE SESSION CREATE TRIGGER, AND CREATE TYPE. If you choose, you can grant DBA role to this user.

Note: Coeus Schema owner should have CREATE USER and ALTER USER right explicitly granted to it, not through a role like DBA.

View 3 Replies View Related

Forms :: When-validate-item Trigger Doesn't Fire?

Jul 9, 2013

I am trying to make a particular field (called reason_code) "required" on a form I am working on.
Now this field has two fields before it, and I have to tab to reach my reason_code field.

But the functionality I want is that when I tab into the reason_code field, the WHEN-VALIDATE-ITEM trigger should fire even when this field is NULL.

IF :REASON_CODE IS NULL THEN
MESSAGE ("Please enter a reason code!");
end if;

The trigger doesn't fire when I don't enter a reason_code field and I can tab past this field and not get the ("Please enter a reason code!") error message.

On researching the problem, I saw that this field has to be of status "CHANGED" in order for the trigger to fire.

View 17 Replies View Related

Security :: Fire Trigger If And Database Object Will Created?

Nov 7, 2013

How to write and fire trigger if any database object will created?

View 1 Replies View Related

Application Express :: Create Collection In A Process To Fire On Page Load

Dec 31, 2012

My collection is not working as expected, what could be the issue here. This is what i did,

1. I created a collection in a process to fire on page load

if apex_collection.collection_exists(p_collection_name=>'MMMM') then
apex_collection.delete_collection(p_collection_name=>'MMMM');
end if;
APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(p_collection_name => 'MMMM');

2. On my page i have a text field P1_text1 when i enter value into text field like ="sample data" i want this data loaded into my collection, so i created a button and added a process(on submit - before computations...) so it should insert into the collection when i click the button but no data is loaded, process:

APEX_COLLECTION.ADD_MEMBER(
p_collection_name => 'MMMM',
p_c001 => :P1_TEXT1,
p_c002 => 'TESTDATA' );

3. when i run the below query it shows "no data found" ,

SELECT c001,c002
FROM APEX_COLLECTIONS
WHERE collection_name = 'MMMM';

View 4 Replies View Related

Access Oracle Database From Root User?

Dec 18, 2012

i have an linux instance running oracle 11g as oracle OS user. i am able to connect the DB from clients.

i need to access this DB from OS root user. what should i do.

View 7 Replies View Related

Security :: Provide Read / Write Access To Oracle User?

Jun 2, 2011

I will have to provide read/write access to an oracle user. What privileges should i grant to the user so as to enable the user to read from and write to the files?

View 2 Replies View Related

Server Administration :: Difference Between A User And Schema On Oracle?

Apr 26, 2010

difference between a user and schema on Oracle.By difference, I do not mean what is a user and what is a schema.

I understand that if we create a user, the schema gets created by default for that user. Does that mean that we cannot create a user/schema alone.

What if I just want to create a user and grant him some read access on an existing schema or just want to create a schema.

View 7 Replies View Related

Create Procedure To Create User In Oracle

Jan 19, 2012

I need to create PROCEDURE to create user in oracle

CREATE OR REPLACE PROCEDURE "CREATE_USER_ORACLE8"
(
USER_ID in VARCHAR2,
PASSWORD in VARCHAR2,
ROLES in VARCHAR2,
nReturnCode OUT NUMBER
)
BEGIN
[code].......

Compilation errors for PROCEDURE NOG.CREATE_USER_ORACLE8

Error: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

; is with authid deterministic parallel_enable as
Line: 9
Text: BEGIN

i want that the customer execute PROCEDURE (user_id,password,PROCEDURE )

View 5 Replies View Related

Forms :: Login User From One CANVAS And Access Second As Per-user Rights?

Oct 20, 2012

- we have user id parameter.can we update the parameter(:parameter.p_userid) before firing "WHEN NEW FORM INSTANCE TRIGGER"(when new form instance trigger contain code for tree node), for login another canvas as per user rights?

- i have created a login form in one canvas.

- also tree node Hierarchy form created on another canvas. now we want to login through login screen, after login only those forms should show in tree Hierarchy which users have rights. for this purpose we want to pass the parameter of userid before connecting to tree node form through the following query

SELECT COUNT (*)
INTO v_count
FROM usersinfo
WHERE usersname = :USERBLOCK.usernames AND passwords = :USERBLOCK.passwords ;

[code]...

Every thing is working but when we click on button in login form at that time parameter.p_userid will return null. because above code is define on button click in login screen, i cannot understand where i need to define the above code .

View 1 Replies View Related

Security :: Schema Consolidation And User Schema Mapping Based On Service

Jul 24, 2011

We have an application with many separate databases (one per customer). Given they share the same business requirements (service hours, change mgmt etc), we're interested in potentially consolidating the separate DBs (which are relatively small) into separate schemas within a fewer no of databases to reduce the overhead.

Our issue is that the application is hard-coded to use a specific administrator and application connection user name. Changing this is unfortunately not an option.

Given this limitation, is there any possibility to map a generic user into a customer-specific schema based on the database service that they connect to? Each customer connects to different database services but may use the same user name. We considered using private synonyms but this seems to acheive the opposite (i.e. many different users could connect and map to a single users schema). One thing to point out is that where there is a single user name, it is acceptable for a single password to be used across the different customer DBs as they will be a single admin/user.

View 5 Replies View Related

Create Schema That Needs To Be Converted Using Non-oracle Syntax

Jan 27, 2011

I am new to oracle and sql in general, I received an oracle create schema that needs to be converted using non-oracle syntax. I have never seen this syntax before.

What does the following syntax mean?
CODE,line_status(1:20) char(2) null

CODE,file_line(1:6) char(40) null

View 4 Replies View Related

Client Tools :: How To Create A Table In Another Schema As In Existing Schema

Apr 26, 2010

I would like to create a table in another schema(CBF) as already exist in my schema(TLC) without data but related indexes,synonyms and grants should be include.

How could I do this without using export import. I am using TOAD 9.0.1.

View 10 Replies View Related

Client Tools :: Grant User Schema To Another User

Feb 9, 2011

I have two users say A and B. I have all the tables,views,indexes, types,procedures,packages etc. User B wants to access all the objects from user A.

View 4 Replies View Related

SQL & PL/SQL :: DBA User Access To Other User Objects

Dec 6, 2010

when a dba user'AA' try to access other user'BB' object it gives error pls-00201 identifier 'BB.function_name' must be declared. However the procedure of BB user are being accessible.

View 17 Replies View Related

PL/SQL :: Procedure Access From One Schema To Another

Aug 2, 2013

I have created one procedure in SCOTT schema. just i need to see that same procedure information to TEST schema. how its possible.if im using

SELECT DBMS_METADATA.GET_DDL('PROCEDURE','PROC_NAME','SCOTT')

FROM DUAL in scott schema mean i can see that full procedure information,like wise i need to see in TEST schema mean what command i need to use.  

View 20 Replies View Related

Read Access To Schema

Oct 12, 2012

Below is the request i have received from a user -

" Can you setup user <usernmae> in <database>S to have read only access to <applicationname> (CHADBA, CHAS, EMI and SVCM schemas)"

Steps I have followed -

create user <usernmae> identified by password default tablespace USERS temporary tablespace TEMPL;

Grant PRODUCEBILL to <username>;
Grant REPORTING to <username>;
Grant PAYMENT to <username>;
Grant CONNECT to <username>;

My question is as user has request for read only access to specific schemas, so how do I validate them?

View 11 Replies View Related

Unable To Create User On Oracle DB

Nov 18, 2010

I have encountered a problem with oracle db where by i'm unable to create a user.

oracle@kapstadt4:/export/home/oracle/scripts> ls -l
total 12
-rw-rw-rw- 1 oracle dba 1115 Sep 10 15:34 crdb.sql
-rwxrwxrwx 1 oracle dba 429 Sep 10 15:39 create_advantage_user.sql
-rw-rw-rw- 1 oracle dba 597 Sep 10 15:38 create_advantage_user_objects.sql
-rw-rw-rw- 1 oracle dba 408 Sep 10 15:37 create_advantage_user_roles.sql
-rw-rw-rw- 1 oracle dba 976 Sep 10 16:04 tbs.sql
oracle@kapstadt4:/export/home/oracle/scripts> cat create_advantage_user.sql

-- creates an advantage database user
-- the role 'advantage_admin_user' must be available!

define user_name = &1
rem define default_table_space = &2

create user &user_name
identified by &user_name#123
default tablespace IN_DEV
temporary tablespace TEMP;
grant connect to &user_name;
grant resource to &user_name;
grant advantage_admin_user to &user_name;
connect &user_name/&user_name#123
@create_advantage_user_objects.sql

[Code] ........

View 5 Replies View Related

How To Create Read Only User In Oracle

Nov 16, 2013

1. To create a read only user who can only query the views as well as db tables and views. 
2. How to create such a read-only user. 3. I have taken a full expdp backup of the production and trying to import it on the pre-production.

I use impdp

system/password table_exists_action=replace full = y dumpfile=file_name.dmp remap_schema=SYSTEM:NEW_USER remap_tablespace=SYSTEM:NEW_USER ;

This can replace and import the tables but it can't replace and add the constraints , do I have to add some other parameter in the syntax if so what it should.

View 11 Replies View Related

Create Dummy User Like Oracle On Linux OS?

Aug 28, 2013

Is it possible to take export import to the Oracle DB/Schema/Table from other linux user? i have plan to create dummy user like oracle on Linux box, so developer will use this dummy user and logging to oracle BOX and take the dump.  I have created one user "TEST" in linux OS. but what is the next? what privilege is required or take dump from other linux user? 

oracle:x:501:502::/home/oracle:/bin/bashtest:x:502:504::/home/test:/bin/bash

View 19 Replies View Related

Server Administration :: How To Give Full Access To Other Schema

Apr 15, 2012

I want to get clear with one thing yesterday i installed oracle9i and dev 2000 to my client.

when they run one report they got stuck with pl/sql compilation errorrep-1247

when i checked that report in the report builder, in the query they are using some other table which is not belongs to that schema,then I give that schema.tablename and compiled, but this is coming for other reports also, then only i came to know that they are acceessin other schema also, how can i sort this out.

can i fix this by givin full access privilige or what privilige can i give to get full access of other schema table.

how can i check in the old database what are all the roles and privileges given to this user,

View 5 Replies View Related

SQL & PL/SQL :: Very Slow Access And Updation Of Table Data Of Another Schema

Jun 3, 2010

I am trying to access and modify data of a table of another schema which contains 80,000-90,000 records. My procedure is taking near about 30 mins to complete the operation. faster access and updation of table data.

Details:
I have two schema: TEST and PROD
I am running the below code from TEST Schema.
/* CODE START HERE*/
DECLARE
exc_bulk_errors EXCEPTION;
PRAGMA EXCEPTION_INIT (exc_bulk_errors, -24381);
v_block_count NUMBER := 1000;

[Code]....

The above code is taking near about 30mins to process.

I have also tried another approch: Creating a procedure in PROD schema to update COMPONENT_MASTER table and by calling the procedure from above code by passing component code.

/* PROCEDURE CALL FROM ABOCE CODE INTEST SCHEMA*/
PROD.PROCEDURE_TO_UPDATE(v_comp_code);

But still it is taking same time.

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved