使用sys as sysdba权限进行EXP/IMP与其它用户稍有不同,详细内容如下(摘自metalink)

Applies to: 

Oracle Server - Enterprise Edition - Version: 8.1.7.0 to 10.2.0.0
Oracle Server - Personal Edition - Version: 8.1.7.0 to 10.2.0.0
Oracle Server - Standard Edition - Version: 8.1.7.0 to 10.2.0.0
Information in this document applies to any platform. Goal This document demonstrates how to connect AS SYSDBA when starting an export or import. Incorrect usage of single or double quotes can result in errors such as: LRM-: invalid positional parameter value 'as'
EXP-: failed to process parameters, type 'EXP HELP=Y' for help
EXP-: Export terminated unsuccessfully Or: LRM-: invalid positional parameter value 'sysdba' Or: LRM-: Message not found; No message file for product=ORACORE, facility=LRM Solution SYSDBA is used internally in the Oracle database and has specialized functions. Its behavior is not the same as for generalized users. For example, the SYS user cannot do a transaction level consisent read (read-only transaction). Queries by SYS will return changes made during the transaction even if SYS has set the transaction to be READ ONLY. Therefore export parameters like CONSISTENT, OBJECT_CONSISTENT, FLASHBACK_SCN, and FLASHBACK_TIME cannot be used.
Starting with Oracle10g, the export shows a warning that the export is not consistent when the export is started with CONSISTENT=Y and connects to the database with the user SYS (or as SYSDBA): EXP-: parameter CONSISTENT is not supported for this user Note that Oracle automatically provides read consistency to a query so that all the data that the query sees comes from a single point in time (statement-level read consistency). For export this means that the export of table data is consistent. However, if a table contains nested tables, the outer table and each inner table are exported as separate transactions. And if a table is partitioned, each partition is exported as a separate transaction. If a nested table or a partitioned table was updated during the export, the data that is exported while connected as the SYS schema could be inconsistent. Typically, there is no need to invoke Export or Import as SYSDBA, except in the following situations:
- at the request of Oracle technical support;
- when exporting a transportable tablespace set with the old-style export utility (Oracle9i and Oracle8i);
- when importing a transportable tablespace set with the old-style import utility (Oracle10g, Oracle9i, and Oracle8i). The examples below are based on:
- the export of table emp, owned by the demo schema scott.
- schema SYS with the password: change_on_install.
- alias 'instance' that is specified in the tnsnames.ora file and used for a connect to the database. To invoke Export or Import as SYSDBA, use the following syntax (this syntax is similar when invoking import and the syntax has not changed with the new Oracle10g Export DataPump and Import DataPump utilities): . Command line.
Enclose the connect string with a single quote character: Windows:
exp 'sys/change_on_install@instance as sysdba' tables=scott.emp Unix (you need to 'escape' the single quote):
exp \'sys/change_on_install@instance as sysdba\' tables=scott.emp VMS (use [double_quote][single_quote]...[single_quote][double_quote]):
exp "'sys/change_on_install@instance as sysdba'" tables=scott.emp Note that this VMS syntax is also a valid syntax on Unix and on Windows. . Interactive
Do not specify any connect string on the command line, so you will be prompted to enter it. E.g.: % exp tables=scott.emp Export: Release 10.1.0.2. - Production on Fri Jun ::
Copyright (c) , , Oracle. All rights reserved. Username: sys/change_on_install@instance as sysdba Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2. - 64bit Production
... etc. . Parameter file.
You 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. Contents of file exp.par: USERID="sys/change_on_install@instance as sysdba"
TABLES=scott.emp Run export with: exp parfile=exp.par Remarks: . 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 . 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 . The export parameters FLASHBACK_SCN and FLASHBACK_TIME cannot be used if the user that invoked the export is connected AS SYSDBA. . Known issues:
Bug "EXPORT FAILED WITH ORA-1031 WHEN LOGIN AS SYSDBA" (not a public bug; fixed in 8.1.7.3 and higher)
Bug "ORA-1925 OCCURS WHEN IMPORTING AS SYS ACCOUNT"
Bug "EXP DID NOT RAISE ERROR WHEN SYSDBA EXPORTS WITH CONSISTENT=Y" (not a public bug; fixed in Oracle10g and higher) References Bug - Ora- Occurs When Importing As Sys Account
Note 112269.1 - How to set Unix env. variable TWO_TASK and Windows NT counterpart, LOCAL
Note 130332.1 - Export / Import Connecting "AS SYSDBA" Fails with LRM- and EXP-
Note 204334.1 - Parameters FLASHBACK_SCN And FLASHBACK_TIME: Point In Time Export
Note 228482.1 - Schema's CTXSYS, MDSYS and ORDSYS are Not Exported
Note 277606.1 - How to Prevent EXP- or EXP- Warning (Data in Table xxx is Protected) During Export

####expdp

expdp \' / as sysdba \' directory=DATA_PUMP_DIR dumpfile=tpsp20121126.dmp logfile=tpsp20121126.log tables= scott.emp,scott.dept

impdp \' / as sysdba \'  directory=DATA_PUMP_DIR dumpfile=tpsp20121126.dmp logfile=imptpsp20121126.log remap_schema=SCOTT:SCOTT1

