Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Sep 2003
    Posts
    9

    Unanswered: Moving databse from Unix to NT

    Hi there,
    I am a complete newbie to Oracle so if my question sounds dumb or the answer is obvious please don't mind.
    I need to move an Oracle 7.32 db from SCO Unix to NT. What I did is:
    export on the Unix machine, which went ok. copied the dump over to NT, where the instance was created with the same SID. edited tnsnames.ora on the nt machine to point to itself. now when I try to import the dump, naturally, I get errors like "could not create directory" as the dump still contains the datafile paths from the unix machine.

    The dump cannot be edited, it seems to be CRC'd or whatever.

    How can I work around this without leaving the original database on the Unix machine in an unuseable state? I want to drop the database on the Unix box once the version on NT runs, but not before.

    ANY input is greatly appreciated, thanks in advance.
    Abel.

  2. #2
    Join Date
    Aug 2003
    Posts
    41
    Hi,

    Have you taken a user export or a full database export? A user export exports only the objects (tables,views etc.) owned by the user. You should not have any directory issues.

    Export the user you want to migrate from your unix box. Create a user with the same name in your NT and import the dump.

    btw, did you install Oracle and created a database in your NT machine?

    Sunil.
    Last edited by sunilthomas98; 09-26-03 at 05:09.

  3. #3
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    311
    Hi,

    the best way to do, is to create a database on NT usin the same names for tablespaces, datafiles, redolog files, etc as the database on unix. Then create the datadictionary using the provided scripts, and then export specific users (not users like sys, system, wmsys etc) and import them in to the new NT database.
    It is some work but it is the safest way to avoid errors of any kind. Also, you will be able to manage the objects better.

    Hope this helps
    Edwin van Hattem
    OCP DBA / System analyst

  4. #4
    Join Date
    Sep 2003
    Posts
    9
    Originally posted by sunilthomas98
    Hi,

    Have you taken a user export or a full database export? A user export exports only the objects (tables,views etc.) owned by the user. You should not have any directory issues.

    Export the user you want to migrate from your unix box. Create a user with the same name in your NT and import the dump.

    btw, did you install Oracle and created a database in your NT machine?

    Sunil.
    Thanks for your reply. I did a FULL=YES export under the system account.
    Surely I created the database on the NT box before trying to import. I looked into the dump with an editor and saw that the datafile paths from the Unix box are in there. Then, when I do "imp73 system/manager@xy" on the NT box it starts importing, but runs into errors right from the beginning where it tries to create the datafiles under /home/user/oracle..... which is hardly possible on a Windoze box.

  5. #5
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    I think if you create the tablespaces manually then you could do a full import using ignore=Y if I remember correctly.

    Alan

  6. #6
    Join Date
    Sep 2003
    Posts
    9
    Originally posted by AlanP
    I think if you create the tablespaces manually then you could do a full import using ignore=Y if I remember correctly.

    Alan
    Thanks for the idea, but I tried that one time - created the instance adn tablespaces, tried to import with "ignore errors due to object existance=yes" and it still tried to create the datafiles before importing anything. Although the datafiles existed on the Windoze machine, they - naturally - were in a different directory and imp73 simply ignored them, instead trying to create new ones under the Unix paths that were stated in the dump.
    I'm out of clues...

  7. #7
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    OK if that doesnt work use either awk or sed on UNIX to replace your paths in the dmp file with the new paths your going to use in windows. Not fun but it does work.

    Alan

  8. #8
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    Textpad on windows MIGHT be able to edit the dmp files aswell.

    Alan

  9. #9
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198
    Originally posted by abel7777
    Thanks for the idea, but I tried that one time - created the instance adn tablespaces, tried to import with "ignore errors due to object existance=yes" and it still tried to create the datafiles before importing anything. Although the datafiles existed on the Windoze machine, they - naturally - were in a different directory and imp73 simply ignored them, instead trying to create new ones under the Unix paths that were stated in the dump.
    I'm out of clues...
    I'm going to ask the dumb question....
    Imp73? Are you keeping the database as Oracle V7.3?

    Is the new database 8i or 9i? If the new db is 8.0 then the import is imp80. If 8i or 9i then just imp.

    Why not upgrade to Ora9i? or at least Ora8i?

    Just my thoughts.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  10. #10
    Join Date
    Sep 2003
    Posts
    9
    Originally posted by jimpen
    I'm going to ask the dumb question....
    Imp73? Are you keeping the database as Oracle V7.3?

    Is the new database 8i or 9i? If the new db is 8.0 then the import is imp80. If 8i or 9i then just imp.

    Why not upgrade to Ora9i? or at least Ora8i?

    Just my thoughts.
    Basically, you are right. Yes, naturally, the destination database is 7.32 also. I can't go to 8 or 9 because of customer requirements. So I have to stick with 7.32 which, considering the database design, size and user number, is perfectly alright.

    Thanks anyway.
    Abel.

  11. #11
    Join Date
    Sep 2003
    Posts
    9
    Originally posted by AlanP
    OK if that doesnt work use either awk or sed on UNIX to replace your paths in the dmp file with the new paths your going to use in windows. Not fun but it does work.

    Alan
    Alan, thank you. Are you sure awk or sed will overcome the CRC in the dump file? My windows hex editor doesn't. Whenever I edited the dump imp won't accept it any more.

  12. #12
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    311
    hi,

    don't edit the dump. In most cases it gets corrupted.
    After creating the dmp file on Unix, be sure to FTP it to Windows for conversion reasons. This might be a problem.

    When importing and still getting the errors on tablespaces, arethe rows imported well ? IMport give warnings no errors, so it might be that it cannot create the datafiles, but since they are available, all rows and db objects might be imported well.
    Be sure to use the logfile parameter to check out later if the only warnings given are about the datafiles.

    If you still get the warnings and are not sure about it, post the logfile here.

    Hope this helps.
    Edwin van Hattem
    OCP DBA / System analyst

  13. #13
    Join Date
    Sep 2003
    Posts
    9
    Originally posted by evanhattem
    hi,

    don't edit the dump. In most cases it gets corrupted.
    After creating the dmp file on Unix, be sure to FTP it to Windows for conversion reasons. This might be a problem.

    When importing and still getting the errors on tablespaces, arethe rows imported well ? IMport give warnings no errors, so it might be that it cannot create the datafiles, but since they are available, all rows and db objects might be imported well.
    Be sure to use the logfile parameter to check out later if the only warnings given are about the datafiles.

    If you still get the warnings and are not sure about it, post the logfile here.

    Hope this helps.
    Thanks Edwin,

    no, the datafiles on the Windoze machine remain untouched, the import runs and ends with "unsuccessfully". Not a byte of data is imported.

    The dump has been copied to Windows via SMB (Samba) and is fine. Would it be corrupted, the CNC would also be broken and imp would reject it. I need a way to either edit the dump or give new datafile paths to imp via a parameter fiel but don't know how to do this.

  14. #14
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198
    Originally posted by abel7777
    Thanks Edwin,

    no, the datafiles on the Windoze machine remain untouched, the import runs and ends with "unsuccessfully". Not a byte of data is imported.

    The dump has been copied to Windows via SMB (Samba) and is fine. Would it be corrupted, the CNC would also be broken and imp would reject it. I need a way to either edit the dump or give new datafile paths to imp via a parameter fiel but don't know how to do this.
    A note in metalink said something about FTP using binary as opposed to ascii to copy the files over.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  15. #15
    Join Date
    May 2003
    Location
    Edmonton Alberta Canada
    Posts
    41

    Hi,

    the best way to do, is to create a database on NT usin the same names for tablespaces, datafiles, redolog files, etc as the database on unix. Then create the datadictionary using the provided scripts, and then export specific users (not users like sys, system, wmsys etc) and import them in to the new NT database.
    It is some work but it is the safest way to avoid errors of any kind. Also, you will be able to manage the objects better.

    Hope this helps
    Agreed!

Posting Permissions

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