15 Mei 2010

HowTo Export an Oracle Table to a File in the SPSU CSE Labs

1. Open a command prompt on an NT OR Win2000 workstation in the lab with Oracle client software installed

2. From the command prompt, open the oracle export utility using the following general syntax “exp username/pwd@connect_string”. As an example

H:\>exp elvis/king @cs4

3. You should then receive a response similar to the following:

Export: Release 8.1.6.0.0 - Production on Thu May 9 16:47:39 2002
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to: Oracle8i Release 8.1.6.0.0 - Production
JServer Release 8.1.6.0.0 – Production

4. Press return to select the default fetch buffer size if prompted

Enter array fetch buffer size: 4096 > 4097

5. Name your export file including its path when prompted. In this example, the export file is named c:\junk\expdata.dmp

Export file: EXPDAT.DMP > c:\junk\EXPDATA.dmp

6. You will be prompted to select entire database, users or tables to export. Select Tables(3) and respond to the subsequent prompts as follows:

(1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U > 3

Export table data (yes/no): yes > y

Compress extents (yes/no): yes > n

7. The system will respond with something similar to the following

Export done in WE8ISO8859P1 character set and WE8ISO8859P1 NCHAR character s
About to export specified tables via Conventional Path ...
Table(T) or Partition(T:P) to be exported: (RETURN to quit) > dept
. . exporting table DEPT 7 rows exported
Table(T) or Partition(T:P) to be exported: (RETURN to quit) >
Export terminated successfully without warnings.

H:\>exp elvis/king1984@cs4

You can use the import utility to import the file to another oracle database or Oracle user account. The command for starting the import utility is “imp”.

Tidak ada komentar:

Poskan Komentar

^_^