学习oracle技术,每天学一点,每天进步一点

怎样让sys用户执行exp操作

上一篇 / 下一篇  2008-07-08 14:59:11 / 个人分类:导入与导出

[oracle@localhost ~]$ exp sys/abcdefg as sysdba full=y file=/tmp/full100.dmpITPUB个人空间2S"M,{'s0joBn L
LRM-00108: invalid positional parameter value 'as'

EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
m }lB is4T}0EXP-00000: Export terminated unsuccessfully
;Ph:K u.\f3e(}B0p,U0

[oracle@localhost ~]$ exp \"sys/abcdefg as sysdba\"  full=y file=/tmp/full100.dmp

Export: Release 10.2.0.1.0 - Production on Tue Jul 8 09:27:56 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


/GXVwB2uqbT0Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionITPUB个人空间2DD"O,VZP"HCP
With the Partitioning, OLAP and Data Mining options
6|z7}-B"PE p)k0Export done in US7ASCII character set and AL16UTF16 NCHAR character set
6Uh!JQa7NR3N0server uses WE8ISO8859P1 character set (possible charset conversion)

About to export the entire database ...
;NKJep7[ y0. exporting tablespace definitions
gX ahp)k)Eq0r,h0. exporting profilesITPUB个人空间6t S0_yJ9\;n}'Q
. exporting user definitions
HY*{'a#o7EV0. exporting rolesITPUB个人空间kp~iK#|g
. exporting resource costs
2U.i/c1Icz+?0. exporting rollback segment definitions
]7|9f*y,i-B1v Qn4j0. exporting database links
;K.y;Ryf|3P#j0. exporting sequence numbersITPUB个人空间3W:kE^$L6s
. exporting directory aliases
4yC"a5rpve0w0. exporting context namespacesITPUB个人空间Yh-H'R/T-U
. exporting foreign function library namesITPUB个人空间yd_p+|$I
. exporting PUBLIC type synonymsITPUB个人空间"C6Ce G J#F
. exporting private type synonyms
c9eQ)QZ9so OFN!wv2_7Pi0. exporting object type definitions
N&E8hA+Q2{;{1}0. exporting system procedural objects and actions
'j['[)x6`0. exporting pre-schema procedural objects and actionsITPUB个人空间)rS}W;j)Wx"S9?/c
. exporting cluster definitions
1B y gr`[:?0. about to export SYSTEM's tables via Conventional Path ...ITPUB个人空间V'{q\/O5a,]#q
. . exporting table                    DEF$_AQCALL          0 rows exportedITPUB个人空间s/pN;M:qR RF^1cL$m
. . exporting table                   DEF$_AQERROR          0 rows exportedITPUB个人空间h9l5T,~,la
. . exporting table                  DEF$_CALLDEST          0 rows exportedITPUB个人空间;`.A!CEsZJ,[{
EXP-00091: Exporting questionable statistics.ITPUB个人空间r v.m2gO!V(P
EXP-00091: Exporting questionable statistics.ITPUB个人空间1A GZ8I%Nw
EXP-00091: Exporting questionable statistics.
q Io1mtl0

反斜杠加单引号也行

[oracle@localhost ~]$ exp \'sys/abcdefg as sysdba\'  full=y file=/tmp/full100.dmp

Export: Release 10.2.0.1.0 - Production on Tue Jul 8 09:28:54 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


&})k$T ? A#k0Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionITPUB个人空间J/Qwd)wv#y
With the Partitioning, OLAP and Data Mining options
;I4Nz%Kq!R Y0Export done in US7ASCII character set and AL16UTF16 NCHAR character set
:J5Hh9L5x tZJE0server uses WE8ISO8859P1 character set (possible charset conversion)

About to export the entire database ...
O*@*PM2|Od0. exporting tablespace definitionsITPUB个人空间&a"o8g7qC_vS
. exporting profilesITPUB个人空间g!^ER1iRD/cUuR
. exporting user definitions
*DpWA|oa Q0. exporting roles
:E F r-v&j\ G1@0. exporting resource costsITPUB个人空间0F*X&D0EZ/R(J0vn
. exporting rollback segment definitionsITPUB个人空间!yuOD][%B
. exporting database linksITPUB个人空间*S k@-V6_rk F2s R
. exporting sequence numbers
q [d%a:M,`0. exporting directory aliases
a*GkpPS0. exporting context namespacesITPUB个人空间\2i-PZ1K;[zg I
. exporting foreign function library names

以下是官方文档说明:

1. Command line.ITPUB个人空间lf;TEx
Enclose the connect string with a single quote character:ITPUB个人空间/P$WI!o'U3?/Q6k
Windows:ITPUB个人空间 ? Box$k&]C.}t z*P p
D:\> exp 'sys/change_on_install@instance as sysdba' tables=scott.emp
o([&{ PD6@sH-R!q1f}0Unix (you need to 'escape' the single quote):
-l"ct#|dg {Qd'?N0> exp \'sys/change_on_install@instance as sysdba\' tables=scott.emp
$I3R.McBa6L0q0VMS (use [double_quote][single_quote]...[single_quote][double_quote]):
"s&O"} v{$l+P0$ exp "'sys/change_on_install@instance as sysdba'" tables=scott.emp
mY8LH,g4Vl0Note that this VMS syntax is also a valid syntax on Unix and on Windows.

2. InteractiveITPUB个人空间Ng$EY-[^H
Do not specify any connect string on the command line, so you will be prompted to enter it. E.g.:

> exp tables=scott.emp
h9t7G r%m,v ]&B&S0Export: Release 10.2.0.3.0 - Production on Fri Jun 25 07:39:46 2004ITPUB个人空间 Gz|w/F-C
Copyright (c) 1982, 2005, Oracle. All rights reserved.ITPUB个人空间1X b Y.a}$od
Username: sys/change_on_install@instance as sysdba
'r.Zi/[+o~?,V n0Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
_ j9o&FdI0... etc.
i MS5X7y.A3y03. Parameter file.
?&}D!il!e^6{-g0You can also specify the username in the parameter file. In this situation, you have to enclose the connect string with a double quote character. However, to prevent possible security breaches we advice you to stop using the USERID parameter in a parameter file.

File: exp.par
:vTON`qt$r0---------------ITPUB个人空间;Z&W5[$Ed Jz
USERID="sys/change_on_install@instance as sysdba"
2m.l6D&E3k5j2C0TABLES=scott.emp

Run export with:ITPUB个人空间7Z1P/Gn,D*h
> exp parfile=exp.par

4. Remarks.
Rz3Zr&pDo0Remark 1. If you have setup operating system authentication, it is not necessary to specify the SYS schema name, and password. E.g.:

> exp "'/@instance as sysdba'" tables=scott.emp

Remark 2. In addition, if you have set the environment variable TWO_TASK (on Unix) or LOCAL (on Windows) or on the server where the database is installed you have set ORACLE_HOME and ORACLE_SID, it is not necessary to specify the @instance. E.g.:

> exp "'/ as sysdba'" tables=scott.emp

Remark 3. The export parameters FLASHBACK_SCN and FLASHBACK_TIME cannot be used if the user that invoked the export is connected AS SYSDBA.
(D'Qz0Y+\}|^C0

ITPUB个人空间Cu,c0@tG `'YH,]
 


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-08-22  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 14606
  • 日志数: 273
  • 图片数: 2
  • 建立时间: 2007-12-11
  • 更新时间: 2008-08-20

RSS订阅

Open Toolbar