Solved

import a schema from sqlplus

Posted on 2001-09-10
4
3,580 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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Format Number Field 10 40
Single ERP VS muttiple Application or Systems 6 41
Oracle 12c patching 1 38
Oracle Syntax 8 42
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…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

760 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

18 Experts available now in Live!

Get 1:1 Help Now