Problem with spread ECID in PL/SQL

Hello

DB: database Oracle EE 11.2.0.4.0

AppServer: Weblogic 10.3.6

My use case is to log ECID propagated within the database for a particular operation of the interface user of Weblogic.

Use cases

(1) user UI Sciez

(2) API invoke including the stored procedure to execute a business logic

(3) generated in Weblogic ECID enters the view dict. v$ session of RDBMS for the session created to execute the stored procedure

Under demonstrative code is used to retrieve the ECID.

CREATE TABLE db_test
(  
  tst_key NUMBER(19) NOT NULL,
  ecid                   VARCHAR2(64),
  component_name            VARCHAR2(30),
  execution_time             TIMESTAMP,
  status                 VARCHAR2(30),
  CONSTRAINT pk_tst_key PRIMARY KEY (tst_key)
);

CREATE OR REPLACE PROCEDURE SP_TEST
  (
  p_comp_name    IN      db_test.component_name%TYPE DEFAULT NULL,
  p_status IN      db_test.status%TYPE DEFAULT NULL
  )
AS
  v_exec_tmstmp  TIMESTAMP;
  v_strSQL VARCHAR2(4000) :=NULL;
  v_sid NUMBER :=0;
  v_ecid VARCHAR2(64) :=NULL;
BEGIN
 -- Start Timestamp
  SELECT SYSTIMESTAMP INTO v_exec_tmstmp FROM dual;

-- Fetch Session ID
  SELECT sys_context('USERENV','SID') INTO v_sid FROM dual;
       
  -- Fetch ECID
  v_strSQL:='SELECT ecid FROM v$session WHERE sid=:1';
  EXECUTE IMMEDIATE v_strSQL INTO v_ecid USING v_sid;

  v_strSQL := ' INSERT INTO db_test(tst_key, ecid, component_name, execution_time, status) VALUES (:1, :2, :3, :4, :5, :6, :7) ';
  EXECUTE IMMEDIATE v_strSQL USING tst_key_seq.NEXTVAL, v_ecid, p_comp_name, v_exec_tmstmp, p_status;

COMMIT;
EXCEPTION
  WHEN OTHERS THEN
  ROLLBACK;
  RETURN;
END SP_TEST;

When the SP is called for the first time, good what ECID is propagated in the table "DB_TEST1".

Now for each consecutive invocation for the SP of functioning of the user (via API) interface, even ECID is inserted in the DB table, but if I check the logs from the server, the ECID value generated was different.

Still a student, I found that only the first invocation of time stored SP ECID correct, for the rest of the invocations to say about 2-3 h, same SESSION_ID was used by the PL/SQL code, so the same ECID being inserted into the DB table.

Could someone explain to me how this happens and how can I make sure I have the correct ECID stored for the API call, rather ECID for the first time copied for the rest of the iterations of MS.

Thanks in advance...

My use case is to log ECID propagated within the database for a particular operation of the interface user of Weblogic.

Use cases

(1) user UI Sciez

(2) API invoke including the stored procedure to execute a business logic

(3) generated in Weblogic ECID enters the view dict. v$ session of RDBMS for the session created to execute the stored procedure

OK - but within Oracle the ecid value is SPECIFIC to the session.

Same session - same ecid. Only the side customer (weblogic) can set a new value for the same session.

A connection from a connection pool creates a single session. Only a real proximity (connection pool) and reopen will create a new session. Even then, this new session to reuse the id of the previous session.

  1. -Extraction ECID
  2. v_strSQL: ='SELECT ecid FROM v$ session WHERE sid =: 1';

Same sid means same ecid unless the customer has defined a new.

When the SP is called for the first time, good what ECID is propagated in the table "DB_TEST1".

Now for each consecutive invocation for the SP of functioning of the user (via API) interface, even ECID is inserted in the DB table, but if I check the logs from the server, the ECID value generated was different.

The ecid will NEVER change in V$ SESSION for a sid unless the customer changes the value.

