Link to home
Start Free TrialLog in
Avatar of dwu5080
dwu5080

asked on

import a schema from sqlplus

at DOS promot:
  I try to import to a schema abc/abc from within a sqlplus script: system/manager is used to login to
 oracle db on the remote network.
  The abc/abc is  user/password parametr to imp commands
 I can not get it working?
 
 I tried to add '.'  or '!' before the imp command
 but to no avail.

 I love to give 20 points for this
 Thanks in advance.
 

 >sqlplus system/manager@remoteOrcl816.com ImportUser.sql abc abc

  The below is the ImportUser.sql
imp $1/$2@remoteOrcl816  fromuser=david touser=$1 file=david.dmp
Avatar of Wadhwa
Wadhwa

imp is not a sql command , it can only be run from OS prompt. you can not run it from sqlplus as above.

Sam
ASKER CERTIFIED SOLUTION
Avatar of Balas
Balas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Although the above command you can execute this from prompt. but if you save this in a file and execute it , this would not work.

Sam
There is a problem of passing the parameter on this if you make a file. I think you are executing this from DOS.
 If this is true first of all $1 and $2 would not work in DOS