SQL Text in DATABASE VAULT Events

I'm using Audit Vault 10.2.3.2 to collect audit data from a source database 11gR2 (11.2.0.1) protected with Database Vault. The DBAUD collector is collecting all the Database Vault Events, but in all cases the SQL Text column is empty.
The collector seems to be working fine, I've added the collector user to the Oracle Data Dictionary Realm and I've also granted dv_secanalyst to the user.
Are there any aditional steps that have to be done in order to get the SQL Text?
Thanks.

In case anybody is interested, this error has been filed as bug 11818022 with Oracle Support.
Thanks.

Similar Messages

  • Oracle Database Vault vs Audit Vault and database firewall

    Hi All,
    I would like to know the main difference between Oracle Database Vault and Oracle Audit Vault and Database firewall.
    I have read all the white papers and documents on them both and find them very similar in work process.
    Only difference I see in the pricing.
    I feel Oracle audit Vault can do all the work of Database Vault with added feature of proactive session monitoring.
    If someone can help me based on their knowledge and experience it would be appreciated.
    Thank you.

    I have read the white papers of both Database Vault and Audit Vault
    According to database Vault sessions can be managed using various roles created as per business requirements.
    Audit vault offers same thing in terms of a firewall which manages and restrictions based on roles created .
    From the white papers:
    DATABAES VAULT:
    Oracle Database Vault restricts access to specific areas in an Oracle database from any user, including users who have administrative access.
    This enables you to apply fine_grained access control to your sensitive data in a variety of ways.
    Oracle Database Vault enables you to create the following components to manage security for your database:
    Realms
    Command Rules
    Factors
    Rule Sets.
    DATABAE AUDIT AND FIREWALL:
    Oracle Audit Vault and database Firewall consolidates database activity monitoring events and audit logs. Policies enforce expected application behaviour, helping preventing SQL injection, application bypass, and other malicious activities from reaching the database while also monitoring and auditing privileged users and other activities inside the database.
    To me these sound very similar of doing same work.
    My apologies as I am unable to paste the whole text here and I cannot type full documents here 

  • How to get triggering sql text in a statement trigger

    hi,
    I need to get sql text that run on the table in statement trigger on that table. I will log sql statements that run on table for a few weeks. I search for it, there is a ORA_SQL_TEXT function but this function is working on event triggers not statement or for each row triggers.
    is there any other way to achive that ?

    You can use AUDIT
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_4007.htm#i2115972
    >
    Auditing Queries on a Table: Example To choose auditing for every SQL statement that queries the employees table in the schema hr, issue the following statement:
    AUDIT SELECT
    ON hr.employees;
    To choose auditing for every statement that successfully queries the employees table in the schema hr, issue the following statement:
    AUDIT SELECT
    ON hr.employees
    WHENEVER SUCCESSFUL;
    To choose auditing for every statement that queries the employees table in the schema hr and results in an Oracle Database error, issue the following statement:
    AUDIT SELECT
    ON hr.employees
    WHENEVER NOT SUCCESSFUL;
    Auditing Inserts and Updates on a Table: Example To choose auditing for every statement that inserts or updates a row in the customers table in the schema oe, issue the following statement:
    AUDIT INSERT, UPDATE
    ON oe.customers;

  • In ICal is there a way to see all of the text in all day events on the month view of the calendar.  Seems to wrap text only if there is a time on the event

    In ICal is there a way to see all of the text in all day events on the month view of the calendar?  Seems to wrap text only if there is a time on the event

    The paths won't agree on the two OSs so a simple XML import isn't likely to work.
    See Sync iPod/iPad/iPhone with two computers and, if needed, Make a split library portable. The techniques in the first link will work when moving the library between Windows and OS X as long as the library is "portable", but iTunes takes quite some time checking the database when the library is opened under a different OS.
    tt2

  • How to restore SQL Server 2008 database to SQL Server Express 2012

    How to restore SQL Server 2008 database to SQL Server Express 2012.
    I BACKED UP a SQL Server 2008 database from work, which runs the enterprise version of 2008, and I tried to RESTORE it to my new 64-Bit home PC which is running the new SQL Server Express 2012 64-Bit (Advanced Edition).
    But if fails. I get the following message text.
    Can anyone help me please. I thought restoring a 2008 database to the later version 2012 would be possible.
    Here is the error message. Thanks.
    TITLE: Microsoft SQL Server Management Studio
    Restore of database failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
    ADDITIONAL INFORMATION:
    System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the backup, or use a
    backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)

    ADDITIONAL INFORMATION:
    System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the
    backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)
    Are you sure your database is SQL server 2008 from error message it seems your SQL server version is 2000.I guess you have multiple versions of SQL server.
    AFAIK you cannot restore backup of SQL server 2000 to 2012 directly .Restore it first to SQL 2008/2008R2 or 2005 then take backup again of new database created and then you would be able to restore it on 2012.Its kind of intermediate way
    Also make sure your DB size is less than 10 G as max DB size supported by Express edition is 10 G and if your DB size is more than 10 G restore will fail.
    You are also trying to restore enterprise DB backup on express edition so you will loose enterprise features on express edition
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • ORA-13786: missing SQL text of statement object - Unable to profile a sql_id in oracle 11g -

    11.2.0.3.5 / 2 node rac on rhel-6 / 64-bit
    I would like to a profile a sql_id since its following 4 plans and one of them is the optimal.
    But im unable to do it as it throwing ORA-13786.
    Steps I followed :
    {code}
    SET SERVEROUTPUT ON
    -- Tuning task created for specific a statement from the AWR.
    DECLARE
      l_sql_tune_task_id  VARCHAR2(100);
    BEGIN
      l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
                              begin_snap  => 29676,
                              end_snap    => 29707,
                              sql_id      => 'fjndcnvzkjkb5',
                              scope       => DBMS_SQLTUNE.scope_comprehensive,
                              time_limit  => 60,
                              task_name   => '420tavt57dxkx_tuning_task',
                              description => 'Tuning task for statement 420tavt57dxkx in AWR.');
      DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    END;
    EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'fjndcnvzkjkb5_CFO_tuning_task');
    SET LONG 10000;
    SET PAGESIZE 1000
    SET LINESIZE 200
    SELECT DBMS_SQLTUNE.report_tuning_task('420tavt57dxkx_tuning_task') AS recommendations FROM dual;
    SET PAGESIZE 24
    SQL>  execute dbms_sqltune.accept_sql_profile(task_name =>'420tavt57dxkx_tuning_task_task', replace => TRUE,force_match  => TRUE);
    BEGIN dbms_sqltune.accept_sql_profile(task_name =>420tavt57dxkx_tuning_task', replace => TRUE,force_match  => TRUE); END;
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "420tavt57dxkx_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7568
    ORA-06512: at line 1
    {code}
    Can somebody help me out on this?

    Hi Experts,
    i too getting this error while attaching the tuning task to the sql profiler, below are the details, appreciate any help on this.
    SQL> SQL> VAR profile_name VARCHAR2(30);
    SQL> BEGIN
       :profile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name => 'sql_tuning_task');
    END;
    /  2    3    4
    BEGIN
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "sql_tuning_task"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at line 2
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

  • How to set the CLASSPATH for an  Sql Server 2005 database... help me please

    Hello! Guys I want to access a Sql Server 2005 database from Java.I've downloaded the JDBC 2.0 driver from Microsoft.I've copied the sqljdbc4.jar file to C:\Java\jdk1.6.0_14\db\lib.And I've added this to the classpath C:\Java\jdk1.6.0_14\db\lib\sqljdbc4.jar.The classpath variable is defined as a user variable.Well the point is that I get that nasty exception:Exception in thread "main" java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver.So if you know how to help me,please do so.Thank you :)

    Hi Timo,
    My jdev version is 10.1.3.3.0, this is for R12. By PR i mean to say process request and PFR process form request in the controller.
    In the Process request of the controller, i am finding the checkbox bean and assigning the firepartialaction for it.
    Later in the process form request for the fired event, i am trying to handle the rendered property of the messagetextinput. Is this a right approach?
    my code below
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)oawebbean.findChildRecursive("X_FLAG");
    if(oamessagecheckboxbean != null)
    oapagecontext.writeDiagnostics(this, "Message check box Bean found:", 1);
    FirePartialAction firepartialaction = new FirePartialAction("change");
    oamessagecheckboxbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, firepartialaction);
    oamessagecheckboxbean.setFireActionForSubmit("change", null, null, true);
    oapagecontext.writeDiagnostics(this, "setting fire event", 1);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processFormRequest(oapagecontext, oawebbean);
    oapagecontext.writeDiagnostics(this, "Inside Process Form Request", 1);
    if("change".equals(oapagecontext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    OAMessageTextInputBean bean = (OAMessageTextInputBean)oawebbean.findChildRecursive("X_NUMBER");
    if(bean!=null){
    bean.setRendered(Boolean.TRUE);}
    Thanks,
    Malar

  • Text File Database

    Hello,
    i am a student at The Open University "APEIRON" Travnik (www.out.edu.ba), i am pursuing a Masters degree in IT, we have one Exam called Java programming.
    My practical exam part is to create a program that should enable user to manipulate students grades. The app should allow these options:
    - Read students data,
    Read students data, needs to ask a user for students name and some ID (Surname etc.), and after that lists students grades and Courses.
    - Inserting of new grades,
    Inserting of new grades should have option to insert a new Course name, students name and grade for that Course.
    - Change of existing grades.
    Change of existing grades needs to ask for students name and/or ID, surname and the name of a Course and shows his present grade, Then it should have an option to change students grade for that Course.
    For this App all of validations should be done.
    All of the data (students names, Course names, Grades etc.), needs to be stored in text file database?! Now, i am a newb to Java, but i worked before with VB, and SQL, and i saw there are some similarities to acces and modify data in SQL database. But the problem is, i never worked with Flat text file databases and now i am stuck, i do not even know how to create a text database or even to connect Java to that database.
    Please, if anyone can help me i would be very grateful!?

    HaloOo wrote:
    i am pursuing a Masters degree in ITPursuing as in commencing, or pursuing as in first/second year undergraduate student. If the former then I am abit worried at your lack of prior research (or is this how you research).
    Please, if anyone can help me i would be very grateful!?You will need to invest some time in the basics of programming in Java and OOL. There are multiple tutorials available on reading/writing to text files. One thing to note: a text file is treated in the majority of cases like a wipe board. You can write a whole bunch of stuff on it, but if you decide you want to write a line in the middle, then unfortunately you need to read what is currently on the whiteboard, rewrite it, append your new message, then append the remainding text from the white board. IMHO a (RAF) is not applicable in this situation.
    Task1: Java: hello world
    Task2: Introductory tutorials
    Task3: Read a text file/write a text file/display contents of file
    You choose,
    Mel

  • Get an image from a varbinary field in an SQL Server 2005 database

    Hi:
    In a varbinary(MAX) field of an SQL Server 2005 database I
    storage JPG images. I design a webservice that returns the
    following XML structure:
    Public Class IMAGEN
    Public ErrorConsulta As Long
    Public Imagen As Byte()
    End Class
    The response look like this:
    <FLEXOBTENERIMAGENResponse>
    <FLEXOBTENERIMAGENResult>
    <IMAGEN>
    <ErrorConsulta>0</ErrorConsulta>
    <Imagen>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgH....</Imagen>
    </IMAGEN>
    </FLEXOBTENERIMAGENResult>
    </FLEXOBTENERIMAGENResponse>
    Where the node Imagen are thousands of caracters that
    represents the JPG image.
    How can I show this JPG in an Image control of a Flex Builder
    2 or 3?
    If you need more information please let me know.
    Thanx in advance.

    Assuming that you have text fields storing the Y N then on
    the output you
    have a code block like this
    <%
    If recordset.fields.item("wheelchair").value = "Y" then
    %>
    <img src="images/wheelchair.gif">
    <%End if%>
    However is your field is set to be a Yes/No type then the
    best way is to
    write the test like this
    If recordset.fields.item("wheelchair").value = TRUE then
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Lancs" <[email protected]> wrote in message
    news:e6srl5$jul$[email protected]..
    > Using ASP/VBscript and Access
    > I'm making a page that dislays a listing of
    organisations (using Repeated
    > Regions) concerned with disabilities. I want to use
    images for symbols
    > that
    > indicate whether, for example, an organisation uses
    textphones, has
    > wheelchair
    > access, and the like. I'm using a form to add new
    records to the database.
    > I
    > want the form to allow users to select the applicable
    symbols using
    > checkboxes.
    > What code will allow the listing page to interpret a Y
    value as an image
    > path
    > and ignore a N value.
    > Thanks
    >

  • How to run recordset SQL query in FORM DATA event

    How can I run recordset SQL query in FORM DATA event upon clicking on Add button in the document?

    Hi Slamet,
    When you receive a form data event you have a class containing inside it a ObjectKeys xml info regarding the object added/modified,...
    With the objects keys you can then use the DI API method called GetByKeys to obtain the DI Object.
    There is some information about it in the SDK Help file, mainly in the "FormDataEvent" class definition:
    <i>The event provides the unique ID (BusinessObjectInfo.ObjectKey) of the modified business object. You can use the value of this property as an input parameter in the DI API DataBrowser.GetByKeys method to get a DI object.</i>
    Pay attention you don't have this information in the Before=True event of the Add as it is not yet in the database.
    Hope it helps
    Trinidad.

  • FULL SQL TEXT를 찾는 방법

    FULL SQL TEXT를 찾는 방법
    PURPOSE
    전통적으로 특정 process가 실행하고 있는 SQL을 살펴보기 위해 V$SQL / V$SQL_TEXT 등의 view가 사용됩니다. 다만, varchar2 datatype이므로 full SQL을 볼 수 없다는 제한이 있습니다.
    10g 부터는 SQL_FULLTEXT 라는 CLOB 형태의 컬럼을 통해 1000 byte 가 넘는 SQL text도 열람할 수 있게 되었습니다.
    CONTENTS
    1. test에 사용할 SQL text
    2. 전통적 방법으로 접근
    3. 새로운 방법으로 접근
    4. 요약
    1. 다음과 같은 TEST 목적의 query가 있습니다. 영문캐릭터만 사용하여 SELECT 부터 DUAL까지 1125 글자이므로, 1125 bytes 입니다.
    select /* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa */ * from dual;
    이 query를 SCOTT 으로 수행해봅니다.
    2. 전통적 방법으로 접근
    새로운 SESSION을 열어 다음과 같이, SCOTT 으로 접속된 SESSION의 sid 및 serial# 를 확인합니다.
    (1) USERNAME을 통해 sid 및 serial# 를 확인
    select b.sid, b.serial#, b.username
    from v$session b where b.username ='SCOTT';
    SID SERIAL# USERNAME
    309 1198 SCOTT
    (2) 확인된 정보를 통해, SQL TEXT를 확인합니다.
    VARCHAR2(1000)에 저장된 DATA 이므로, 다음과 같이 FULL SQL은 확보하지 못했습니다.
    set linesize 50
    column sql_fulltext format a60 word_wrap
    break on sql_text skip 1
    select s.username username, s.osuser, s.program, a.sql_text SQL
    from v$sql a, v$session s
    where s.sid = 309 and s.serial# = 1198
    and a.address = s.sql_address and a.hash_value = s.sql_hash_value;
    USERNAME
    OSUSER
    PROGRAM
    SQL
    SCOTT
    oracle
    [email protected] (TNS V1-V3)
    select /* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    USERNAME
    OSUSER
    PROGRAM
    SQL
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    USERNAME
    OSUSER
    PROGRAM
    SQL
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    USERNAME
    OSUSER
    PROGRAM
    SQL
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    USERNAME
    OSUSER
    PROGRAM
    SQL
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    3. 새로운 방법으로 접근
    새로운 SESSION을 열어 다음과 같이, SCOTT 으로 접속된 SESSION의 sid 및 serial# 를 확인합니다.
    (1) USERNAME을 통해 sid 및 serial# 를 확인
    select s.username username, s.osuser, s.program, a.sql_text SQL
    from v$sql a, v$session s
    where s.sid = 309 and s.serial# = 1198
    and a.address = s.sql_address and a.hash_value = s.sql_hash_value;
    SID SERIAL# USERNAME
    309 1198 SCOTT
    (2) 확인된 정보를 통해, SQL TEXT를 확인합니다.
    VARCHAR2(1000)에 저장된 DATA 이므로, CLOB datatype인 SQL_FULLTEXT 컬럼에 접근하였으므로 full SQL text를 확보할 수 있습니다.
    set linesize 50
    column sql_fulltext format a60 word_wrap
    break on sql_text skip 1
    select
    replace(translate(a.sql_fulltext,'0123456789','999999999'),'9','')
    SQL_FULLTEXT
    from v$sql a, v$session s
    where
    s.sid = 309 and s.serial# = 1198
    and a.address = s.sql_address and a.hash_value = s.sql_hash_value
    and a.sql_text like '%aaaaaaaaaaa%'
    group by replace(translate(a.sql_fulltext,'0123456789','999999999'),'9','');
    set linesize 50
    column sql_fulltext format a60 word_wrap
    break on sql_text skip 1
    SQL_FULLTEXT
    select /*
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    SQL_FULLTEXT
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    SQL_FULLTEXT
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    */ * from dual
    4. 요약
    10g 이상 버젼에서는, 다음과 같은 형태의 query를 응용함으로서 FULL SQL TEXT를 확보할 수 있습니다.
    select
    replace(translate(sql_fulltext,'0123456789','999999999'),'9','')
    SQL_FULLTEXT
    from v$sql
    where sql_text like '%<찾고자_하는_SQL_KEYWORD>%'
    group by replace(translate(sql_fulltext,'0123456789','999999999'),'9','')
    NOTE
    혹시라도 SQL TEXT가 4000 BYTE 이상 저장되어 있는 경우라면, ORA-22835 가 발생합니다. (VARCHAR2 형태로 출력되는 과정에서 최대 4000 BYTE 라는 제한조건이 발생됩니다) 이 경우, 다음과 같이 4000 byte만 읽도록 DBMS_LOB.SUBSTR()을 설정해줄 수 있습니다.
    *** BEFORE
    replace(translate(sql_fulltext,'0123456789','999999999'),'9','')
    *** AFTER
    replace(translate(dbms_lob.substr(a.sql_fulltext,4000,1),'0123456789','999999999'),'9','')
    만약 4000 BYTE 이상의 SQL text 가 모두 필요, java/proc/developer 등의 CLOB 처리가 가능한 3rd part tool를 사용해주시거나, 필요한 APP를 작성해주셔야 합니다.
    References
    Note 437304.1

    스크립트의 RMAN 구동 후 돌려 주시는 구문 중에 $db_bk_sql 호출하여 백업을 받으시는데 채널 할당하는 부분에 format 구문을 넣어서 각 채널에서 저장하는 위치을 다르게 잡아 줄 수 있습니다. 대신 쓰시는 backup database 구문에서 format 관련된 부분을 빼 주셔야 합니다...
    예로
    ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/disk1/backups/%U';
    뒤으 %U는 구분을 해 주기위해서 쓴 구문이구요... 위 구문과 같은 형식으로 채널 할당을 조절해 주시면 원하시는 대로 백업을 나누어서 할 수 있을 겁니다...
    추가적으로 더 다양한 형식으로 컨트롤을 할 수 있지만 그런 부분들은 백업 정책 및 기타 고려 사항을 참고해서 구성을 하셔야 입맛에 맞게 조절할 수 있으리라 봅니다.
    글 수정:
    명품 관

  • Importing data from SQL Server 2005 database

    Dear Friends
    Scenario:
    We have built an application for which the database is SQL Server 2005.
    Now, we have planned to switch over to Oracle 8i database.
    There is a field with data type as Varchar(Max) – which can hold data with a maximum length of 231 characters (SQL Server 2005)
    In Oracle 8i, the Varchar2 max size 4000 bytes or characters.
    We want to import the data from SQL Sever 2005 database into Oracle 8i database.In the process, the value for the particular field whose data type set as Varchar(Max) in SQL Server 2005 and contains more than 4000 characters gets automatically truncated while importing into oracle.
    We want the entire characters stored in the field to be imported into oracle database.
    Please suggest solutions.
    Thanks and regards
    Bharath Kumar V

    Use CLOB if the data is purely text data. BLOB otherwise.
    But the question is why you want to switch over to an Oracle version which is de-supported by Oracle?

  • Unicode literals lost in SQL text

    I am using SQL Developer 1.0.0.15.57, Build MAIN 15.57, on Winodws XP SP2, against a 10g db. I have already found that I need to set the environment variable
    ORA_NCHAR_LITERAL_REPLACE to TRUE on clients issuing SQL text containing Unicode (e.g. an OracleClient Command object in VB.NET), to prevent the Unicode characters from being transposed to the database character set. However, setting this environment variable does not address the exact same issue in SQL Developer. I have hunted for a setting in SQL Developer itself, but to no avail. Does anyone know how, or if it is not possible, to address this issue in SQL Developer?
    Thanks very much in advance for any assistance.
    David

    Your table appears to have 5 columns not 5 rows.
    Your statement does not provide a column list, so your value list must contain an entry for each column in the table, which is why you're getting the exception.
    When finally created your statement should read:
    insert into users (Name,address,city,state,zip) values ('John Doe','123 anystreet','sometown','ab','12345')
    Dave

  • Database Vault and expdp

    Hi, i want export the database schema which is protected by database vault.
    Metalink Note:433887.1 describes this, but i receive errors.
    expdp bernst/password schemas=HR file=/tmp/test
    ORA-31626 job does not exist
    ORA-31633 unable to create master table bernst.sys_export_schema_05
    ORA-06512 at sys.dbms_sys_error
    ORA-06512 at sys.KUPV$FT
    ORA-01950 no privileges on tablespace USERS
    any ideas?
    regards Frank

    This is late but, somebody will see it.
    Be sure to do this.
    First of all, create a user called pepe in this way.
    create user pepe identified by PASSWORD default tablespace users temporary tablespace temp;
    Then...
    SQL> CREATE DIRECTORY datapump AS 'full_path';
    SQL> GRANT EXP_FULL_DATABASE to pepe;
    SQL> GRANT READ, WRITE ON DIRECTORY datapump to pepe;
    You should be able then to run the expdp utility.
    Alex.

  • Grant Privileges in Database Vault for DATAPUMP.

    HI,
    I am using ORACLE DATABASE 11g R2.
    I have installed/enabled DATABASE VAULT 11g on it.
    I have configured many user in it for privileges like 'SELECT on table','INSERT on table' ,DELETE .....
    I want to give a user DATAPUMP privilege so that he can export and import.
    I have 2 users.
    1) MAIN
    2) BACKUP
    MAIN user is the owner and the most important schema. Now i want one more schema named 'BACKUP' which will be able to take backup from MAIN schema. NO OTHER SCHEMA SHOULD BE ALLOWED TO TAKE BACKUP OF MAIN SCHEMA NOT EVEN SYS.
    *Can anyone tell me how i can grant proper privilege to BACKUP schema so that he can use DATAPUMP and import/export from OS prompt on the MAIN schema.
    NOTE :- I have Database vault installed on my server. Please let me know what all RULES or RULE SETS I need to make to make this happen.
    Thanks in advance.

    I have managed with privileges to grant BACKUP user right to start an IMPORT but i get these errors while importing :-
    Failing sql is:
    CREATE TABLE "MAIN"."FLX_PM_OFFER_SELECTOR_B" ("USER_NAME" VARCHAR2(50 BYTE), "PRODUCT_GROUP" VARCHAR2(5 BYTE), "REFERENCE_NUM" VARCHAR2(30 BYTE) NOT NULL ENABLE, "SESSION_STATE" VARCHAR2(5 BYTE), "OFFER_FEATURES" BLOB, "RECOMMENDED_OFFERS" VARCHAR2(500 BYTE), "SELECTED_OFFERS" VARCHAR2(500 BYTE), "MAKER_NAME" VARCHAR2(12 BYTE), "MAK
    ORA-39083: Object type TABLE:"MAIN"."FLX_PM_ACCOUNT_ROLE_FLOW" failed to create with error:
    ORA-47401: Realm violation for CREATE TABLE on MAIN.FLX_PM_ACCOUNT_ROLE_FLOW
    {code}
    I am getting this error for all the objects :- SYSNONMY,SEQUENCE,
    I have granted MAIN users all the privileges but still i am getting these errors. Do i need to create any realm or rule set for this?
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • LOOKUP and retreiving values

    I need to retreive some data from an other application with a logic. Pour une logique je vais avoir besoin de rechercher des données dans une autre application. J'air echerché des trucs sur SDN et sur la Doc mais les exemples ne sont pas tres clairs.

  • Firmware v4.6 bug on nokia c3

    I updated my phone to v4.45 to v4.6, all apps works except for the built in chat, it says "Application not found". I already restored the factory default settings, or any user precautions would do. What shall I do? Thanks.

  • Internet crashes on my 27 inch 3.4GHZ 2011 model iMac while on all my 3 other devices I still have connectivity

    I have wireless network run via BT hub. However because of ongoing connectivity issues connect the main machine via the ethernet. I no longer use my Airport extreme. Since I first bought this machine I have had connectivity issues. At first thought i

  • CAlling a Windows app from Solaris

    Is it possible to make a call from a Solaris system to a Windows app? I am trying to setup a process in Oracle ERP which is on a Solaris server that will make a call at the end of the process to a windows app. The windows app will responds to a cmd l

  • Disk containing iphoto library is low on space

    When attempting to download pictures I get the message "The disk containing your iPhoto library is running low on space" and cannot download the pics.  What to do?  I don't want to delete my pics from computer...