转 : 如何用sys as sysdba权限连接数据库进行EXP/IMP的更多相关文章

  1. oracle中scott/tiger、sys、SYSDBA、system都是什么用

    scott 是个演示用户,是让你学习ORACLE用的 SYSDBA 不是用户,可以认为是个权限,超级权限详细点说吧            超级用户分两种 SYSDBA和SYSOPTSYSOPT 后面3 ...

  2. 【转载】为什么任何随便输入的账号使用SYSDBA权限都能登陆oracle

    其实简单点就是检查一下你的机器有没有一个ora_dba用户组,而且你登陆os的用户是否在这个组里,有的话问题的原因就找到了,下面是转的高手的介绍 本文环境配置:Oracle10gR2,Windows ...

  3. MSSQL 2012 拒绝了对对象 'extended_properties' (数据库 'mssqlsystemresource',架构 'sys')的 SELECT 权限

    查看数据库的表的时候报如下错误: MSSQL 拒绝了对对象 ) 解决方法: 在数据库里相应的用户权限中,把db_denydatareader的复选框的勾去掉.db_denydatareader是拒绝访 ...

  4. 拒绝了对对象 'sp_OACreate' (数据库 'mssqlsystemresource',架构 'sys')的 EXECUTE 权限。

    执行一个存储过程, 由于里面使用到了一些 --创建对象  EXEC sp_OACreate 'VBScript.RegExp', @objRegex OUT  --设置属性  EXEC sp_OASe ...

  5. 关于IMP由拥有DBA权限的用户EXP数据时,数据存放表空间的几种情况(IMP-00013) -1

    关于IMP由拥有DBA权限的用户EXP数据时,数据存放表空间的几种情况(IMP-00013) -1 ORACLE公司来培训BIEE,带了一个DEMO的DMP文件,其导出用户DBO具有DBA权限,缺省表 ...

  6. plsql developer 使用sys用户登录,报ORA-01031权限不足,解决sys(dba权限用户)远程登录报错。

    数据库服务器架设在机器A上,此时我在机器B上进行远程连接,使用sys账号远程登录时报ORA-01031:insufficient privileges 或 ORA-01017: invalid use ...

  7. sqlplus sys as sysdba

    Enter user-name:sys Enter password:password as sysdba --以sys用户登陆的话 必须要加上 as sysdba 子句

  8. Linux 操作系统的权限为什么是1,2,4 而不是 1,2,3?如何用二进制来做权限管理

    1.二进制做权限的优点 大家都知道,在Linux操作系统中,x - 可执行权限,w - 可写权限 , r - 可读权限.其权限值分别是1,2,4,但是有没有想过为什么是1,2,4 而不是 1,2,3 ...

  9. python中如何用sys.excepthook来对全局异常进行捕获、显示及输出到error日志中

    使用sys.excepthook函数进行全局异常的获取. 1. 使用MessageDialog实现异常显示: 2. 使用logger把捕获的异常信息输出到日志中: 步骤:定义异常处理函数, 并使用该函 ...

随机推荐

  1. 《JS权威指南学习总结--8.6 函数闭包》

    内容要点: 和其他大多数现代编程一样,JS也采用词法作用域,也就是说,函数的执行依赖于变量作用域,这个作用域是在函数定义时决定的,而不是函数调用时决定的. 为了实现这种词法作用域,JS函数对象的内部状 ...

  2. 《JS权威指南学习总结--6.4检测属性》

    内容要点: js对象可以看做属性的集合,我们经常会检测集合中成员的所属关系-----判断某个属性是否存在于某个对象中,可以通过in运算符,hasOwnPreperty()和propertyIsEnum ...

  3. Sass入门:第四章

    1.加法 加法运算是Sass中运算的一种,在变量或属性中都可以做加法运算.如: .box { width: 20px + 8in; } 编译出来的CSS: .box { width: 788px; } ...

  4. 【LeetCode】423. Reconstruct Original Digits from English

    Given a non-empty string containing an out-of-order English representation of digits 0-9, output the ...

  5. 用makecert.exe生成一个自签名的证书

    makecert.exe不用去找,安装VS2008后,在开始菜单相应的路径找到该命令提示符:Microsoft Visual Studio 2008/Visual Studio Tools/Visua ...

  6. phpstudy 相关配置

    在/etc/my.cnf中 添加 expire_logs_days=5 phpstudy add   list    del

  7. wpf ListBox 双击事件时在子项添加Style 确保选中

    <ListBox ItemTemplate="{StaticResource CardPictureTemplate}" VirtualizingPanel.CacheLen ...

  8. md5校验问题

    描述: 最近跟同事做数据对接,接收完数据,有个md5校验,发现总是对不上 首先把解密之后的明文直接写成变量在md5的工具类main函数执行,发现居然对上了, 然后测试环境debug接收的文件,md5加 ...

  9. Echart图表相关配置项的设置

    饼状图提示框单位显示 在{c}后面即可添加任意单位内容. 一条记录含有多组数据的柱状图单位显示 标注单位的显示. 目前还未找到方法实现,当鼠标移动到标注上时设置显示单位. 标线单位的显示

  10. JavaScript 构造函数 prototype属性和_proto_和原型链 constructor属性 apply(),call()和bind() 关键字this

    1.构造函数: 通常构造函数首字母需要大写,主要是为了区别ECMAScript的其它函数.(高程三 P145) 构造函数与其他函数的唯一区别,就在于调用它们的方式不同.只要通过new来调用,任何函数都 ...