SQL & PL/SQL :: What Is Being Inserted / Updated In Database Currently
Apr 2, 2011
I wanted to know if there is a way to keep track of what is being inserted/updated in the database currently.
I tried psoug website and SQL_Trace at orafaq (I cannot post the links) but those are useful when you want to see what happens with your queries in a session... When I tried to modify an outer session by its id I couldn't find any trace file that could've been generated (and its impossible to change "tracefile_identifier" in an outer session)
There is an application that is customized by me and it inserts some additional records into the DB in its backend functionality to which I do not have an access (I mean I don't have any source of the backend code), so if I need to see what are the inserts being made, I have to do that directly from the oracle level. I've heard that it is possible and easy to do in MySQL (but I never used that DBMS).
View 3 Replies
ADVERTISEMENT
May 28, 2010
how can i know if all_source view is updated or a new data is inserted..
View 6 Replies
View Related
Oct 7, 2012
I tried to find out recently updated table list. I couldn't find anything.
CODE>> JUST SAMPLE TRANSACTIONS >>
SQL> conn sam
Enter password:
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$y1TXhcjGApvgQAB/AQBOpA==$0 TABLE
TAB1 TABLE
[code]........
View 1 Replies
View Related
May 16, 2012
I have seen the below blog abut database driven menu in java. uRL..... look into the below tables and its data below.I have concerned inserting data in the tables and particularly about
ROLE_DETAILS,ROLE_MASTER and EM_MENUMAS data.
select
level lvl,
ID, NAME,
lpad(' ', level * 14, ' ') || NAME menu,
parent_NAME,nodetype, page_name from em_menumas
[code].....
View 10 Replies
View Related
Aug 4, 2011
i want a query/function/procedure to check recently updated columns/tables in a database...
View -1 Replies
View Related
Mar 10, 2011
I am having trouble changing a non-displayed field when a displayed field is changed.
When a user wants to un-assign a territory they want to just null the ID field (non-database item). I then need to null the PIDM field(not visible, database item) for that one record.
I tried this, but I end up putting null on all the records instead of just the one record, which ends up un-assigning all the territories not just the one.
Is there a way to assign the null to the PIDM field associated to the ID field of that particular record.
View 6 Replies
View Related
Oct 19, 2010
My code format is:
Insert into table1
select val1,val2
from table2,table3
where table2.col2=table3.col2
and....(some more conditions)
I am working with Oracle 10g.This insert statement is called from a procedure for nearly 3000 to 4000 time.Now my problem is even though the select statement selects correct no. of rows but still it insert only 2 or 3 rows.Apart from it ,it's working fine for some cases i.e it insert the actual no. of rows that is being selected from the select statement.
View 3 Replies
View Related
Oct 20, 2010
My code format is:
Insert into table1
select val1,val2
from table2,table3
where table2.col2=table3.col2
and....(some more conditions)
I am working with Oracle 10g.This insert statement is called from a procedure for nearly 3000 to 4000 time.Now my problem is even though the select statement selects correct no. of rows but still it insert only 2 or 3 rows.Apart from it ,it's working fine for some cases i.e it insert the actual no. of rows that is being selected from the select statement.
View 5 Replies
View Related
Jun 12, 2008
I keep getting the "ORA-01401:inserted value too large for column". No biggie - I've dealt with this multiple times before (but obviously not enough in this instance).
The data being entered is a SINGLE digit number - a number like 1, 2 or 3 - nothing fancy, just a plain straight everyday single digit number. The field in question is / was set as field type "Integer". Now, there is no set field size for integers! - not in Oracle anyway. Since it wasn't happy, I decided I'll try field types of 'Number' and also "Varchar2" set to 10 bytes. I have deleted the column from the table and re-created it as well.
Here's the even more puzzling bit: I can INSERT data into this field, BUT I can not UPDATE the field with the exact same data. The data is being inserted from a csv file. The same exact csv file used to insert works, but the same data in the same file will not update only that particular column.
If I delete the specific column data from the csv file, all goes through fine. If I hard code the update for the field (eg SET field2 = '1' or even SET field2 = ' ') it still doesn't work. So I know it is not the csv file that is causing problems. I deleted all data from the csv file except the field in question - still no luck.
So after eliminating:
1. The field type
2. The field length
3. The data being inserted
4. The external source of the data
What else could possibly be the problem?
View 1 Replies
View Related
May 30, 2012
i m create a table emp . all user of database have privileged to read and write the emp table. now How can identify that which user have insert row in emp file ?
View 4 Replies
View Related
Aug 7, 2012
I need select last added/inserted records where value = 'test1' and = 'test2' and = 'test3' in column 'NAME' should be one record for each 'test1','test2' ...
aslo..table have column 'DATE_USR' with data_type = timestamp(6)
View 12 Replies
View Related
May 12, 2011
i am trying to insert a table through select statement. if i execute the select stmnt alone its working fine. but the table is not getting inserted?
View 10 Replies
View Related
Sep 3, 2012
I have a problem where my record is updated yesterday. How to get the record before updated?
View 4 Replies
View Related
Jul 9, 2013
We are using Release 11.2.0.3.0 of Oracle. I am having below special characters inserted into one of my columns, how this value got inserted, (what is the source) i need to track it down.
We dont have any audit trigger on this table to track one level below. As per JAVA guys this is uploaded through a file and the file is having well defined characters and no special characters for this column value also they uploaded the file again but its now going fine with no such special characters. So they put it on DBA's to find how special characters came into database?
Again the editor is not recognising all the characters , so i got the ASCII value for each of the characters in the string, its as below.
String - ‡Mw‹O--ggÑÆÔéÓÞ³µmT¤OˆÓ`ôiyïÎ!Ž
ASCII character is : ‡ ASCII Value Is : 14844065
ASCII character is : ‹ ASCII Value Is : 14844089
ASCII character is : -- ASCII Value Is : 14844052
ASCII character is : ASCII Value Is : 49793
ASCII character is : Ñ ASCII Value Is : 50065
[code]....
View 8 Replies
View Related
Mar 25, 2010
I have a table with lot of records.In this table, how do I find, which record is inserted just before a record in my question.
consider this example..
SQL> desc test1
Name Null? Type
------------------------------- -------- ----
SEQ_ID NUMBER
NAME VARCHAR2(1)
[code]....
in the above data, if I want to know what record is inserted before "1018", how can I find it.
Can we find out based on ROWID.?
View 13 Replies
View Related
Apr 16, 2012
I have the following tables:
CREATE TABLE test_abc(id NUMBER PRIMARY KEY, col1 NUMBER(10), col2 NUMBER(10), col3 NUMBER(10));
INSERT ALL
INTO test_abc VALUES (1,12345,34567,87654)
INTO test_abc VALUES (2,17345,37567,87754)
INTO test_abc VALUES (3,12745,34767,87674)
INTO test_abc VALUES (4,17045,30567,80754)
INTO test_abc VALUES (5,12740,34067,87604)
SELECT * FROM dual;
CREATE TABLE test_b (id NUMBER, col VARCHAR2(10), coltype_id NUMBER);
What I need to do is to convert the columns col1, clo2, col3 in test_abs into rows in test_b. but I need to do this so that the column name is what determines the value of colytype_id.So in test_b values will look like:
id col coltype
1 12345 1
1 34567 2
1 87654 3
and so on.
View 11 Replies
View Related
Apr 22, 2013
i have a table in that every month i insert rows and my table doesn't have primary key,index and date filed.for example:-table is like this
name salary Id
john5000101
brat4500102
smith4600103
john5500101
brat4600102
smith4800103
i think one cannot tell in above table whether "john" salary is 5000 or 5500(last insert row is 5000 then john salary is 5000)
when it comes to retrieve i have to pick the latest(last) insert row of particular Name.Is there any auto generated row_numbers in Oracle.
View 1 Replies
View Related
May 17, 2013
What would be the best way to Commit after every 10 000 records inserted from one table to the other using the following script :
DECLARE
l_max_repa_id x_received_p.repa_id%TYPE;
l_max_rept_id x_received_p_trans.rept_id%TYPE;
BEGIN
SELECT MAX (repa_id)
INTO l_max_repa_id
[code].........
View 9 Replies
View Related
May 9, 2011
There is a xxxxx.sql file in the OS level which contains create or replace trigger script. I modified that file with the code below:
if(upper(USER)= 'U_USER') then
execute immediate 'alter session set current_schema=USER';
end if;
after that, I went to sqlplus
and logged in to U_USER like this
SQL>conn U_USER/U_USER;
connected.
SQL>@xxxxx
some numbers are getting generated if i press enter.
Then i press ctrl +c and get to sql prompt.
I issue
SQL>select SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;
I am getting the output as U_USER but I must get the output as USER and not as U_USER. Basically the trigger is not getting updated.
View 1 Replies
View Related
Apr 11, 2012
I want to know that How to find which table got last updated and how to find last DDL and DML operation obtained in which table? here I know the table name
SQL> SELECT LAST_DDL_TIME FROM DBA_OBJECTS WHERE OBJECT_NAME='PREM';
LAST_DDL_
---------
20-MAR-12
SQL> TRUNCATE TABLE PREM;
Table truncated.
SQL> SELECT LAST_DDL_TIME FROM DBA_OBJECTS WHERE OBJECT_NAME='PREM';
LAST_DDL_
---------
10-APR-12
Note: With out enable the auditing I want to know that .
View 6 Replies
View Related
Jul 17, 2012
write a query find which rows of a table is updated on 2 days before?
(OR)
In table there r so many rows write a query which two rows r updated last two day before?
View 4 Replies
View Related
Dec 8, 2011
I Have a table with 100records.after sometime i updated some records . But after that i want to know how many (count of) records got updated
View 3 Replies
View Related
May 20, 2011
I have a promotion table which is having 3 columns.
PROMOTION_ID
display_name
ASSET_VERSION
This ASSET_VERSION
field keep on getting updated by other system where they may update the display name of the promotion_id.The main concept of this table is there will be a unique combitination of asset_id and promotion id.
Promotion_idDISPLAY_NAME ASSET_VERSION
123 1ST VERSION 1
123 2ND VERSION 2
123 3RD VERSION 3
456 1ST VERSION 1
456 2ND VERSION 2
456 3RD VERSION 3
789 1ST VERSION 1
789 2ND VERSION 2
789 3RD VERSION 3
So,my requirement is that i have the fetch promotion_id ,display_name that is having highset asset_version.
The OUTPUT SHOULD BE:
Promotion_idDISPLAY_NAME
123 3RD VERSION
456 3RD VERSION
789 3RD VERSION
I need a single sql for this .
Driver used: oracle.jdbc.xa.client.OracleXADataSource
Orcale version: 11G
View 24 Replies
View Related
Jul 16, 2013
I want know how the values in view DBA_FEATURE_USAGE_STATISTICS gets updated i have already checked the metadata of this view but unable to find how / when the values are being updated.
View 3 Replies
View Related
Oct 5, 2010
I have a table where there is no sequence maintained and there is no time stamp column to track the inserted record.How do I find the latest inserted record in the table.
View 5 Replies
View Related
Jun 13, 2011
We have a table, to which daily we insert 100 records. if we want to know recently or today inserted records from that table.
View 3 Replies
View Related
Apr 12, 2011
I would like to write a select statement on a table and I want the records to be retrieved in the order they were inserted.
View 17 Replies
View Related
Feb 11, 2013
I have table and it will contain huge data, so we have implemented as partitioned table. Every day when we load data into table there will be one partition created by the ETL Process by default with the Date Column(day wise). Now we may receive data for the previous days as well(Date column in table will have the date associated to the Data). No i would like the data should be inserted into partition which assocites to its own date.
View 5 Replies
View Related
Sep 21, 2013
I am using an Oracle Forms application. When you click a check-box in the form and save it,a record is inserted to a log table, they say. The DB schema has over 1000 tables and over50 log tables. Is there way using the data dictionaly to find out which table was inserted tomost recently? I don't have access to the Forms code. My goal is to find out the table that the Form inserted the log entry to.
View 7 Replies
View Related
Mar 20, 2013
I wanted to select data which is inserted on the same time.
Is that possible? I am trying with below query but facing isses.
SQL> SELECT a,b,c,d FROM tb;
no rows selected
SQL> SELECT a,b,c,d FROM (INSERT INTO tb VALUES(1,1,1,1));
SELECT a,b,c,d FROM (INSERT INTO tb VALUES(1,1,1,1))
*
ERROR at line 1:
ORA-00903: invalid table name
View 11 Replies
View Related