Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Syntax of export command
dn.perl_at_gmail.com schrieb:
> I am looking at a script which has the following syntax for exp
> utility :
> exp "/ as sysdba" owner=$SCHEMA log=$LOGFILE file=$DMPFILE
> consistent=y direct=y statistics=none
>
> I am told this script runs when $LOGNAME="oracle" on a linux server.
> To the best of my knowledge, the syntax is :
> exp "username/password as sysdba" owner=$SCHEMA, etc etc. And I don't
> know how the command runs without being supplied username and
> password.
>
> I am trying to export it to Windows.
> If I use : exp "/ as sysdba" owner=$SCHEMA etc etc, I get an error.
> If I use : exp " as sysdba" owner=$SCHEMA etc etc, I am prompted for
> username and password.
>
> So can the export utility be run on unix/linux without supplying
> username and password to it when a) logged in as 'oracle' and b) when
> logged in something else.
> And can export utility be run on Windows without supplying username
> and password?
>
If you run exp from command prompt and your os user is in the privileged
group, you can use syntax shown, however quotes should be escaped:
exp userid=\"/ as sysdba\" owner=...
You can look it up in the Oracle documentation
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/dba.htm#sthref156
This is valid for both, linux and windows.
This is not only the valid option to connect without supplying username
and password, depending on your version, you can as well have users
identified externally by means of operating system or certificate, as
well as identified globally by means of directory service
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8003.htm#i2065278
For export of a schema you don't have to log in as sysdba, the
EXP_FULL_DATABASE role is fully sufficient privilege.
To summarize, all your questions can be answered with yes - you can run
export utility on unix/linux without supplying username and password
when logged as oracle, when logged as someone else and it can be run on
windows as well - but you should notice, that in every variation
absolutely different mechanisms of authentication may be involved ( and
may be required to prepare as prerequisite) .
Best regards
Maxim Received on Mon Oct 08 2007 - 18:26:07 CDT
![]() |
![]() |