Solved

import a schema from sqlplus

Posted on 2001-09-10
4
3,598 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

730 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