Auditing And Implicit Commits

May 11, 2009

I'm working on a Java-based web application and we have unit tests that we use to test all our all code that interacts with the database or code that interacts with our DB code. The Spring framework allows us to perform some DML within a transaction before each test and then rollback the changes. For the most part, this works, however when I run the full suite of unit tests, it will randomly commit data to the database causing the rest of the tests to fail.

will Oracle's auditing let me see where this odd-ball commit is occurring? Is there another way for me to see when data is being committed?

This does not appear to be happening on any of the systems we've deployed, however this is a bit unsettling and would like to know why this is occurring so that we can prevent it from happening in production.

View 1 Replies


ADVERTISEMENT

(log File Sync) And Commits?

Jan 23, 2013

When a user session commit he is waiting on 'log file sync' untill LGWR sends the message back to user session after writing log buffer content into redo log file.As far as i understand this is serialize operation(one at a time).

So how come i have 7 ms average 'log file sync' wait time and i can still perform 200 commits per sec ?

7 ms * 200 waits = 1400ms = 1.4 sec

View 2 Replies View Related

PL/SQL :: Finding Commits In Plsql During Runtime?

Jul 19, 2012

In any application, we will have many commit statements issued in many places. How can we find out as to where all commits have happened during runtime.

Basically in our application, when am trying an operation, am getting the error ORA-01086: savepoint <save point name> never established.

My guess is that there is a commit somewhere because of which system is not able to rollback to that save point.

View 1 Replies View Related

Update With Case Clause Auto Commits

Nov 26, 2012

i tried the following update on one table:

update siebel.s_contact
set marital_stat_cd =
case
when (marital_stat_cd = 'Casado') then 'Married'
when (marital_stat_cd = 'Solteiro') then 'Single'
when (marital_stat_cd = 'Divorciado') then 'Divorced'
end

As you can see i forgot the else, so my update is wrong.

I thought i could rollback the update issuing the rollback statement, but when i have issue the rollback, the i query the table to confirm that the update was rollbacked and for my suprise the update is commited.

I didn�t issue the commit statement after the update and i confirmed that the auto-commit feature to worksheets is disabled, so i don�t understand whit the update was commited.

View 5 Replies View Related

Forms :: Post Built-in Commits Changes In The Database?

May 7, 2010

I have been testing out a form using 10.1.2.0.2 on a v10.2.0.1 db and in my local env. the form works correctly i.e. if I make a change and 'post' it and then exit and press NO (when asked to save changes) then it correctly leaves the value in the database as it originally was.

The process works by the user pressing a button in form A (read only form) and this opens form B (using open_mode,session,activate) and the user makes their change(s) in form B (a 'post' command is issued in a When New Rec Inst trigger on a db block when the user navigates to a new record within the same block if it is determined that the block status <> 'QUERY') before returning to form A and pressing 'NO' when prompted to save changes.

However, if I run the same process in the TEST env. using the same executable against the same database then it actually updates the database value.

I have tested this by adding a debug message at the end of form B to retrieve the db value back AFTER having issued a clear_form(no_commit) just for the sake of the test and it still returns me the 'new' i.e. amended value - which is obviously incorrect. From what I can see it would appear that the commit occurs straight after the 'post' has been issued and well before the user even exits the form.

Is this a known bug with the 'post' built-in or could it be that a parameter is set to act in this way (i.e. is there an 'autocommit' setting that is 'ON') within the application server?

View 8 Replies View Related

SQL & PL/SQL :: Cursor Loop With 3 Commits In Middle Based

Feb 19, 2010

We have a fact table t1 in the warehouse which has above 6 million records.There is to be an update like this where t2 has aid+bid as composite primary key. column aid repeats in t1.There's performance problem and we'v been told to break this huge update into pieces with few commits in the middle.

update t1
set t1.aid =
(select t2.aid from t2
where t1.bid = t2.bid
)

