Use of private synonyms for types breaks code

Hi
When using the following code snippet:
=====================================
OracleCallableStatement ocs = null;
try {
ocs = (OracleCallableStatement) conn.prepareCall("{ ? = call somemethod(?,?) }");
ocs.setString(2, filter);
ocs.registerOutParameter(1, Types.NUMERIC);
ocs.registerOutParameter(3, OracleTypes.ARRAY, "SOME_TYPE");
ocs.execute();
ARRAY usersArray = ocs.getARRAY(3);
Object[] structs = (Object[]) usersArray.getArray();
We get an error when the registering of the type in the line
ocs.registerOutParameter(3, OracleTypes.ARRAY, "SOME_TYPE");
is done using a reference to a synonym rather than the direct name.
The error occurs on the line
Object[] structs = (Object[]) usersArray.getArray();
We are using the 10.2.0.1.0 drivers against an 9.2.0.5 database.
Any ideas are appreciated
Leon

Leon,
I'm only guessing, but did you try setting the "includeSynonyms" [connection] property to 'true'?
See the JDBC Developer's Guide and Reference for more details.
Good Luck,
Avi.

Similar Messages

  • Complex use of private synonyms

    I need to write a create user script that sets up our database. for production this is easy, but for development and test it gest complicated.
    We have 1 user that contains all of our data tables.
    another user that has all our code and our logging data.
    In development I need to create sets so developers can have their own environment.
    So how do I make code_user_a only see code_user_b's data without changing code? I think can do this with private synonyms, but I am not sure how to do it.

    First off. Synonyms have not changed over the last few version, but we are in 10.2
    Second off the point of the question is that I do not want to put them each in their own schema, I want it to mirror production. This is where the complexity comes from. I also don't want to change code.
    In production we will have two schemas
    Schema 1: All the tables that contain application data that users will see
    Schema 2: All the code and the logging tables
    This is a fairly standard deploy and not that uncommon. However, it gets complicated in development because I can have multiple "sets" of
    Schema 1
    Schema 2
    For example, a Developer named Jim and a Developer named Bob need to have their own set of schemas to do testing. So I need
    Schema1_Jim
    Schema2_Jim
    Schema1_Bob
    Schema2_Bob
    I only want Bob's Schema2(which has code that uses data in schema 1) to see schema1_Bob and not Schema1_Jim.
    It is not uncommon to deploy with multiple schemas for security reasons. I have seen it required by SOX auditors because the group that deploys the code is different than the group that deploys the data and the auditors say they are not allowed to share passwords.
    This is my requirement and I have to deal with it. The question is what is the best way to handle it in development. Productoin is easy becuase there is only one set of privileges.
    DBMS_WM is a good suggestion for a simple system. However, we have code that adds and drops partitions that need to act on the other schema so it won't work/.

  • Spotlight cannot search for type & creator codes?

    I want to find some old ClarisWorks documents that I know are on my computer somewhere. Simple, I thought: Just search for documents dated before 2000 with creator code BOBO. But looking through the list of search parameters in Spotlight, I don't find either type or creator code. I know Mac OS X no longer uses these metadata, but they can still be useful, as in cases like this. Am I missing something? Is there a way for Spotlight to search on type & creator codes?

    Thanks for the response. I solved my problem by just looking through folders of old files and checking dates of those with AppleWorks icons. Very 21st century. I knew there must be some reason I thought I could do such a search, so I fired up my old 'Pismo' PowerBook and indeed, the Finder search utility in 10.3.9 allows searching for Type and Creator codes. It also will search only on those codes, or on a date or other parameter; while with Spotlight I could find no way to search for, say, all files dated before 1/1/1999 -- it requires something entered in the top field, i.e. a word to search for either in the file's contents or its name. So I put in "the" and got a lot of results, but of course minus any file that doesn't contain "the". Not so smart.
    I've never much liked Spotlight, which is way overkill for 95+% of the searching I do; I almost never used it in 10.4 (used Easy Find); in 10.5 at least it's fast enough to not be a major annoyance, though the fact that I can't make "File Name" the default requires me to keep a Spotlight window open in the Finder all the time (or have to manually click on "File Name" every time I want to do a search). Sure it's nice to be able to search the contents of files -- when I need to, but that's almost never. Meanwhile, Spotlight remains far inferior in simple, day-to-day usability to 10.3's Find utility.
    So how do you find out how to do such a "Raw Query" search? "kMDItemKind" is not an immediately intuitive term, at least for ordinary mortals such as myself.

  • Is it possible to use same sap script for different comp code with difflogo

    I have 3 company codes. I need to use same sap script to all  but each company code has different logo. I dnt want to go for 3 different sap script. Is it possible to change in coding
    like this
    If comp code = '100'
    print ' logo1'
    If comp code = '200'
    print ' logo2'
    If comp code = '300'
    print ' logo3'
    in same sapscript.If yes how ?

    Hi,
    Yes you can do it.
    In Sap Script use:-
    /: If Comp code='100'
       INCLUDE ZHEX-LOGO100 OBJECT TEXT ID ST LANGUAGE EN
    /:Elseif comp code = '200'
    INCLUDE ZHEX-LOGO200 OBJECT TEXT ID ST LANGUAGE EN
    /:Else
    INCLUDE ZHEX-LOGO300 OBJECT TEXT ID ST
    LANGUAGE EN
    /:Endif
    I hope this helps,
    Regards
    Raju Chitale

  • Private synonym unknown obj type

    Hi,
    I'm making a script, that makes private synonyms for the new database schema "ABC", for our existing schemas.
    part of the script is:
    SELECT * FROM (
         SELECT owner, object_name FROM all_objects WHERE owner IN ('ETL') AND object_type IN ('TABLE', 'VIEW') AND object_name NOT LIKE '%$%' MINUS(
    SELECT table_owner, table_name FROM all_synonyms WHERE UPPER(owner) IN ('PUBLIC', 'ABC')
    AND UPPER(table_owner) IN ('ETL'))
    r_synonym     sys.all_objects%ROWTYPE;
         FOR r_synonym IN table_synonyms
         LOOP
         EXECUTE IMMEDIATE 'CREATE OR REPLACE SYNONYM ABC.'||r_synonym.object_name ||' FOR '||r_synonym.owner||'.'||r_synonym.object_name;
         END LOOP;
    Now, the synonym gets created, but the info shows me "<unknown obj type>" and as you can expect, the synonym doesn't work (even though it's created).
    Any ideas?
    Thx

    Does ABC have any privileges on the objects?
    E.g. a sysnonym on a table will not work if you don't have a privilege like SELECT or UPDATE.
    Regards
    Marcus

  • I am searching for the Pin Code of the Vodafone UMTS card

    Hi there,
    i bought the Lenovo T400s and was surprised to find a Vodafone SIM Card inside!
    Now i want to use it an seaching for the PIN Code, dose sombody knows where i can find???
    I only find a Card with a P No. and an ICCID Code, there is no Manuel or any other information.
    Thanks for help!
    Solved!
    Go to Solution.

    larsspo, welcome to the forum,
    the PIN code for pre-inserted SIM cards in Germany is 0000.
    Hope this helps
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • Implementation:Enhancement using screen exit:QQMA0001 for Tcode:QM01

    Dear Abaper,
      I am implementing the Enhancement for Quality notification using screen exit:QQMA0001 for the transaction code :QM01,QM02,QM03.
    when i was creating the subscreen in function group:XQQM and after saving that subscreen(for example 100) , it is automatically stored in local object, that mean local package or development class. it is not transporable.
    my requirement is , i want to transport that Project. how to do that.
    if you have a any idea, please help me.
    advance thanks.
    with best regards,
    Velmurugan.S

    Dear ravi,
    yes of course , I have created already customer enhancement in CMOD.but my requirement is ,
    when i save that subscreen after creation of subscreen, it is not ask Package or development class.but it is taking local object(local package) automatically . what is reason, i donot know .
    if you have a any idea, please help me.
    thank you.
    with best regards,
    velmurugan.S

  • Search for the t-code where the specefic output type is used

    Hi
    I want to know how can we search for the t-code used  for a  specefic output type in use?
    I have a requirement where in i have a output type, i knwo teh prog name and the form name...
    i know it is used in SD and billing but i am not able ot exactly pin point as to in which t-code to be used..so that i can check the output throught the T-code.
    Experts sugget!!
    Thanks
    Prashant

    Hi
    It is used for a Standard t-code i want to find that T-code. Through NACE the outputtype (which i already have) i can find teh prog name and the form name.
    and through SPRO also its the same info...
    i want to knwo for SD-> Billing->INvoice i can find the output type...i want to knwo what T-code needs to be run and on givign the data and running the out put type from the menu and choosing my OUTput type...and seeing the output in the print format.
    Hope you got my problem.Thanks for the reply.
    Prashant

  • How do you effectively use if,for, type loops in TestStand. Do you have to use the goto command or is there a way of writing actual c type code (perhaps using the statement step in teststand) with the variables allready declared.

    Thank you
    Arik

    I assume your loop is more than just one step. You should use the 'Loop Options' for a single step.
    For looping on a group of steps, you can place them all in a sub sequence and then set the 'Loop Options' for the 'SequenceCall' step to set up your looping conditions. Pass values to and from the sub-sequence by Parameters.
    You can keep the loop inline with the rest of your sequence by using 'Goto' or using 'Goto destination' in the Post Actions tab of the condition step.
    Using a sub sequence will keep it easier to read and maintain.

  • Expdp / impdp - Private synonyms using DB link not imported

    Hi
    I'd appreciate any help with this.
    We are taking an export (expdp) of a database on Oracle EE 10.2.0.3 in Prod and then importing it into an identical DB on 10.2.0.5 in Dev.
    I doubt the minor version difference is an issues, but I mention it for completeness.
    Our expdp in prod used to look like this:
    expdp agdba/x directory=DATA_PUMP_DIR dumpfile=X.DMP logfile=X.LOG schemas=A,B,C,D
    We have changed it to:
    expdp agdba/x directory=DATA_PUMP_DIR dumpfile=X.DMP logfile=X.LOG full=y EXCLUDE=SCHEMA:"IN ('E', 'F')"
    ( so basically do a full export, but exclude schemas E & F )
    The impdp in dev has not changed (we import one schema at a time):
    impdp agdba/x DUMPFILE=X.DMP LOGFILE=imp_X.LOG SCHEMAS=A DIRECTORY=DATA_PUMP_DIR TABLE_EXISTS_ACTION=SKIP
    DB user AGDBA has been granted the DBA role...
    The Issue:_
    Private synonyms that use a DB link are NOT imported, but private synonyms that do NOT use a DB link ARE imported.
    I can fix the issue by simply recreating the private synonyms using the DB link - e.g.:
    CREATE SYNONYM EVENTLOGTBL FOR EVENTLOGTBL@FCISTOSMS;
    Things were working fine until we change the expdp to use FULL. I see a few posts about synonyms and FULL=Y issues, but nothing quite like our problem.
    Any ideas?
    Thanks,
    Andreas

    Andreas Hess wrote:
    So the problem is expdp FULL=Y for some reason does not export synonyms that refer to objects via DB links. I doubt that ... More than few times a week I refresh non-prod databases from a prod db, (it is schema level export not FULL=Y), and two of the schema own db links, and others have synonyms pointing to them. I have never encountered synonym problem (except that if db_links are invalid then impdp takes extremely long time to timeout while compiling pl/sql code.). We normally change db_links after the impdp is done, or (while it is importing table via another session).
    I just re-ran sqlfile option with include=db_link,synonym option and i can see statements that create synonyms and create db links.
    However i think the order in which impdp runs might be the source of your problem ... see this
    Starting "ME"."SYS_SQL_FILE_SCHEMA_01":  ME/******** dumpfile=xxxx.%u.dmp directory=xxxx_exp schemas=schema1,schema2,schema3 sqlfile=schema.sql include=db_link,synonym
    Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM       <<<< Synonyms are created first
    Processing object type SCHEMA_EXPORT/DB_LINK               <<<< db_links come later
    Job "ME"."SYS_SQL_FILE_SCHEMA_01" successfully completed at 08:32:02So, it is conceivable that if you drop synonyms/db_links from your schemas before impdp, some synonyms will fail to create properly. This could be a version specific issue, mine is 11.2 and I don't see failures for synonym creation, i.e. no error messages while impdp. Next time you could try to drop objects except db_links and see if you still have the same issue.
    Raj

  • Exchange Rate Type default different from M for a company code

    Dear SAP guru,
    Would you shed some light on this?
    How would we be able to default/assign a different exchange rate type from M at a company code level?
    I have a company code - finance company - that every foreign currenty transaction needs to be translated using different exchange rate type (i.e. daily hedge rate) than other operating companies.
    The OB22 screen makes it appear as M rate is specificied as 1st currency in company code, but grayed out and not able to change.
    Please help me with your expertise on this.
    Kind regards
    taro

    Hi,
    ExRateType is hardcoded in
    Main Program     SAPL0F03
    Source code of   L0F03I01
    *------- Daten zur ersten Hauswährung -
      rfcu4-curtp = '10'.
      rfcu4-bwer1 = '0'.                                        "AT 23039
      rfcu4-kurst = 'M'.               <<<<<
      rfcu4-cursr = '1'.
      rfcu4-curdt = '3'.
    The reason why the assignment of exchange rate type M to the first company code currency is a historical reason. A lot of coding within the SAP system is directly developed under the prerequisite that the exchange rate type for the first company code currency is M.
    As you described you want to setup several company codes in one client that all have the same first company code currency but should use different exchange rates. To solve that issue there are 2 ways available:
    The first way is that you use the functionality to assign an exchange rate type to a document type. That would mean a lot of work because in that case you would have to define all document types seperatly for
    every company code.
    The second possible solution is that you use different names for the fist company code currency.
    That means for example that you name the first company code currency in company code 0001 USD and in company code 0002 US1. So you can use different exchange rates for the same currency.because in that examle USD and US1 are only different names for the same currency. Using this approach you can have different exchange rates for different companies with the same company code currency by setting only different names even though the exchange rate type M is fix asigend to the first company code currency.
    Best Regards,
    Gladys xing

  • Tax code optional in document type for one company code

    Hello experts,
    Is it possible to make tax code optional in a document type only for one company code.  If yes kindly explain me the process in detail. 
    Regards,
    P.Krishna Chaitanya.

    Hi
    If I understand your requirement correctly  that for a particular document type, the line item should not contain a tax code, while for other Document Types, it should have a tax code. Note, the logic for making tax code optional/mandatory is made through the field tax category in the GL Master and not through the field status. further Build in a validation rule, using a logic as follow:
    BKPF-BLART IN "SET NAME"
    Check BSEG-MSKWZ<> ' '
    Set an Error message
    You can also create a subsitituion rule for populating tax code with a blank value if a particular doc type is used.
    BKPF-BLART in 'SET NAME"
    Substitute BSEG-MSKWZ= ' '
    You may need to allow tax code as a field to be substituted in the maintainence view of table GB01 using T Code SM30 for boolean class 9
    Regards
    Sanil

  • Multiple dispute case types for one company code

    Hi Experts
    I am trying to design a solution for external system interfacing with SAP FSCM. Requirement is to create dispute cases for short pays automatically using program FDM_AUTO_CREATE (which is normal standard SAP process). We are also creating complaints in third party system based out of our data from SAP. When these are getting created in third party, we need to interface back into SAP and create Dispute (against compalint created in third party). I am thinking of using program FDM_AUTO_CREATE to create disputes based on company code/document number/fiscal year/line item etc.
    To differentiate between disputes and complaints i am proposing to create new case type (other than dispute case type) and have its own number range assigned to it, so that it can be easily recognised in SAP. But as per standard SAP setting one company code can have only one default case type assigned to it and whenever i create cases using FDM_AUTO_CREATE, system always picks up only one case type.
    Is there any standard setting so that system can create complaint cases in SAP with different case type (other than default dispute case type) while using auto create program?
    Thanks in advance
    Aleem

    This is an common question when implementing SAP TCM for trade promotions where claims/ disputes go to CRM for approval.
    We have overcome this by leaving the standard dispute case type in the default settings. We then activate a BAdI - FDM_AR_DEF_CASE_TYPE. We create a Z table that we linked to in the BAdI - that had company code and reason code - and put the additional case type in the table linked to a reason code. By adding a reason code (FI-AR) to the specific items, when you create the dispute it will call the BAdI and table and use the extra dispute case type as opposed to the standard one.

  • Create Synonym for Object Type not supported; Why?

    Does anybody know the reason why Oracle does not support the creation of synonyms for object types?
    In our application we use many schemas to separate subsystems. The schema name has a version identifier included to allow multiple product versions loaded in the database at the same time.
    We reference objects between schemas by using synonyms, to avoid hardcoding the schema names.
    Therefore I must refrain from using object types, currently.
    Does anybody have such a multi-schema architecture, also?
    What is your experience?
    Thanks,
    Robert

    Robert,
    Type synonym is now supported in Oracle9i Release 2. The practice of using multi-schema architecture is an excellent practice for large applications. This provides a level of abstraction to simplify application maintenance, whihc you must have experienced. In conjuction with Object types, you can further simplify your application through reuse of user-defined types.
    Do you have an email address that I can contact you for further discussion off-line.
    Regards,
    Geoff
    Does anybody know the reason why Oracle does not support the creation of synonyms for object types?
    In our application we use many schemas to separate subsystems. The schema name has a version identifier included to allow multiple product versions loaded in the database at the same time.
    We reference objects between schemas by using synonyms, to avoid hardcoding the schema names.
    Therefore I must refrain from using object types, currently.
    Does anybody have such a multi-schema architecture, also?
    What is your experience?
    Thanks,
    Robert

  • Ever seen this error message? You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only.

    Trying to load this site
    http://southcarolina.247sports.com/
    and it redirects me to this address
    http://media.247sports.com/Oops.html?aspxerrorpath=/
    and gives me the error message. "You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only. "
    Thanks for your help

    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"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

Maybe you are looking for