Forms :: Commit After Insert Into Audit Table

Jul 5, 2013

I am just making a audit table as well. i have learnt the basics from here URL.....

My problem is that after inserting into audit table if i issue commit command then the table + unsaved data present on the form is also saved.What i want is that i issue a command which save only inserted record in audit table, and should NOT save data present on the data entry form. (which will be saved later by other method/button).

View 9 Replies


ADVERTISEMENT

Forms :: Record To Be Inserted Into Table As Audit-trail Of Printing

Feb 3, 2010

I am using oracle developer 10g. I want to know the status of the printer where i want to print. If the running report is printing or in queue then a record is to be inserted into a table as audit-trail of printing. Idon't want to do it manually.

View 1 Replies View Related

SQL & PL/SQL :: Insert Statement Which Will Commit Transaction By Itself

May 22, 2010

What is the syntax to write an insert statement which will commit the transaction by it self,not using an exclusive commit statement after wards.

View 2 Replies View Related

Security :: Audit Update / Modify And Insert

Oct 18, 2011

I am using 'Novell Sentinel Log Manager' to collect/fetch logs from my Oracle 11g R2.To enable auditing, first I did following:

login as sys, then
SQL> create user testuser identified by "testuser";
SQL> grant connect to testuser
SQL> grant dba to sharf
SQL> grant CREATE SESSION to testuser;
SQL> grant select on v_$session to testuser;
SQL> grant select on v_$version to testuser;
SQL> grant select on SYS.DBA_AUDIT_TRAIL to testuser;
SQL> grant select_catalog_role to testuser;
SQL> grant select any dictionary to testuser;

