• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3650
  • Last Modified:

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
0
dwu5080
Asked:
dwu5080
  • 3
1 Solution
 
WadhwaCommented:
imp is not a sql command , it can only be run from OS prompt. you can not run it from sqlplus as above.

Sam
0
 
BalasCommented:
Hi
use host and then your imp command
like  this

SQL> host imp $1/$2@remoteOrcl816  fromuser=david touser=$1 file=david.dmp

Balas
0
 
WadhwaCommented:
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
0
 
WadhwaCommented:
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

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now