Invalid Object "Swapping" Between Two Schemas

Hi all,
I have an issue in my 11.2.0.2 database.
I have two schemas that are almost exactly the same (one is part of a development environment, the other is a test environment) that have invalid procedures in them. These procedures exist in both schemas. There are a couple peculiar things about these procedures:
-They have no compiler errors. If I compile a procedure, it becomes valid.
-Once we compile a procedure in one schema, the same procedure in the other schema becomes invalid.
To give an example:
In schema APP_DEV, there is a procedure PROC1. It also exists in another schema APP_TEST.
PROC1 is INVALID in APP_DEV, but is VALID in APP_TEST.
If we compile PROC1 in APP_DEV, it becomes VALID in APP_DEV, but PROC1 will be INVALID in APP_TEST.
In essence, these procedures "flip-flop" between being valid and invalid, as if they are connected somehow. But the two schemas cannot see each other because they have no select, execute or any other privileges to interact with each other.
If anyone can shed some light on this, it'd be greatly appreciated.
Thanks,
Clint

OK, I have it.
DOH!  (told ya)
So, while intellisense (typically) flags this table as not existing, that's just Intellisense doing the nonsense it always does. This obfuscated the ACTUAL error - which was the wrong schema defined in the output clause. The error itself pointed at the wrong
line (nothing new there either). Once I fixed the OUTPUT clause, everything worked as expected - although SSMS is still putting squiggly red lines under everything that is working anyway. Yeah, we've all seen THAT behavior - no big deal.
Anyway, that's the answer. It's magic - in that the error messages specialize in misdirection :)...
Closing this. (I wonder if I get credit for answering my own question?)