Now logon/logof of user 'testuser' are logged , as well as if testuser drops a table or creates a table, its also logged . but when 'testuser' insert a new record, this information does not logged ;( while I need to know exactly what was added SQL> insert into emp (empid, name, salary) values (10002, 'Ron', 6000)

likewise if 'testuser' modify/update an existing record it also does not logged.
SQL> update emp set salary=700 where empid=10001;

which sql statements I have to execute to start auditing 'insert' and 'update', so that I know what was added/inserted and exactly what was updated/ changed/modify by user 'testuser'.

View 12 Replies View Related

SQL & PL/SQL :: How To Commit After 1000 Records In Simple Insert Statement

Oct 10, 2011

I am using Oracle 11g Release 11.2.0.1.0

OS: windows

I am taking an example of EMP table in a scott schema.

EMP_1 is also a same structure of EMP.

Here is the Insert statement used.(i might get where clauses etc in the real scenario i am taking a simple example here)

INSERT INTO SCOTT.EMP_1(JOB,ENAME,EMPNO) SELECT JOB,ENAME,EMPNO FROM SCOTT.EMP

table EMP is having around 25 million records.

i would like to do a commit after every 1000 records. as my redo log is getting full if i use a single commit at the end.

Quote:pls note: Increasing of redo log is not possible as of now

is there anyway i can acheive this without cursor bulk collect.

View 7 Replies View Related

SQL & PL/SQL :: Insert Statements / Give A Commit One By One After Each Insert Statements?

Oct 11, 2012

Can we execute more than one insert statements at a time (eg 10) in database and givecommit at the end of insert statements or else give a commit one by one after each insert statements ?

View 8 Replies View Related

Forms :: Read Data From Table And Insert To Another Table With A Cursor?

Feb 20, 2013

I have a table with a BLOB column ;

I want read data from table and insert to another table with a cursor

My code is :

procedure read_data is
cursor get_data is
select id,image from picture1;
id1 number;
pic blob;
begin
open get_data;

[code]....

when I run form , error FRM-40734 occurred

error in line " fetch .... "

View 1 Replies View Related

Forms :: Insert Values In A Table Through Ref

Aug 26, 2011

Table Structure:
Name of Table: info
Column: ID, Name, Cell,Cell1,Ref

i want to insert these values in a table through ref (key next item).
-----------------------------------------------------------
Key next Item Triger
DECLARE
A NUMBER;
B NUMBER;
BEGIN
SELECT :CELL,:CELL1 INTO A,B FROM DUAL;
[code].......
-------------------------------------------------------
but when i press enter(ref Key_next_item) it will return error:

FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR: ORA 40102

View 12 Replies View Related

SQL & PL/SQL :: Audit Particular Table

Apr 20, 2012

We can audit a particular table alone, I would like to audit one table, to find all different kinds of queries fired (Including select, insert and update) over a period of 2 months.

View 4 Replies View Related

Forms :: Dynamic List From One Table And Insert Into Another?

Jan 10, 2013

Im facing some issues with my form, getting stuck... prob desc below : I have Table A which has columns; car_year, car_type, line_num, line_text. Table B has country, car_year, car_type, line_num, data_entry_amt.

Table A contains data which gets updated once every year only. Contains what year model is the car, what type of car it is.. Line_num has numbers starting from 1 which indicates the different part number and line_text has description for that line_num. eg :
2010 Toyota 1 Windshield
2010 Toyota 2 Door
2010 Toyota 3 Tire
2010 BMW 1 Windshield
2010 BMW 2 Door
2010 BMW 3 Tire
2010 BMW 4 Rear_mirror

Table B contains specific data related to table A, Contains country where car details n prices are, car_year, car_type, line_num, and amount($) for that part. for example :
Australia 2010 Toyota 1 400.50
Australia 2010 Toyota 2 200.40
Australia 2010 Toyota 3 308.25

So in year 2010, in Australia, Toyota's Door was sold at $200.40 Now, Table A will have similar data for this year and users will enter data for table B throughout this year. I tried master-detail form for this but it doesnt work. Because every year line_num change in table A and therefore cant implement a fixed number or rows on the form for amount for table B.

How to use dynamic listing but im not familiar with it. So how i should go about doing this. My form has structure has below :

Country Car_year
___________________________________________________
table_A.line_num table_A.line_text table_B.data_entry_amt
table_A.line_num table_A.line_text table_B.data_entry_amt
table_A.line_num table_A.line_text table_B.data_entry_amt
table_A.line_num table_A.line_text table_B.data_entry_amt

When clicked on save, data on table_B.data_entry_amt on this form should go n insert into table B.

View 1 Replies View Related

Forms :: Insert Data And Then Update Table

Aug 5, 2010

i have a tabular form select * from emp and i want to create table and store there data in goup select empono,sal,com group by dept i want to insert in another table.

how i insert the data in table by forms front end and then update also when again click the button or any change occur in form insert into a select empono,sal,com group by dept

View 2 Replies View Related

Forms :: How To Insert Data In Two Table In Same Time

Feb 4, 2012

how to insert data in two tables in same time

table1 --master table
table2 --transaction table

View 13 Replies View Related

Updates In Audit Table

May 22, 2011

I have to create a audit/history table on a master table so that I can store the old/current state of data in my audit table. I am planning to write following program.

1. Created the audit table with similar number of records.
2. Everyday at a particular time I will compare the audit/main table and push the records in audit table which are either updated or not present in the audit table so that the audit table = main table + old state of data.

I am unable to figure out the proper way to implement the point 2 above in oracle database.

View 3 Replies View Related

PL/SQL :: Audit Change In A Table?

Feb 27, 2013

We need to audit what data has changed from Vendor_B table when compared to Vendor_A table.

There is two tables:

a) VENDOR_A
b) VENDOR_B

VENDOR_A and VENDOR_B table does not share the same structure but have 1 column in common - the ID and may or may not having changed Coordinates.

We need to audit what coordinates has changed from Vendor_B data when compared to Vendor A and get the report back in the format of:

<pre>
               VENDOR_A VENDOR_B                    
ID     Change_date     LONGITUDE     LATITUDE     LONGITUDE     LATITUDE     
873     1/02/2013     -33.46711315     151.3195056     -33.46211316     151.3245057          
694     3/02/2013     -33.46721315     151.3198056     -33.46214312     151.3265053     

</pre>
---------------------------------------------------------------------------------------------------------------------------------------------------
--Found a sample query from Ask Tom but I am not sure how I can apply them to get the structure above.
---------------------------------------------------------------------------------------------------------------------------------------------------
<pre>
create table base_tab (pk number, column1 number, column2 varchar2(30), column3 date);
Create table refresh_tab (pk number, column1 number, column2 varchar2(30), column3 date);
Create table diff (pk number, column1 number, column2 varchar2(30), column3 date, base_tab number,
refresh_tab number, action varchar2(30));