I've tried cursor loop with 3 commits in the middle based on if condition that evaluates on every iteration.

View 8 Replies View Related

SQL & PL/SQL :: Regular Expression To Find Commits In All Oracle Source?

Oct 14, 2013

I would like to write a select that would return all places in DB that are commiting transaction.

E.g. package for testing:

CREATE OR REPLACE PACKAGE test.TEST_COMMIT AS
PROCEDURE THE_ONLY_COMMIT_IN_DB ;
END TEST_COMMIT;--not a match
CREATE OR REPLACE PACKAGE BODY test.TEST_COMMIT AS

[code]....

The select should return 4 rows with --ok.

SELECT *
FROM ALL_SOURCE ASO
WHERE
REGEXP_LIKE(ASO.TEXT,'commit(s*);','i' )
AND name = 'TEST_COMMIT'

View 18 Replies View Related

Implicit Commit While Purging

Oct 24, 2011

I have written a purge package that would delete records older than 10 years. Since the data is huge, the purging was taking 14 hours plus. To improve performance, I disabled constraints , deleted records and then reanabled them. This was quite quick but the only problem is rollback. Say for some reason if enabling constraints fails there is no way to rollback as enabling and disabling constraints does an implicit rollback.

View 1 Replies View Related

SQL & PL/SQL :: Use Implicit Cursor In Program

Aug 18, 2010

I've tried to use implicit cursor in my pl/sql program and i get an error as following:

DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 17

Then,I tried to include an exception for it and the error is 'solved'.

DECLARE
d_call_id course.call_id%TYPE;
d_course_name course.course_name%TYPE;
d_term_desc term.term_desc%TYPE ;
d_f_first faculty.f_first%TYPE;
d_f_last faculty.f_last%TYPE;
d_day course_section.c_sec_day%TYPE;
d_time course_section.c_sec_time%TYPE;
d_bldg_code location.bldg_code%TYPE;
d_room location.room%TYPE;
[code]....

By actually the program are suppose to return the records instead or returning the error. I've included the table that i'm trying to retrieve the records from as well.

View 4 Replies View Related

SQL & PL/SQL :: Implicit Cursor In Single Statement?

Feb 7, 2011

1) SQL Statements are not using IMPLICIT CURSORS.

2) Only the SQL statements of the PLSQL program create implicit cursors.

View 1 Replies View Related

SQL & PL/SQL :: Does Commit Close Implicit Cursor

Feb 3, 2011

We all know that commit will do the following.

1. Save the Txn Permanently to the database.

2. Release the table locks and

3. Erase the save points.

TABLE NAME:
==========
create table TEST_PREC (NO NUMBER(4,2));
DECLARE
BEGIN
INSERT INTO TEST_PREC VALUES (12.34);
DBMS_OUTPUT.PUT_LINE('the no of records before commit '||SQL%ROWCOUNT);
commit; /* What's happening inside commit */

[code]....

why the SQL%ROWCOUNT is set to zero after commit.

Does the commit, close the implicit cursor?

View 3 Replies View Related

SQL & PL/SQL :: Differences Between Explicit And Implicit Cursor?

Nov 16, 2011

what are the main points that these examples are considered cursors? and why are they called explicit and implicit cursor.

explicit
for x in (select * from emp) loop
dbms_output.put_line('emp no: '||x.empno);
end loop;

implicit
select empno
into vEmpno
from empno
where empname = 'SCOTT';

for all we know that these are not clearly defined on the declaration area as cursor.

View 16 Replies View Related

SQL & PL/SQL :: Difference Between Implicit And Explicit Cursor?

Feb 21, 2013

What is the difference between implicit cursor and explicit cursor in PL/SqL?

And what is ref cursor ?

View 2 Replies View Related

PL/SQL :: Difference Between Explicit And Implicit Cursor?

Nov 5, 2013