Still a student, I found that only the first invocation of time stored SP ECID correct, for the rest of the invocations to say about 2-3 h, same SESSION_ID was used by the PL/SQL code, so the same ECID being inserted into the DB table.

Which means that your client is NOT reset the value of the ECID. Oracle does not change the value - customer made.

Your problem is on the client, middle tier side of things. As sol.beach says "Oracle is the victim."

https://blogs.Oracle.com/jamesbayer/entry/weblogic_server_use_the_execution

Tags: Database

Similar Questions

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Problem with WSUS after upgrade of SQL and SCCM

    A few years ago, we implemented SCCM 2012 R2 on a virtual machine running Server 2008 R2 (Enterprise), using 2012 SQL for databases.  We use it for software deployment, updates/patches via WSUS and imagery of the network.  Everything is smooth enough for most, even if we hit a few snags Windows 10 points when that came out.  After you install the patches and updates to our Server 2008 box to make it compatible with Windows 10 content, everything was good again.  A few weeks ago, I decided to update our version of SCCM 1511 and SQL for 2014.  After the two updates, I tested imaging and software deployment, and everything seemed good.  I forgot WSUS, however... and later visited account it was not working properly for these updates.  Unfortunately, I realized after I deleted the VM snapshot, I got to thinking that everything was good (stupid, I know).  After researching and discovering some of the errors were permissions associated with - why would have changed the permissions on folders of SQL and SCCM upgrade I have no idea - those who have since been smoothed.  Now, my mistakes seem to be related SQL more and I hit a dead end with research.  When I opened WSUS and go look at the clocks, he tries to load the history of synchronization, and after a few minutes-error with the following information:

    The WSUS administration console failed to connect to the WSUS server database.

    Verify that SQL server is running on the WSUS server. If the problem persists, try restarting SQL.

    System.Data.SqlClient.SqlException - Timeout expired.  The delay before the end of the operation or the server is not responding.

    WARNING: The join order has been applied because a local join hint is used.
    Source .Net SqlClient data provider
    Stack trace:

    to Microsoft.UpdateServices.Internal.BaseApi.SoapExceptionProcessor.DeserializeAndThrow (SoapException-soapException)

    at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPGetSummariesPerUpdate (String computerTargetScopeXml, String preferredCulture, String updateScopeXml, ExtendedPublicationState publicationState)
    at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetSummariesPerUpdate (UpdateScope updatesToInclude, ComputerTargetScope computersToInclude)
    at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetUpdateSummaries (UpdateScope updateScope, ComputerTargetScope computerTargetScope)
    at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetAndCacheUpdates (ExtendedUpdateScope updateScope, ComputerTargetScope computerTargetScope)

    at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetListRows)

    I found a few forums that suggest to uninstall WSUS and delete the database, and then reinstall WSUS.  Unfortunately, when I try install fails... giving only an error code and no other explanation of why.  The error is 0 x 80070643, which is supposed to be due to the current user not having the "sysadmin" in SQL.  However, I have tried with several accounts I checked to make you have the sysadmin role in SQL (and are also part of the Administrators group on the server itself)-always get the same error message.

    I would really like to try to find that rather than wasting his time with the construction of a new server and redo our whole SCCM environment... get the client reinstalled on all our machines to synchronize with a new server appears as a huge headache.  Is there anyone else out there who know what would cause this?  Any help would be greatly appreciated!

    Hello

    This community is for users.

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    SQL Server TechNet forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • Problem with a variable in the SQL statement variable

    Hello

    I try the following query.

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + string + "");

    At this point, I get this error:

    Operands of + have illegal types "pointer to char" and "pointer to char".

    I tried this:

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + & cadena + "");

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password = '" + string + "'");

    Still having the same problem.

    It works fine if I do this.

    HSTMT = DBActivateSQL (hdbc, "SELECT UserLevel UserClass WHERE the password =" cadena' "");

    Where "cadena" is treated as a string.

    Any ideas?

    Thank you!

    The Visual Basic method to concatenate strings with the + operator does not work in C. You can use a number of ways to do this - here is just a sample:

    char string [256] = "SELECT UserLevel OF ClassUsers WHERE password = ';"

    HSTMT = DBActivateSQL (hdbc, strcat (string, String));

    JR

  • Problem with the named instance of SQL Server using DG4ODBC

    I am running DG4ODBC on a computer LINUX 64-bit with the Microsoft SQL Server driver is installed. I tested successfully with an instance of SQL Server that is not named (GENERALI_DSN). The named instance gives the following when trying to query:

    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:

    [unixODBC] [Microsoft] [SQL Server Native Client 11.0] Connection timeout expired {HYT00} [unixODBC] [Microsoft] [SQL Server Native Client 11.0] SQL Server Network Interfaces: Error Search Server/Instance specified [xFFFFFFFF].  {NativeErr 08001, = - 1} [unixODBC] [Microsoft] [SQL Server Native Client 11.0] A network-related or instance-specific error all by establishing a connection to SQL Server. Server is not found or is not accessible. Check if the instance name is correct and if SQL Server is configured to allow remote connections. For more information, see SQL Server Books Online. {NativeErr 08001, = - 1}

    ORA-02063: preceding 2 lines of DEVMISC

    ODBC.ini

    [GENERALI_DSN]
    Driver = SQL Server Native Client 11.0
    Server = CLTDMJCWBYZ.eu.scor.local
    User = everest
    Password = everest
    Database = Everest_Generali

    [DEVMISC_DSN]
    Driver = SQL Server Native Client 11.0
    Server = [USVCLTDEVSQL02\DEVMISC]
    User = link_user
    Password = password1
    Database = s/n

    initDG4ODBC2.ora

    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = DEVMISC_DSN
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so

    #
    # ODBC specific environment variables
    #
    Set ODBCINI=/home/oracle/.odbc.ini

    Listener.ora

    SID_LIST_LISTENER_GW =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = DG4ODBC)
    (ORACLE_HOME=/home/oracle/product/11.2.0)
    (ENV=LD_LIBRARY_PATH=/usr/lib64:/home/oracle/product/11.2.0/lib:/opt/micro
    Soft/SQLNCLI/lib)
    (PROGRAM = dg4odbc)
    )
    (SID_DESC =
    (SID_NAME = DG4ODBC2)
    (ORACLE_HOME=/home/oracle/product/11.2.0)
    (ENVS=LD_LIBRARY_PATH=/usr/lib64:/home/oracle/product/11.2.0/lib:/opt/micr
    OSoft/SQLNCLI/lib)
    (PROGRAM = dg4odbc)
    )
    )

    LISTENER_GW =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = usvcltprdoragw) (PORT = 1521))
    )
    )

    tnsnames.ora

    DG4ODBC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=usvcltprdoragw) (PORT = 1521))
    (CONNECT_DATA = (SID = DG4ODBC))
    (HS = OK)
    )

    DG4ODBC2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=usvcltprdoragw) (PORT = 1521))
    (CONNECT_DATA = (SID = DG4ODBC2))
    (HS = OK)
    )

    I can't understand why the named instance is not working but the other is. Any help would be greatly appreciated!

    Have you checked with the ODBC test utility isql (it is installed by default when you install the unixODBC Driver Manager) If your ODBC driver can connect at all to this named instance? I doubt it will work either as there was that a blog has commented by MS engineer:

    Presenting the new ODBC drivers from Microsoft for SQL Server - Microsoft SQLNCli - Site Home - MSDN Articles team blog

    which States that the instance named connections are not supported using this driver.

    -Klaus

  • Problem with error ORA-06502: PL/SQL: numeric string or the error value

    Hello

    I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.

    ORA-06502: PL/SQL: numeric string or the error value

    SD wrote:
    Hello

    I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.

    ORA-06502: PL/SQL: numeric string or the error value

    Yes, it's a mistake to dependent data.

    Manage: SD
    Status level: Beginner
    Join date: November 21, 2001
    Messages total: 289
    Total Questions: 189 (183 pending)

    Why wasting you time here when you get rarely answers your questions?

  • The problem with ampersand in the PL/SQL procedure

    Dear Oracle experts,

    Please, help me to understand this case. I have the following code
    V_RESPONSE := UTL_HTTP.GET_RESPONSE (V_REQUEST);
    
          LOOP
             UTL_HTTP.READ_LINE (V_RESPONSE, V_BUFFER, FALSE);
             DATA_OUT := DATA_OUT || V_BUFFER;
          --DBMS_OUTPUT.PUT_LINE (V_BUFFER);
          END LOOP;
    And I'm getting DATA_OUT as
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns:chargeSubscriberResponse xmlns:ns="http://ws.cube.az"><ns:return>&lt;?xml version="1.0" encoding="UTF-8"?>
    &lt;response>
         &lt;retval>-2200003&lt;/retval>
         &lt;retmsg>Invalid Service&lt;/retmsg>
         &lt;quantity>&lt;/quantity>
         &lt;cube-transaction-id>&lt;/cube-transaction-id>
    &lt;/response></ns:return></ns:chargeSubscriberResponse></soapenv:Body></soapenv:Envelope>
    A don't have to '&' in this output. I need to analyze this variable to clear all ampersands. How can I do?

    Just replace does not work... I tried
    PROCEDURE Clean_up_xml (v_xml IN OUT VARCHAR2)
       IS
       BEGIN
          WHILE INSTR (v_xml, 'lt;') > 0
          LOOP
             v_xml :=
                SUBSTR (v_xml, 1, INSTR (v_xml, 'lt;') - 2)
                || SUBSTR (v_xml, INSTR (v_xml, 'lt;') + 4);
          END LOOP;
       END;
    But no luck...

    Does not erase the procedure '& '. How can I disable ampersand in PL/SQL procedure?

    Thanks in advance.

    PS: I know SET DEFINE OFF. But it only works in SQL * MORE.
    SQL> declare
      2
      3    data_out clob :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <response>
      6       <retval>-2200003</retval>
      7       <retmsg>Invalid Service</retmsg>
      8       <quantity></quantity>
      9       <cube-transaction-id></cube-transaction-id>
     10  > </response>' ;
     11
     12  begin
     13
     14    for rec in (
     15        select r.*
     16        from xmltable(
     17               xmlnamespaces(
     18                 'http://www.w3.org/2003/05/soap-envelope' as "soap"
     19               , 'http://ws.cube.az' as "ns"
     20               )
     21             , '/soap:Envelope/soap:Body/ns:chargeSubscriberResponse'
     22               passing xmlparse(document data_out)
     23               columns xml_return clob path 'ns:return'
     24             ) x
     25           , xmltable('/response'
     26               passing xmlparse(document x.xml_return)
     27               columns retval              number       path 'retval'
     28                     , retmsg              varchar2(30) path 'retmsg'
     29                     , quantity            number       path 'quantity'
     30                     , cube_transaction_id varchar2(30) path 'cube-transaction-id'
     31             ) r
     32    )
     33    loop
     34
     35      dbms_output.put_line('retval = '||rec.retval);
     36      dbms_output.put_line('retmsg = '||rec.retmsg);
     37      dbms_output.put_line('quantity = '||rec.quantity);
     38      dbms_output.put_line('cube_transaction_id = '||rec.cube_transaction_id);
     39
     40    end loop ;
     41
     42  end;
     43  /
    
    retval = -2200003
    retmsg = Invalid Service
    quantity =
    cube_transaction_id = 
    
    PL/SQL procedure successfully completed
     
    
  • Problem with the two EA DEVELOPER SQL DATA MODELING 3.0.0.665 and 3.1

    I created a model of very large data using SQL Developer data 3.0.0.665 and 3.1 EA maker. Its having a lot of check constraints. Whenever I am the design of the fence and the DOF and reopening export to import the DDL file failure to import completely check constraints. It is important to check constraints, but without any range of values inside. Its very frustrating because whenever you open import ddl, you must manually add again all the details of data check range constraint.

    OS: Windows XP.
    Check in the two EA Developer SQL Data Modeler 3.0.0.665 and 3.1

    -------------------------------------------
    Here are the contents of the .dmd file.
    -------------------------------------------
    * <? XML version = "1.0" encoding = "UTF - 8"? > *.
    * < OSDM_Design class = "oracle.dbtools.crest.model.design.Design" name = 'Admin_Panel' id = "9BE18B0A-6C67-2E5B-00DE-BD8312189ECB" version = "3.41" > * "
    * < createdBy > administrator < / createdBy > *.
    * < Createduserid > 2011-10-17 08:32:18 UTC < / Createduserid > *.
    * < Admin_Panel ownerDesignName > < / ownerDesignName > *.
    * < false capitalNames > < / capitalNames > *.
    * < designId > 9BE18B0A-6C67-2E5B-00DE-BD8312189ECB < / designId > *.
    * < / OSDM_Design > *.

    -------------------------------------------------------------------------------
    An example how the check constraints to get dirty.
    -------------------------------------------------------------------------------
    Initial check constraint is as below:
    ======================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    CHECK (Active_Flag IN ('A', 'I'))
    *;*

    Below how it occurs once I have imported the ddl and re-export:
    ============================================
    ALTER TABLE test_table
    ADD CONSTRAINT Active_Flag_ck
    (CHECK)
    *;*

    I'm in trouble as I already in the middle of the my development using SQL Developer Data Modeler.

    Please help me soon.

    Jean

    Hi John,.

    Every time I'm fence design and export the ddl and reopening through the import of the DDL file

    Why are you doing this? Once the DDL file is imported and then save the drawing and open simply saved design, no need to generate the DDL and import it every time that you start Modeler data.
    On the list of values - forced as this CHECK (Active_Flag IN ('A', 'I')) are imported as constraint check plain and not as a list of values.
    There are the more specific elements import of check constraint - they are defined as type database constraint that you select during the import. Accordingly if you import your DOF as Oracle 10 g DDL, then you will get forced correct check in DDL generated for Oracle 10 g and Oracle 11 g. Constraint of evil will be generated for Oracle 9i. You can move the constraint for Oracle 9i (in the check constraint dialog box) or generic if it can be treated as such constraint.

    I logged for DOF bad bug.

    Philippe

  • Problems with Insert by using dynamic Sql

    Hello
    I use the following procedure to read a BLOB after download tab-delimited text files and insert the data in a table called TBL_TMP. The columns of the table are the following: T1, T2, T3, T4, T5, T6, T7, T8, T9. I have different text files.

    Some files could fill the table until the column T8 (v_data_array (8)) and others could fill the columns up to T9 (v_data_array (9)). So I try to change this procedure in order to take account of the text file that will fill in column T9 (v_data_array (9)) but the only thing is fails for text files that fill will alone up to T8.

    The error was: ORA-01403: no data found. I tried using NVL (v_data_array (9), 'NULL'), but it does not work. How the procedure can be modified to accept two text files containing data up to columns T8 and T9.

    Thanks in advance.
    CREATE OR REPLACE PROCEDURE pr_file_upload
      (name_in IN varchar2)
    IS
    v_blob_data       BLOB; --will hold the binary structure
    v_blob_len        NUMBER; --The length of the BLOB in bytes
    v_position        NUMBER; --Will store the current position of the pointer in the blob
    v_raw_chunk       RAW(10000); --Incremental raw chunks of the BLOB will be read in the loop
    v_char            CHAR(1); --Stores the current character of the BLOB
    c_chunk_len       NUMBER := 1; --Stores the current length of the raw chunks in bytes.
    v_line            VARCHAR2 (32767) := NULL;  --Stores the value of the current line in the loop
    v_data_array      wwv_flow_global.vc_arr2;  --apex array size of 32,000
    v_name_in         VARCHAR2 (50);
    BEGIN
    
    
    -- Read data from APEX_APPLICATION_FILES view in APEX
    SELECT blob_content INTO v_blob_data
    FROM APEX_APPLICATION_FILES WHERE filename = name_in;
    
    
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    
    -- Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
     v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
     v_char :=  chr(fn_hex_to_decimal(rawtohex(v_raw_chunk)));
     v_line := v_line || v_char;
     v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
     IF v_char = CHR(10) THEN
    -- Convert tab CHR(9) to : to use wwv_flow_utilities
       v_line := REPLACE (v_line, CHR(9), ':');
    -- Convert each column separated by : into array of data
       v_data_array := wwv_flow_utilities.string_to_table (v_line);
    -- Insert data into target table
       EXECUTE IMMEDIATE 'insert into TBL_TMP (t1, t2, t3, t4, t5, t6, t7, t8, t9)
        values (:1,:2,:3,:4,:5,:6,:7,:8,:9)'
        USING
          v_data_array(1),
          v_data_array(2),
          v_data_array(3),
          v_data_array(4),
          v_data_array(5),
          v_data_array(6),
          v_data_array(7),
          v_data_array(8),
          NVL(v_data_array(9),'NULL');   -- Need help here.  This is empty when reading text files that fills up to column T8.
    
    
    -- Clear out
       v_line := NULL;
      END IF;
     END LOOP;
    END;
    /

    NVL (v_data_array (9), 'NULL') will not work. Use:

    CASE WHEN v_data_array.EXISTS(9) THEN v_data_array(9) END
    

    SY.

  • What is the problem with my trigger :(

    Hi friends

    What is the problem with this trigger please
    SQL> select object_type from user_objects where object_name='CE_STMT_INT_TMP';
    
    OBJECT_TYPE
    -------------------
    TABLE
    
    SQL> create or replace trigger ce_stmt_int_tmp_trg1
      2  after insert on ce_stmt_int_tmp
      3  for each row
      4  begin
      5      :new.column7 := 'checkno_test';
      6  end;
      7  /
    create or replace trigger ce_stmt_int_tmp_trg1
                              *
    ERROR at line 1:
    ORA-04084: cannot change NEW values for this trigger type
    Thank you very much

    I guess you mean that SQL * Loader is insertion of the value of the column, not not to date. You can override the value SQL * Loader is the insertion in a level line BEFORE INSERT trigger.

    Justin

  • Error message: this isn't a problem with intellectual property. Board of Directors, but rather with your SQL Server when you visit a Web site.

    Original title: an error occurred in SQL server?

    Hello, I just wanted to go to this site, but this error pops up: error SQL

    An error occurred in SQL server:

    This isn't a problem with intellectual property. Board of Directors, but rather with your SQL Server. Please contact your host and copy the above message.

    «Back to index »

    Please help me, I just moved my computer so I had to disconnect from the internet, but now he has problems.

    Is the site I tried to go to: http://www.minecraftforum.net/topic/227822-166-millenaire-npc-village-076c-duplicate-villager-fix/

    Hey Brainiac,

    1. are you encounter problems with this site?

    2. are you able to connect to this site from a different computer?

    3. were you able to connect to this website before?

    4. you remember to make changes to the computer before this problem?

    The problem seems to be, with the site that you are visiting. You can check if you can access the site from another computer.

    Hope this information is useful.

  • Problem with Top SQLs report

    Hello

    I have a big problem with Top SQLs reports, when I generate a report of high SQLs, SQL, the value text is not end, I know that there is a "The SQL text size" setting on the properties of the agent (this configuration is also on the collections setting ' Ta maximum size in characters of the short collects text of the SQL statement is ") on the two options , I've incremented the value of 256 (default) 1500, but when I generate the Top SQLs postpones continue it problem, once the changes I restarted the agent but the problem persists, I generate the report on the different formats, but result is the same, could you help me please.

    Thank you.

    Best regards.

    I see this in support KB article https://support.software.dell.com/kb/109536

    "

    • Title

      SQL in DB2 Top instructions are truncated in the delivered report of Top SQL

    • Description

      SQL in DB2 Top instructions are truncated in the delivered report of Top SQL

    • Resolution

    • Resolution A DDB-3673 request improvement with Support software Dell to show the full text of SQL high in the report Top SQL for DB2.

      Workaround At this point you should be able to make a custom report by cloning the Top SQL existing and then customizing report. »

    I know that this is not the solution, more of an explanation and guidance on how to solve this problem by using customizations.

    Golan

  • Problem with hierarchical query in function PL\SQL

    I have a simple table containing the ID of the parent

    -Create table

    create the table1 table:

    (

    ID NUMBER (12) not null,

    year number 4.

    month NUMBER (2),

    parent_id NUMBER (12)

    );

    -Create/recreate primary, unique and foreign key constraints

    change the table1 table:

    Add primary key constraint PK_TABLE1 (ID);

    change the table1 table:

    Add the foreign key constraint FK_TABLE1_PARENT (PARENT_ID)

    reference TABLE1 (ID);

    data:

    Insert into TABLE1 (id, year, month, parent_id)

    values (5, 2015, 12, 3);

    Insert into TABLE1 (id, year, month, parent_id)

    values (6 (2015), 12, 4);

    Insert into TABLE1 (id, year, month, parent_id)

    values (3 (2015), 11, 1);

    Insert into TABLE1 (id, year, month, parent_id)

    values (4 (2015), 11, 2);

    Insert into TABLE1 (id, year, month, parent_id)

    values (1, 2015, 10, null);

    Insert into TABLE1 (id, year, month, parent_id)

    values (2 (2015), 10, null);

    commit;

    and query

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;

    It works, but when I put this request in the procedure pl\sql

    create or replace procedure is get_report (p_cur_out on sys_refcursor)

    Start

    Open the p_cur_out for

    with h as

    (select t.id, t.year, t.month, CONNECT_BY_ROOT t.id as parent_id from table1 t

    where t.year = 2015 and t.month = 12

    and CONNECT_BY_ROOT t.year = 2015 and CONNECT_BY_ROOT t.month = 10

    connect by prior t.id = t.parent_id)

    Select * from:

    Join table1 t left t.id = h.parent_id;             

    end get_report;

    /

    They do not compile. And in the fall, with the exception

    Errors of compilation for the PC of the PROCEDURE. GET_REPORT

    [Error: PL/SQL: ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], []]

    Online: 6

    Text: with h as

    Error: PL/SQL: statement ignored

    Online: 6

    Text: with h as

    My version of oracle

    1Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    2PL/SQL Release 11.2.0.3.0 - Production
    3CORE Production 11.2.0.3.0
    4AMT for Linux: Version 11.2.0.3.0 - Production
    5NLSRTL Version 11.2.0.3.0 - Production

    What is the problem with my request? Or database? How to solve this problem?

    If you have access to MOS, you can search the reason of it. If you are using left join syntax instead of joining ANSI, owner Oracle procedure compiles and returns the result.

  • What is the problem with my sql says invalid identifier

    CREATE THE TABLE PROJECT

    (proj # NUMBER (6) NOT NULL,)

    p_name VARCHAR2 (15) NOT NULL,

    p_desc VARCHAR2 (150) NOT NULL,

    p_budget NUMBER (8).

    CONSTRAINT project_proj PRIMARY KEY #pname_pk (proj #, p_name));

    CREATE TABLE WORK ORDERS

    (wo # NUMBER (6))

    proj # NUMBER (6).

    wo_desc VARCHAR2 (150).

    wo_assigned VARCHAR2 (30),

    wo_hours NUMBER (5),

    wo_start DATE,

    wo_due DATE,

    wo_complete char (1),

    CONSTRAINT workorders_wo #_pk KEY(wo#) primary SCHOOL.

    CONSTRAINT workorders_wo #_fk FOREIGN KEY (proj #)

    REFERENCES PROJECT (proj #).

    Workorders_wodesc_uk of CONSTRAINT UNIQUE (wo_desc).

    CONSTRAINT workorders_hours_ck CHECK (wo_hours > = 0).

    CONSTRAINT workorders_wocomplete_ck CHECK (wo_complete in ('Y', 'n')));

    Whenever you have an error message the best thing to do is post a copy of your session with your statement sqlplus output. Like this.

    I have no problem with your first statement regarding the syntax and semantics

    SQL> create table project
      2  (
      3  proj# number(6) not null,
      4  p_name varchar2(15)not null,
      5  p_desc varchar2(150)not null,
      6  p_budget number(8),
      7  constraint project_proj#pname_pk primary key (proj#, p_name)
      8  );
    
    Table created.
    

    Second table a problem that his tent to make reference to project.proj #. But the problem is that it doesn't have a primary or unique key defined in this topic.

    SQL> create table workorders
      2  (
      3  wo# number(6),
      4  proj# number(6),
      5  wo_desc varchar2(150),
      6  wo_assigned varchar2(30),
      7  wo_hours number(5),
      8  wo_start date,
      9  wo_due date,
     10  wo_complete char(1),
     11  constraint workorders_wo#_pk primary key(wo#),
     12  constraint workorders_wo#_fk foreign key (proj#)
     13  references project (proj#),
     14  constraint workorders_wodesc_uk unique (wo_desc),
     15  constraint workorders_hours_ck check (wo_hours >=0),
     16  constraint workorders_wocomplete_ck check (wo_complete in ('y' ,'n'))
     17  );
    references project (proj#),
                        *
    ERROR at line 13:
    ORA-02270: no matching unique or primary key for this column-list
    

    I defined a

    SQL> alter table project add constraint project_proj#_uk unique (proj#);
    
    Table altered.
    

    Now, the second table is also created correctly

    SQL> create table workorders
      2  (
      3  wo# number(6),
      4  proj# number(6),
      5  wo_desc varchar2(150),
      6  wo_assigned varchar2(30),
      7  wo_hours number(5),
      8  wo_start date,
      9  wo_due date,
     10  wo_complete char(1),
     11  constraint workorders_wo#_pk primary key(wo#),
     12  constraint workorders_wo#_fk foreign key (proj#)
     13  references project (proj#),
     14  constraint workorders_wodesc_uk unique (wo_desc),
     15  constraint workorders_hours_ck check (wo_hours >=0),
     16  constraint workorders_wocomplete_ck check (wo_complete in ('y' ,'n'))
     17  );
    
    Table created.
    
    SQL>
    

    My Version of DB's

    SQL> select * from v$version where rownum = 1;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    
    SQL>
    
  • Pool pane there problem with long sql query?

    Hello

    I use Jdeveloper 11.1.2.2.0

    In the application I'm developing, there is a long sql query to call (it's a function from a package, which may take a few minutes to run) and I want to display a progress bar for the user.

    The progress bar component is a "progress indicator" and the percentage of achivement is refreshed by a component 'pool' with 1-second interval.

    The two components are connected in a javabean.

    The function with the sql query is the javabean too.

    To run the sql query that is long on background I am calling from a thread, and the pool component get the advancement of the percentage of a pipe filled with the sql function.

    If the function to run is just a long loop of java operations the progress bar works fine, but if I put my long sql query instead, stop listener pool should be performed to stop long, s sql queryo progress are updated only at the end of the long sql query.

    You have any ideas?

    Thank you

    Thanks for your replies. Unfortunately, it was not the solution to my case, sql procedures to block the entire application while ADF awaits them at the end...

    To solve my problem, I finally used a PL SQL Job to call my sql procedure (dbms_job.submit).

    The application is released right after the call and the component of the pool is not more secure!

    Kind regards

    Yann

Maybe you are looking for