• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3662
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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