Database Link Problem-Peculiar SQL stmt execution.. Please help

Hi all,
This is a strange problem i'm facing while running the following query.
This query is run on the local machine which is fetching data from another remote database. All the functions included also are fetching data from the remote database through db links.
I know lot of db links are into picture, but the requirement is like this only.
SQL :SELECT billing_extract_subscriber.get_external_id_types_descr
(ciem.external_id_type,
'ra_delhi'
) AS "EXTERNAL_ID_TYPE",
ciem.external_id, ciem.subscr_no customer_equip_map_subscr_no,
ciem.subscr_no_resets, s.subscr_no servive_subscriber_no,
s.service_active_dt, s.service_inactive_dt, s.is_prepaid,
billing_extract_subscriber.get_status_values_descr
(ss.status_id,
'ra_delhi'
) AS "STATUS_VALUES",
billing_extract_subscriber.get_status_type_values_descr
(ss.status_type_id,
'ra_delhi'
) AS "STATUS_TYPE_VALUES",
ss.subscr_no service_status_subscr_no, NULL "point_target",
NULL "customer_corridors_subscr_no", cmc.component_id, cmc.package_id,
billing_extract_subscriber.get_component_name_descr
(cmc.component_id,
'ra_delhi'
) AS "COMPONENT_NAME",
billing_extract_subscriber.get_package_def_values_descr
(cmc.package_id,
'ra_delhi'
) AS "PACKAGE_NAME",
cmc.component_status,
billing_extract_subscriber.get_mkt_code_values_descr
(cf.mkt_code,
'ra_delhi'
) AS "MKT_CODE",
cf.account_no,
billing_extract_subscriber.get_bill_period_descr
(cf.bill_period,
'ra_delhi'
) AS "BILL_PERIOD",
cf.account_type,
billing_extract_subscriber.get_account_category_descr
(cf.account_category,
'ra_delhi'
) AS "ACCOUNT_CATEGORY",
billing_extract_subscriber.get_gender_descr (cf.gender,
'ra_delhi'
) AS "GENDER"
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
WHERE ciem.subscr_no = s.subscr_no
AND s.subscr_no = ss.subscr_no
AND s.parent_account_no = cf.account_no
AND s.service_active_dt >= cf.date_active
AND NVL (s.service_inactive_dt, '31-dec-9999') <=NVL (cf.date_inactive, '31-dec-9999')
AND s.service_active_dt <= ciem.active_date
AND NVL (s.service_inactive_dt, '31-dec-9999') >=NVL (ciem.inactive_date, '31-dec-9999')
AND cmc.parent_account_no = cf.account_no
AND ciem.active_date <= cmc.active_dt
AND NVL (ciem.inactive_date, '31-dec-9999') >=NVL (cmc.inactive_dt, '31-dec-9999');
*1. Now when i'm running this sql all as a whole I'm getting the error:*
ORA-00904: "S"."SERVICE_INACTIVE_DT": invalid identifier
ORA-02063: preceding line from RA_DELHI
Sometimes Invalid Identifier, sometimes invalid table etc. is coming.
*2. Now when i'm running the above query after breaking into two parts is :*
a. first part .. WHERE clause is removed -
SELECT billing_extract_subscriber.get_external_id_types_descr
(ciem.external_id_type,
'ra_delhi'
) AS "EXTERNAL_ID_TYPE",
ciem.external_id, ciem.subscr_no customer_equip_map_subscr_no,
ciem.subscr_no_resets, s.subscr_no servive_subscriber_no,
s.service_active_dt, s.service_inactive_dt, s.is_prepaid,
billing_extract_subscriber.get_status_values_descr
(ss.status_id,
'ra_delhi'
) AS "STATUS_VALUES",
billing_extract_subscriber.get_status_type_values_descr
(ss.status_type_id,
'ra_delhi'
) AS "STATUS_TYPE_VALUES",
ss.subscr_no service_status_subscr_no, NULL "point_target",
NULL "customer_corridors_subscr_no", cmc.component_id, cmc.package_id,
billing_extract_subscriber.get_component_name_descr
(cmc.component_id,
'ra_delhi'
) AS "COMPONENT_NAME",
billing_extract_subscriber.get_package_def_values_descr
(cmc.package_id,
'ra_delhi'
) AS "PACKAGE_NAME",
cmc.component_status,
billing_extract_subscriber.get_mkt_code_values_descr
(cf.mkt_code,
'ra_delhi'
) AS "MKT_CODE",
cf.account_no,
billing_extract_subscriber.get_bill_period_descr
(cf.bill_period,
'ra_delhi'
) AS "BILL_PERIOD",
cf.account_type,
billing_extract_subscriber.get_account_category_descr
(cf.account_category,
'ra_delhi'
) AS "ACCOUNT_CATEGORY",
billing_extract_subscriber.get_gender_descr (cf.gender,
'ra_delhi'
) AS "GENDER"
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
The query is running fine.
b. when i'm running the another part where i'm removing the functions and replacing with then also it is running fine. e.g*
SELECT *
FROM customer_id_equip_map@ra_delhi ciem,
service@ra_delhi s,
service_status@ra_delhi ss,
cmf_package_component@ra_delhi cmc,
cmf@ra_delhi cf
WHERE ciem.subscr_no = s.subscr_no
AND s.subscr_no = ss.subscr_no
AND s.parent_account_no = cf.account_no
AND s.service_active_dt >= cf.date_active
AND NVL (s.service_inactive_dt, '31-dec-9999') <=NVL (cf.date_inactive, '31-dec-9999')
AND s.service_active_dt <= ciem.active_date
AND NVL (s.service_inactive_dt, '31-dec-9999') >=NVL (ciem.inactive_date, '31-dec-9999')
AND cmc.parent_account_no = cf.account_no
AND ciem.active_date <= cmc.active_dt
AND NVL (ciem.inactive_date, '31-dec-9999') >=NVL (cmc.inactive_dt, '31-dec-9999');
*3. I can trace out there is some problem related to the concurrent db links getting opened.*
i've done resizing the following parameters as well but isn't working :
NAME TYPE VALUE
open_cursors integer 3000
open_links integer 100
open_links_per_instance integer 100
read_only_open_delayed boolean FALSE
session_max_open_files integer 10
NAME TYPE VALUE
open_cursors integer 3000
open_links integer 100
open_links_per_instance integer 100
read_only_open_delayed boolean FALSE
session_max_open_files integer 10
SQL>
SQL> sho parameter distributed
NAME TYPE VALUE
distributed_lock_timeout integer 300
I've tried breaking up the query but in any case i'm opening same no. of dblinks. So it din't help me.
Kindly Suggset what to do? Is there any more parameter which govern maximum db links opened at a time? or is this problem due to someother reasons?
Database Details :
Version : 10.2.0.3.0
Platform : HP UX

