Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Location
    Waukesha WI
    Posts
    78

    Unanswered: Using IMP in Batch files for Oracle on server

    We utilize the imp command line to import .dmp files into oracle

    imp <schema>/<password> TABLES=(<TableName>)
    FILE=C:\Backups\dmp\RESULTS.dmp buffer=64000 commit=y ignore=y log=\Backups\log\RESULTS.log

    Now we have a machine on the network that is dedicated to runing Oracle and the .bat files that control the imports need to be updated.

    I have mapped a drive L: to the server and created a subdirectory L:\imports
    The current batch file does this:

    Copy C:\Backups\dmp\RESULTS.dmp L:\imports
    cd L:\imports
    imp PROD1/mypassword TABLES = (RESULTS.dmp) etc...


    The imp command seems to want to import into the Oracle on my local machine. It can not find the PROD1 schema and tells me the schema/password is bad.

    How do I let it know to import it into the production server?

    Thanks...

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool



    Try:
    Code:
    imp PROD1/mypassword@PROD1 TABLES = (RESULTS.dmp) etc...
    Where '@PROD1' is the service name for the PROD1 database.

    PS: You need to include this service name in the tnsnames.ora file.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    yeah, service name dood.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Jun 2005
    Location
    Waukesha WI
    Posts
    78
    Thanks folks.
    It appears that there are two service names the same.
    So I had to use the entire database name:

    imp schema/password@something.something.com_prod1 .....

    and that worked like a champ.

Posting Permissions

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