Exporting user to dmp file in Oracle11gr2

4k views Asked by At

I am trying to create a dump file of an Oracle database on 11g

the user is CONTACT and lets say pwd is zip (lowercase)

i log into SQLplus using run command "sqlplus /nolog"

and then

Connect sys/pwd@oracle11g as sysdba

then i try to run my export command

SQL> exp sys/pwd owner=CONTACT DIRECT=Y FILE=E:\ORA_DUMP\CONTACT.dmp LOG=E:\ORA_DUMP\CONTACT.log

and then i hit enter but i get

SP2-0734: unknown command beginning "exp sys/pw....." -rest of line ignored

i tried

SQL> exp CONTACT/zip owner=CONTACT DIRECT=Y FILE=E:\ORA_DUMP\CONTACT.dmp LOG=E:\ORA_DUMP\CONTACT.log

but i get same error

what am i doing wrong

1

There are 1 answers

0
Justin Cave On

exp is an application, not a SQL statement. You would invoke it from the operating system command line, not from within SQL*Plus. Well, I suppose you could invoke it from within SQL*Plus since SQL*Plus can call client-side operating system utilities, it just wouldn't make a great deal of sense to do so.

Run the exp command from your shell (or from a DOS command-line in Windows). You'll almost certainly want the script to specify the TNS alias (i.e. exp contact/zip@tns_alias ...) since you aren't connected to a database when you're at the command line.