From the versioned tables link to another diagram

Hello!

We are currently assessing the mechanisms of synchronization of data as possible for a future database that must use data from a database of existing B.
option 1 is the simplest: export data from B, import in A and you're done. the problems are of course used those like arguing with Exim, how up-to-date the data is, etc.
However, we are more interested in option 2: link to the tables of a B. If we are not wrong here we could establish this with the help of dblink and synonymous.
done importand is arrays in B are versioned with OWM. is it in any way possible to link to those who in this case? and if so, how selection of work/savepoint space be treated?
We suspect that this is not possible, at least not if A base table are not versioned as well. or you would need to omit true foreign keys when the referencing of the versioned tables in B of A, which is not exactly good either.

Thanks for the advice in advance!

Kind regards

Andreas

Hi Andreas,

You can use synonyms and links. GotoWorkspace works the same as it would for the local database. Just run it on the remote database.

For example,.
SQL > exec dbms_wm. GotoWorkspace@dblink ('Workspace1');

You should be able to use tables from different databases in the same query. However, it is not any child support for foreign key constraints where the tables are set to different databases and only the tables is transferred. In the case, the parent table must be part of the same db as the child.

Kind regards
Ben

Tags: Database

Similar Questions

  • Choose field from the joined table based on another field?

    Hello!

    Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
    ID  C1   C2    C3    C4    C5    C6
    T1  9.6  10.3  12.4  19.6  19.6    0
    T7  9.6  10.4     0     0     0    0
    T3  8.2   9.9  11.4  19.6  19.6    0
    T8  8.3  10.7  13.5  20.7     0    0
    T5  9.4  10.3  12.7  22.9  19.6    0
    ...
    And the following data in the table MDETAIL:
    ID           MDATE        CNUM     ...
    T1  03/28/2012 18:00:00    4
    T1  03/28/2012 18:00:00    1
    T8  03/29/2012 06:00:00    6
    T8  03/29/2012 06:00:00    5
    ...
    I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:
    SELECT m.t1, m.mdate,
           CASE WHEN m.cnum = 1 THEN c.c1
                WHEN m.cnum = 2 THEN c.c2
                WHEN m.cnum = 3 THEN c.c3
                WHEN m.cnum = 4 THEN c.c4
                WHEN m.cnum = 5 THEN c.c5
                WHEN m.cnum = 6 THEN c.c6 END AS cvalue
      FROM mdetail m
      JOIN cvalues c ON m.id = c.id
    The CVALUES table records are unique; only one line by ID.

    This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!

    Hello

    With a decoding it would be easier, but as ugly :-)

    SELECT m.t1, m.mdate,
           DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue
      FROM mdetail m, cvalues c
      WHERE m.id = c.id
    

    Success!

    FJFranken

  • Problem with the af:table links and views

    I want to display a table with data from a database table called PERSON, so I use af:table tag.

    The PERSON table has the following fields:

    • PERSON_CODE
    • PERSON_NAME
    • PERSON_COD_STATE

    The PERSON_STATE field is a foreign key to another table called PERSON_STATE:

    • PERSON_COD_STATE
    • DESCRIPTION

    I created a view for the data of the PERSON (personView) table. Because I want to show the person status description in the af: table, I created another view for the data in table PERSON_STATE (personStateView). And I've also created a link between personView and personStateView.

    In the column of the af: table that represents the State of no one, I drop the field 'description' of the State view linked to the view of anyone.

    When I run the JSP, the State is not displayed correctly. All persons are displayed with the same State.

    During the test directly with the application module, the display link works correctly.

    View links inside an af:table work?

    I work with ADF 10 g.

    Thank you

    Your scenario should be treated with a sql (VO on two EOs) join with a relationship master / detail. The table will be able to browse the details for each master record to time stamping.

  • XML from the Oracle Table data

    Hi all

    I'm new to this network. I'm also new to oracle XML package. I want a help with the query below.

    CREATE TABLE EMP (ID NUMBER PRIMARY KEY, NAME VARCHAR2 (10), TELEPHONE NUMBER);

    INSERT INTO EMP (ID, NAME, PHONE) VALUES (11, 'Joy', 1234);
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (22, 'Mike', 5678).
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (33, "Jason", NULL);
    COMMIT;

    I want to export data from the EMP table in an XML file with the format below.

    Power required:

    <? XML version = "1.0" encoding = "UTF-8"? > < Joy STATICDATA > < EMP > < ID > 11 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Mike STATICDATA > < EMP > < ID > 22 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Jason STATICDATA > < EMP > < ID > 33 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >

    I used some XML functions and you wrote the following query.

    Select XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8') xml EMP;

    my query output:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 11 / < ID >
    Joy of < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 22 / < ID >
    < NAME > Mike < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 33 / < ID >
    Jason < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >


    But I want the out as the power required above. all records in a single line. can someone help me achieve the desired output. also can I export all columns of the table with something like select * from the table in the XML file?

    Thank you
    Delobelle

    Don't know why you need it on a single line, but you could:

    Select XMLTYPE (REGEXP_REPLACE (XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8'), CHR (10) |)) ' *<><'))>
    FROM EMP;

    SY.

  • ORA-22992: cannot use LOB Locators selected from the remote tables...

    Oracle 10.2.1.0.4
    Solaris 10

    We try to access a table in another database via a db_link.

    The table we are trying to access has a LOB.

    We get the following error: ora-22992: cannot use LOB Locators selected from the remote tables.

    Is there a way to get around this? We need the data in the BLOB field.

    Thank you.

    See on metalink:

    ORA-22992 has a workaround solution in 10 gr 2
    DOC - ID: 436707.1

    Werner

  • The APK from the version code must be greater than 100088

    Hello.

    When I tried to build android build phonegap apk I get this error since the game of google publish:

    The APK from the version code must be greater than 100088

    It's my config.xml file:

    <? XML version= "1.0" encoding= ' utf - 8'? >
    "" <widget id= "appname.app" version= "1.1.0" xmlns= 'http://www.w3.org/ns/widgets"" " xmlns:gap="http://phonegap.com/ns/1.0""">

    Version 1.1.0 of Penny, it was 1.0.8

    Thank you!

    You are (or were) more likely using the gradle build tool. It's OK, but the number of versioncode (not the version string!) it messes up.

    Game Google wants your versioncode higher because of gradle 100088 increases quickly.

    Including a

    preference

    with name =

    Android-versionCode

    and the value =

    100089

    in your config.xml file and rebuild.

  • Google app renewed the question. The APK from the version code must be greater than 1000000

    Hello

    I am updating a previous AIr based Android app with a new version.

    I got the following error

    The APK from the version code must be greater than 1000000.


    The problem is that I carefully replace the application version number, but it keep gave me this address.


    Any clue?

    OK, found the solution

    I had to add several ZERO to the version number to be able to successfully download the APK

  • the result is different from the version textLayout.swc.

    Hello

    I wrote simple code using TLF.
    It generated three text box with different textAlign.
    But the result of that code is different from the version textLayout.swc.

    Why is the result different?

    I tried textLayout.swc comes with...
    [A] flex 4 SDK_4.0.0.7219
    [B] flex 4 SDK_4.0.0.9437

    OS: WinXP SP2
    SDK: worm 3.4
    Tool: Flex Builder 3

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="init()">
         <mx:Script>
              <![CDATA[
                   import flashx.textLayout.formats.TextLayoutFormat;
                   import flashx.textLayout.container.ContainerController;
                   import flashx.textLayout.elements.SpanElement;
                   import flashx.textLayout.elements.ParagraphElement;
                   import flashx.textLayout.elements.TextFlow;
                   import flashx.textLayout.elements.Configuration;
                   
                   private function init():void
                   {
                        var textBox1:Sprite = createTextBox("left");
                        textBox1.x = 300;
                        textBox1.y = 100;
                        this.rawChildren.addChild(textBox1);
                        
                        var textBox2:Sprite = createTextBox("center");
                        textBox2.x = 300;
                        textBox2.y = 250;
                        this.rawChildren.addChild(textBox2);
                        
                        var textBox3:Sprite = createTextBox("right");
                        textBox3.x = 300;
                        textBox3.y = 400;
                        this.rawChildren.addChild(textBox3);
                   }
                   
                   private function createTextBox(value:String):Sprite
                   {
                        var rect:Rectangle = new Rectangle(0,0,300,100);
                        
                        var sprite:Sprite = new Sprite();
                         sprite.graphics.lineStyle (1, 0x000000, 1.0);
                        sprite.graphics.beginFill (0xFF0000, 1.0);
                        sprite.graphics.drawRect  (rect.x, rect.y , rect.width , rect.height);
                        
                        var tlFormat:TextLayoutFormat = new TextLayoutFormat();
                        tlFormat.textAlign = value;
                        tlFormat.color = 0x000000;
                        tlFormat.fontSize = 50;
                        
                        var config:Configuration = new Configuration();
                        config.textFlowInitialFormat = tlFormat;
                        
                        var textFlow:TextFlow = new TextFlow(config);
                        
                        var p:ParagraphElement = new ParagraphElement();
                        var s:SpanElement = new SpanElement();
                        s.text = value;
                        p.addChild(s);
                        textFlow.addChild(p);
                        
                        textFlow.flowComposer.addController(new ContainerController(sprite, rect.width,rect.height));
                        
                        textFlow.flowComposer.updateAllControllers();
                        
                        return sprite;
                   }
                   
              ]]>
         </mx:Script>
    </mx:Application>
    

    [A] textLayout.swc comes with SDK_4.0.0.7219

    [B] textLayout.swc comes with SDK_4.0.0.9437

    4007219.jpg4009437.jpg

    Yes.  There was a regression introduced - its since been corrected.  Trace example [B] ContainerController.horizontalScrollPosition - I think you will see that it is different from zero.

    Richard

  • Select values from the db1 table and insert into the DB2 table

    Hello

    I have three databases oracle running in three different machines. their ip address is different. among the DB can access databases. (means am able to select values and insert values into tables individually.)

    I need to extract data from the DB1 table (ip say DB1 is 10.10.10.10 and the user is DB1user and the table is DB1user_table) and insert the values into DB2 table (say ip DB2 is 11.11.11.11 and the user is DB2user and table DB2user_table) of DB3 that is to have access to the two IPs DB.

    How do I do this

    Edited by: Aemunathan on February 10, 2010 23:12

    Depending on the amount of data must be moved between DB1 and DB2, and the frequency at which this should happen, you might consider the SQL * COPY more control. I think it's very useful for one-off tasks little, so I can live within its limits of the data type. More http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/apb.htm#i641251.

    Change some parameter of sqlplus session are almost mandatory in order to get decent transfer rates. Tuning ARRAYSIZE and COPYCOMMIT can make a huge difference in flow. LONG change may be necessary, too, depending on your data. The documentation offers these notes on use:

    To activate the copy of data between Oracle and databases non-Oracle, NUMBER of columns is replaced by DECIMAL columns in the destination table. Therefore, if you are copying between Oracle databases, a NUMBER column with no precision will become a DECIMAL column (38). When copying between Oracle databases, you must use SQL commands (CREATE TABLE AS and INSERTION), or you must make sure that your columns have a specified precision.

    SQL * the VALUE LONGER variable limits the length of the LONG column you are copying. If all LONG columns contain data exceeds the value of LONG, COPY truncates the data.

    SQL * Plus performs a validation at the end of each successful COPY. If you set the SQL * variable more COPYCOMMIT DEFINED to a value positive n, SQL * Plus performs a validation after copying all lots n of records. The SQL * Plus ARRAYSIZE variable SET determines the size of a batch.

    Some operating environments require that the service names be placed between double quotes.

    From a SQL * Plus term on DB3, can resemble the command to move all content from my_table in DB1 to the same table in DB2

    COPY from user1/pass1@DB1 to user2/pass2@DB2 -
    INSERT INTO my_table -
    USING select * from my_table
    

    Note the SQL code * more line-continuation character ' - '. It is used to escape the newline character in a SQL * Plus command if you do not have to type all on one line. I use it all the time with this command, but I can't locate the documentation on that right now. Maybe someone else can put their finger on it.

    There are other ways to accomplish what the command copy and it is not without its quirks and limitations, but I find that there is usefulness in an Oracle Toolbox.

  • How can I get the second and third highest salary from the emp table

    How can I get the second and third highest salary from the emp table in the ecah Department
    SQL> ed
    Wrote file afiedt.buf
    
      1  select empno, ename, sal, deptno
      2  from (
      3    select empno, ename, sal, deptno, dense_rank() over (partition by deptno order by sal desc) as rn
      4    from emp
      5    )
      6* where rn in (2,3)
    SQL> /
    
         EMPNO ENAME             SAL     DEPTNO
    ---------- ---------- ---------- ----------
          7782 CLARK            2450         10
          7934 MILLER           1300         10
          7566 JONES            2975         20
          7876 ADAMS            1100         20
          7499 ALLEN            1600         30
          7844 TURNER           1500         30
    
    6 rows selected.
    
    SQL>
    
  • minimum hiredate from the emp table

    Hello

    There is a table EMP, hiredate column (date). I want to get the record with minimum hiredate and using this query.
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    SQL> with t as
      2  (select 'A' ename, 1 enum, '1-Oct-2008' hiredate from dual union all
      3  select 'B', 2, '1-Jan-2002' from dual union all
      4  select 'C', 3, '1-Mar-2008' from dual)
      5  select * from t
      6  where hiredate = (select min(hiredate) from t);
    
    E       ENUM HIREDATE
    - ---------- ----------
    B          2 1-Jan-2002
    
    SQL> 
    Is there another way to do it, without using subquery?

    Kind regards
    Ritesh

    Another option:

    SELECT  MIN(ENUM)       KEEP (DENSE_RANK FIRST ORDER BY HIREDATE)       AS ENUM
    ,       MIN(HIREDATE)   KEEP (DENSE_RANK FIRST ORDER BY HIREDATE)       AS HIREDATE
    FROM    t
    

    EDIT: See the post of John Spencer as it has a more in-depth explanation. This will only return the FIRST record oracle meets with minimal hiredate. It will not return more records if more than one employee has the same minimum hiredate.

    Published by: Centinul on October 23, 2009 09:38

  • Remove the entry from the ARP table

    I need to create a program to remove an entry in the ARP table in Windows 7 with LabVIEW and TestStand.  The test that I develop contacts ESA via Ethernet.  Each HAD has the same IP address at the beginning but different MAC addresses.  I note that there may be long delays in test is running when you try to connect and remove the previous entry in the ARP table seems to help.  But now I have to do it manually through the command line.  The command 'arp d' requires elevated privileges.  I had a hard time getting LabVIEW to raise the system exec.  Does anyone have an ideas? Is there a .NET access to the ARP table?

    Thank you

    Paul

    I'll try to look into ARP sync settings setting in Windows.

    We have suffered from various problems of connection-performance TCP a few years ago and our solution was to change the default number of TCP sockets and delays (we knew port exhaustion). The tweeks eliminated most of our problems, no changes to code LV/TS not required.

    I tried to find info on ARP parameters for Windows 7, but it seems that there is much less info available that ther is for XP.

    Key words of the most common registry for older versions of Windows have been 'ArpCacheLife' and 'ArpCacheMinReferencedLife.

    EDIT:

    These parameters were apparently kidnapped in Vista. I found this on the site of $ M; they can apply to later versions, as well as M$ is a request for change to the management of the ARP...

    http://support.Microsoft.com/kb/949589

  • missing parenthesis in insertion into separate lines select the table from the other table

    Hello

    could you help me with the following question?

    I have the following tables

    CREATE TABLE table1)

    ID varchar (12),

    col2 varchar (10),

    COL3 varchar (10),

    level varchar (10))

    CREATE TABLE table2)

    Id2 varchar (12)

    A varchar (10),

    B number (1)

    CONSTRAINT PRIMARY KEY PK (ID2, is));

    INSERT INTO table2 (ID2, A, B) SELECT ID, col2

    MAX (CASE WHEN level = "level 1" then 1

    level = 'level 2' then 2

    Level = 3 then 'niveau3') as colIN3)

    FROM table1 GROUP BY ID2, a.;

    the first table have duplicates as follows:

    Id2 COL2 COL3 level

    A1 pepe football level1

    A1 pepe football level2

    A1 pepe football level1

    A1 pepe basket level2

    A1 pepe pingpong level3

    the output should be selected with unique key (ID2, col3) lines and the level must be the greatest.

    Id2 COL2 COL3 level

    A1 pepe football level2

    A1 pepe basket level2

    A1 pepe pingpong level3

    The output of the script tells me the following messages:

    -lack of right parenthesis referring to the max function.

    Thanks adavance.

    Kind regards

    Hello

    Remember the ABC's of the GROUP BY:

    When you use a GROUP BY clause or in an aggregate function, then all in the SELECT clause must be:

    (A) a ggregate function,

    (B) one of the expressions "group By."

    (C) adding to C, or

    (D) something that Depends on the foregoing.  (For example, if you "GROUP BY TRUNC (dt)", you can SELECT "TO_CHAR (TRUNC (dt), 'Mon - DD')").

    To ask him, there are 5 columns in the SELECT clause.  The last one is a function MAX (...); It is an aggregate, is not serious.

    The first 2 columns are also named in the GROUP BY clause, so that they are well.

    The other 2 columns, country and internal_Id do not match any of the above categories.  These 2 columns cause the error.

    There are many ways to avoid this error, each producing different results.  You could

    • remove these 2 columns in the SELECT clause
    • Add these 2 columns in the GROUP BY clause
    • use the aggregation such as MIN, 2-column functions
    • remove the country from the SELECT clause and add internal_id to the GROUP BY clause
    • remove the internal_id from the SELECT clause, and add countries to the GROUP BY clause
    • ...

    What are the results you want?

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) for all the tables involved, so people who want to help you can recreate the problem and test their ideas.  Also post the results you want from this data, as well as an explanation of how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • Audio waveform disappears from the Source monitor after opening another audio clip

    I use Premiere Pro CC 2015 on an iMac (late 2014) of new 27-inch Retina 5 k with 8 GB of RAM.

    I've got 5 takes of the same voice that I'm editing into a simple video "How-to" recorded at the screen. I'm pass between the clamps and picking at the take, that I prefer and move it into the timeline.

    Problem is, once I open an audio file and then pass away from him to another audio file in the monitor Source Panel, the waveforms on this clip will not appear when I open it in the Source monitor. See waveforms is a unique case, unless I restart Premiere Pro. I can still hear everything and I still see the playhead moving across a green screen, but the waveforms are gone. It works fine the first time I open the clip.

    I waited about 10-15 minutes to see if it's just to take a second to reload the waveforms, but none of the clips appear in their new waveforms unless I restart the first. I tried to open a video and then come back to an audio clip. I have actually managed to do come back simply by moving the source monitor Panel in its own window separate from the table of mixing, effects, etc. but it happened again the next time I went to another audio clip and no amount of monitor source is fluttering it don't come back.

    Is there something that I am missing? I can still change course by listening to each piece of the voice-over begins, but without seeing it, it's a real pain.

    I think that this has been fixed with the latest update. No more problems!

  • Ordinary table from the temporary table vs

    Hello
    What is the difference between a temporary table and a regular ODI table.

    I created a temporary table mapping. Works very well. Now, I added the column in the mapping. To make it work, I have to drop the temporary table that created starting from my previous run or add the column in the temporary table. So I was wondering what is the difference between temp and a regular table in terms of maintenance.

    How can I make adding new dynamic columns.

    -app

    Just to add to what others have said.

    (Temporary interface or yellow Interface) to create (Temp Table or Table Stagging)
    -------------------------------------------------------- ----------------------------------------------------------------

    This method is used to create a temporary Table or Stagging table so that you can export your data before the load in the main target.
    Also its always good practice to create them in the scheme of work (where $ tables are created), except if you required in your database schema.
    This interface are marked by yellow color
    Also these Interface can be dragged directly into all other Interfaces.

    The main reason why they are not removed or delete which is then we cannot call in the following Interface to load the target.

    tables of $
    ------------

    Here's the ODI tables it creates before loading the data into the target as ODI works with ELT concept where his charges into a temporary table (C$, I$, $ J etc.). ODI after loading data in these tables $ can do the necessary transformation and finally load into the target table.
    Once the loaded data to compeltely there ' won't be any use of these tables so they let down, even if you have not deleted by havingthe option
    Delete temporary objects - not in LKM and IKM. Generally used for debugging, but once you have finished debugging, make sure that you return Yes, ODI else will not remove these tables of $.

    How can I make adding new dynamic columns.

    Although I see no reason to drop the temporary table or tables intermediaries. Its good to drop in the database and run your IKM, but again please find a way to do it using revenge for your reference.

    Step 1 - create a copy of your IKM

    Step 2 - Add another command called Drop Target Table and use the following code

     Drop table  <%=snpRef.getTable("L", "TARG_NAME", "A")%> 
    

    Move it before you create the target Table.

    Step 3. Added an option - Drop Table target, so that you can specify whether to drop or not. Go on command and option and instead of always run, check the Drop target only Table option.

    That way if you do not want to delete the target table, it used to other specify Yes.

    I hope this helps.

Maybe you are looking for