How should I do??

In my program I have to do a part which I first need to export the data from some tables, which is located from 1 server, then import again, which is into another server.
If its only for inserting the data I should have no problem. But now, I need to cater for both inserting new data and updating existing data. So, to do update I need to find the primary keys for each table then find a way to run the update statement. I am using oracle 8.1.7.
So here's my problem, How can I get the primary key from oracle?? I've tried searching around the database but can't find the table that stores all the primary key records. Besides, can I try to get the primary key from java without making a text file of primary keys manually??
On the other hand, I have no experience of doing such program to import & export, so I kindly ask the experts here how do you usually carry out such process??
Thanks.

If this is professional work, you should look at the Oracle utility programs "exp" and "imp" (or "expdp" and "impdp", if you are using Oracle 10g); they're always going to be faster than practically anything you can write yourself. They're documented in the "Utilities" book for your version of the database, which is online.
Start with http://www.oracle.com/technology/documentation/index.html
Select your version of the databse. Click on "View Library".
Get the list of books. Select the Utilities book.
There are also a large number of Oracle technolgies for moving data between databases: Oracle Streams, Data Guard/standby database, materialized views, database links, log miner, etc. All of these are documented/explained in the documentation on Oracle's site (and have nothing to do with Java/JDBC).
If you have to do it in Java, you can get all sorts of information about the databse using the DatabaseMetaData class. Oracle databases also have a set of system-maintained views which have all the information about the data dictionary that is available; these have names which begin with ALL_ and USER_, such as ALL_TABLES and USER_CONSTRAINTS. You can get a list of them with:
SELECT view_name FROM all_views where view_name like ('USER_%') order by 1;
There are also explanations of most of the useful ones on the web; use Google.
Good luck.