difference between between these two constructs. Finally  when i read the asktom.oracle.com , I was totally confused. The reason is thatTom says...we can retrieve more than one row in implicit cursor. If that would be case, what's the difference between these two cursors?? when to use?? My understanding was implicit cursors" ---> single-row queryExplicit cursors ---> multi-row query Experts

View 10 Replies View Related

Implicit Data Conversion / Join Conditions Between Number And Vrahchar2

Jun 17, 2013

In my Project, there are many queries have join conditions between Number and Vrahchar2. Will it give any wrong results or Invalid Number exception even the varchar2 column always contains the number data?

Example:
Select * from Table_t1 t1, table_t2 t2
where t1.num_col = t2.var_col
-- Here var_col always hold only numaric data.

View 1 Replies View Related

Precompilers, OCI & OCCI :: Error Implicit Conversion Of String Literal To (char) Is Deprecated?

Jan 30, 2011

i write a select statement in proc that contains 44 columns.

when i precompile it. it is showing the error: implicit conversion of string literal to "char *" is deprecated.when i compile the same select with 40 columns it is not showing any error.

but for more than 40 columns (41-44) it is showing the above error.

View 1 Replies View Related

SQL & PL/SQL :: DB Extended Auditing

Aug 24, 2010

I have a database in which DB extended auditing is enabled but there are no audit specifications in privileges or statements or objects. So what will be audited in that case.

View 12 Replies View Related

Oracle 9i Auditing

Feb 24, 2011

I have enabled auditing in my oracle9i DB, it is running fine, generating trails and I can capture those. Recently I checked in dba_audit_session table and found os_username, userhost, terminal showing null value whereas username is captured as my own (having dba prvis). Strange thing is that it doesn't occurs everyday.

One of the possibility of running batch files may occurs such issues, but I ran this batch everyday then why it is occurring some days only.

Attached File(s)

dba_audit_session.txt ( 2.71K )
Number of downloads: 4

View 1 Replies View Related

Data Auditing In Application?

Mar 31, 2011

I am trying to maintain data audit in the database using triggers where i want to write the row level trigger in an generic way using the following concept .Using USER_TAB_COLUMNS table inside the trigger i want to bind all column values of the row into a single string in the following format

COLUMN_NAME = Value(:new/:old.COLUMN_NAME)=> this value would be bound dynamically is it possible to create a string for each row instance in the trigger at run time using the above mentioned format and user_tab_column table

View 5 Replies View Related

Auditing Without Audit Vault

Mar 8, 2011

how to set up alerts on specific audit log results without using Audit Vault?

View 1 Replies View Related

Enable / Disable Auditing From PHP

Dec 15, 2010

In PL/SQL Plus, i can enable/disable auditing when i connect as sysdba by using these command:

SQL> ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE
SQL> shutdown
SQL> startup

I've done it successfully with PL/SQL Plus command line. But in PHP, how can i do that?How to execute "shutdown" and "startup" from PHP?
I've found this code for connect to oracle as sysdba:

oci_connect("/", "", null, null, OCI_SYSDBA);

From the following link:

[URL]......

But, i still can't execute "shutdown", "startup";

View 4 Replies View Related

Auditing Database Without Being DBAdmin?

Jul 17, 2012

I would like to be aware of all select statements that are run against the schema I am responsible for (for performance analysis reasons) My privileges are restricted and I think I won't get access to any dba views.

So is there a recomondation how I can solve this requirement?

View 3 Replies View Related

Auditing No Archive Log Mode

Jun 8, 2012

I am using Oracle Database 10.2 in No Archive Log Mode. what auditing options are available in No Archive Log mode ?

View 4 Replies View Related

Auditing For Queries With No Where Clause

Jul 31, 2012

I'd like to audit a table for any SELECT queries that are executed against it with no WHERE clause. I've read the documentation on DBMS_FGA carefully, and as close as I can tell, creating a policy with a NULL audit_condition causes all queries against the table to be audited, which isn't what I'm looking for.

What I'd like is something like this:

