SQL Invoking Import

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

We can use Import in three different methods, which was discussed earlier while invoking Exports. Since we already know about these methods, let us have a look at the examples alone.

Interactive method

This example will restore tables that were accidentally dropped by John (provided he has exported them recently). In this example, Import will read file Backup. dmp
Enter imp in the command line an press ENTER as shown below
$ imp
It will prompt for the user name and the password Enter username and Oracle password and press ENTER. The following sequence of statements will appear on the screen.
Import file :EXPDAT.DMP > backup.drap
Enter insert buffer size (minimum is 4096) :30720 > (The default buffer size will be adequate, so press ENTER)
List contents of imoort file only (Y/N) :N
at allows us to see the contents of the export file. Accept the default)
Ignore create errors due to object existence (Y/N) :N
(It will generate an error if an object to be imported already exists. Accept the default)
Import grants (Y/N) :Y> (Accept the default to import table data)
Import entire export file (Y/N) :Y> (In this option we can choose tables that are to be imported. Accept the default to import all the tables)
Importing john's object into join
..importing table "accounts" - 2 rows imported
-importing table admin - 8 rows imported
-importing table mklg - 0 rows imported

TOUSER parameter cannot be specified in the above method. To Import tables from one user to another we can use TOUSER parameter either in the command line method or parameter file method.

Command line method

It is equivalent to interactive method. Enter the following at the command line. $ imp john/jim. file = backup.dmp ignore - y fromuser - johngrants - y indexes = y

Parameter line method

Create a file named imports and specify the following parameters in the file. file = backup.dmp
grants = y
indexes =Y
ignore =y
fromuser = john Then , in the command line enter the following $ imp
parfile - imports



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.