Approaches to dblink

Hello

I have two database A and B and we have a db link.

I have a proc stored in database b say SP1 which accesses the database tables B and the values.

1st approach: I have a scenario where I have to call the stored procedure SP1 database A and get the value returned by SP1 and do some math database.

I just want to know how the procedure is performed. Is that SP1 is executed in database B and gets the value?

2nd approach: I can write the same logic as the SP1 does in the database a to access the underlying tables of the database B, using the dblink and perform the calculations.

This efficiency is wise

Thank you

Matt

Option 1 should be faster because he does all the operations in a database

concerning

Pravin

Tags: Database

Similar Questions

  • Bulk collect ForALL - error when insert via DBLink

    HY everybody,

    I have two databases 9i on two servers. DB1 and DB2.

    The DB1 is a DBLink in DB2.

    I insert values into a DB2 table with the values in the tables of db1.

    In proceedings of DB1, I have this code:

    DECLARE
    TYPE TEExtFinanceiro IS TABLE OF EExtFinanceiro@sigrhext%ROWTYPE INDEX OF PLS_INTEGER;
    eExtFinanceiroTab TEExtFinanceiro;
    Start

    ....

    IF eExtFinanceiroTab.count > 0 THEN

    FORALL vIndice IN eExtFinanceiroTab.First... eExtFinanceiroTab.Last
    INSERT INTO eExtFinanceiro@sigrhExt VALUES (vIndice) eExtFinanceiroTab;

    COMMIT;

    END IF;

    ...
    END;

    The fields in the eExtFinanceiro table are nullable.

    This command inserts the rows in the eExtFinanceiro table, but all lines are null.

    What could happen?
    Can someone help me, please?

    Thank you!

    Hello

    FORALL has a limitation, it does not work on a DBLink.
    Operations block (such as FORALL) are used to minimize the change between PL/SQL and SQL context engines.
    For remote database operations, there is no change of context SINCE each DB link must open is no new connection.
    In your scenario, it will be much better to use an approach to PULL rather than PUSH. This way you can get to use FORALL as well.

    As in:
    Having a procedure in DB2 (instead of having it in DB1). This way used inside FORALL DML will not have a DBLink

    I hope that helps!

    See you soon,.
    AA

  • Remote index not used with INSERT in the local table on dblink

    Hi all

    I don't know if anyone has come across this problem before, but for some reason any the remote index remains unused ONLY* in the insertion on the local database operation. Let me explain this pseudo-device code

    insert into LOCAL_TABLE
    Select / * + index_combine (alias_remote_tab IDX_LOG_DATE) * /.
    trunc (log_datetime),
    Count (*)
    of REMOTE_TABLE@DBLINK alias_remote_tab
    When trunc (log_datetime) = trunc(sysdate-1)
    Trunc Group (log_datetime);

    where:
    REMOTE_TABLE is a table partitioned on log_datetime (monthly)
    IDX_LOG_DATE is an index of bitmap of based on a valid function on log_datetime created in the trunc (log_datetime)
    local database: 10 gr 2
    remote database: 11 GR 1 material
    OS: windows (both)

    More funny thing is when I just run the select query independently on the only both local and remote, the index is used. I checked by printing the command explain for the select query plan. But when I prefix the query with the insert lose all hell breaks and local database plays the ignorance about the index. The command for the insert query explain plan has no mention of the index even when I explicitly place the index indicator in the select part of the query.

    If this should not be simple enough for ORACLE? Am I missing something here?

    Jonathan describes the details and the reasons for the behavior you see in following blog post http://jonathanlewis.wordpress.com/2008/12/05/distributed-dml/
    Your SELECTION is performed remotely (filtering and grouping) and sends only the (relatively) small results via dblink local database while the in an INSERTION, filtering only occurs at the remote and data site (relatively) important are sent via dblink to the local database, the consolidation takes place.
    You can give a try to the approach proposed by michaels2. If the approach from the view result grouping and filtering which will take place in the remote database, you will see improved performance.

    PS BTW, if the sql code that I suggested to check the plane, in my previous post using an index, then the cause of your performance issue is certainly not due to the index not used and is due to the amount of data transferred to dblink.

  • Approach of the album (several pieces) project?

    Hello. What is the right approach for the work of the album from?

    Let's say that I have several audio tracks for the album, most of the tracks have same basic settings/plugins/etc + automation. But they should sound compatible with each other and I really don't want to transfer settings every time that I change/tune something.

    BUT at this stage I do not see how to deal with it in a project in Logic Pro X. Things like lunch to several titles (battery, for example), bounce/export, freeze - work for the entire project, which means take a lot of time and disk space.

    Export of the stems of selection is also weird - they don't start from the same place.

    In Reaper I used before, there are regions. You can select a part of a project, mark it as a region and then free to accomplish within it. In addition, where the subprojects. You could do things separately and then only incorporate such what within any track.

    Just to be clear: work with this I expect to be easy and convenient to export a part, not all projects. But it seems logical is more oriented to the project as a song on the album.

    Not a pro engineer music yet, so I hope that there is something I missed it.

    Thanks in advance for the advice.

    Anyone?

  • Activity App account my approach when Apple Watch lock?

    Activity App account my approach when Apple Watch lock?

    For the best performance of app activity and other features, you may want to use these settings:

    -On your iPhone, in the application of Eve, go to: My Watch (tab) > General > detection of wrist - it lights up.

    -On your iPhone, in the application of Eve, go to: Watch My > password > code turn on (choose a password Simple or more complex).

    -Also on the password settings screen, select Unlock with iPhone.

    After putting on your wrist, your watch don't unlock then after whatever you do first: unlock your watch manually (by entering the access code) or unlock your iPhone.

    Then, it will remain unlocked (including when the screen is idle) until you remove it from your wrist. When you remove your watch, it locks automatically.

    More information:

    https://help.Apple.com/watch/#/apd748b87e2a

    Use the activity on your Apple Watch - Apple Support

  • Are the moderators censor now negative, though respectful and helpful messages approach 'quick release' of criticing Mozilla?

    Many of my posts have disappeared recently, off topics, despite not having any rude, profane content or unfounded.

    I've been vocal about disliking the "quick release" approach by Mozilla, because I believe that it is introducing bugs and problems faster that it's their fixation, but my messages were intended to be useful and recommend that people do back up their versions of FireFox than functional, as well as the request of Mozilla for back to basics , which means producing a great product with sensible edits.

    I wouldn't think that CENSORSHIP is now the approach of Mozilla, in these tips, for all who dare to criticize their policies to up-to-date.

    After all, I've been a long-time Firefox. The best way to lose supporters, however, is to CENSOR what they have to say.

    Does anyone else have this problem?

    Hi Ron,

    I deleted your messages in this thread for two reasons:

    • You are spreading misinformation.
    • You are hijacking other threads of people to evacuate your own questions, rather than helping.

    Call it censorship or other, we have an obligation to ensure that users receive correct information, and when you ignore the messages that correct you, I won't get into a game of "Add a correction each time Roncq messages. At least I'm not.

    If you have problems with moderation, please post in the contributors forum. Therefore, I'm locking this thread.

  • Motorcycle approach Glitch

    Hello everyone, since about 1 month I have my bike Z Force and so far I'm loving every second. However, I noticed that, after the last updated approach of motorcycle action is not working properly. Normally I would waive my hand above the screen and the screen stays on for about 5 seconds before I can see my notifications. Now I give up my hand on the screen and it lights up for about 1/4 second or even less, then off, blink and you missed. I noticed this problem just after the update in August, and the thing is that I also bought my mother a force z of bike and the same thing happens on his device. I already did the following:

    Power is turned off/on

    Safe mode

    Erase the data on the App motorcycle

    Clear the Cache on the device

    Reconfigure the settings of the motorcycle

    I have not tried a factory reset data yet.

    Anyone having the same issue here? I use a case on two phones and a protective glass zagg for viewing on both devices and they worked very well from the first day until the last update. All information will be appreciate as to how I can solve this problem.

    Thanks in advance

    The problem is in developer mode. Go into that and change the animation setting. I got mine off and he did the same thing. Change a.5 or at 1 x and it should work again. Let me know if it works.

  • Approach of Apple on a MacBook replacement?

    I went to *, then again, then back to *.

    So, I have 2012/2013 retina MacBook Pro 13 "512 GB.

    I got a mac more, prior to that, the man that mac has been incredible. No problems, no not to bother with AppleCare. This new mac I have now seems to be a load of crap. I bought it in December 2013, and my first problem occurred around April / May in 2014. My mac has been so slow, so I went to my nearest authorized Mac people, and they told me it was the logic board - they fixed. Everything was fine, then some of my keys stopped working. Although it was not a major problem, I had to wait a week for a part then so it can be fixed. Last year, my mac went berzerks - I lost all my files, proved to be only a matter of 'software '. After that, though, my mac has never seemed quite the same thing and it is not fast. Then now brings us to December, where my mac randomly stopped working, it keeps freezing! So I'm smart enough to know that it is the display of graphics.

    I called apple, and I'm like, dude... I need a replacement! This will be the third repair in the last 2 years. Anyway, so they tell me that I should go to the people at my authorized provider of Apple stuff, because that's where I bought and ask them for a replacement. So I did it, I told them what happened and they look like Oh yes, you should contact apple on this topic, not us. Let's put it in a diagnosis so that you can definitely know it's a hardware problem (I'm smart enough to know that it is not). So I put on my best "I agree, I don't cry face" because they say it will take up to three days for a diagnosis only. So I called apple and I thought, what's the deal? Anyway, so they must seek approval from Apple but they are the ones who make restitution.

    So, how can I do this? Should I just continue with a repair or make a replacement? Like how I approach this store? I'm obviously not to go will they ring me and tell me that it's a hardware failure, so do I just ask them if they make replacements?

    BTW, I did all restoration software and I deleted and installed two times, Apple diagnostic 4 times so if it's a software issue its quite undetectable.

  • Best approach for the design of the Radial Image - sector scanning Sonar

    This is not a problem, but you are asked to think about the best approach.

    I need a sector sonar image data.  This device runs on 360 (degree sub-segments) and generates a set of data from the origin - radially outwards at an angle of no - to an endpoint.  Therefore, for each 'ping' sonar I need data points in the center of a circle graph, a radial angle on the outside.

    I don't know if I should use LabView vi for the drawing tools, or go to ActiveX or?

    Anyone has a suggestion on the best approach to this?

    Thank you
    Peter

    Peter,

    You can use a chart of the LabVIEW intensities for this kind of display.

    Maybe not the best way, but it is possible.

    As an attachment, I did an example with your specifications.

    datapoints 1024 by degree

    See example image:

    Basic principle:

    -Create the matrix of 2048 x 2048 points database

    -For each 'line of angle' calculate which pixel to replace each data point in the line

    -Because "datapoints" becoming bigger, far from the Center, repeat the action for several "sup angles. for example, to 85 deg also Calc. 84.6, 84.8, 85, 85.2 85.4

    It gives you an idea of the possibilities, but performance may be necessary.

    -Only external Calc x pixels more degrees

    -Do some kind of anti-aliasing to avoid the pixelated lines.

    See attached example. (LV 8.6)

  • What is the best approach for a same code used for 16 test stations

    I write code for 16 testbeds that are all the same, except that different circuits CAN are used, i.e. CAN0 through CAN15. The approach that I plan to use is 16 screws, one for each test station executes independently and in parallel, meaning that they can be stopped and started at different times. Each of the 16 screws have about 10 complex subVIs that are all the same. Even if I do not use uninitialized shift registers, I wonder if there is no advantage to using a reentrant approach, or even if it works for my application. Any suggestions are appreciated as I have no experience using the reentrant approach.

    Thank you.

    First of all, you should get used to use projects. They are very useful. If the code is in a project, you can open the VI from there.

  • Cluster to C formatting style struct (Named pipes (Windows), OpenG implementation), best/correct approach?

    Greetings,

    I'm trying to send commands to 3rd party software, through pipes (Windows). The 3rd party software implements channels appointed for me this approach should be used. The 3rd party software returned data me through a separate set of named pipes. The pipe command accepts the following structure as input:

    typedef struct _pipe_CMD

    {

    WORD wCMD

    BYTE, Byte [2]

    } PIPE_CMD;

    An example of command shows the following values:

    wCMD = PIPE_CMD_EXAMPLE

    bYte [0] = 0 x 0001

    bYte [1] = 0

    Similarly, the exit pipe returns the following structure:

    typedef struct _PIPE_OUT_PUT

    {

    Double x

    Double y

    Double z

    } PIPE_OUT_PUT

    Question:

    What is the way to better/correct to imitate the structure of the typedef above in/to leave LabVIEW? Note that the channel named (OpenG application) for Windows takes string input (and similarly returns a string output).

    In the below attempts, I use a named pipe created by LabVIEW to test what can be read as I wrote my order for the named pipe. At this point, I was not able to get the 3 rd party software to respond to one of these commands, so I set the channel control named and listen to the output of the channel named, but I can type a channel named, successfully providing information (read only) house-keeping.

    Try 1: cast

    See Screenie 1. I threw each of the values in a string and it concatenate to send through named pipe. One of the problems here is that, in my view, type casting 0 creates a NULL character, who does not intend. The other problem is that I can not actually the 3rd party software to recognize that I sent an order!

    Attempt 2: Flatten the cluster chain

    Screenie see 2: I create a cluster and flatten it into a string to be sent by the named pipe. Here a number of characters represented is apparent in the output. Again, I fear that these are not representative of what I'm trying to send (wCmd and bYte [2]). Yet once, none charged with receipt of the 3rd party software that I sent an order.

    Thoughts:

    Should I change the channel named call library function node to accept clusters/structs to send what I want? This will break something else down the line? My "gibberish" (Screenie 3) return attempt, but same "gibberish" regardless of whether I used method 1 or 2 above, indicating that maybe I don't know how to read what is returned? (Could say "fool you, stop this")

    Thank you very much in advance for all your comments!

    Nicolai

    If your named pipes pass binary data - and it seems that they are - so don't expect to get an ASCII string. You will also need to send binary data. The wCMD is setting a WORD (2 bytes, or 16 bits) - so why do you send 15 bytes (PIPE_CMD_EXAMPLE length)? Moreover, since the data is an array of 2 elements of fixed size, it would be preferable to use a 2-element cluster for byte element, and not a picture of LabVIEW. Who's going to flatten properly, while a painting may not (depending on whether you set the flag to prepend to the size of the array). For data read back, you will need to unflatten it in a cluster of 3 values double precision, and it is possible that you will need to reverse the order of each element byte to get the correct values.

  • OK, another window 7 HotSync approach for legacy T3

    I read a lot of threads on this forum, but simply could not find a solution that corresponds to my case. I tried an apparently plausible approach, but don't have enough to work. I wonder if the gurus out there can give me a pointer or two.

    I have a T3, I can only use up to Desktop 4.1.4 not something higher. If some of the workarounds would not work for me.

    My new laptop is a Windows 7 Home Premium, but it of a good deal and does not have bluetooth or infrared port to speak of. Once again, an another roadblock for me.

    While I was thinking, how about a network HotSync via my old Windows XP which has the network connection to my new Windows 7 laptop?  In other words, T3-> USB-> Window XP PC-> for Windows 7 laptop.   I HotSync would be on network in the past before, so I think I knew what I had to do.

    BUT the ONLY problem I have is, how to create a USER in the first place on the Notepad of Windows 7 for hotSync launched across the network knows how to 'home' to the main computer?    In the past, I had to hotSync on the main computer to create the user before I can hotSync over network.

    Any idea?

    Ramon, thanks to again raise this matter.

    Reb1, thanks for letting me know the availability of the 64-bit driver!

    Here is the link for the 3rd new 64-bit driver that works for my T3 on Windows 7 on USB:

    http://forums.Palm.com/T5/Windows-HotSync/64-bit-Palm-Desktop-drivers-are-here/m-p/337516#M58035

    1. I installed the Palm Desktop 4.1.4 on my Windows 7.

    2 when you are prompted to HotSync at the end of the installation, I plugged in with the PDA cradle and press the HotSync button.

    3. I heard the beep signifying the USB device has attempted to commit, but nothing showed on the screen.

    4. I then followed the outlines the steps in the link above, and everything worked as described!

    OK, for completeness, here are the steps I took to step 4 above:

    4.1 I downloaded and extracted the driver 64 bit Aceeca site through the link provided in the thread above.

    4.2 I opened Device Driver and found "Palm device" with a yellow warning icon.

    4.3 I right click on it and select "Update driver".

    4.4 I navigate to the folder where I extracted the drivers

    4.5 after the driver has been installed successfully, I HotSync would once again and voila!

  • What is the best approach to the conversion of the LV7.1 tags to the variables shared by several screws LV2012?

    What is the best approach for the upgrade of the DSC-LV2012/LV7.1/DSC static variable tags in several screws running on several platforms? Our system is made up of about 5 PC running Windows 2000/LV7.1 DURATION, the more a PLC and a PDC running XP/SP3/LV2012. About 3 PC publish information from the sensor through tags on the local network to the PDC. Only the main command is currently being upgraded. Basic questions:

    1. the other computers running RTÉ 7.1 (with labels) will be able to communicate with the PDC running 2012 (shared variables)?

    2. is it necessary for conversion of tags shared variables, or the deprecated legacy tag screws of LV7.1 work in LV2012?

    3 all of the main controllers will be screw must be integrated in a project in order to use shared variables?

    4 is the only way to do it is to find all the tags and replace them with elements of shared variable?

    Thank you in advance with all the information and advice!

    lb

    Hello lb.

    Datasockets are the common middle only my knowledge between versions, so apart from the upgrade to the same version, they will probably be your best bet.

  • Change the limit storage to the SharePoint Web approaching site

    Is there a way to SP 2010 change the default e-mail notifications sent from SharePoint? For example, when a SP site approaches its storage limit, the default notification remains below:

    You receive this message because you are an administrator on the SharePoint Web site, which has exceeded the level of warning for storage: https://yoursite.com/office. To find out how much storage is being absorbed by this site, go to the use of site collections view summary: https://yoursite.com/office/_layouts/Usage.aspx

    Is there a way that this text can be changed without configuring a trigger to send a second and separate total e-mail?

    Thank you!

    For any question about SharePoint 2010, please visit http://social.technet.microsoft.com/Forums/en-US/category/sharepoint2010. It is not a forum for answers of MS, and this Feedback forum is not intended for technical questions, but only for comments on the forums for answers.

  • My approach to local variables...

    I want to hear comments on this approach.

    I create a relatively large program, and I want to use offscreen indicators / controls as "local variables".

    I think having that in a cluster - typedef, called "local variables", which I can then fitting differnet of VI and it cleans up the code a bit (but adds above makes it less clear what is happening).

    You guys/girls think this approach?


Maybe you are looking for