使用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. iOS开发下架在AppStore中销售的app

    1.登陆开发者账号 2.选择itunes connect 选择我的app 3.选择要下架的app 4.价格与销售范围 5.销售范围 6.点击存储 //如果想要重新在AppStore中进行销售只需要选择 ...

  2. UITableView控制头部View

    首先我们先集成一个UIView做一个自己的View #import <UIKit/UIKit.h> @interface MyView : UIView @property (nonato ...

  3. 《JS权威指南学习总结--7.9 ES5中的数组方法》

    内容要点: ES5中定义了9个新的数组方法来遍历.映射.过滤.检测.简化和搜索数组. 概述:首先,大多数方法的第一个参数接收一个函数,并且对数组的每个元素(或一个元素)调用一次该函数. 如果是稀疏数组 ...

  4. CentOS/RedHat rpm方式安装Apache2.2

    注:所有RPM包均从网易镜像上下载 # rpm -ivh /home/apache/apr-1.3.9-5.el6_2.x86_64.rpm warning: /home/apache/apr-1.3 ...

  5. 修改win7锁定界面背景

    Regedit HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Authentication/LogonUI/Backgrou ...

  6. ebtables使用

    Targets: (1)ACCEPT : 让帧通过 (2)DROP: 丢弃帧. (3)CONTINUE:让帧继续走下面的规则(rule) (4)RETURN: 停止当前链的过滤规则,进而去走前面链的下 ...

  7. CentOS系统使用配置文件修改IP地址详细教程

    在VM虚拟机安装的centos系统,默认使用的是dhcp自动获取ip地址的方式,而我自己想用这个centos在局域网内搭建一个小型演示站点,这个自动获取ip地址的方式就明显不好了,那么centos如何 ...

  8. 分布式事务、XA、两阶段提交、一阶段提交

    本文原文连接:http://blog.csdn.net/bluishglc/article/details/7612811 ,转载请注明出处! 1.XA XA是由X/Open组织提出的分布式事务的规范 ...

  9. SpringMVC 的重定向时,参数非法问题

    在重定向时,携带的参数出现非法 /shopping/editShippingAddressCart?cs=0eaa49d6-9c6e-4d02-85d0-40c3c7939207|ef9d80b1-7 ...

  10. 在客户端缓存Servlet的输出

    对于不经常变化的数据,在servlet中可以为其设置合理的缓存时间值,以避免浏览器频繁向服务器发送请求,提升服务器的性能. public class ServletContext7 extends H ...