DBMS_FGA.ADD_POLICY (
object_schema      =>  'scott',
object_name        =>  'emp',
policy_name        =>  'mypolicy1',
audit_condition    =>  'WHERE CLAUSE IS ABSENT',
audit_column       =>  'comm,sal',
[code].......  

SELECT * FROM EMP;but queries with conditions ('WHERE sal > 400', for instance) are not trapped.

I'm using 11gR2 (11.2.0.2) on OEL.

View 2 Replies View Related

Auditing Unsuccessful Select Statements

Sep 3, 2013

I'm attempting to audit unsuccessful Select statements in order to trap a problem we're experiencing with our application. I have set the AUDIT_TRAIL initialization parameter to DB_EXTENDED, and bounced our database.

I've issued the AUDIT SELECT ANY TABLE WHENEVER NOT SUCCESSFUL command, and when I issue a SELECT statement as an application user, nothing appears in SYS.AUD$ even though the application has issued a select statement which returned no rows.

View 3 Replies View Related

Security :: How To Enable Auditing In Oracle

Dec 8, 2011

How to enable auditing in oracle ?

View 2 Replies View Related

Security :: Auditing At Table Level In 11g?

Apr 27, 2012

We have recently upgraded our DR environment from 9i to 11g. We have auditing turned on for 3 tables.

On 9i, AUD$ table size is 11G for 12 months and the upgraded 11g environment has 9G in 2 days....

Below is the sql statement we used to turn on auditing on these tables.

audit select,update,delete on audit_Test2 by session;

Opened SR with Oracle, but no proper response from them...

what changes we need to do in order to reduce the amount of audit data on these tables in 11g?

View 8 Replies View Related

PCI - Auditing Connect / As Sysdba - Connections?

Feb 15, 2012

I have a problem with a PCI DSS - requirement in Oracle 11.2. (PCI DSS = Payment Card Industry Data Security Standard)

Problem:

we connect via ' ssh -2 -X -l oracle hostname ' to the databaseserver and become os-user 'oracle'. we have also two offshore locations with dba's and each dba comes with his personalized user to the jumphost and then with the above ssh command to the database server.

the problem is that each dba becomes the oracle-os-account and can now connect with '/ as sysdba' to the database.in pci-dss this is not allowed !

now my question:how can I audit these '/ as sysdba'-connections and prove which user connected at which time with the '/ as sysdba' command ?

database is in audit mode. we log to syslog on linus redhat 5. I know one solution could be setting "SQLNET.AUTHENTICATION_SERVICES" parameter to "NONE" in sqlnet.ora file will make it not possible to connect to the database without a password as sysdba. (sqlplus / as sysdba). but we have to many applications and jobs and this is not really the solution in this case.

I think I can only solve this problem with personalized OS-user DBA-accounts in the dba-goup on os-site and os-user oracle should not be used for the future ?? I also need personalized dba-user-accounts in the database. using sys and system is not allowed. this users has to be locked and only for special administration work could it be unlocked.

View 3 Replies View Related

Security :: Enable Auditing For Users?

Oct 10, 2012

i enable auditing on the database 10.2 for users,

once i query SQL> SELECT username,
extended_timestamp,
owner,
obj_name,
action_name
FROM dba_audit_trail
WHERE owner = <Username>

there are many many rows , my question is , are you enable to truncate it from time to time , if not ,is it effect on the performance of the database ?

View 3 Replies View Related

Auditing Lob Column Changes When Working With Dbms_lob?

Oct 26, 2010

It seems that dml trigger doesn't fire when lob field is being updated using dbms_lob package.

As it stated in Oracle documentation:

QUOTE Using OCI functions or the DBMS_LOB package to update LOB values or LOB attributes of object columns does not cause Oracle to fire triggers defined on the table containing the columns or the attributes.

I need to know that table was updated (or is about to be updated), how can I do that in case it is lob field that is being updated?

View 4 Replies View Related







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