EJB with same tables names on differents oracle schemas

Hi,
I need to deploy 2 ejbs in one database oracle 10g instance with 2 schemas. The 2 EJBs have some tables with the same name.
When I try to deploy the second EJB (after I deployed successfully the first on the first schema) on the second empty schema, it gives me the following error:
10:28:27,135 ERROR [SchemaUpdate] Unsuccessful: alter table T_ACTIVITY add constraint FKF970329A403565CA foreign key (LAST_UPDATE_USER_KEY) references T_USER
10:28:27,135 ERROR [SchemaUpdate] ORA-00942: tabella o vista inesistenteand the table for the second schema is not created.
This error is repeated for all the tables that have the same name on the first and on the second ejb,
even if the table exists only on the first schema.
How can I solve it?
Thank you in advance.
Alessandro Rossi

Thank you so much, I found the solution and I've seen your post at the same time :)
Specifying the schema attribute on @table annotation all works properly. I thought that the default schema was taken from the user specified on the data source, but obviously this is not enough.
Alessandro Rossi.

Similar Messages

  • Errors when browsing same table name in a different schema.

    I have two separate schema in a database and each has a table with the same name but different columns. I used the GUI to change the column order while looking at the data on one table. Now I can't see data in the other table and I get the error message ORA-00904: "DAY_DT": invalid identifier. I have tried to clear the persisted settings on both tables and I have disconnected and logged out SQLDeveloper and the problem still persists. How can I fix this.
    Edited by: user507794 on Apr 14, 2010 8:51 AM

    I had another user try to look at data in the table from his account on his PC and he saw the same error. So I looked a little deeper. The situation seems to be this
    user_a creates a table and a public synonym of the same name. user_a grants select on the table to user_c
    user_b creates a table using the same name as user_a's table with different columns. user_b grants select on the table to user_c
    user_c can use the GUI to see the the data in user_a's table.
    user_c cannot use the GUI to see user_b's table data. The GUI returns an error ORA-00904: "XXX": invalid identifier where XXX is a column on user_a's table.

  • How could JNDI differentiate two ejb have same jndi name but on difference

    how could JNDI differentiate two ejb have same jndi name but on difference server
    suppose that:
    we have two J2EE Server those are Server1 and server2, and both of them have a ejb named Test deployed on it, and I need a java client maybe it is a java Application, servlet or ejb in server1 to get the reference to the ejb name Test, how to use JNDI to get the reference to both of them. those two ejb have same name but on difference server. how could the java client locate them?

    You've hit problem #1 in the alleged scalability of EJB containers.
    Basically, the whole setup assumes that you're only dealing with one naming service. The expectation is that a given name is bound to a single object, which in this case is the Home interface.
    Some systems support clustering, which can allow you to get round this, but the details will depend on you EJB container vendor,
    Sylvia.

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • Two query with same technical name in Quality

    Hi experts,
    I have two queries in Quality with same technical name. I used the program RENAME_DUPLICATE_ELEMENTS to rename the query and its renaming the latest query instead of the old Query. I am in BI 7.0 system and cant find a note that applies to BI 7.0. There are quite a few notes on 3.x system. Has somebody faced the same problem. What did you do. If there is a note for bi 7.0, please let me know so i can resolve with the Basis team.

    We had similar issues - this happens when you create a query locally and then transport the same.
    The queries have an internal GUID which is generated locally and this causes duplicates.
    You can :
    1. Delete queries using the GUIDS ( you can find this in RZCOMPDIR or RSRREPDIR tables ) using RZDELETE to delete queries.
    identify your older version query and then delete the same and you should be good to go...
    also try identifying the same using program
    ANALYZE_RSZ_TABLES

  • How to get two fields with same tech name in LIS Extractors?

    Hi Experts,
    I need "ERDAT" field from two structures (QMSM & QMFE) in 2LIS_18_IOTASK extractor.
    In LBWE first I moved ERDAT from QMSM. When I moved ERDAT from QMFE it gives an error:
    "Field with same technical name is already available in the Extract Structure".
    I don't want to create Append Structure as we need to write User exit.
    Can any one tell me how to get this field added in the extractor from QMSM and QMFE?
    Thanks for your help.
    Regards,
    Sree

    this is not possible as the all those fields are put in one structure. per definition you can't put the same field name twice in a structure, table in the data dictionary...
    hence, you really need to use an append and fill via user exit
    M.

  • Copy the structure of a table to another with another table name.

    how to copy the structure of a table to another with another table name.
    ie. i want a emp table with same values/structure to be copied to another table called my_employee.
    how can this be done?

    create table my_emp as select * from emp;
    If you do not want the data to be copied then do the following:
    create table my_emp as select * from emp
    where 1=2;
    Avanti.

  • Multiple Infoobject with same technical name

    Hi All,
    I have a very basic question which confuses me a lot.
    I have installed a BI content info cube 0SD_C03(Sales overview) and it is installed in Info Area -  ERP Analytics -->sales and distribution analyses. I checked the dimensions of it and 0customer( master data attr) is linked as a dimension. I created a copy of 0SD_C03 and the new Infocube name is ZSD_C03_T. It also has the same 0customer master data attr as a dimension(obviously!).
    Now both the infocubes have different technical name(0SD_C03 and ZSD_C03_T) since they will be storing different sets of data(lets say). but the technical name of the master data (0CUSTOMER) is the same for both cubes.
    ques 1: Is it since its a master data and contains the same set of master data for both the cubes, it has the same technical name?
    If I search the Info provider section for "0CUSTOMER", i get two entries: One within my info area and another within another info area. And also i can keep doing (Right click Info area--> Insert Characteristic as Infoprovider) on every other info area and insert 0CUSTOMER in every other info area.
    ques 2: does all the 0CUSTOMER in different info areas, actually contain the same set of data?
    ques 3: if i search for 0CUSTOMER in InfoObjects section, i get 5 entries in different infoareas. How can there  be diffferent Infoobject with same technical name be present in different info areas?
    Sorry if i am too elaborate, I hope i have made my questions clear.

    Hi,
    ques 1: Is it since its a master data and contains the same set of master data for both the cubes, it has the same technical name?
    A. same 0CUSTMER you can use the different places it holds same data.
        source is the 0CUST_ATTR -> target is 0CUSTOMER.
    ques 2: does all the 0CUSTOMER in different info areas, actually contain the same set of data?
    A. it will contain the same set of data.
        it has the overwrite function.
    ques 3: if i search for 0CUSTOMER in InfoObjects section, i get 5 entries in different infoareas. How can there  be diffferent Infoobject with same technical name be present in different info areas?
    A. you triggered the 5 times for specif DTP means you will 5 entries for different info areas.
    finally i will say you use the 0CUSTOMER no of places where you required and no need to create the ZCUSTOMER.
    Thanks,
    Phani.

  • How can OIM provision users with same Display Name in AD?

    I can create users with same First Name, Middle Name and Last Name (same Display Name) in OIM if they have different UserId.
    But I can not provision two users with same Display Name to one Organization Unit in AD, the resource provisioning shows
    Status: Rejected
    Response: AD user already exists
    Can AD be configured to create users with same Display Name (different UserId) in one OU, or would I have to create logic in OIM to modify the display name so it gets accepted by AD?
    Thanks!

    Thanks Nitesh. Also, I can create the user with same DN in different OU's, not in same OU.
    I agree once we determine that same cn exists in one OU , I can modify the display name by appending a number at the end or something. I understand the logic but I need more details on how to specify this logic in the pre-pop adapter, can you please share more details.
    Thanks a lot!

  • Recreate skype user with same skype name ?

    I just deleted 21 skype users, by mistake, in Business Manager, is it possible to recreate them with same skype name ?
    /Claus

    Hi again,
    Hope this helps.
    alias_maps = hash:/etc/postfix/aliases,hash:/var/mailman/data/aliases
    always_bcc =
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-mailtransport:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    inet_interfaces = all
    luser_relay =
    mail_owner = postfix
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mapsrbldomains =
    messagesizelimit = 10240000
    mydestination = $myhostname,localhost.$mydomain,localhost,apm.pt,onlearn.apm.pt,ml.apm.pt,xserv e.apm.pt
    mydomain = apm.pt
    mydomain_fallback = localhost
    myhostname = mail.apm.pt
    mynetworks = 127.0.0.1/32,195.23.139.104/29
    mynetworks_style = host
    newaliases_path = /usr/bin/newaliases
    ownerrequestspecial = no
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relayhost =
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdclientrestrictions = hash:/etc/postfix/smtpdreject
    smtpddelayreject = yes
    smtpdenforcetls = no
    smtpdhelorequired = yes
    smtpdhelorestrictions = permitsasl_authenticated,permitmynetworks, checkheloaccess hash:/etc/postfix/heloaccess,reject_non_fqdn_hostname,reject_invalidhostname,permit
    smtpdpw_server_securityoptions = login
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpdsenderrestrictions = permitsasl_authenticated,permit_mynetworks,reject_non_fqdn_sender,reject_unknown_sende rdomain,permit
    smtpdtlsCAfile =
    smtpdtls_certfile =
    smtpdtls_keyfile = $smtpdtls_certfile
    smtpdtlsloglevel = 0
    smtpduse_pwserver = yes
    smtpdusetls = no
    unknownlocal_recipient_rejectcode = 550
    virtualaliasmaps = hash:/var/mailman/data/virtual-mailman
    João.

  • Is there a way to view all the table names in a certain schema?

    Is there a way to view all the table names in a certain schema?

    SELECT table_name FROM user_tablesThat won't do much good given this piece of information:
    i am trying to finish a lab for school but i don't know what tables are in my
    professor's schema. The appropriate solution is
    SELECT table_name
    FROM all_tables
    WHERE owner = 'PROFESSOR_YAFFLE'
    /This will show the names of the tables which Prof. Yaffle has granted to us.
    Cheers, APC

  • Get the table names from a specified schema name

    Can't any one can hlep me how to use OCIDescribeAny() to retrive the list of table names for a given schema name?
    I have problem when I connect to the database using syste as usr id. I can't ge the table name form the SCOTT schema.

    If I understand you correctly, I don't think OCIDescribeAny() is the way to go.
    You can get a list of tables owned by a particular schema by using the following SQL:-
    SELECT TABLE_NAME FROM DBA_TABLES WHERE OWNER = 'SCOTT'
    Just change the where clause to your needs.
    Regards.
    Adrian

  • Three tables with the same table name in the same user account

    Windows XP with 10.2.0.1.0
    What is the best strategy to handle the following tasks? Thanks in advance.
    I need to have three different version of database with the same tablename and under the same user name.
    So, I can choose which version of table I need.
    For instance:
    version1:
    create table history(col1 varchar2(20),col2 varchar2(10) ,col3 varchar2(30));
    with data:
    version2:
    create table history(col1 varchar2(20),col2 varchar2(10), col3 varchar2(30) ,col4 number ,col5 number);
    version3:
    history is an union by version1 and version2

    782150 wrote:
    Windows XP with 10.2.0.1.0
    What is the best strategy to handle the following tasks? Thanks in advance.
    I need to have three different version of database with the same tablename and under the same user name.
    So, I can choose which version of table I need.
    For instance:
    version1:
    create table history(col1 varchar2(20),col2 varchar2(10) ,col3 varchar2(30));
    with data:
    version2:
    create table history(col1 varchar2(20),col2 varchar2(10), col3 varchar2(30) ,col4 number ,col5 number);
    version3:
    history is an union by version1 and version2You can't unless you delete the previous table one table only with the same name

  • View the tables with same column name

    Hi all
    I have 10-20 tables and they have some same column names
    How can I know it?
    I mean, I want to know the tables which have the common column names
    Thanks...

    SQL> break on column_name
    SQL> set linesize 1000
    SQL> set pagesize 10000
    SQL> select column_name, owner, table_name
      2  from (select owner, table_name, column_name, count(*) over (partition by column_name) ct
      3        from dba_tab_columns)
      4  where ct>1
    SQL> /
    COLUMN_NAME                    OWNER                          TABLE_NAME
    AADSAS_ID_NBR                  H89UCBAC                       PS_SAD_ADA_CD
                                   H89UCBAC                       PS_SAD_ADA_SUS
                                   H89UCBAC                       PS_SAD_ADA_TMP
    AA_CODE                        H89UCBAC                       PS_RQ_CONDIN_SLVW
                                   H89UCBAC                       PS_RQ_CONDIN_SRCH
                                   H89UCBAC                       PS_DUMMYDESCR_LANG
                                   H89UCBAC                       PS_DUMMY_DESCR
                                   H89UCBAC                       PS_RQ_NOTINCOND_LV
                                   H89UCBAC                       PS_RQ_NOTINCOND_SR
    [...]Nicolas.

  • Problem with Dynamic Table Name

    Hello all,
    I am having trouble using a dynamic table name. I have the following code.....
    declare l_cur sys_refcursor;
    l_ID int;
    l_tableName varchar(30);
    BEGIN
    open l_cur for
    select hkc.ColumnID, mapping from &HKAPPDB_Schema_Name..doctablemapping ddm
    inner join &HKDB_Schema_Name..HKColumns hkc on hkc.doctablemappingid = ddm.id
    where ddm.id > 0;
    LOOP
         FETCH l_cur into l_ID, l_tableName;
         EXIT WHEN l_cur%notfound;
         -- update missing VerbID in DocumentDocMapping table
         UPDATE &HKAPPDB_Schema_Name..IndexedDocument
         SET VerbID = (SELECT t.VerbID
                             FROM (SELECT DocRef, VerbID, DateUpdated
                                  FROM &HKAPPDB_Schema_Name..l_tableName dd        - this is where the dynamic table name is used
                                  WHERE dd.VerbID is not NULL))
         WHERE HKColumnID = l_ID AND VerbID is NULL;
    END loop;
    end;
    /When I try to execute this i get an error
    ORA-00942: table or view does not exist
    What am I doing wrong?
    Regards,
    Toby

    redeye wrote:
    I only started about 6 weeks ago, with no tutorials and learning it on the fly; Same here.. only my introduction was to a 12 node Oracle OPS cluster all those years ago.. and required a whole new mind set after using SQL-Server extensively. But it was fun. Still is. :-)
    but thats what you get when a company throws you in at the deep end with a ridiculous time constraint to migrate a whole MSSQL DB.Migrating SQL-Server to Oracle is not a simple thing. A lot of best practices in SQL-Server are absolutely worse practices in Oracle - they are that different. Simple example is lock escalation - an issue in SQL-Server. In Oracle, the concept of a lock being escalated into a page lock simply does not exist.
    In terms of getting the migration done as quickly and painlessly as possible I try to reuse all the logic as it appears in the MSSQL code - in this case it was using dynamic table names. I do not doubt that i am probably shooting myself in the foot in the long run.....As long as you do not splatter too much blood on us here.. not a problem :D
    Seriously though - just keep in mind that what works in SQL-Server may not work as well (or even at all) in Oracle. So do not hesitate to refactor (from design to code to SQL) mercilessly when you think it is warranted.

Maybe you are looking for