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


ADVERTISEMENT

Server Administration :: 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 1 Replies View Related

SQL & PL/SQL :: Getting ORA-06502 While Using DBMS_LOB?

Oct 17, 2011

I was trying to insert some data in a table from a file. I am using DBMS_LOB for that.

My code looks like below -

--Create table t ( a number(10), b number(20), c varchar2(30), d varchar2(30), e varchar2(60));

set serveroutput on
declare
l_bfile bfile;

[Code]....

But getting error, after first row insertion. Error is -

ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 20

It insert the first row successfully, but in the event of second row formatting, its returning error. I found the next time while its picking up the column "A", its adding some new line charecter in it. I tried to replace before assigning it to rec.a, but didn't work.

View 15 Replies View Related

Use Of DBMS_LOB Necessary When Returning CLOB From PL/SQL Procedure?

Oct 23, 2009

I would like to create some PL/SQL procedures that return XML as CLOB parameters. I want to just do this (which works fine with simple tests):

create or replace procedure p_xml_test_1(
p_xml out nocopy clob
) is
begin
p_xml := '<?xml version="1.0" encoding="utf8" ?>' ||
'<test><something>some value</something></test>';
end p_xml_test_1;

But I have access to some other source code that basically does this:

create or replace procedure p_xml_test_2(
p_xml out nocopy clob
) is
lv_xml clob;
begin
dbms_lob.createtemporary(
[code]......

I'm wondering if the first method will cause any problems for me down the road. Is it ok to do it that way? What is the advantage, if any, to the second method?

View 1 Replies View Related

SQL & PL/SQL :: Execute Privileges To DBMS_LOB.SUBSTR Function

Mar 15, 2011

I am trying to execute the PL/SQL block below:

DECLARE
var VARCHAR2(4000);
BEGIN
SELECT DBMS_LOB.SUBSTR(v_clob,4000,1) INTO var FROM test_clob;
END;
** v_clob is a CLOB column in test_clob table.

I get the below error:

wrong number or types of arguments in call to 'SUBSTR'"SYS"."DBMS_LOB"."SUBSTR": invalid identifier...I have execute privileges to DBMS_LOB.SUBSTR function.

View 2 Replies View Related

SQL & PL/SQL :: Passing Rowtype Column Dynamically Not Working

Sep 6, 2010

I am passing the column name for a rowtype dynamically and it is considered as a string by oracle and not giving the value of rowtype.column.i have ANONY 1 where i am passing value to attribute1 and ANONY 2 i am passing value as NULL.

IF l_comp_column IS NOT NULL AND l_mand_column = 'Y'
THEN
dbms_output.put_line(l_comp_column ||' IS NOT NULL');

l_flag := 'Y';
ELSIF l_comp_column IS NOT NULL AND l_mand_column = 'N'
THEN
l_flag := 'N';
END IF;
[code]....

View 9 Replies View Related

SQL & PL/SQL :: Instr Versus DBMS_LOB.instr / Search A Pattern Backwards In A CLOB Field?

Mar 10, 2012

I need to search a pattern backwards in a CLOB field.Function DBMS_LOB.instr does not work with '-1' offset (where to start the search) as instr does.

Parameters: instr(text_to_be_searched, pattern, offset, nth)

Example: I want to search 'Hello world' for the first instance of the letter 'o' starting from the end, backwards.As you can see, result for DBMS_LOB.instr is null when entered -1 for offset.

select
DBMS_LOB.instr('Hello world','o',-1,1) lob_i,
instr('Hello world','o',-1,1) std_i
from dual;

View 6 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

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 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

ORA-00932 - Sample Code Working Fine In 10g And Not Working Now In 11g

Apr 1, 2013

Below is the sample code working fine in 10g and not working now in 11g.

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "PSTest" AS
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.util.List;
[code]....

we got the below error: ORA-00932: inconsistent datatypes: expected an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class got an Oracle type that could not be converted to a java class

Current Oracle version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit and the version we are upgrading is Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit

View 3 Replies View Related

Security :: Send Oracle Auditing To Syslog

Mar 9, 2011

I am using Oracle 11g (11.2.0.1) and I want to audit the specific tables in my schema and send to OS syslog.

For example, I have 3 tables A,B and C. If any user is accessing A and B tables (DMLs,select etc) then I want to audit and send it to OS syslog.

View 1 Replies View Related

Security :: Oracle Auditing DBA_STMT_AUDIT_OPTS Where User_name Is Null

Jan 8, 2013

I have enabled Auditing but when i run the below given statement i get the output with count of 20 null username.I tried to run NOAUDIT ALL but still the same result.

Why does it show auditing for null username and how can i disable it.

select count(*) from DBA_STMT_AUDIT_OPTS where user_name is null;
20

View 3 Replies View Related

PL/SQL :: To_char Not Working / (||) Is Working With Join Query

Mar 22, 2013

I have two tables : oa_membership_dtl(in this created_by field is varchar2(200 byte) ,oa_partner_usr_dtl(in this table partner_userid is number(8,0) i need to do join on above fields.

I am using following two queries:

select * from oa_membership_dtl membership
join oa_partner_usr_dtl partner_user
on to_char(partner_user.partner_userid,'9999')=membership.created_by
select * from oa_membership_dtl membership
join oa_partner_usr_dtl partner_user
on rtrim(ltrim(partner_user.partner_userid||' '))=rtrim(ltrim(membership.created_by))

by using first data is not fetched but 2nd is working fine , i am getting the matched records using 2nd query.

whats the diff between to_char and || symbol?

View 1 Replies View Related

Application Express :: How To Connect As A Real Database Account User For Auditing

May 15, 2013

For auditing, I need to insert the user, among other data, into different tables. The thing is, I have an application with DB account authentication, so a real database user is connected, when auditing, the user field inserted is "ANONYMOUS".

Apex 4.2
EPG
Oracle Enterprise Linux 5.5
Database 11.2 EE

View 7 Replies View Related

Server Utilities :: Possible To Configure Auditing To Get Number Of Rows Returned By Select Statements

Aug 22, 2011

I am importing some data from Oracle into another database on a regular basis. It works fine for most of the queries but couple of queries don't work sometimes (random). I don't get any errors or any data.

We switched on the Oracle auditing to find out the queries being sent to oracle db. We can see all the queries in the Audit log. Is it possible to configure Auditing to get the "Number of Rows" returned by Select statements so that we can be sure that some data was returned.

View 8 Replies View Related

Sqlplus UI - Not Working?

Apr 22, 2008

I'm having some minor trouble with my sqlplus in Windows. Don't know which feature I accidentally edited by cosole seems to be in debug mode. Everything is ok, except that it print the old and new values of my variables. How can't I restore it to it's original behavior.

View 3 Replies View Related

SQL & PL/SQL :: How To Calculate Working Day

Jan 1, 2013

I need a query to find out the working days. I have attached the sample script to create table and data. Here is the description of the tables.

Emp1 : To record the employe's information and weekly rest day.
Attendance :- To record daily attendance.
Leave_appovd : To record the approved leaves.
Holiday : To record the holidays.

W = Attendance
R = Weekly Rest
L = Leave
H = Holiday
A = Absent

Required output is

Emp No.In Date Out Date Type
736912/1/201212/1/2012W
736912/2/201212/2/2012R
736912/3/201212/3/2012W
736912/4/201212/4/2012W
736912/5/201212/5/2012W
736912/6/201212/6/2012L
736912/7/201212/7/2012H
736912/8/201212/8/2012H
736912/9/201212/9/2012R
736912/10/201212/10/2012A
736912/11/201212/11/2012W
736912/12/201212/12/2012W
736912/13/201212/13/2012W
736912/14/201212/14/2012W
736912/15/201212/15/2012L
736912/16/201212/16/2012L
736912/17/201212/17/2012L
736912/18/201212/18/2012W
736912/19/201212/19/2012W
736912/20/201212/20/2012W
736912/21/201212/21/2012W
736912/22/201212/22/2012W
736912/23/201212/23/2012R
736912/24/201212/24/2012A
736912/25/201212/25/2012A
736912/26/201212/26/2012A
736912/27/201212/27/2012W
736912/28/201212/28/2012W
736912/29/201212/29/2012W
736912/30/201212/30/2012R
736912/31/201212/31/2012W
778212/1/201212/1/2012W
778212/2/201212/2/2012W
778212/3/201212/3/2012W
778212/4/201212/4/2012W
778212/5/201212/5/2012W
778212/6/201212/6/2012W

Separate Query will be run for the following output.

Wroking Days
EmpnoAttend WeeklyRestsLeavesHolidays TotalAbsentsG. Total
7369 17 4 4 2 27 4 31
7782 6 0 0 0 6 25 31

If any body work on weekly rest or holiday, it will be considered as weekly rest and holiday. There working on these days will be treated separately.

View 10 Replies View Related

SQL & PL/SQL :: Update Is Not Working

Apr 27, 2012

with a as (
SELECT subscriber_agn,max(ixml_id) ixml_id, claim_id
FROM
(

[Code].....

i want to combine above two and need only one sql stmt.

View 2 Replies View Related







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