[Code] .....

--clean out the differences table
truncate table diff;

--------------------------------
-- build the difference data
------------------------------------
insert into diff select pk,column1,column2, column3,
count(src1) base_tab, count(src2) refresh_tab, null action
from
( select a.*,

[Code]....

View 8 Replies View Related

Forms :: Insert Date And Time Automatically In Table

Apr 29, 2013

i have emp table of 5 columns empno,ename,dept,sal,edit_timing(edit timing datatype is timestamp).and my form contains empno,ename,dept,sal. is if i insert a record into forms it automatically insert the date and timing into edit_timing columns.

View 2 Replies View Related

Forms :: Updating - Insert Some Data In Transaction Table

Feb 1, 2011

i want to insert some data in the transactions table on after insert trigger. Which trigger should i use on form level to accomplish this task.

View 4 Replies View Related

Forms :: How To Insert And Update From Global Temporary Table

May 15, 2013

Global temporary Table Name:

1.MT_GBL
2.DT_GBL
3.DT2_GBL

Base Table Name:

1.MT
2.DT
3.DT2

My Steps:

1.Insert all data from global table to base table.
2.Update all data (that means retrieved all data from base table to global table and update this data). Question: How to Insert and Update from Global temporary table ??

View 4 Replies View Related

Forms :: INSERT Record - Update Columns Of Table

May 31, 2010

I would like to UPDATE the columns p1 and p2 of my table student (studentid:pk,name,p1,p2,...) for a given studentid.and I have a when-button-pressed trigger with this

UPDATE student
SET student.p1=:validation.proj1,
student.p2=:validation.proj2
where UPPER(student.studentid)=UPPER(:validation.studentid);commit_form;

when I run my form with a correct studentid, I got this error: FRM-40508: ORACLE error: UNABLE to INSERT record

but it is cworking correctly in sqlplus; and I have all priveligies.

View 4 Replies View Related

SQL & PL/SQL :: Audit Table With Primary Keys?

Feb 19, 2013

I need to copy the changed and deleted data in an other table. I have searched this site ,asktom and other sites also. I found the following solution from asktom website. But it gives me the changed columns data only and i need the primary key with changed data and deleted rows also.

DROP TABLE emp;
CREATE TABLE emp AS (SELECT * FROM scott.emp);
CREATE TABLE audit_table

[Code].....

View 10 Replies View Related

Audit Dml On Few Table For Non Application Users

Oct 12, 2013

I want to audit  dml on few table for non application users.can I omit only application users from audit so that whenever new user is created we need not to add audit for user.do i have to create audit logon trigger for this which check first the application user names from table and if logged user is not application user auditing will start for it.

View 4 Replies View Related

Forms :: Commit_form Does Not Commit

Dec 18, 2011

I am calling a child form from a parent form.It works perfectly if the parent form is adding records and while entering records when i press the button to call the child form, the whole things work perfectly according to plan.

The problem begins when i run execute query command in the parent form and then call child form then it does not "commit_form". So this is my problem that child form does not work perfectly when parent form is being called in execute_query procedure.

My working:

1) I read in the documentation that When parent form status is query_only then child will also have the same mode regardless of the parameter given in call_form.So i checked the :SYSTEM.FORM_STATUS of both the parents and child form,it shows "CHANGED" hence this point is covered. (dont know how come the parent form is in changed status but at least it is doing my work)

2) I further read and found that Commit_form procedure make the :SYSTEM.FORM_STATUS as QUERY. Here i am facing problem as in child form when i make changes and press commit form. Then before commit_form and after commit_form the :SYSTEM.FORM_STATUS results in "CHANGED".You can see this in the following code which i have written in save button.