Similar Messages

  • Swap between two different item categories in sales orders for sub-contracting

    Dear gurus,
    my requirement is to have the ability to swap between two different item categories for sales orders for sub-contracting.
    This should be controlled by a combination of the material and a value maintained the Usage field in the Customer Material Info Record (for example by entering a ‘V’).  A combination of Sales Doc Type, Item Cat Group and Usage should result in the creation of a purchase requisition.
    In the event that a process order is required instead of a purchase requisition (i.e. the product is to be manufactured in-house instead of sub-contracted) the user must have the ability to change the Item Category within the sales order to produce a process order.
    The user would just change the item category within the sales order, and the system would automatically remove the purchase requisition assigned to the SO, and create a process order and assign it to the SO.
    Can you suggest any possible solution?
    Thank you in advance.

    Hi Majlo,
    In my system, I checked.  First created sales order with third party line item and then changed item category to normal item category.
    Till Purchase order not created, I can change Item category of my sales order line item.
    In this case SAP inform by log and once save delete purchase requisition of that line item .
    For this you need to assign another item category as an manual item category in SPRO Item category assignment.
    After this user can manually change item category to other one manually, if PO do not exist.
    Please let me know if your query is different.
    Regards

  • Different ways to copy data between two schemas in one instance

    Hi there,
    I am searching a good way to copy data between two schemas in the same instance.
    Both schemas have an identical structure such as triggers, tables, views and so on. The only difference is the purpose: one is the productivity system and one is for development.
    I looked at datapump but I do not explicit want to export / import. I want to keep the data in the productivity schema as well as copy it to the other schema. Any ideas? I found out there is a copy statement but I dont't know how that works.
    Thank you so far,
    Jörn

    Thank you for your replies!
    I also thought of creating a second instance for development and move the dev - schema to it. I just don't know whether our server can handle both (performance?). Anyway the idea is to have a possibility to quickly rebuild the data inside a schema without indixes or triggers, just pure data. I thought the easiest way would be to copy the data between the schemas as they are exactly the same. However if you tell me DataPunp is the best solution i won't deny using it :).
    When you export data a file is created. does that also mean that the exported data is deleted inside the schema?
    best regards
    Jörn
    Ps: Guido, you are following me, aren' t you? ;-)

  • How to find the difference in object definition between two databases

    Hi,
    Can any one suggest me how to find the difference in object definition between two different databases. Is there any tool or by OEM? If so how?
    Regards
    Naveen

    this link may be helpful...
    http://www.dbspecialists.com/scripts.html

  • Compare table data between two schemas?

    Hi,
    I am looking for a script to compare the table data between the schemas (two different databases)? I know how to compare table by table but looking for a generic script where I can compare all the tables data from one schema to another schema?
    Thanks a lot...

    here the idea, adapt it with your needs :)
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    Connected as SYS
    SQL> create user user1 identified by user1;
    User created
    SQL> grant create  session to user1;
    Grant succeeded
    SQL> grant create table to user1;
    Grant succeeded
    SQL> alter user user1 quota 10m on DATA;
    User altered
    SQL> create user user2 identified by user2;
    User created
    SQL> alter user user2 quota 10m on DATA;
    User altered
    SQL> grant create table to user2;
    Grant succeeded
    SQL> grant create  session to user2;
    Grant succeeded
    SQL> create table user1.test(a Number) tablespace DATA;
    Table created
    SQL> create table user2.test(a Number) tablespace DATA;
    Table created
    SQL> insert into user1.test values (1);
    1 row inserted
    SQL> insert into user1.test values (2);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> insert into user2.test values (2);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> create table sys.logs(Diff number) tablespace data;
    Table created
    SQL> select * from sys.logs;
          DIFF
    SQL>
    CREATE OR REPLACE PROCEDURE TEST_MY_DIFF IS
      CURSOR CUR_ IS
        SELECT D.TABLE_NAME T_NAME FROM DBA_TABLES D WHERE D.OWNER = 'USER1';
      W_DIFF NUMBER;
      TYPE CV_TYP IS REF CURSOR;
      CV CV_TYP;
    BEGIN
      EXECUTE IMMEDIATE 'TRUNCATE TABLE SYS.LOGS';
      FOR I IN CUR_ LOOP
        W_DIFF := 0;
        OPEN CV FOR 'select count(*)
    from
    ( select * from USER1.' || I.T_NAME || '
    minus
    select * from USER2.' || I.T_NAME || ' )
    union all
    ( select * from USER2.' || I.T_NAME || '
    minus
    select * from USER1.' || I.T_NAME || ')
        LOOP
          FETCH CV
            INTO W_DIFF;
          INSERT INTO SYS.LOGS VALUES (W_DIFF);
          COMMIT;
          EXIT WHEN CV%NOTFOUND;
        END LOOP;
      END LOOP;
    EXCEPTION
      WHEN OTHERS THEN
        NULL;
    END;
    SQL> BEGIN
      2  test_my_diff;
      3  end;
      4  /
    PL/SQL procedure successfully completed
    SQL> select * from sys.logs;
          DIFF
             1
             1

  • Not able to do transformation between two schemas

    I have this two very similar schemas, I tried to do a transform activity between them. I kept getting error says 'Failed to save XSL Map, Make sure XSL Map is valid'. I am not even able to map a single element.
    This two schemas are generated from 'Define Native Format schema' using the same sample file. most of elements have same name and type in both files.
    Here is how they look like:
    Schema one:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/FRead"
    xmlns:tns="http://TargetNamespace.com/FRead"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
    <xsd:element name="RECORD1" nxsd:conditionValue="RH">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ReqHeaderId" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LastUpdateDate" type="xsd:date" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;"
    minOccurs="1">
    </xsd:element>
    <xsd:element name="Description" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Note" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="RECORD2" nxsd:conditionValue="RL">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="LineId" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ReqHeaderIdToLine" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LineDescription" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LineNote" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Quantity" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ExtendedAmount" type="xsd:decimal" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="TotalAmount" type="xsd:decimal" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:choice>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Schema 2:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/Fwrite"
    xmlns:tns="http://TargetNamespace.com/Fwrite"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="Root-Element">
    <xsd:complexType>
    <xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
    <xsd:element name="RECORD1" nxsd:conditionValue="RH">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ReqHeaderId" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LastUpdateDate" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Description" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Note" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="RECORD2" nxsd:conditionValue="RL">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="LineNumber" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ReqHeaderIdtoLine" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LineDescription" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="LineNote" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="Quantity" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="ExtendedAmount" type="xsd:decimal" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
    </xsd:element>
    <xsd:element name="TotalAmount" type="xsd:decimal" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:choice>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    Coul not reprocduce it:
    - created BPEL process.
    - imported the two XSD schema's
    - Ceated two variables and each pointed to an element in the schema.
    - Create transformation:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="x1.xsd"/>
    <rootElement name="Root-Element" namespace="http://TargetNamespace.com/FRead"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="xs2.xsd"/>
    <rootElement name="Root-Element" namespace="http://TargetNamespace.com/Fwrite"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.2(build 060111.0746) AT [MON OCT 09 10:32:38 CEST 2006]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:ns0="http://TargetNamespace.com/FRead" xmlns:tns="http://TargetNamespace.com/Fwrite" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" exclude-result-prefixes="xsl xsd ns0 nxsd tns ldap xp20 bpws ora orcl">
    <xsl:template match="/">
    <tns:Root-Element>
    <tns:RECORD1>
    <tns:ReqHeaderId>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD1/ns0:ReqHeaderId"/>
    </tns:ReqHeaderId>
    <tns:LastUpdateDate>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD1/ns0:LastUpdateDate"/>
    </tns:LastUpdateDate>
    <tns:Description>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD1/ns0:Description"/>
    </tns:Description>
    <tns:Note>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD1/ns0:Note"/>
    </tns:Note>
    </tns:RECORD1>
    <tns:RECORD2>
    <tns:LineNumber>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:LineId"/>
    </tns:LineNumber>
    <tns:ReqHeaderIdtoLine>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:ReqHeaderIdToLine"/>
    </tns:ReqHeaderIdtoLine>
    <tns:LineDescription>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:LineDescription"/>
    </tns:LineDescription>
    <tns:LineNote>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:LineNote"/>
    </tns:LineNote>
    <tns:Quantity>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:Quantity"/>
    </tns:Quantity>
    <tns:ExtendedAmount>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:ExtendedAmount"/>
    </tns:ExtendedAmount>
    <tns:TotalAmount>
    <xsl:value-of select="/ns0:Root-Element/ns0:RECORD2/ns0:TotalAmount"/>
    </tns:TotalAmount>
    </tns:RECORD2>
    </tns:Root-Element>
    </xsl:template>
    </xsl:stylesheet>

  • Joins between two schemas

    Hi
    I need data from two different schemas. Can develop one subject area taking 2 tables from 2 different schemas or we need to have these two tables from one schema only ?
    Can any one help on this.
    Thanks
    Manu

    Hi,
    When you try to create physical join between these two tables of different schemas.
    The join condition is REGION.REGION_CODE = REGION.REGION_ID
    Note: The table name is same in both the schema.
    Now as soon as I click on Ok, it gives an error.Because You can not create join between two tables with the same name.
    So, create alias for these two tables and try to create the join with the same join condition.
    It allowed me to create join perfectly. I moved ahead with the creation of Subject Area based out of these two tables.
    Opened Presentation Services, selected few attributes from both the Presentation folders.But it gave ODBC error as :
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46036] Internal Assertion: Condition m_CountFields == static_cast<int32>(m_ColumnNameVector.size()), file .\Src\SQCSCacheStorageListStream.cpp, line 221. (HY000)
    Now in order to fix that issue, rename the base tables as Schema1_name.REGION and Schema2_name.REGION in the repository.
    Reload the rpd and run the same report, it would give correct result.
    But instead you can have the tables in the same schema for better maintenance activities.
    Hope this solved your question.
    Regards
    MuRam

  • DBlink between two schema on the same database.

    Hello,
    I am facing a troublesome situation here regarding a database link. Usually I create my db links between two databases hosted on two different servers but in this current situation, am in short of machines. The database informations are contained in two different schema that were suppoded to be imported on two different databases(servers). As only one machine is available,I would like to know given the situation, whether I can create two schemas on the same database and link both schema using a database link. Is it possible? If yes, how do I achieve that?
    Thanks in advance.

    adomi wrote:
    Hello,
    I am facing a troublesome situation here regarding a database link. Usually I create my db links between two databases hosted on two different servers but in this current situation, am in short of machines. The database informations are contained in two different schema that were suppoded to be imported on two different databases(servers). As only one machine is available,I would like to know given the situation, whether I can create two schemas on the same database and link both schema using a database link. Is it possible? If yes, how do I achieve that?
    Thanks in advance.Cann't understand you. If you transfer data between two databases, then use database link. If you use only one database, then you don't need to use database link. Please elaborate more

  • Moving data between two schemas

    I need to move data between to schemas. I have a created packaged code to accomplish this. The problem is the execution time. When running the insert statements from the source schema to insert data into the target schema, it takes considerably longer to complete the statement than if I copied the tables from the source schema into the target schema and executed the same statement in the target schema. Any insight as to why this might be?
    Also all data resides on the same physical disk, running version 10g on a W2K server.
    Thanks in advance
    Here is a sample of one of the insert statements:
    INSERT INTO target_table(tt_id, tt_disp, tt_date, tt_emp_1, tt_emp_2, tt_emp_3)
    SELECT src_tab.src_id,
    src_tab.scr_disp,
    src_tab.scr_date,
    src_tab.scr_emp_1,
    src_tab.scr_emp_2,
    src_tab.scr_emp_3
    FROM
    (SELECT
    row_number() over(
    ORDER BY SUBSTR(fn_cil_sort_format(SUBSTR(src_cil,
    1, 8)), 1, 4), SUBSTR(src_cil, 4, 8)) AS src_id,
    scr_disp,
    fn_date_format(date_time) AS scr_date,
    v_convert AS scr_emp_1,
    v_convert AS scr_emp_2,
    v_convert AS scr_emp_3
    FROM source_table
    ORDER BY SUBSTR(fn_sort_format(SUBSTR(src_cil, 1, 8)), 1, 4),
    SUBSTR(src_cil, 4, 8)) src_tab
    WHERE scr_disp IS NOT NULL;

    In addition to the above post, you should create the table initially with NOLOGGING. create table as select has the ability to bypass logging. This should increase performance very much. No log writes will have to be taking place.
    Lee

  • Data comparison and update/insert between two schemas in same database

    Hi all,
    I have requirement like this. In one database, i am having two users, user1 and user2. Both users is having same tables and structure wise also same. In user1, data will be populated by job.
    Now, what i want to do is, i have to find out difference between user1 and user2 data and the Difference data will be updated/inserted into the user2.
    Any ideas please...
    Thanks in advance,
    Pal

    Will trigger help you ... ie. for every update/insert on user1 will do on user2-- it is heavy to do for all table...
    --svmg                                                                                                                                                                                                                                                                   

  • PL Package to sync ddl between two schemas

    About a year or so ago I came across a website (can't remember) that indicated that in 11g there is a package that would automatically update a target schema from a source schema to make it structurally the same (ddl). I've been unable to find such a package and want to know if anyone else out there knows if such a package exists. We are writing some software that would push the ddl changes made in a dev schema to test and then prod without the need to maintain scripts. We would want it to work similar to the way jDeveloper works with database changes made to a model. We could write it from scratch, but didn't want to go that route if there was something available from oracle that we could leverage.
    Thanks in advance for any insight.

    Never used it but probably you are talking about DBMS_COMPARISON?!
    The aforementioned document further links you to Comparing and Converging Data.

  • I want a sql query to diffrentiate the column names between two schemas

    The structure of the dba_tab_cols table is owner, table_name, column_name, data_type,.....
    So I have a ACCT_ALT_ID table under owner SEODS01 and in that therse are column names
    IBD_ID
    ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID
    DATA_GRP_CDE
    UPDT_DTE
    AND I have a ACCT_ALT_ID table under owner SEODS02 and in that therse are column names
    IBD_ID
    ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID
    DATA_GRP_CDE
    CRTE_PGM
    CRTE_TSTP
    UPDT_PGM
    UPDT_TSTP
    so I want select query to display like this
    SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
    IBD_ID IBD_ID
    ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID EODS_ACCT_ID
    DATA_GRP_CDE DATA_GRP_CDE
    UPDT_DTE CRTE_PGM
    CRTE_TSTP
    UPDT_PGM
    UPDT_TSTP
    AND ALSO I NEED ONE MORE QUERY THAT I DO NOT WANT DISPLAY HAVING SAME COLUMN_NAME LIKE ACCT_ALT_ID_CNTX_CDE ,EODS_ACCT_ID,IBD_ID
    DATA_GRP_CDE

    Hi,
    Welcome to the forum!
    876793 wrote:
    The structure of the dba_tab_cols table is owner, table_name, column_name, data_type,.....
    So I have a ACCT_ALT_ID table under owner SEODS01 and in that therse are column names
    IBD_ID
    ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID
    DATA_GRP_CDE
    UPDT_DTE
    AND I have a ACCT_ALT_ID table under owner SEODS02 and in that therse are column names
    IBD_ID
    ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID
    DATA_GRP_CDE
    CRTE_PGM
    CRTE_TSTP
    UPDT_PGM
    UPDT_TSTP
    so I want select query to display like this
    SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
    IBD_ID IBD_ID
    ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID EODS_ACCT_ID
    DATA_GRP_CDE DATA_GRP_CDE
    UPDT_DTE CRTE_PGM
    CRTE_TSTP
    UPDT_PGM
    UPDT_TSTPYou may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    That way, your message will look like this:SEODS1_ACCT_ALT_ID SEODS02_ACCT_ALT_ID (COLUMN HEADER)
    IBD_ID IBD_ID
    ACCT_ALT_ID_CNTX_CDE ACCT_ALT_ID_CNTX_CDE
    EODS_ACCT_ID EODS_ACCT_ID
    DATA_GRP_CDE DATA_GRP_CDE
    UPDT_DTE CRTE_PGM
    CRTE_TSTP
    UPDT_PGM
    UPDT_TSTP
    This sounds like a jon for a FULL OUTER JOIN:SELECT     s1.column_name     AS seods1_acct_alt_id
    ,     s2.column_name     AS seods2_acct_alt_id
    FROM          dba_tab_cols     s1
    FULL OUTER JOIN     dba_tab_cols     s2 ON s1.column_name     = s2.column_name
    WHERE     s1.owner     = 'SEODS1'
    AND     s1.table_name = 'ACCT_ALT_ID'
    AND     s2.owner     = 'SEODS2'
    AND     s2.table_name = 'ACCT_ALT_ID'
    AND ALSO I NEED ONE MORE QUERY THAT I DO NOT WANT DISPLAY HAVING SAME COLUMN_NAME LIKE ACCT_ALT_ID_CNTX_CDE ,EODS_ACCT_ID,IBD_ID
    DATA_GRP_CDESorry, I don;t understand.
    Post the results you want (formatted, between \ tags, of course).
    Do you want only the column names that appear in one table or the other, but not in both?
    In that case, you can add a condition like this to the WHERE clause:
    AND       (   s1.column_name  IS NULL
           OR  s2.column_name  IS NULL
           )

  • Finding Invalid objects in schema

    Dear All,
    How to find all invalid objects in an paticular schema
    Regards,
    Raju

    Hello Raju
    SQL> select object_type,count(*) from user_objects where status = 'INVALID'
    2 group by object_type;
    OBJECT_TYPE COUNT(*)
    PACKAGE BODY 4
    PROCEDURE 61
    VIEW 3
    next, as sys
    exec dbms_utility.compile_schema( 'ACCOUNTS' );
    PL/SQL procedure successfully completed.
    then,
    connect accounts
    SQL> select object_type,count(*) from user_objects where status = 'INVALID'
    group by object_type;
    OBJECT_TYPE COUNT(*)
    PACKAGE BODY 1
    PROCEDURE 182
    VIEW 3
    try this
    Ravi
    http://dbaoraclefaqs.blogspot.com/

  • How to compare two schemas in Oracle sql developer

    Hello,
    I need to compare both the data and schemas details (columns etc) between two schemas on different databases (connections).
    What is the easiest and most efficient way to do this? Hopefully in Oracle Sql Developer or Sql Plus?
    Thanks.

    In SQL Developer go to Tools -> Schema Diff !
    in SQL* Plus you will need to write PL/SQL for this.
    Amardeep Sidhu

  • Sharing data between two separate user sessions

    Hi all!
    I have been trawling my brain for a solution to this - any help will be appreciated!
    I would like to create a single instance of a class but share that instance over more than one user session (two separate users but both running concurrently).
    Just as you can pass data between sessions using ABAP memory - I would like to pass data (specifically an object reference) between two separate users that could even be logged in to two separate application servers...
    Even a mini Client/server solution would suffice but I cannot figure one out!
    Is this possible?
    Many thanks for your thoughts in advance...
    N

    Hello N K,
    sorry thats not possible. Sharing a data item / object instance requires at least a common physical memory. As this is not guaranteed between different app. server this is technical not possible.
    With release 640 ABAP offers the new feature Shared Objects. These mechanism allows access by different users and some propagation to differnt servers.There is an interesting article on the ABAP SDN homepage
    https://www.sdn.sap.com/sdn/developerareas/abap.sdn
    For relases below more or less the database is the only chance to store data accross application servers (known to me). One exception might be the ENQUEUES which might (mis)used to store some Flags.
    Kind Regards
    Klaus
    Link to Shared Objects PDF
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/shared objects in abap

Maybe you are looking for