Solved

import a schema from sqlplus

Posted on 2001-09-10
4
3,584 Views
Last Modified: 2012-08-13
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
Comment
Question by:dwu5080
  • 3
4 Comments
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6472065
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
 

Accepted Solution

by:
Balas earned 30 total points
ID: 6472258
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
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6472301
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
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6472325
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now