message(:SYSTEM.CURRENT_FORM || ' a ' ||:SYSTEM.FORM_STATUS); pause;
commit_form;
message(:SYSTEM.CURRENT_FORM || ' b ' ||:SYSTEM.FORM_STATUS); pause;
IF Form_Success THEN
Commit;
IF :System.Form_Status <> 'QUERY' THEN
Message('Error prevented Commit');
RAISE Form_Trigger_Failure;
END IF;
else
message('FAIL');
END IF;
exit_form;

then at last exit_form module shows that" i have unsaved data in the form" save Yes-No-Cancel?

View 16 Replies View Related

Forms :: Commit With Condition

Jan 9, 2013

After committing form i want to clear few item and retain few item and make the form ready for next record to be inserted along with retained item.

View 4 Replies View Related

Forms :: 10g Win XP 32 Bit - Key-commit Trigger?

Oct 10, 2013

I have a problem with key-commit trigger. I have written some validations and computations criteria on the block level (lines level). Actually there are a number of loops involved in it.

Problem is that the computations are performed twice. (may be the validations would also be performed twice, which couldn't be felt ). Since i read somewhere that key-commit is fired on different events, which i infered to be firing only just before database commit.

View 1 Replies View Related

Forms :: How To Insert Value Of Selected Radio Button In Database Table

May 10, 2010

Suppose There are Four options in a Radio Group. From this whichever option I select using the Mouse that option must be Inserted in the Database table field.

How to do this Using Radio Buttons.

Also If I want to select more than One Option Then I use Check Box. For this Also When I select two or three options simultaneously then these values must be Inserted in the Database Table Fields.

View 1 Replies View Related

Forms :: Hierarchical Tree - Retrieve Values And Insert Into Table

Apr 19, 2010

My Form consists two Hierarchical trees. When I select a node from first tree and I press Move Right (>>) Button the selected node should move to the second tree. Similarly when I select a node from second tree and press move Left button(<<) it should move to the first tree.

I also want to know want to insert values Into New Table using node values from The Displayed Hierarchical Tree. How to retrieve values using populate_Group_from_tree and insert into table.

View 2 Replies View Related

Forms :: Getting Error At Compilation Time / To Insert Images Into Table

Oct 3, 2011

I am getting error at compilation time. I want to insert images into table. The code is

declare
f_lob bfile;
b_lob blob;
begin
INSERT INTO imag VALUES(empty_blob())
return img INTO b_lob;
f_lob := bfilename( 'PIC', 'DESERT.JPG' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
end;

errors are
[code]

View 1 Replies View Related

SQL & PL/SQL :: Trigger - Send Booking ID To Audit Table

Jun 3, 2010

I'm trying to create a trigger that will come into play after the user has inserted a 0 for the booking evaluation, i need the booking id sent to the audit table. This is what I have tried so far:

CREATE OR REPLACE TRIGGER zero_evaluation
AFTER INSERT OR UPDATE ON booking
FOR EACH ROW
WHEN (NEW.Evaluation=0)
BEGIN
INSERT INTO audit (audit_id, booking_id, Reason)
VALUES (audit_id_seq.NEXTVAL,:NEW.booking_id, 'Contact customer for 0 evaluation');
END;

I get the following:
Line 2 PL/SQL: SQL Statement ignored
Line 3 PL/SQL: ORA-02289: sequence does not exist

This is my SQL statement:
CREATE TABLE audit
(audit_id numeric(5) not null,
booking_id numeric(5) not null,

[code]...

View 5 Replies View Related

Forms :: Clearing The Form After Commit

Aug 25, 2011

Is it possible to clear the form after a successful commit? In order to avoid the user from double posting of record by making double commit.

View 17 Replies View Related

Forms :: Commit Record Automatically?

Mar 15, 2010

I have a master detail form based on two tables and i want to save the record automatically when the user exits the last field.how i can do it.which trigger is appropriate and what is the code.

View 8 Replies View Related

Forms :: Loop To Commit More Than 1 Record?

Jul 3, 2010

i made this loop to commit the same item but depend on the count of suppliers to set the same item every time to different supplier . but the problem this code commit only the first sypplier but not any othere one ..

code : { key - commit - trigger }
declare
var_record_count number ;
VAR_p_request number;
begin
var_record_count:= get_block_property('control',CURRENT_RECORD);

[code]....

View 2 Replies View Related







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