Table update through the database link

I'm trying to update the tables in the clone of my production database, but has no chance. I have a few tables in the cloned database I want updated twice a week and wrote the following script, but it does not work.

INSERT ignore in local_table select * from remote_table@remote_pro_DATABASE;

ERROR on line 1:
ORA-00925: missing IN the key

Is there a better way I could update these tables from the production to the cloned?

Hello

Must be a syntax error, should work. It works for me:

SQL>sho rel
release 1002000400
SQL>CREATE TABLE raw_period NOLOGGING AS
  2     SELECT * FROM [email protected]
  3      WHERE 1 = 2;

Table created.

SQL>
SQL>MERGE INTO raw_period t
  2       USING [email protected] s
  3  ON (t.sqid = s.sqid)
  4  WHEN NOT MATCHED
  5  THEN
  6     INSERT (sqid, start_date, end_date, creation_date)
  7     VALUES (s.sqid, s.start_Date, s.end_date, s.creation_date);

120 rows merged.

SQL>
SQL>COMMIT;

Commit complete.

SQL>
SQL>DROP TABLE raw_period PURGE;

Table dropped.

SQL>

You may have a prefix s. in your Insert-column list:

SQL>MERGE INTO raw_period t
  2       USING [email protected] s
  3  ON (t.sqid = s.sqid)
  4  WHEN NOT MATCHED
  5  THEN
  6     INSERT (sqid, start_date, end_date, s.creation_date)
  7     VALUES (s.sqid, s.start_Date, s.end_date, s.creation_date);
   INSERT (sqid, start_date, end_date, s.creation_date)
                                       *
ERROR at line 6:
ORA-00904: "S"."CREATION_DATE": invalid identifier

Note that error message indicates line 6.

Concerning
Peter

Tags: Database