Hi all,
NO RESPONSE AT ALL???
Well not a PROBLEM....
I got my solution so thought of writing it here for everybody's reference.
SQL> alter session set events '10176 trace name context forever';
Session altered.
SQL> alter system flush shared_pool;
System altered.
And then I have execute original query given by Prabhat, it's running fine.
Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.7
This problem can occur on any platform.
Symptoms
-- Problem Statement:
Following query over dblink having Local database 9iR2 and remote 10gR2 works..
select *
from ctps3.institutions@ctps3 i,
ctps3.state_types@ctps3 s,ods.institutions oi
where s.stt_state_type_id (+) = i.stt_state_type_id
and oi.ctps_insttn_id = i.inst_insttn_id
and i.inst_modifd_dt = trunc(sysdate)
and (nvl (oi.inst_state_txt, 'x') <> nvl (s.stt_state_type_nm, 'x'))
and (nvl (oi.inst_phone_txt, 17) <> nvl (i.inst_phone_txt, 17));
The same query fails when both local and remote databases are 10g R2, with following errors:
ERROR at line 2:
ORA-00904: "OI"."INST_STATE_TXT": invalid identifier
ORA-02063: preceding line from CTPS3
Cause
Outer join query over dblink can fail with ORA-904, as referenced in:
Bug 6620988 QUERY OVER DBLINK FAILS WITH ORA-904 SELECTING DATE
Predicates are not checked to verify if they belong to same network node when we attempt to colocate the remote tables. This results in wrongly generating remote query and ORA-904
REDISCOVERY INFORMATION:
1. ORA-904
2. DB link
3. OJ predicates across network nodes
4. predicates wrongly pushed network nodes
Solution
-- To implement the solution, please execute the following steps::
Use the workaround of disabling colocated joins via event 10176 and force a hard parse to happen
(ie by flushing the shared pool), ie:
SQL> alter session set events '10176 trace name context forever';
SQL> alter system flush shared_pool;
or
For a permanent fix, request a One-Off Backport of 6620988 for the appropiate platform.
References
Bug 6620988 - QUERY OVER DBLINK FAILS WITH ORA-904 SELECTING DATE