Similar Messages

  • Hi, I have a macbook pro 10.6.8 and an iphone 4s. I have already created an icloud account. I want my normal mails to be saved on icloud. how should i go about?

    Hi, I have a macbook pro 10.6.8 and an iphone 4s. I have already created an icloud account. I want my normal mails to be saved on icloud. how should i go about?

    I'm not sure I understand your question really, but one thing for sure is that you need Lion for iCloud to work.

  • I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    You should be able to just place them in your Books library in iTunes and check to ensure that your Book library is configured to sync to your iPod when you sync your iPod to iTunes.

  • How should I set GPG to use with KMail or even rather Thunderbird?

    In the last 3 hours I tried to set Thunderbird (Enigmail) and KMail to use my GPG key. I failed.
    I made the keypairs with Kgpg, installed enigmail, restarted the Thunderbird, set everything, but TB didn't asked for password, only gave an error message that it can't use gpg in batch mode and the password is wrong:
    gpg parancssor és kimenet:
    /usr/bin/gpg
    gpg: Probléma van az ügynökkel. Letiltom a használatát.
    gpg: can't query passphrase in batch mode
    gpg: Érvénytelen jelszó. Próbálja újra...
    gpg: can't query passphrase in batch mode
    gpg: Érvénytelen jelszó. Próbálja újra...
    gpg: can't query passphrase in batch mode
    gpg: skipped "<my e-mail>": rossz jelszó
    gpg: [stdin]: sign+encrypt failed: rossz jelszó - its in Hungarian, it says: Problem with the agent. Disabling use. Wrong password. Try again.
    I read a lot and all I found is that I have to disable the use of gpg-agent in Enigmail's settings, but it was alredy disabled, despite I got this message:
    "Your system uses gpg-agent or a similar tool for passphrase handling (gpg-agent is mandatory if GnuPG v2.0 or later is used). Since caching of passphrases is handled by gpg-agent, the respective timeout settings in OpenPGP are disregarded. In order to change passphrase caching options, please configure your gpg-agent tool."
    After many pages I gave up, it seems it cannot be solved.
    So I tried KMail. But KMail didn't ask password, too. Google, searching. I found that I should install pinentry-qt. Well, pinentry is already installed and I have pinentry, pinentry-qt and pinentry-qt4, too. So I searched for another solution. Then I found that I should use gpg-agent (I used it already according to Thunderbird) and I have to write use-agent to .gnupg/gpg.conf. It was already there. Then I found that I have to make a file, .gnupg/gpg-agent.conf whit this content:
    pinentry-program /usr/bin/pinentry-qt4
    no-grab
    default-cache-ttl 1800
    So I made it. After this I add the eval "$(gpg-agent --daemon)" to my .xinitrc, as it was written in many posts. I logged out and in. Still no luck.
    The gpg-agent in terminal says:
    gpg-agent: gpg-agent running and available
    I tried a test I found on forums: echo "test" | gpg -ase -r 0xDEADBEEF | gpg. It says:
    1024-bit RSA key, ID CFF2728D, created 2011-05-17 (main key ID CD35B00C)
    gpg: problem with the agent -disabling agent use.
    Then it asks the passphrase. I type it in, but then a message appears that I didn't have any public key.
    I tried to disable gpg-agent, but didn't helped. Thunderbird said:
    "can't connect to `/tmp/gpg-y2XPqU/S.gpg-agent': Kapcsolat elutasítva
    gpg: Nem tudok kapcsolódni "/tmp/gpg-y2XPqU/S.gpg-agent" objektumhoz: connect failed" - connection refused. Can't connect to /tmp... object.
    KMail simply says bad passphrase.
    So. How can I use GPG? What should I do, how should I start? Is it possible at all? I just wanted to sign and encrypt e-mails. It seemed very easy.
    ps.: all the installed softwares are up to dated. And sorry about the mistakes in my English, if any!

    Hi Melfour-
    Here is a Support article detailing how to work with your Firefox PDF preferences:
    [[Opening PDF files within Firefox]]
    Hope that helps.

  • How should I reformat my external hard drive?

    I have just purchased a new 21.5" iMac and I will be moving from PC to iMac. I currently have a 2.5TB external hard drive which I have connected to my PC laptop that I use to store and watch movies. My question is how should I format/partition my external hard drive so that I can use it with my new iMac? The external hard drive will solely be used with my new iMac (it won't be connected/used with my laptop again) and I am ok with losing the data on the external hard drive as I have backed up the data currently on it onto another hard drive. I have tried to research what format to use but I am a little confused as to which one is the best and I am looking for some advice.

    Mac OS Extended (Journaled).
    (73546)

  • I want to use one apple id in my macbook and iPad but i don't want pics to get sync and show in both devices, how should i stop this ?

    I want to use one apple id in my macbook and iPad but i don't want pics to get sync and show in both devices, how should i stop this ?

    Turn off My PhotoStream in iCloud on both the iPad and the Mac. PhotoStream is what shares your photos (unless you are using iCloud Photo Library Beta, in which case, all photos uploaded are accessible from all devices signed onto the same Apple/iCloud ID).
    Cheers,
    GB

  • I accidentally dropped macbook air that was in a book bag. The keyboard is working because I can see the light but the screen is black and it won't turn off. How should I fix this? Please Help ME!!

    I accidentally dropped my friend's macbook air that was in a book bag. The keyboard is working because I can see the light but the screen is black and it won't turn off. How should I fix this? Please Help ME!!
    I tried to turn it off and it didn't work... and I held on to the shift key too and it still doesn't work..
    Please help me..

    Accidental damage is not covered under Apple warranty.  And it seems there is much accidental damage.  Only a Genius Bar tech looking at it can tell how much it will cost to repair.
    Cost to repair will be high, I suspect (though Genius Bar will confirm/deny.
    There is no gentle way to say this sir/ma'am ... someone will need to pay for your friend's MBA repairs.

  • Due to virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if do the same then the data on my ipod touch will be erased....how should i protect my ipod touch data?

    due to the virus attack i had to format my windows laptop...now when i installed new itunes software i had to sync my ipod touch again but it says that if i do it then the data present on my ipod touch will be erased as it is syncd to some older library... how should i protect my ipod touch data?

    With all you media (apps, music) in the iTunes library connect the iPod to the computer and make a backup. Do that by right clicking on the iPod under Devices in iTunes and select Back Up. Then restore the iPod from that backup.
    Note the the iPod backup that iTunes makes does not included synced media like apps and music.

  • I have a mac pro g4 when i load a cd or dvd there is no start up noise from drive and icon will not show on desktop or in itunes. How should i troubleshoot? pioneer 105 mirror door

    I have a mac pro g4 when i load a cd or dvd there is no start up noise from drive and icon will not show on desktop or in itunes. How should i troubleshoot? pioneer 105 mirror door

    PIONEER DVD-RW  DVR-105:
      Firmware Revision:          A506
      Interconnect:          ATAPI
      Burn Support:          Yes (Apple Shipping Drive)
      Cache:          2000 KB
      Reads DVD:          Yes
      CD-Write:          -R, -RW
      DVD-Write:          -R, -RW
      Write Strategies:          CD-TAO, CD-SAO, CD-Raw, DVD-DAO
      Media:          Insert media and refresh to show available burn speeds
    yes its a power mac thanks its been a long month and Merry Christmas thanks for checking my question im hoping its a driver problem but not liking some other stuff looking like replace drive

  • Importation ;I just started with lightroom 5,6 (french)-I 'd like to import with creation of a second copy apart of the catalog but impossible to activate this option.How should I do to activate this option?

    Importation ;I just started with lightroom 5,6 (french)-I 'd like to import with creation of a second copy apart of the catalog but impossible to activate this option.How should I do to activate this option?

    Importation ;I just started with lightroom 5,6 (french)-I 'd like to import with creation of a second copy apart of the catalog but impossible to activate this option.How should I do to activate this option?

  • Old Macbook to New Macbook Air Transfer but new Macbook Air has less Storage Space. I only want to keep all iTunes and iPhoto Files. I can keep the rest on an External HD. How should I do this?

    Bought a New Macbook Air and wanting to transfer only iTunes and iPhoto stuff to the new Macbook Air. How should I do this? Ive got and External HD acting as Time Machine but the Data on there is 143G worth and the New Macbook Air is a 128G HD. So i dont need all the extra Documents but want to keep them on the External HD which has been Partitioned.
    Question is - How do I transfer the iTunes and iPhoto info into the New Macbook air and keep all its settings ect and also keep the Docs ect in the HD? Time Machine wont work as there is too much info for the New Macbook Air.
    What should I do?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

  • I would like to be able to optimize my cc installation.  I am using a ssd card as my primary hard drive on a windows 8.1 machine with 32 gigs of memory.  I have additional spinner hard drives in this machine.  Everything is SATA 2 or 3.  How should I inst

    I would like to be able to optimize my cc installation.  I am using a 500 GB ssd card as my primary hard drive on a windows 8.1 machine with 32 gigs of memory.  I have additional spinner hard drives in this machine.  Everything is SATA 2 or 3.  How should I install the product to best utilize my hardware assets (Program Installation Drive; Scratch Drive; Temporary storage drive etc.).

    Barcode1 I would recommend you install the Adobe Creative applications included with your membership to your Primary hard drive which contains your operating system.  For questions on how to optimize specific settings such as scratch disks I would recommend posting in the relevant point product forum.  You can find a list of available forums at https://forums.adobe.com/welcome.

  • I download my illustrator as Chinese edition, I want to change it back to English, how should I do that?

    I download my illustrator as Chinese edition, I want to change it back to English, how should I do that?
    My computer is MAC, do I need to download any extra things to fix it?

    Depends on the version:
    Adjust the install language | CCM

  • I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    Jonas,
    I think what you want is a 3D plot of a cylinder. I have attached an example using a parametric 3D plot.
    You will probably want to duplicate the points for the first theta value to close the cylinder. I'm not sure what properties of the graph can be manipulated to make it easier to see.
    Bruce
    Bruce Ammons
    Ammons Engineering
    Attachments:
    Cylinder_Plot_3D.vi ‏76 KB

  • I want to use my iphone for wi-fi connection, without calls or texts or having a carrier for a period of time. How should I do it??

    I want to use my iphone to connect to wi-fi without calls or texts and without a carrier. How should I do that??

    Turn on airplane mode, turn wifi back on.

  • After updating to Firefox 9.0.1 on Mac OSX 10.6.8, Trusteer Rapport for banking has gone. I have reinstalled Rapport but is still missing. How should I do?

    Hello. When I was on the internet with previous Firefox, there was Trusteer Rapport (A seurity software for UK banking: http://www.trusteer.com/) icon was still there. However after Firefox gave me an update alart to be 9.0.1 on Mac OSX 10.6.8 today and after I followed the update in this early evening, Trusteer Rapport is gone. I have re-installed the latest Trusteer Rapport and re-launched Firefox for several times, however, it is still missing. The Trusteer Rapport is a required security software to log in to the secure banking websites such as RBS, NatWest and HSBC (UK) etc and also it validates web security for Paypal and eBay by the Trusteer Rapport icon on Firefox, therefore I require. How should I do? I have none of other additional add-on/plug-in installed, because previous Firefox has crashed by a conflict of Trusteer Rapport and Nectar Yahoo Toolbar before. If it was a bug, please fix it asap please. Thank you.

    Thank you for your sincere help John.
    Yes it works again now after; I uninstalled Raport by Rapport utility, cleaned Rapport folders in system, re-installed the latest Rapport, activated at system preference, re-stated computer and then re-launched Firefox 9.0.1!
    Thank you again for your help, now it is solved .#)

Maybe you are looking for

  • Sony Bravia KDL 32XBR6 BluRay settings

    Hey guys, ive had this tv for quite a while now  Sony Bravia KDL 32XBR6 i just got myself a PS3 for the BluRay player, im trying to set it up for the best HD image so i found this video http://www.youtube.com/watch?v=3ngvnnMPbDg and used the same set

  • Has Apple blocked VLC from DVD playback?

    My Spec: Version 10.5.3 || Model Identifier: MacBookPro3,1 || MATSHITA DVD-R UJ-85J: || Firmware Revision: FBZ8 Back history: I have a mac book pro, while ago. I work with film/ adverts etc - I'm very perticular about ratio/ deinterlacing/ overall qu

  • Ack Requirement

    Hi All, I have two scenarios. 1. IDOC to File 2.File to IDOC. My requirement is to get the acknowledgement in both the cases. 1. Scenario (IDOC to File) – I have ALEAUD message type for Source and user defined message type for target. 2. Scenario (Fi

  • Can anyone help with a good system maintenance tool for ML

    Does any one have any suggestions for a good dependable all-in-one system maintenance tool for ML and is it straight forward and easy to use? Thanks in advance .....

  • Full hard drive panic

    I have PB 15" 1Ghz, Power PC G4, 1GB RAM, mac 10.5.6, 60 GB drive. I have run out of space. I want to update ILife 09. I do use Itunes with a lot of music and have a lot of photos but no space left. I have 55 of 60 GB in use. I took unit into Apple s