Similar Questions

  • Authentication of database through the database link

    Is it posible to use database authentication in the APEX by link of database and how?

    Also is it posible to reading user roles through the database link?

    Database links to establish the connection, so you lose the context regarding which is recorded in a single user.

    Custom authentication can do some PL/SQL you need, but I would say that replicate your tables locally through something as materialized views.

    You could also potentially be used dba_role_privs, but do not forget roles can be turned on/off.

  • How s/n know when and what account perform a function using the database link?

    Dear,

    My application of the CIM team asked DBA to create new function and run it. Function must use the database link for remote database data. So I need to create a new database to their licensing link. Cause we guess we'll experience the performance issue after the user performs this function, or another question and errors may occur. So we want to know when and who use this feature that connects to a remote database through the new database connection in advance. And I also need to know when and which connect to the remote database using this new database link. We have no idea to get this information?  Can anyone recommend how do? Thank you very much.

    Best reqards, Otis.

    Check what business purpose, it will solve.  If the function is so safe, why everyone will use. Only admin people should access.

    All of these additional controls of this kind must be avoided as much as possible to improve the overall performance of the application.

    Still if you need, see the database audit mechanism, specifically designed for this type of activity.

    Kind regards

    Harman

  • My adobe will open and say "install updates" but it stops at 5% and told to try to connect to the server. It won't go past that. I tried to update through the view, but it still does the same thing.

    My adobe will open and say "install updates" but it stops at 5% and told to try to connect to the server. It won't go past that. I tried to update through the view, but it still does the same thing. I tried to reinstall, but it usually because of my other apps I have. How can I fix it?

    Hi crystal,

    Please see the following link for assistance on this issue;

    https://helpx.Adobe.com/creative-cloud/kb/download-update-errors.html

    Concerning

    Harsha

  • User passwords do not work at the level of the application after updating of the database

    Hello

    Working on the updating of the database user passwords do not work for front end users but the same passwords work at the db level.

    We backup before refresh and restraint after the update, but if the user tries to connect to db, they receive the error invalid password/username.

    but passwords are working at the level of the DB if reset us the password then it works fine, but we cannot do this for all users of all time. can someone share the knowledge or solution for this problem.

    DB version: 11.2.0.3

    operating system: AIX

    Thank you

    892574 wrote:

    Yes, the process is correct.

    We are capture passwords user via display SYS. USER$

    I didn't see any errors in the logs I see only out put modified user.

    Thank you

    Do you mean that you update the column SPARE4 of $ USER (which is a table, not a view)? I don't think it will work, because the password is salted with a random string that will be different in the two databases. It might work if you return to the use of passwords for 10g, which are salty with the user name. See here, the 10 GB hash stored in the PASSWORD column is the same in the two databases, but the 11g in SPARE4 hash is different:

    orclz >

    orclz > conn sys/oracle@orclz as sysdba

    Connected.

    orclz > create user fred identified by Ginger;

    Created by the user.

    orclz > select password, spare4 of user$ where name = 'FRED ';

    PASSWORD

    ------------------------------------------------------------------------------------------------------

    SPARE4

    ------------------------------------------------------------------------------------------------------

    9C592D45D54D1FB2

    S:DF5BEC6914DFF48B39261EAA4DCF5746A309E50E791F6F90FBF2F33A8CD5; H:22E34131E43CC3DF07440A0DC2A45F22

    orclz > conn sys/oracle@orcla as sysdba

    Connected.

    orcla > create user fred identified by Ginger;

    Created by the user.

    orcla > select password, spare4 of user$ where name = 'FRED ';

    PASSWORD

    ------------------------------------------------------------------------------------------------------

    SPARE4

    ------------------------------------------------------------------------------------------------------

    9C592D45D54D1FB2

    S:4FE5925E671719B9CA5904C42AAD965753CAC4891C31F1BA9B9DA83D3255; H:22E34131E43CC3DF07440A0DC2A45F22

    orcla >

  • a doubt on the database link

    Hi all

    I use 10.2.0.1.0 oracle.

    I had 2 databases named ( ora1, ora2 ).
    in fact, I have to connect to ora1 and to use tables, procedures exist in ora2.

    So, I've created database ora2 as database link:

    CREATE DATABASE LINK ora2_test
    CONNECT to ora1_user
    IDENTIFIED BY ora1_password
    Using of "ora1";

    Here is ora2_test name of the database link.

    Am I wrong?

    I am connected to ora1 as
    connect ora1_user/ora1_password@ora1;
    Select * from redg@ora2_test;

    but I get the error message.

    Any help please.
    Thank you

    Please post the answer as correct/useful.

    Asif kabir

  • At what stage of the treatment we use a rule to update to apply logic to the way the data are updated in the database?

    Hello

    At what stage of treatment do you use a rule to update to apply logic to the way the data are updated in the database?

    Rahul

    Hello Rahul,

    Update the existing record or a data object

    Thank you

    edynamic expert Eloqua

  • Planning level 11.1.2.1 in 11.1.2.3.5 - updating of the database is not updated every custom on some Member attributes

    Us are currently working on improving our environment to 11.1.2.1 11.1.2.3.5, but have you encountered a problem with one of our applications, and only on one of the cubes in the application. When we perform a refresh of the planning database, it initially stripped of some members of the attributes, custom and is now refusing (Finally, not directly) to update on that specific cube. The other cubes in the same application, I can see the custom attributes, update correctly.

    The cube itself is not locked on the side of essbase, prevents the updates and the updating of the database of planning indicates he managed. I spent reviewing the essbase application log and planning0 journal, noting none of which seems to indicate a problem with the refresh or out of the ordinary.

    I am able to edit the cube directly via EAS and on the updating of the database, the changes are deleted (if I add an attribute) or the Member is restored (if I remove the Member), but still, no custom attributes.

    It is unfortunately the case at some 700 members of 5,000 members in one of our dimensions and only in a cube so that a single application, but we hit an obstacle for what might be the cause. What is happening in the our QA Dev environments, but I expect that since one is one migration on the other. Step moved to production yet because this (among a few other things) continues our implementation.

    If anyone can lend a thought on what could be the cause or the paths to understand where we can't look to fix this? I definitely appreciate all the help that can be done.

    Thank you

    Jonathan

    A solution to the problem, but not sure about the cause. By deletng the cube that has problems and performing a database update subsequently, we are now able to see the cube with the appropriate attributes. It would seem that we had problems with our cube Essbase itself rather than on the side of planning.

    My suspicion is that it might have been caused by our Essbase upgrade are out of sync from the upgrade of planning during the updating of the original database after the start of the process to upgrade (11.1.2.3.5 for planning vs 11.1.2.3 for Essbase). While I am not sure of the cause, I am sure the solution so feeling good go ahead now.

    John - I appreciate all the help and insight along the way, as it has helped us reach this point of the solution.

    Thank you

    Jonathan

  • 6 Lightroom unbootable after an update... I reinstalled the software, but it still won't start? Updated through the creative cloud but still does not start?  What should do?

    6 Lightroom unbootable after an update... I reinstalled the software, but it still won't start? Updated through the creative cloud but still does not start?  What should do?

    My computer is a PC with Windows 10.
    Everything worked well before the Update Adobe Lightroom 6.
    The software was purchased in a shop (FNAC) with software to download map, it is saved in my account (Adobe) with its serial number. Why is this so difficult thing to reinstall Adobe software?


    I apologize for the inconvenience.

    Since it appears and disappears from the Task Manager, it seems that Lightroom crashes.

    We have seen this kind of problem on Windows 10 when Visual C++ Reditsributable 2012 update 4 is not installed correctly, it is necessary to run certain programs. You might have encountered until now Adobe programs that require it.

    Otherwise, there could be another cause of this accident and if C++ installation does not help, then you need to share the event viewer crash logs. See this article for in crash logs: Photoshop Elements Editor Help. How to find the crash logs on to Windows

  • What is the updating of the database?

    Hi all...

    Can someone tell me what exactly the average refresh databases in oracle?

    Thanks in advance...

    jgarry, you are quite right about that.

    An update of the database for a developer could mean just refresh the schema to use in the development database, but NOT patterns of the user.

    An update of the database to a tester could mean to update all application schemas, but certainly NOT the patterns of the user.

    An update of the database to a manager might mean updating the entire database of production, including patterns of the user.

    Most of the cases, an update of the database will probably only see the application schemas they use and not the user patterns.

    In these cases, the use of import and export is the most common method to make the update, although transportable tablespaces multiply for this purpose, but also of the flashback database for testing purposes (or even Real Application Testing - which uses flashbacks).

    In some cases, a test database will need to be completely refreshed with RMAN.

    I hope this helps.

  • Cannot answer your request because the updating of the database

    I created a user in Services shared and then assigned to a group. After that, I went to the workspace in the ahead mode to manage security filters, the user does not appear and when I try to "create" an existing user, an error appears:

    I do not turn any updating in the database and my EAS shows nothing. What could happen? It's Hyperion Planning 11.1.1.3

    Kind regards

    If an update of the planning is certainly not executed then maybe there is still a lock to indicate that an update is running, you can try to run the utility hspunlockapp - unlocking Applications

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • Using the database links in a process of page plsql

    I try to use a database link in a process of pl/sql page.

    It works fine when I use the link name in the plsql like this:

    BEGIN 
    SELECT  
    CARD_ID 
    into   
     :P12_HDR_CARD_NUMBER  
    from     [email protected]; 
    

    But the name of the link will come an element of page (P12_DBLINK) filled as follows:

    select db_link d, db_link r from user_db_links;  
    

    I tried the following and it doesn't work:

    DECLARE 
    l_link VARCHAR2(30); 
    BEGIN 
    l_link :=  :P12_DBLINK; 
    SELECT  
    CARD_ID 
    into   
     :P12_HDR_CARD_NUMBER  
    from     fusion.EXM_CC_COMPANY_ACCOUNTS@l_link; 
    

    It gives me:

    • ORA-04052: error occurred when searching to the top of the remote object MERGER. EXM_CC_COMPANY_ACCOUNTS@L_LINK. WORLD ORA-00604: error occurred at recursive SQL level 3 ORA-02019: description of the connection to the remote database not found

    I thought that perhaps the name of the link was joined with. WORLD automatically but already has the name of the link. WORLD at the end I tried stripping first but the error is the same.

    Is there some synatx for what will work? Can I use dynamic sql statements?

    Any suggestions are most appreciated.

    Thank you

    John

    Hi John,.

    see the following example to use the execute immediate for your purpose

    SQL - Variable for the name of the database link - Stack Overflow

    Let me know if that answers your query in the active thread

  • Updating of the database

    Hi gurus,

    (1) when we say the updating of the database, we need to remove the database and clone again with the last backups rman.

    (2) whereas cloning not set us the id of database also. If we do not then set what happens. in fact, what is the importance of id database parameter.

    Please, help me to be clear in this.

    Thank you very much...

    (1) RMAN is physical backup. So delete the database that should be cloned and generate the backups

    (2) there are several ways to clone, if using DUAL control, you should not use DBID.

    We might think of the connection string:

    target: the new database which is getting cloned
    Catalog: catalog database--> that stores all backups of your company

    RMAN target / catalogue /@.

    RMAN > set dbid ---> to retrieve the details of data source catalog database backup. RMAN backups in catalog
    database are identified by the DBID

  • Error for this user account details can only be updated through the site where it was created first

    I get this error will receive try to put in place a new email: "Details of the error for this user account can only be updated through the site where it was created first."  What should I do?

    My email is down.  If you respond by email please send it to [email protected]

    Thank you

    Rick

    All sorted

    Thank you very much for your help

    2014 12-15 10:04, Anshul.sharma wrote:

    ERROR FOR THIS USER ACCOUNT DETAILS CAN ONLY BE UPDATED THROUGH THE SITE WHERE IT WAS CREATED FIRST

    created by Anshul.sharma in going live (Emails, users, domains) - discover complete discussion

  • strange problem with the database link

    Hello world

    I have a strange problem with the link of database in Oracle 11 g Express Edition;
    There are two computers: computer-server and the client computer. Tnsnames.ora are the same on both computers IE.

    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = XE)
    )
    )

    I created the database link:

    Create database link zdalny
    Connect to < user_id > identified by < password >
    using "CT".

    Customer cannot connect with server when I do not use above the command. But when I change 'use' for using "krzysztof:1521" or by using "krzysztof" or "server IP:1521" - everything is ok.

    Why I ask. Because in all the materials that I read about Oracle command with the help of "CT" should work correct. But there is no. Do you know why?

    Thanks in advance and apologize me for my English.

    Rgds
    Krzysztof

    Here's the tnsnames of your server, but to connect to the oracle server db (any client or to another instance of db oracle), you must install oracle client.
    However, in your condition, you want to connect the DB1 Oracle OracleDB2 using a link db, I'm right? In this case you should always set the entry in the tnsnames.ora
    To verify that you can connect to Oracle DB2 from DB1 Oracle, you can use tnsping in the command line.
    In your case

    c:\tnsping CT
    

    Krzysztof Szymaniak wrote: CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )
    )

    Check your tnsnames entry in the machine, you are trying to connect to. And check if the tnsping is successful.
    Sometimes the error message says not everything, which means that you need to troubleshoot yourself and learn from the experience.
    Always in the opposite case, refer to the documentation.

    See you soon.

    Published by: Spongebob December 14, 2011 09:30

Maybe you are looking for

  • Satellite A100-991 - cannot boot from USB device

    My Satellite A100-991 (MS Windows XP MCE, SP3) does not start from a USB key or USB hard drive. The same USB devices are bootable if they are connected to a desktop computer or a laptop from other manufacturers. I put the USB as the first boot device

  • Satellite A200 (PSAECE) - How to find drivers?

    I have a Toshiba A200 PSAECE windows Vista OSI recently installed windows XP and now I need to install (I guess...) all the drivers for toshiba but now I can't connect to the internet. So I can not download the necessary drivers. How can I download a

  • Problem with graphics card

    Hello!. I have a problem with my laptop. So I know that when I bought my laptop it has an AMD HD 3450 graphics card but in dx diag, it shows that I hava a Mobile Intel (r) 4 Series Express Chipset Family and I don't know why. Could you please tell me

  • IPhone virus 6s...

    Hi I have the impression that my iPhone 6s is seen virus... Is this possible? As I mail, if there is an attachment, ters a few small file with it. Then you can help! Moreover, my camera does not sometimes...

  • I forgot to lock model reset x 3

    I have a 3 x in which I forgot my lock model. I am unable to find an option to reset. Could u please help me to do so.