Similar Messages

  • TS3899 In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    In my iPad 2 with IO6 today I can not send emails from my gmail account, they go to the outbox directly...why? How can i solve this problem? ..I restarted the IPad but the problem was not solved. Please help.

    Greetings,
    Questions:
    1. What version of the Mac OS are you running (Apple > About this Mac)?
    2. What version of the iOS are you running (Settings > About)?
    3. Do you use MobileMe/ iCloud or another server based sync solution like Google or Yahoo?
    4. Do other changes to synced information like Address Book content sync successfully back and forth?
    Based on your description it sounds like you have a 1 way sync issue.  Events sync fine between the iOS devices and fine from the computer to the iOS devices but not from the iOS devices to the computer.
    Try:
    Backup your computer and iOS devices before doing anything else:
    http://support.apple.com/kb/HT1427
    http://support.apple.com/kb/ht1766
    Ensure all the devices in use are fully up to date: Apple > Software Update / Settings > General > Software Update
    Make separate backups of critical data:
    Backup your computer Addressbook: http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad961.html
    Backup your computer iCal: http://support.apple.com/kb/HT2966
    Reset syncing on your Mac: http://support.apple.com/kb/TS1627
    Reply back if that does not resolve your issue.
    Hope that helps.

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • I'm having a problem saving a pages document as another format, like a Word document or PDF file.  I've never had this problem in the past.  Please help me!  I need to have this fixed a.s.a.p.

    Hello everyone,
    I'm currently having a problem saving a Pages document as another format, such as a Word document or PDF file.  I've never had this problem before with Pages.  Please help me!  I need to have this completed a.s.a.p.
    Thanks,
    Amy

    To save as a PDF, you do that from Print
    To save as Wrod format, you export
    Allan

  • By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator]. What is the name of the product? Where is the link for download and reinstall? Please help me r

    By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator - never disclose publicly]. What is the name of the product? Where is the link for download and reinstall? Please help me rapidly, Best regards / Stefan

    Sign in to your Adobe account online and look in the Plans/Products sections to see which program it might have been.

  • HI YANN/VADIM...Still having problem in BADIs...please help me out

    Hi Yann/Vadim,
    Facing a problem in BADI can u please help me out...
    I am implementing sourcing dashboard.
    I am facing problem while implementing the badi BBP_ECS_PO_OUT_BADI in SRM. and BBP_PO_INBOUND_BADI in R3.
    i have written following code in BBP_ECS_PO_OUT_BADI in SRM
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    data : ls_item type BBP_PDS_PO_ITEM_D.
    data : w_customer_fields type BBPS_IF_CUSTOMER_FIELDS_PI.
    move 'POITEM' to w_customer_fields-refobject.
    move 'CATALOGID' to w_customer_fields-fieldname.
    move ls_item-catalogid to w_customer_fields-container.
    append w_customer_fields to ct_bapi_customer_fields.
    endmethod.
    i have created field zsrmcatalogid field in R3 in EKPO table.and i am now implementing the Badi in R3 for BBP_PO_INBOUND_BADI .....in extended classic scenario.
    i have written following code in R3 BADI
    method IF_EX_BBP_PO_INBOUND_BADI~BBP_MAP_BEFORE_BAPI.
    data : wa_customer_fields type bbps_if_customer_fields,
    wa_bapi_te_mepoitem type bapi_te_mepoitem,
    wa_bapi_te_mepoitemx type bapi_te_mepoitemx,
    wa_extensionin type bapiparex.
    data : txt_960(960) type c.
    read table bbp_customer_fields into wa_customer_fields with key
    refobject = 'POITEM' fieldname = 'CATALOGID'.
    if sy-subrc eq 0.
    move wa_customer_fields-container TO
    wa_bapi_te_mepoitem-zsrmcatalogid.
    wa_bapi_te_mepoitemx-zsrmcatalogid = 'X'.
    endif.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitem to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitemx to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    endmethod.
    But its not working...
    The PO details are not passed from SRM to R3.......
    PLEASE CAN U GIVE ME EXACT CODE FOR CHANGES TO BE MADE IN THIS BADI ..AS IT IS NOT WORKING...
    Can anybody help me regarding how to debug the BADI in R3.
    Thanks in Advance...

    Hi Ravi,
    You can transfer the standard SRM catalog ID field to R/3 tracking number field (if not already used for another purpose) in the R/3 PO.
    This will avoid to implement the R/3 inbound bapi.
    Here is an extract of the code.
    The ECS PO badi example was here used to transfer the unlimited delivery flag to R/3 PO for a Z combination of criteria as well as the transfer of <b>catalog ID</b> to <b>tracking number field</b> in R/3 PO :
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    update unlimited delivery flag in R3 PO for combination of vendor +
    Product Category maintained in the bespoke table ZUD_PC_VNDR ..
      LOOP AT ct_bapi_poitem INTO ls_bapi_poitem.
        lv_tabix = sy-tabix.
        IF ls_bapi_poitem-po_item IS NOT INITIAL.
          READ TABLE it_item INTO ls_item
               WITH KEY number_int = ls_bapi_poitem-po_item
                          del_ind    = ' '.
          IF sy-subrc = 0.
    Set Unlimited delivery Flag
            read table li_zud_pc_vndr into ls_zud_pc_vndr
                            with key partner       = ls_partner-PARTNER_ID
                                       category_id = ls_item-category_id.
            if sy-subrc eq 0.
              ls_bapi_poitem-UNLIMITED_DLV = 'X'.
            endif.
    Set the Dummy catalog.. entry..
            if ls_item-catalogid eq c_dummy.
              ls_bapi_poitem-TRACKINGNO = c_noncat.
            endif.
            ls_bapi_poitem-GR_BASEDIV = ' '.
            modify ct_bapi_poitem from ls_bapi_poitem index lv_tabix
                          transporting UNLIMITED_DLV TRACKINGNO GR_BASEDIV.
          ENDIF. "READ TABLE it_item ..
        ENDIF.   "IF ls_bapi_poitem-po_item ..
      ENDLOOP.   "LOOP AT ct_bapi_poitem ..
    endmethod.
    Kind regards,
    Yann
    PS : please do reward helpful answers ))

  • I have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me

         i have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me apple.corp and please tell me if this is not possible to be done it almost a month that i cant use my iphone.
         thank you for those who read this
    <Email Edited by Host>

    Remove your email address.  This is a public website, and you are addressing thousands of strangers.
    After doing that, tell us what your issue actually is.  This is a user-to-user technical forum.  You are not addressing Apple here.

  • Firefox is having problems with "Southwest Airlines website" Please help soon

    Whenever I go on Southwest Airline website, it does not work. I am having this problem since last month. Please help on this as soon as you can.

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Other things that need your attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    * Shockwave Flash 10.0 r22
    * Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://kb.mozillazine.org/Flash
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://kb.mozillazine.org/Java
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • HT4623 why my device  had "no service" even I already put my sim card..I have follow a few instruction from you tube how to solve this problem but all failed. Please help me .TQ

    why my device  had "no service" ..I have follow a few instruction from you tube how to solve this problem but all failed. Please help me .TQ

    See if anything in this support document help http://support.apple.com/kb/ts4429

  • TS3376 I was able to use the findmyiphone app last week, but now I have been getting an error message "Can't load findmyiphone.  There was a problem loading the application."  please help as we are trying to locate an ipod with pics of a no deceased loved

    I was able to use the findmyiphone app last week, but now I have been getting an error message "Can't load findmyiphone.  There was a problem loading the application."  please help as we are trying to locate an ipod with pics of a no deceased loved one.

    Had the same problem and the same message --  was suddenly unable to access icloud apps on my pc, also using Windows 7 and Internet Explorer. After several days of pulling my hair out, decided to try a different browser and was able to get in by using Firefox instead of Internet Explorer.  Hope this helps. 

  • My ipod wont connect to itunes, i have re-installed itunes ...reset my ipod...re-boot my computer...basically i've done eveything i could but no joy it even shows on my computer but simply does not link in to my itunes. Please HELP !!!

    my ipod wont connect to itunes, i have re-installed itunes ...reset my ipod...re-boot my computer...basically i've done eveything i could but no joy it even shows on my computer but simply does not link in to my itunes. Please HELP !!!

    If you're unable to do the Restore, go into Recovery Mode per the instructions here.

  • OracleXE- PostgreSQL database link problem

    I have set up a database link between Oracle XE and PostgreSQL using unixODBC, but I seem to be having trouble with certain data types.
    Here's what I mean...
    First I execute the following DDL in postgres:
    create table "TEST1" (
    "TEST1ID" integer,
    "TESTDATE" timestamp,
    "TESTVC" varchar(20)
    create table "TEST2" (
    "A" varchar(125),
    "B" varchar(126),
    "C" varchar(127),
    "D" varchar(128),
    "E" varchar(129),
    "F" varchar(130),
    "G" varchar(200)
    The tables look fine when I check them using unixODBC's isql tool.
    But here's what SQLPlus tells me...
    SQL> desc test1@prism
    Name Null? Type
    TEST1ID NUMBER(10)
    TESTDATE DATE
    TESTVC VARCHAR2(20)
    SQL> desc test2@prism
    Name Null? Type
    A VARCHAR2(125)
    B VARCHAR2(126)
    C VARCHAR2(127)
    D VARCHAR2(128 CHAR)
    E VARCHAR2(256 CHAR)
    F VARCHAR2(512 CHAR)
    G VARCHAR2(18432 CHAR)
    The "TEST1" table looks fine, but, as you can see from the "TEST2" table, varchar columns longer than 128 characters are really screwy.
    Any ideas about how to fix this?
    If it helps, here's the trace from the above SQLPlus session:
    HOAUTIL.C (1259): ; ------ hoadtab (hoat) -------:
    HOAUTIL.C (1262): ; hoatnam: TEST1, hoatnml: 5, hoatnrw: -1, hoatarl: 30
    HOAUTIL.C (1273): ; ------ hoadtab (hoai) -------:
    HOAUTIL.C (1274): ; n_index_stat: 0
    HOAUTIL.C (1224): ; -------- hoadtab for table TEST1---------:
    HOAUTIL.C (1225): ; hoadamsz: 3, hoadasiz: 3, hoadambr: 1, hoadabrc: 0
    HOAUTIL.C (1228): ; row 0 - hoadambl: 4, hoadadty: 8, hoadaprc: 10, hoadacst: 0
    HOAUTIL.C (1232): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 7, hoadanam:
    TEST1ID, hoadabfl: 4, hoadamod: 0
    HOAUTIL.C (1228): ; row 1 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst:
    0
    HOAUTIL.C (1232): ; row 1 - hoadascl: 0, hoadanul: 1, hoadanml: 8, hoadanam:
    TESTDATE, hoadabfl: 7, hoadamod: 0
    HOAUTIL.C (1228): ; row 2 - hoadambl: 20, hoadadty: 108, hoadaprc: 20,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 2 - hoadascl: 0, hoadanul: 1, hoadanml: 6, hoadanam:
    TESTVC, hoadabfl: 20, hoadamod: 0
    hoadtab (26): ; hoadtab Exited with retcode = 0.
    hoadafr (23): ; hoadafr Entered. id = 0.
    hoadafr (23): ; hoadafr Exited with retcode = 0.
    hoadtab (26): ; hoadtab Entered. count = 1
    hoadtab (26): ; schema_name = , table_name = TEST2
    odbc_rec: select * from "TEST2"
    r: 165od 0 SQLAllocStmt:- hdbc=8266C78,pst=FF93C95C
    r: 188od 0 SQLPrepare:- hst=829D848, css=-7091304
    sss = select * from "TEST2"
    r:1067od 0 SQLNumResultCols:- hst=829D848,pcol=7
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=1,scn=A,cnm=64,pcn=1,pst=12,
    pcd=125,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=1,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=2,scn=B,cnm=64,pcn=1,pst=12,
    pcd=126,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=2,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=3,scn=C,cnm=64,pcn=1,pst=12,
    pcd=127,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=3,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=4,scn=D,cnm=64,pcn=1,pst=12,
    pcd=128,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=4,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=5,scn=E,cnm=64,pcn=1,pst=12,
    pcd=129,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=5,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=6,scn=F,cnm=64,pcn=1,pst=12,
    pcd=130,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=6,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r:1090od 0 SQLDescribeCol:- hst=829D848,icol=7,scn=G,cnm=64,pcn=1,pst=12,
    pcd=200,psc=0,pnul=1
    r:1118od 0 SQLColAttributes:- hst=829D848,icol=7,fdt=10,rgbd=0,cbdm=0,pcb
    d=FF93C822,pfd=FF93C824
    r: 225od 0 SQLFreeStmt:- hst=829D848, fop=1
    r:1473od 0 SQLAllocStmt:- hdbc=8266C78,pst=FF93C5A4
    r:1486od 0 SQLStatistics:- hst=829D848,scn=0,ccn=0,ssn=0,csn=0,stn=FF93C6
    38,ctn=-3,funq=1,fcc=0
    scn=, ssn=, stn=TEST2
    r:1493od 0 SQLBindCol:- hst=829D848,icl=2,fct=1,rgv=FF93CB88,cbvm=129,pcv
    =-7092832
    r:1494od 0 SQLBindCol:- hst=829D848,icl=4,fct=5,rgv=FF93C59A,cbvm=0,pcv=-
    7092836
    r:1495od 0 SQLBindCol:- hst=829D848,icl=6,fct=1,rgv=FF93CAF8,cbvm=129,pcv
    =-7092844
    r:1496od 0 SQLBindCol:- hst=829D848,icl=7,fct=5,rgv=FF93C58E,cbvm=0,pcv=-
    7092848
    r:1497od 0 SQLBindCol:- hst=829D848,icl=9,fct=1,rgv=FF93CA68,cbvm=129,pcv
    =-7092856
    r:1498od 0 SQLBindCol:- hst=829D848,icl=10,fct=1,rgv=FF93C582,cbvm=2,pcv=
    -7092860
    r:1499od 0 SQLBindCol:- hst=829D848,icl=11,fct=4,rgv=FF93C578,cbvm=0,pcv=
    -7092868
    r:1500od 0 SQLBindCol:- hst=829D848,icl=12,fct=4,rgv=FF93C570,cbvm=0,pcv=
    -7092876
    r:1507od 100 SQLFetch:- hst=829D848
    r:1589od 0 SQLFreeStmt:- hst=829D848, fop=1
    nvOUT (qp_sqtxt.c 55): select NON_UNIQUE, INDEX_NAME, TYPE, SEQ_IN_INDEX,
    COLLATION, CARDINALITY, COLUMN_NAME from NAV_PROC:SP_STATISTICS('prism', '%',
    'TEST2', 1, 0, 0) order by 3, 1, 2, 4
    <<<<<<<<<<<<<<<<<<< Execution Strategy Begin <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Original SQL:
    select NON_UNIQUE , INDEX_NAME , TYPE , SEQ_IN_INDEX , COLLATION , CARDINALITY , COLUMN_NAME from NAV_PROC : SP_STATISTICS ( 'prism' , '%' , 'TEST2' , 1 , 0 , 0 ) order by 3 , 1 , 2 , 4
    Accessing saved query spec SP_STATISTICS()
    from NAV_PROC DB
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>HOAUTIL.C (1259): ; ------ hoadtab (hoat) -------:
    HOAUTIL.C (1262): ; hoatnam: TEST2, hoatnml: 5, hoatnrw: -1, hoatarl: 484
    HOAUTIL.C (1273): ; ------ hoadtab (hoai) -------:
    HOAUTIL.C (1274): ; n_index_stat: 0
    HOAUTIL.C (1224): ; -------- hoadtab for table TEST2---------:
    HOAUTIL.C (1225): ; hoadamsz: 7, hoadasiz: 7, hoadambr: 1, hoadabrc: 0
    HOAUTIL.C (1228): ; row 0 - hoadambl: 125, hoadadty: 108, hoadaprc: 125,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    A, hoadabfl: 125, hoadamod: 0
    HOAUTIL.C (1228): ; row 1 - hoadambl: 126, hoadadty: 108, hoadaprc: 126,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 1 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    B, hoadabfl: 126, hoadamod: 0
    HOAUTIL.C (1228): ; row 2 - hoadambl: 127, hoadadty: 108, hoadaprc: 127,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 2 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    C, hoadabfl: 127, hoadamod: 0
    HOAUTIL.C (1228): ; row 3 - hoadambl: 128, hoadadty: 108, hoadaprc: 128,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 3 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    D, hoadabfl: 128, hoadamod: 0
    HOAUTIL.C (1228): ; row 4 - hoadambl: 129, hoadadty: 108, hoadaprc: 129,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 4 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    E, hoadabfl: 129, hoadamod: 0
    HOAUTIL.C (1228): ; row 5 - hoadambl: 130, hoadadty: 108, hoadaprc: 130,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 5 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    F, hoadabfl: 130, hoadamod: 0
    HOAUTIL.C (1228): ; row 6 - hoadambl: 200, hoadadty: 108, hoadaprc: 200,
    hoadacst: 0
    HOAUTIL.C (1232): ; row 6 - hoadascl: 0, hoadanul: 1, hoadanml: 1, hoadanam:
    G, hoadabfl: 200, hoadamod: 0
    hoadtab (26): ; hoadtab Exited with retcode = 0.
    hoadafr (23): ; hoadafr Entered. id = 0.
    hoadafr (23): ; hoadafr Exited with retcode = 0.
    hoacomm (11): ; hoacomm Entered. keepinfo = FALSE, tflag = 1.
    e:1328od 0 SQLTransact:- henv=0,hdbc=8266C78, ftp=0
    e:1334od 0 SQLSetConnectOption:- hdbc=8266C78, fop=102 , vprm=1
    hoacomm (11): ; hoacomm Exited with retcode = 0.
    hoalgof (8): ; hoalgof Entered. tflag = 1.
    nvRETURN (drviunwn.c 779): -1210
    i:1231od 0 SQLDisconnect:- hdbc=8266C78
    i:1238od 0 SQLFreeConnect:- hdbc=8266C78
    (Last message occurred 2 times)
    hoalgof (8): ; hoalgof Exited with retcode = 0.
    hoaexit (6): ; hoaexit Entered.
    hoaexit (6): ; hoaexit Exited with retcode = 0.

    user7566651 wrote:
    I have set up a database link between Oracle XE and PostgreSQL using unixODBC, but I seem to be having trouble with certain data types.Interesting... Oracle uses standard ODBC API calls to describe the table contents and data types. You will see these as calls "+SQLDescribeCol+" and "+SQLColAttributes+" in your log listing.
    This returns the data type of the column. I assume Oracle then maps this to its own data types - for example a string datatype will be mapped to varchar2.
    One problem is that Oracle only support string sizes of up to 4000 bytes (including multi-byte charsets). Anything larger than that needs to be a CLOB. Thus the mapping is not a simple 1:1 map - it's a tad more complex than that.
    But your foreign table does not touch on these complexities. It uses string data types that should be straight forward to map.
    As this (complex mapping) is not the case, one of two possible issues comes to mind.
    Oracle has a bug in the way it maps the remote column's data type to an equivalent Oracle SQL data type.
    Or, the ODBC driver is returning funky and incorrect data types that Oracle then also maps incorrectly as a result.
    I'm more inclined to think the latter - as the ODBC API is a standard and Oracle's Heterogeneous Agent interface that uses it, has been thoroughly tested. So while there can be bugs in the agent's use of the ODBC call interface, I rather think it could be the driver.
    The driver needs to provide an interface (govern by ODBC call interface standards) to the client - and map these to the call interface supported by that database (e.g. OCI for Oracle, dblib for SQL-Server, etc). This can be complex - and as I doubt that Postgres's ODBC driver is that widely used and undergo the same amount of intensive testing.
    You can confirm/reject this as the error by replacing the ODBC driver (if there are other versions/sources available) and testing Oracle with that.
    Or you can use another ODBC client (e.g. isql command line executable) and check what it sees when dealing with this specific ODBC driver against that Postgres database and tables.
    An alternative option is to actually debug the ODBC calls made - as the log file includes the parameters passed and responses (with full verbose logging enabled). This will tell you exactly how the Oracle HS agent is using the ODBC call interface, parameters passed and what it sees in return.

  • Problem in SQL Query Execution

    Hi,
    I have tried to Insert Data in Table (Using MySQL) , and as far as i know there is no error in my program and it's executing well with out showing any error and throwing exception. Database connected successfully. I have given the full code here. Help me to execute this program as soon as possible .Thanks in advance.
    Code:_
    public class MysqlConnect{
    public static void main(String[] args) {
    System.out.println("MySQL Connect Example.");
    Connection conn = null;
    String url = "jdbc:mysql://localhost:3306/";
    String dbName = "demo";
    String driver = "com.mysql.jdbc.Driver";
    String userName = "root";
    String password = "root";
    try {
    Class.forName(driver);
    conn= DriverManager.getConnection(url+dbName,userName,password);
    try{
    Statement st = conn.createStatement();
    System.out.println("Connection Established");
    int value = st.executeUpdate("INSERT INTO demo.login VALUES("+17+","+"'G'"+","+"'GG'"+","+70+")");
    System.out.println("1 Row Inserted"+ value);
    conn.close();
    System.out.println("Disconnected from database");
    catch(SQLException Se)
    System.out.println("Exception::SQL Statement Not Executed");
    } catch (Exception e) {
    e.printStackTrace();
    Regards,
    Prabu
    Edited by: [email protected] on Apr 17, 2008 11:10 AM
    Edited by: [email protected] on Apr 17, 2008 11:13 AM

    I think there is some problem in sql statement u have written code as shown bollow
    st.executeUpdate("INSERT INTO demo.login VALUES("17",""'G'"",""'GG'"","70")");
    i think the proper statement is as shown bellow
    st.executeUpdate("INSERT INTO demo.login VALUES('17','G','GG','70')");
    (if all u have 4 columns in u r table of type varchar)
    and if this is not solution for ur problem let me know the table structure , i mean columns and datatype of columns.

  • Database link problem in a page process

    I'm trying to access a function over the database link in a page onload process. The called function located in another schema returns a varchar2 value, based on this value, I'll be doing appropriate navigation. But it's giving the following dblink error. However the select statement below works fine in sqlplus. any ideas are appreciated.
    ORA-04054: database link testschema does not exist
    DECLARE
    v_check varchar2(10) := NULL;
    BEGIN
    execute immediate 'select is_valid@testschema(&APP_USER., 10) into v_check from dual';
    END;
    thanks,
    Surya

    First you don't want to use &. anything in sql - use a bind variable and the using clause.
    Second, what if you try creating a view with the dblink in there and call the view? Does that change the error?

  • Database link problem

    I am trying to connect two databases on the same NT server in Oracle8i.
    I need to query both databases (UNION) from a stored procedure called
    from a VB program. This is the link I created, but can't get to work. Any suggestions?
    -- create database link in "Document" database to connect to second database ("Infowhse") ON SAME SERVER
    create public database link infowhse.anacortes
    using infowhse_shaw
    -- Tnsnames.ora (on server)
    INFOWHSE_SHAW =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = shaw)(PORT = 1521))
    (CONNECT_DATA = (SID = INFOWHSE)(SERVER = DEDICATED))
    -- Creates successfully. When tested from within DB Studio, I get the following error message:
    The database link is not active
    -- If I key the following sql:
    select sysdate from dual@infowhse_shaw
    -- I get the following error message:
    ORA-12154: TNS:could not resolve service name
    Thank you for your help.

    In your case the command should be like the following, if the GLOBAL_NAMES parameter is not set. You have to give the link name as same as the name in the TNSNAMES.ORA file. You can give any name in other case like you have set your GLOBAL_NAMES parameter.
    create public database link infowhse.shaw connect to <username> identified by <pwd> using infowhse.shaw
    Try it..Good Luck
    null

Maybe you are looking for

  • How can i delete photos in a folder from my Iphone 4s?

    On accident, I synced pictures from my computer onto my phone. I have many pictures on my computer and now it is taking up a lot of space on my phone. The problem is i dont know how to get the pictures off my phone now. The pictures are in knew files

  • Goods receipt Purchase Order error (MIGO_GR)

    Hi I'm trying to save this transaction but it is giving me an error message. The message comes up as - *" User ******** already processing Purchasing document **************" This message has been there for 5 hours now We have tried few things but th

  • J2EE app server not able to compile JSP

    Hi, I have just installed J2EE app server and am trying to deploy a JSP. The following error is generated. can anyone help me please. Thank you, Deepika. org.apache.jasper.JasperException: Unable to compile class for JSP No Java compiler was found to

  • Applying payment to down payment requst

    Hi all, I have an issue. Could you Provide some solution... My client wants to apply payment to down payment requests... How could be done this... Thanks in advance... Regards, Richy Anand.

  • Capturing xml data returned from a url post in a jsp page

    Hi, We are writing a interface which will capture data returned from an other website. The data returned will be in XML form. http://www.ecrm.staging.twii.net/ecrmfeed/ecrmfeedservices.sps?eCRMFeedInputXml=<twii><ecrmfeedinput><data%20method="Login">