The simple geometry Gets the error ORA-29532 on all calls SDO_GEOM

Hi all

I have a single point in a table in such a way that the query:
select SDO_GEOM.VALIDATE_GEOMETRY(geomObj, 0.05) from testvalid;
/* Returns */
SDO_GEOM.VALIDATE_GEOMETRY(GEOMOBJ,0.05)
'TRUE'
However the query:
select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
Receives the following error message:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.NumberFormatException: empty String
ORA-06512: at "MDSYS.SDO_3GL", line 658
ORA-06512: at "MDSYS.SDO_GEOM", line 519
ORA-06512: at "MDSYS.SDO_GEOM", line 558
ORA-06512: at line 1
The data itself are a unique SDO_POINT_TYPE:
select GEOMOBJ from testvalid;
/* Returns: */
GEOMOBJ
'(3001, , (174.092329032787, 129.420551704918, -71.2857142857142), , )'
I think the problem is something to do with the accuracy of the stored X, Y and Z values in point because if I'm running the following:
update TESTVALID set GEOMOBJ.sdo_point.x = cast(GEOMOBJ.sdo_point.x as number(8,3));
select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
/* Returns: */
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(GEOMOBJ,0.05)
'TRUE'
Similarly, running a direct comparison of an object made in the textual representation of the point fly works fine:
select SDO_GEOM.VALIDATE_GEOMETRY_with_context("MDSYS"."SDO_GEOMETRY"(3001,NULL, "MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL), 0.005) from dual;
/* Returns */
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT("MDSYS"."SDO_GEOMETRY"(3001,NULL,"MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL),0.005)
'TRUE'
Note that I only noticed this problem after upgrade to v11 v11 R2. In addition, the same error ORA-29532 happens when executing calls SDO_GEOM. [x] function such as SDO_GEOM. DISTANCE(). The problem is not limited to the geometries of type SDO_POINT_TYPE, but the problem only happens on some geometry entries in my database. It is reproducible in that the same geometry will continue to fail and the only solution I found is to try to round up its precision in x, y or z. I don't know how to round the precision for the types of SDO_POINT_TYPE easily, so one of my problems is that I find myself with a any dispersion of other geometries that I can query is no longer in space.

The data itself was inserted from MATLAB (which connects using drivers of ODBC Oracle Java v11) which converts my details in Java.Math.BigDecimal and binds to a prepared statement oracle.
It is possible that I consider that the insertion is made from different computers, some of which are 64-bit computers. Maybe somehow these machines are pumping in too large of a precision coordinates for the geometry of the oracle?

Any help would be great I am quite lost here.
If the precision is indeed the problem, anyone know how can I cut these surplus values after the decimal point for all types of geometry?


Thank you
Sven.

It is only related to the version of the server.
So once the database is 11.2, that corruption won't happen.

Tags: Database

Similar Questions

  • Gets the error ORA-01779 after I added the column

    Hi, I'm a total newbie in APEX but collaborated with ordinary development Oracle (tables, views, packages, triggers, etc) for a number of years.

    I ve been assigned in order to respect an existing application to APEX. One task is to add a column to a single character named 'ACTIVE' to a database table and also present on a current project list page. The value can be 'Y' or 'n'. In the view which is the source of data for the project page ad 'Y' turned into 'Yes' and 'n' turned into 'no '. So far so good, everything works well.

    There is another page on which it is possible to create new or modify existing projects. This page uses a view as a source of data. On this page, I added a group of radiobutton that contains two options: 'Yes' and 'no '. When I select to edit a project in the project list page the second page is loaded and the correct option, 'yes' or 'No', is marked on the page. This group of radiobutton works exactly like a couple of other groups of radiobutton also represented with a single character column in the database. So far so good!

    However, when I try to save the project file by clicking on "Apply Changes" I get this error:

    ORA-20001: DML error: p_rowid = 50, ID = p_alt_rowid, p_rowid2 =, p_alt_rowid2 is. ORA-01779: cannot modify a column that is mapped to a table not preserved key

    What is the problem here? The new 'ACTIVE' column is added to the view, when I run the view I Don t get all records in duplicate, the underlying table has a column id as the primary key.

    Since I Don t know that APEX is under the hood it s hard tp what's wrong. Anyone knows the solution to this problem?

    / Magnus

    Hello Magnus,

    Is there an INSTEAD OF trigger defined on the view? Have you added the new column ACTIVE there too?

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Get the error ora-02021

    I'm trying to truncate a table but oracle throws the error ORA-02021: DDL operations are not allowed on a remote database.

    02021, 00000, "DDL operations are not allowed on a remote database"
    * Cause: An attempt was made to use a DDL operation on a remote database.
    For example, "CREATE TABLE tablename@remotedbname... ».
    * Action: To change the remote database structure, you must connect to the
    remote database with the appropriate privileges.


    I'm pretty sure you have the appropriate privileges.

    You can even call a procedure:
    dbms_utility.exec_ddl_statement@DB_LINK exec ('your stmt');

  • What deletion XMLSchema received the error ORA-04022 no waiting asked, but had to wait to lock the dictionary objects

    I recorded a XMLschem in the Oracle XDB repository to load the XML file into the oracle tables using storage relational object. In this process, I'm trying to remove the xmlschema to sign up again with a few changes in the XSD file, but I'm not able to remove it and I get the error ORA 04022 no waiting asked, but had to wait to lock the dictionary objects... Before that, I deleted the xmlschem 2 - 3 times and it worked fine. But now I have this error.

    I tried to remove it with "DELETE_CASCADE" and also tried "DELETE_CASCADE_FORCE" and in both cases, I get the same error.

    I've waited 2-3 days and then retried still had the same error.

    Could you please help me to solve this problem.

    Here is the screenshot of the error

    Delete Schema No wait error.JPG

    I also tried to purge the schema, as shown below, but I get the error access denied. I'm stuck here, could not move before working on it.

    Select * from dba_xml_schemas, where qual_schema_url like '% HPO484% '; -1B01B74F95BE1C91E0540021287E70DC

    BEGIN

    DBMS_XMLSCHEMA. PURGESCHEMA (schema_id = > '1B01B74F95BE1C91E0540021287E70DC');

    END;

    It throws below error

    ORA-31050: access denied

    ORA-06512: at "XDB". DBMS_XMLSCHEMA", line 109

    ORA-06512: at line 1

    Could you please help me with this.

    Thank you

    Reva

    Is it possible to reproduce the problem?

    You have a table that references the schema?

    Check with your DBA if there is no locking assets library.

  • has received the error ORA-44416: invalid ACL, while trying to enable network services

    Hi guys I got the ERROR ORA-44416 after the activation of services network in 11 GR 2 to send emails, so I ran this command found just as shown below in the Oracle document library

    SELECT THE ACL, PRINCIPAL

    OF NACL, XDS_ACE ACE DBA_NETWORK_ACLS

    WHERE HOST = ' *' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND

    NACL. ACLID = ACE. ACLID AND

    ARE NOT (SELECT NULL FROM ALL_USERS WHERE USERNAME = MAIN);

    That returned a result of

    no selected line

    What could this mean

    The installation is done on a localhost and the APEX version is 4.2.2 browser is mozilla fire fox

    ORA-44416 means that the ACL that you tried to create to refer to a valid principle - that is, the user does not exist.

    The SQL code that you included above seems to be looking for associated ACL principles which are more database users. I don't see a direct link between this request and the ORA-44416.

    What was your original script of ACL?

    Also, because it is a question of database rather APEX you might get a better answer on the forums of the database.

  • Any suggestions on the elimination of the error ORA-01417?

    Just a question here. I'm developing a workbook in Discoverer Plus. I get a message ORA-01417 - a table can be external joined as another table. Just trying to see if there is a way to eliminate this error message. What I do is the following. I join table PA_EXPENDITURE_ITEMS_ALL to PA_EXPENDITURES_ALL. It is a standard join. Detail exists in master. Then I join PA_EXPENDITURES_ALL to PER_ALL_EMPLOYEES_F. Since I have a lot of spending on projects that aren't payroll/labor partner, my id of the person spending all the table is often null. This particular join must be an outer join, where I want to go back the detail that corresponds to a master document and detail that does not match. So far, nothing unusual there. The problem is that an employee may have multiple records in the employee file. Which would give me the detail data duplicate lines when I do not have a match, which would be bad. So what I do is to add a condition to test the article date of expenditure between the employee effective start date and the date of actual end of the employee. It is a condition that I add to the workbook. There is NO join defined between PA_EXPENDITURE_ITEMS_ALL and PER_ALL_EMPLOYEES_F. But what does the discoverer is when it generates the SQL, is to put the symbol of outer join on this condition. That does not seem logical, why he would do this. After all, I'm having some retail spending with no record of employee for them. So I have to have a way to deal with situations of nowhere. In any case, when I added this condition and try to refresh the workbook when I get the message ORA-01417. So I did some playing. I realized that if I build a condtion like that - AND ei.expenditure_item_date BETWEEN nvl(per.effective_start_date,ei.expenditure_item_date-1) AND nvl (per.effective_end_date, ei.expenditure_item_date + 1)
    then manually running a SQL query, I get good results. When I create this condition in discoverer, discoverer always ends by adding the symbol of the left outer join and I always get my message ORA-01417. Does anyone know of a sneaky way to keep discoverer of the addition of this symbol of outer join on my condition when discoverer built its SQL statement? I hope that I have explained the situation pretty well. Always a challenge to adequately describe a question.

    John Dickey

    Hello

    The error ORA-01417 is a restriction of the database rather than an a discoverer. If you get wrong this discoverer entirely in. Here are some things you can do:

    1. you can set a condition:

    Nvl (per.effective_start_date, ei.expenditure_item_date) AND nvl(per.effective_end_date,ei.expenditure_item_date) OR ei.expenditure_item_date BETWEEN EI.expenditure_item_date BETWEEN nvl(per.effective_start_date,ei.expenditure_item_date) AND nvl(per.effective_end_date,ei.expenditure_item_date)

    GOLD tells discoverer an outer join cannot be used, and it is why the sign (+) will not be added. This is not a real outer join but might work, as the dates are never null in the per_all_employees_f table.

    2. you can create a folder complex, combining the fields you wanted two tables PA. Then outer join this folder to the employee record, including the date of track conditions.

    3. If you only want the name of the employee in the per_all_employees_f table, and then you could implement a search function to translate the person_id in name of the employee. The function could be brought from the workbook so no join would be necessary. You might have to cache the result in the output function.

    Rod West

  • Create the error ORA-04021: timeout period exceeded while waiting to lock object

    Hello

    I get the following error when I try to deploy the mapping.
    Create the error ORA-04021: timeout period exceeded while waiting to lock object.
    I use OWB 10.2.0.4.36

    All the world is facing this problem? Kindly help me in this regard.

    Thank you
    Siva

    Hi Siva,

    It's probably a blocking problem.

    Select "alter system kill session"'"
    || TO_CHAR (l.session_id)
    || ','
    || to_char(s.Serial#)
    || '''; ' kill_session
    o.object_name
    l.oracle_username
    l.os_user_name
    || Chr (10)
    || '('
    || s.Terminal
    || ')' os_user_name
    v $ session s
    , v$ locked_object l
    dba_objects o
    where s.sid = l.session_id
    and l.object_id = o.object_id
    /

    The above should give you the session id

    Then use SYSTEM account to kill the session
    alter system kill session "";

    Thank you
    Fati

  • How to solve the error ORA-00001 in SQL Insert?

    Hi all, I need your help appreciated.

    I do a plsql procedure that inserts a line according to the value of the slider, I have error oracle ORA-00001: unique constraint (constraint_name) violated.

    This message may appear if a duplicate entry exists at a different level: in the RDBMS MySQL, I have the syntax IGNORES to solve this error of duplication... and in Oracle?

    Thanks for your time and your advice.
    Miguelito

    user6317803 wrote:
    How to solve the error ORA-00001 in SQL Insert?

    ORA-00001 means table a unique/primary key / index and you attempt to insert a row with the key value already exists in the table. I'll assume table has a primary key on COUNTRY_ID. Then modify SQL for:

    SQL = "INSERT INTO COUNTRIES (COUNTRY_ID, COUNTRY_NAME, REGION_ID) SELECT"BZ","BLZ", 3 DOUBLE WHERE DOES NOT EXIST (SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID ="BZ").

    There is a good chance COUNTRY table also has unique key/index on COUNTRY_NAME. If so use:

    SQL = "INSERT INTO COUNTRIES (COUNTRY_ID, COUNTRY_NAME, REGION_ID) SELECT"BZ","BLZ", 3 DOUBLE WHERE DOES NOT EXIST (SELECT 1 FROM COUNTRIES WHERE COUNTRY_ID = 'BZ' OR 'BLZ' = COUNTRY_NAME).

    SY.

  • EMCA fails with the error "ORA-01034: ORACLE is not available.

    Hello
    10g R2 on AIX I have the following error:
    emca -config dbcontrol db -repos create
    ......................................................
    .....................................................
    Password for DBSNMP user:
    Invalid username/password. [ORA-01034: ORACLE not available]
    And that's because all oracle processes are runing with:
    ORACLE_HOME=/U00/Oracle/product/10.2.0/Db_1/

    EMCA fails with the error "ORA-01034: ORACLE is not available" and "Name of user and password invalid." For DBSNMP user [ID 550484.1]
    It is said:
    +<moderator edit - removed MOS content>+
    Can I do the reverse and in the script of the emca, add "/" at the end of ORACLE_HOME=/u00/oracle/product/10.2.0/db_1
    ??
    Thank you.

    Edited by moderator - content removed from MOS

    Hi user;

    First of all please do not post details here, its against to oracle interoperability metalink, ID is sufficient for us. Secondly, yes you can, first to save $ORACLE_HOME/bin/emca script like

    CP $ORACLE_HOME/bin/emca $ORACLE_HOME/bin/emca_org

    to change the file number and test

    Respect of
    HELIOS

  • Get the error ORA-39146 while trying to import data from 10 g to 12 c

    Hi all


    im getting below error while trying to import data from 10 g to 12 c


    ORA-39146: schema 'B_SITES' does not exist
    import in WE8MSWIN1252 and AL16UTF16 NCHAR character set
    export in the UTF8 character set and AL16UTF16 NCHAR character set
    ATTENTION: the possible loss of data to character set conversions


    can someone help how do we change to WE8MSWIN1252 UTF8 character set...

    Hello

    "ORA-39146: there is no schema 'B_SITES'.

    ORA-39146: schema 'string' does not exist

    Cause: The specified schema was referenced as the source of a REMAP_SCHEMA parameter, but did not exist in the dump file (for

    Action: Specify the correct name of the schema to be remapped.

    Anand

  • Sending a message using UTL_SMTP, get the error ORA-29278: SMTP temporary error

    Hi all

    I try to send mail from oracle plsql. for that I use the below mode operative but unfortunately not able to move forward.
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    procedure is
    CREATE OR REPLACE PROCEDURE send_mail (p_to        IN VARCHAR2,
                                           p_from      IN VARCHAR2,
                                           p_message   IN VARCHAR2)
    AS
      l_mail_conn   UTL_SMTP.connection;
      l_reply utl_smtp.reply;
      l_smtp_host VARCHAR2(50) := 'smtp.gmail.com:25';
      l_smtp_port NUMBER := 25;  
    BEGIN
      l_mail_conn := UTL_SMTP.open_connection(l_smtp_host, l_smtp_port);
      utl_smtp.EHLO(l_mail_conn, l_smtp_host);
      utl_smtp.command(l_mail_conn, 'AUTH LOGIN');
      utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('[email protected]'))));
      utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('mypwd'))));
      l_reply :=UTL_SMTP.mail(l_mail_conn, p_from);
      dbms_output.put_line( l_reply.code || ' ' || l_reply.text );
      UTL_SMTP.rcpt(l_mail_conn, p_to);
      UTL_SMTP.write_data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
      UTL_SMTP.quit(l_mail_conn);
    END;
    /
    call you as follows
    declare
     conn        utl_smtp.connection;
     smtp_domain VARCHAR2(256) := null;
     BEGIN
     utl_smtp.command(conn,'STARTTLS');
     utl_smtp.helo(conn, smtp_domain);
       send_mail(p_to        => '[email protected]',
                 p_from      => '[email protected]',
                 p_message   => 'can i get message.');
     END;
     /
    and the error
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 159
    ORA-06512: at line 5
    I checked in Control Panel that IIS is installed and also SMTP is configured.
    I am able to ping HOST SMTP thro' TELNET

    and I changed the parameter, SMTP_OUT_SERVER, as
    ALTER SYSTEM SET SMTP_OUT_SERVER= 'smtp.gmail.com:25' scope = both
    I don't get no idea. is this due to use the GMAIL Server?

    Oracle 10 g and Windows version is XP - SP3

    Thanks for any help

    Concerning
    Knockaert

    When I googled for "Gmail PL/SQL" I find a lot of things, including the articles of blog with code examples. How about you?

  • Region report on apex 4.1 upgrade page get the error ORA-01790

    Hi all
    We have recently upgraded from 3.1.2 to 4.1. One of the pages in several regions, one being a region of report. It has a simple sql statement:
    Select
    "RU_TD_ID,"
    "RU_TH_ID,"
    "LOC"
    "DEPT"
    'ACCOUNT ',.
    "SUB."
    "SPRT."
    "DETAIL_DESC,"
    "SERVICE_PERIOD,"
    "DETAIL_AMT,"
    "FULL_ACCT_STRING,"
    'DATE_ADD ',.
    "USER_ADD."
    "DATE_UPD,"
    'USER_UPD '.
    of ' #OWNER # '. " RU_TRANS_DTL ".
    where "RU_TH_ID" =: P26_RU_TH_ID

    : p26_ru_th_id is entered in a header after process... I can see this field filled in other parts of the page and you can see in the URL to this page... http://sea-ax0038.davita.com:7777 / pls/fintest_apex/f? p = 130:26:6483666979470721:NO:P26_RU_TH_ID:13745

    I have active debugging and it comes back with the following:

    0.00227 0,18859 region: details of payment 4
    review of the salon 0.00358 0,19093 4
    0.00086 0,19451 determine the 4 column headers
    0.00288 0,19527 enable sorting 4
    0.00112 0,19818 analyze the query like: FINAPPS 4
    0,19928-0.00121... Execute the statement: select NULL NULL "CHECK$ 01", 'RU_TD_ID': 'P14_RU_TH_ID' 'RU_TH_ID', NULL, 'FULL_ACCT_STRING', NULL, 'DETAIL_AMT', NULL, 'DETAIL_DESC', NULL, 'SERVICE_PERIOD', NULL, 'LOC', NULL, 'DEPT', NULL, 'ACCT', NULL, 'SUB', NULL "SPRT,' NULL 'DATE_ADD', NULL"USER_ADD', NULL, 'DATE_UPD', NULL, 'USER_UPD' of the union select double all ' CHECK$ 01 ","RU_TD_ID" , 'RU_TH_ID', 'FULL_ACCT_STRING', 'DETAIL_AMT', 'DETAIL_DESC', 'SERVICE_PERIOD', "LOC", "DEPT", 'ACCOUNT', "SUB", "SPRT", 'DATE_ADD', "USER_ADD", 'DATE_UPD', 'USER_UPD' of (select NULL "CHECK$ 01", "RU_TD_ID", "RU_TH_ID", "LOC", "DEPT", 'ACCT', "SUB", "SPRT", 'DETAIL_DESC', 'SERVICE_PERIOD', 'DETAIL_AMT', 'FULL_ACCT_STRING', 'DATE_ADD', "USER_ADD", 'DATE_UPD', 'USER_UPD' from (select 'RU_TD_ID' 'RU_TH_ID' ') , "LOC", "DEPT", "ACCOUNT", "SUB", "SPRT', 'DETAIL_DESC', 'SERVICE_PERIOD', 'DETAIL_AMT', 'FULL_ACCT_STRING', 'DATE_ADD', 'USER_ADD', 'DATE_UPD', 'USER_UPD' to 'FINAPPS '. ((' "RU_TRANS_DTL" where "RU_TH_ID" =: P26_RU_TH_ID) APEX$ RPTSRC order by 2 nulls first) 4
    0,20053 0.00653 rename mentioned link "P14_RU_TH_ID" to "p$ _quoted_bind_1 ' 4
    0,20706 0.00094 report error: ORA-01790: expression must have the same data type as the corresponding expression 4

    The only thing that jumps, is where there the line "Rename city bind...". "I have no idea why is the reference 'P14_RU_TH_ID' in the select clause... it is P26 and was called from P11. In fact I do not understand why the whole of the union everything is generated wit the first part all the field of execept P14_RU_TH_ID NULL.

    The other two regions on the page fill/processusent without problem.

    Any help would be appreciated. We have improved the production 4.1 over the weekend and users missed test this feature and it is 'critical' (of course).

    Thank you
    Kristina

    Published by: Kristina on February 13, 2012 21:01

    Hi Kristina,

    in fact, you should see a search box with the value 'Translational research' at the top right. When you click this field, the text will disappear and you can type in your search criteria. Press on [Enter] to run your search.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Get the error ORA-01422 in stored procedure

    ORA-01422: exact fetch returns more than number of lines
    This page explains the error:
    http://www.techonthenet.com/Oracle/errors/ora01422.php

    This is my procedure:
    In the clause select is causing the error. I understand the nature of the error, but the strange thing is that when I run the sql code, remove the "in."
    part of my test settings, I just receive a single line. Always when I execute my procedure with the same settings I get the error. What could be wrong?

    create or replace
    PROCEDURE COUNTER_GETACTIVE
    (
    METERPOINTID IN MeterPointCounters.MeterPointId%Type,
    METERPOINTCOUNTERNR IN METERPOINTCOUNTERS. Type of METERPOINTCOUNTERNR %,
    p_cursor on REFCURSOR_PKG.counter_cursor
    )
    IS
    l_counterNr CounterBridgeTable.CounterNr%type;
    l_meterId CounterBridgeTable.MeterId%type;
    BEGIN
    Select counternr, meterid in l_counterNr, l_meterId from CounterBridgeTable where meterpointid = METERPOINTID and meterpointcounternr = METERPOINTCOUNTERNR and datetom is null;

    Open p_cursor for select * from counters where counternr = l_counterNr and meterId = l_meterId;

    END COUNTER_GETACTIVE;

    You actually run this query

    select counternr, meterid from CounterBridgeTable where meterpointid = METERPOINTID and meterpointcounternr = METERPOINTCOUNTERNR and datetom is null;
    

    param name is identical to the column, he's ignoring your param and pretty much do a self-join

    Try this:

    create or replace
    PROCEDURE COUNTER_GETACTIVE
    (
    p_METERPOINTID IN MeterPointCounters.MeterPointId%Type,
    p_METERPOINTCOUNTERNR IN METERPOINTCOUNTERS.METERPOINTCOUNTERNR%type,
    p_cursor out REFCURSOR_PKG.counter_cursor
    )
    IS
    l_counterNr CounterBridgeTable.CounterNr%type;
    l_meterId CounterBridgeTable.MeterId%type;
    BEGIN
    select counternr, meterid into l_counterNr, l_meterId from CounterBridgeTable where meterpointid = p_METERPOINTID and meterpointcounternr = p_METERPOINTCOUNTERNR and datetom is null;
    
    open p_cursor for select * from counters where counternr = l_counterNr and meterId = l_meterId;
    
    END COUNTER_GETACTIVE;
    

    Published by: tanging on June 8, 2010 10:37

  • Get the error ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid.

    I get error report error: ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid. When you attempt to select a view in the APEX. The view is the source of the region for a regional report.

    The view contains data from active directory that has been built using the DBMS_LDAP package.

    PLEASE SEE BELOW FOR THE CODE USED IN THE CONSTRUCTION OF THE VIEW;

    VIEW to CREATE or REPLACE v_capa_security AS
    (select attribute_name, attribute_value)
    table (ldapquery (sys_context ('CAPA_ACCESS', 'domain') |'. com',))
    '389',
    sys_context ('CAPA_ACCESS', 'username') | » @'|| sys_context ('CAPA_ACCESS', 'domain') |'. com',.
    sys_context ('CAPA_ACCESS', 'password'),
    "DC is psdev, DC = com",
    "sAMAccountName =' | ' sys_context ('CAPA_ACCESS', 'username'),
    (("memberof, business, mail, sAMAccountName"))
    );

    (The below function retrieves data from a LDAP directory)

    CREATE OR REPLACE FUNCTION LDAPQuery)
    p_host IN VARCHAR2,
    p_port IN VARCHAR2,
    p_user IN VARCHAR2,
    p_password IN VARCHAR2,
    p_dn_base IN VARCHAR2,
    p_filter IN VARCHAR2,
    p_attributes IN VARCHAR2)
    Tbl_ty_ldap_query RETURN PIPELINED IS


    v_result tbl_ty_ldap_query: = tbl_ty_ldap_query)
    ty_ldap_query (NULL,
    NULL,
    NULL));


    retval PLS_INTEGER;
    v_session DBMS_LDAP. SESSION;
    v_attrs DBMS_LDAP.string_collection;
    v_message DBMS_LDAP. MESSAGE;
    v_entry DBMS_LDAP. MESSAGE;
    v_dn VARCHAR2 (256);
    v_attr_name VARCHAR2 (256);
    v_ber_elmt DBMS_LDAP.ber_element;
    v_vals DBMS_LDAP. STRING_COLLECTION;
    b_first BOOLEAN: = TRUE;
    v_dn_identifier VARCHAR2 (200);
    v_attributes apex_application_global.vc_arr2;

    BEGIN
    retval: = - 1;
    DBMS_LDAP.use_exception: = TRUE;
    v_session: = DBMS_LDAP.init (p_host, p_port);
    retval: = DBMS_LDAP.simple_bind_s (v_session,
    p_user,
    p_password);

    v_attributes: = apex_util.string_to_table (p_attributes, ',');
    because me in (v_attributes.first)... loop (v_attributes.last)
    v_attrs (i): = v_attributes (i);
    end loop;

    value: =.
    DBMS_LDAP. SEARCH_S (v_session,
    p_dn_base,
    DBMS_LDAP. SCOPE_SUBTREE,
    p_filter,
    v_attrs,
    0,
    v_message
    );
    retval: = DBMS_LDAP. COUNT_ENTRIES (v_session, v_message);
    v_entry: = DBMS_LDAP. FIRST_ENTRY (v_session, v_message);
    WHILE v_entry IS NOT NULL LOOP
    v_attr_name: = DBMS_LDAP. FIRST_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);

    WHILE v_attr_name IS NOT NULL LOOP
    v_vals: = DBMS_LDAP. GET_VALUES (v_session,
    v_entry,
    v_attr_name);

    IF v_vals.count > 0 THEN
    BECAUSE me IN v_vals. FIRST... v_vals. LAST LOOP
    v_dn_identifier: = DBMS_LDAP. GET_DN (v_session,
    v_entry);
    line of conduct (ty_ldap_query (v_dn_identifier,
    v_attr_name,
    v_vals (i)));
    END LOOP;
    END IF;
    v_attr_name: =.
    DBMS_LDAP. NEXT_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);
    END LOOP;
    v_entry: = DBMS_LDAP. NEXT_ENTRY (v_session,
    v_entry);

    END LOOP;
    retval: = DBMS_LDAP.unbind_s (v_session);
    RETURN;

    END LDAPQuery;



    I then use the following pl/sql code piece to fill the frame and the view;

    Start
    pkg_capa_security.pr_set_context (< username > < password >, < domain >).
    end;


    If I run the code through TOAD or SQLPLUS it works very well (I am able to select the view without getting errors)

    Is the error due to the LDAPQuery as a function of Pipelined?

    Any help/suggestions welcome.

    Thanks in advance

    If you set a process of loading page on preparing for the session of database to view your page. If you need it for the session of data used for the application that manages the POST (presentation) of your page you must set an after - submit processes. An easier way to do both is to code once in the VPD (under Security) attribute for the application.

    Scott

  • Unable to create a table with virtual columns... Get the error ORA-12899... Suggestions please.

    Hi all

    Here is the create table script, which does not work, error ORA-12899 keep expressing. Please suggest...,.,.

    CREATE TABLE FX_TRANS
    (
    SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),
    UPSTREAM_EXECUTION_TS TIMESTAMP (9).
    LOCAL_TZ VARCHAR2 (20 BYTE),
    GMT_CONV_ENTERED_DT_TS TIMESTAMP (9) ALWAYS GENERATED IN THE FORM ("SONARDBO". "FN_CONVERT_TIMEZONE"("LOCAL_TZ","ENTERED_DT_TS")), "
    GMT_CONV_EXECUTION_DT_TS TIMESTAMP (9) ALWAYS GENERATED IN THE FORM ("SONARDBO". "FN_CONVERT_TIMEZONE"("LOCAL_TZ","UPSTREAM_EXECUTION_TS")), "
    );

    [Error] Running (5:3): ORA-12899: value too large for column 'GMT_CONV_EXECUTION_DT_TS' (actual: 11, maximum: 20)

    [Error] Performance (6:3): ORA-12899: value too large for column 'GMT_CONV_EXECUTION_DT_TS' (actual: 11, maximum: 20)


    Used fucntion Script that I use as a VIRTUAL column expression:

    CREATE OR REPLACE FUNCTION SONARDBO. FN_CONVERT_TIMEZONE
    (
    PI_LOCAL_TZ IN VARCHAR2,
    PI_DT IN TIMESTAMP
    )
    RETURNS THE TIMESTAMP
    DETERMINISTIC
    IS
    LV_TIMESTAMP TIMESTAMP;
    BEGIN
    LV_TIMESTAMP: = CASE WHEN PI_LOCAL_TZ = 'SERGEANT' THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "Asia/Singapore")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    WHEN PI_LOCAL_TZ = "GMT" THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "GMT")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    WHEN PI_LOCAL_TZ = "IS" THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "America/New_York")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    ANOTHER NULL
    END;


    RETURN LV_TIMESTAMP;
    EXCEPTION
    WHILE OTHERS THEN
    LIFT;
    END;
    /

    Thank you very much

    Arpit

    This one worked for me.

    -----------------

    drop table FX_TRANS;
    
    CREATE TABLE FX_TRANS (
       SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),
       UPSTREAM_EXECUTION_TS TIMESTAMP (9),
       LOCAL_TZ VARCHAR2 (20 BYTE),
       ENTERED_DT_TS TIMESTAMP (9),
       GMT_CONV_ENTERED_DT_TS timestamp(9)
             GENERATED ALWAYS AS
                (cast ("FN_CONVERT_TIMEZONE" ("LOCAL_TZ", "ENTERED_DT_TS") as timestamp(9))),
       GMT_CONV_EXECUTION_DT_TS timestamp(9)
             GENERATED ALWAYS AS
                (cast("FN_CONVERT_TIMEZONE" ("LOCAL_TZ", "UPSTREAM_EXECUTION_TS") as timestamp(9))));
    
    INSERT INTO fx_trans (SAGE_TRADE_TYPE,
                          UPSTREAM_EXECUTION_TS,
                          LOCAL_TZ,
                          ENTERED_DT_TS)
         VALUES ('A',
                 SYSTIMESTAMP,
                 'SGT',
                 SYSTIMESTAMP + 1 / 24);
    
    commit;
    

    ------------

    See you soon,.

    Manik.

Maybe you are looking for