How to use “/ as sysdba” to exp and imp

Sometimes we need to user “/ as sysdba” to do export and import in command line of operating systems. There is a little trick.

1. OS:Window 2000 Server

DB:Oracle9.2.0.1

exp userid=”"”/ as sysdba”"” tables=(t.t) file=t.dmp

imp userid=”"”/ as sysdba”"” file=t.dmp fromuser=t touser=system

Here three double quotation marks are used.

2.OS:SunOS 5.9

DB:Oracle9.2.0.5

exp userid=\’/ as sysdba\’ tables=(query_user.aaa) file=t.dmp rows=n

imp userid=\’/ as sysdba\’ fromuser=query_user touser=system file=t.dmp

Here a back slash are used before the single quatotion mark.

2 Responses

  1. Thanks for this – just what I was looking for !

  2. Thanks for this tip !!

Leave a Reply