Foxpro and Oracle
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Foxpro and Oracle

  1. #1
    Join Date
    Jun 2001
    Posts
    56

    Angry


    Hi All
    I wanna convert a database from Foxpro to Oracle,
    What Can I do bcoz Ican not know ABC of Foxpro.
    Please help me step by step.

    Please same answer send to mahmoodshaikh70@yahoo.com

    Thanx.

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    One thing is that create the basic table schema structures of foxpro in oracle and then export the foxpro to a flat file in some delimited form, then use the oracle sql loader utility to load those data into your newly created schema.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Aug 2000
    Posts
    462
    I think the syntax to create a text file from FoxPro is:

    copy table_name to file_name type sdf

    Oracle DBA and Developer

  4. #4
    Join Date
    Jun 2001
    Posts
    56

    Angry




    Thank you Sir
    If you dont mind I can write a detail and then answer me.

    1- create a table in Oracle user schema like structure of Foxpro table. (same columns and datatype and size)
    True/False
    2- How i can transfer data throw a sqlldr from foxpro to Oracle
    (You mean copy data from foxpro table to notepad and then
    trow sqlldr tranfer in oracle table)

    Please Reply me.
    mahmoodshaikh70@yahoo.com


  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Step1: Creating schema, with appropriate oracle datatype. For example: Say its a text field in FoxPro, your corresponding datatypes in oracle would be CHAR/VARCHAR/VARCHAR2. Similarly the others. DATE is date in oracle.

    Step2: The FoxPro would have some machanism to export the records into a text file. Talk to some foxpro dudes and find out how to export the records into a text file format. You don't have to cut and past any thing. The utility should be able to create a , or tab seperated files for you. Also check the method suggested by Kmesser.

    Step3: writer a sqlloader control file script to load the data file (text file exported from foxpro) into the user schema.

    Here is a link that would help you with the sqlloader concepts:
    http://www.oradoc.com/ora816/server....rt2.htm#435958

    Hope this would help you.
    Thanx
    Sam



    Life is a journey, not a destination!


  6. #6
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    I had worked with Foxpro many many years back and I vaguely remember that when you are looking at the table data in Foxpro there is a menu item for "Save result as" and I think there is an option for type "SQL" also.
    So if the tables are not very big, you can generate the SQLs directly from the Foxpro and use it to import into Oracle.

    Other option may be to Save As Text file (use some unique delimiter like "@" or "%") and then use SQL*Loader

    - Rajeev
    Rajeev Suri

  7. #7
    Join Date
    Dec 2000
    Posts
    40
    If you have foxpro on ur system, the following commands that gives u the complete syntax of command.

    set help on
    help copy

    U need to use the table first and copy the data to sdf format like

    use
    (if u have index also, use orde )
    copy to temp.txt sdf
    (will copy the data as a fixed length type text file, u need to use position clause while loading into oracle with SQL loader)
    copy to temp.txt sdf deli by ','
    (i am not sure whether by is required or not. try it.)

    any more questions pl. mail me to my personal mail id mshreddy@yahoo.com


  8. #8
    Join Date
    Dec 2000
    Posts
    40
    Hay, what happend to the commands. Ok, see the commands again

    use dbffilename
    or
    use dbffilename order indexname
    copy to temp.txt sdf
    or
    copy to temp.txt sdf deli by ','
    (insted of , any special character can be used)




  9. #9
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    This seems to be a pretty good discussion thread. So please keep discussing the migration in detail on this thread, instead of having to solve things through personal email contacts.

    I'm passing this comment upon considering the wide array of use. If things are discussed here in detail, then it could be used as a document for the folks who in the future would want to do such kind of migrations.

    So, please go ahead and keep this discussion going, instead of urging the folks to send mails to the personal contacts.

    Thanx for the cooperation and participation.

    Keep going

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  10. #10
    Join Date
    Jun 2001
    Posts
    56

    Bundle of Thanx.
    Mahmood.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width