使用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. em,strong,b,i的区别

    文章来源: http://www.zhihu.com/question/19551271 默认样式: strong=b=粗体 em=i=斜体   HTML4.01: strong,em代表语义,从语义 ...

  2. 记第一届 CCCC-团体程序设计天梯赛决赛 参赛

    其他都没什么,上午报道,下午比赛两个半小时,最后139分 但四我超遗憾的是,最后在做L3-1二叉搜索树,因为看到有辣么多人做出来,可是我没做出来啊 比赛结束后看了看其他两道当场吐血,L3-3直捣黄龙不 ...

  3. 三、WCF的宿主

    注:本文为学习摘抄,原文地址:http://www.cnblogs.com/iamlilinfeng/archive/2012/10/01/2706353.html 一.WCF服务应用程序与WCF服务 ...

  4. iOS相关教程

    Xcode Xcode 7中你一定要知道的炸裂调试神技 Xcode 6和Swift中应用程序的国际化和本地化 iOS新版本 兼容iOS 10 资料整理笔记 整理iOS9适配中出现的坑(图文) Swif ...

  5. python读取CSV文件

    python中有一个读写csv文件的包,直接import csv即可.利用这个python包可以很方便对csv文件进行操作,一些简单的用法如下. 1. 读文件 csv_reader = csv.rea ...

  6. [ An Ac a Day ^_^ ] hdu 1662 Trees on the level 数据结构 二叉树

    紫书上的原题 正好学数据结构拿出来做一下 不知道为什么bfs的队列一定要数组模拟…… 还可以练习一下sscanf…… #include<stdio.h> #include<iostr ...

  7. 正则表达式协助实现排序&&邮箱验证

    /** 将IP地址按照字符串的自然顺序排序,只要让他们的每段的位数都是3就可以. 1.按照每一段需要的最多的0进行补齐,那么每一段就会至少保证有3位. 2.将每一段都保留3位.这样所有的ip地址都是每 ...

  8. 洛谷-生活大爆炸版石头剪刀布-NOIP2014提高组复赛

     题目描述 Description 石头剪刀布是常见的猜拳游戏:石头胜剪刀,剪刀胜布,布胜石头.如果两个人出拳一样,则不分胜负.在<生活大爆炸>第二季第8 集中出现了一种石头剪刀布的升级版 ...

  9. Shell脚本中让进程休眠的方法(sleep用法)

    有时候写Shell的脚本,用于顺序执行一系列的程序. 有些程序在停止之后并没能立即退出,就例如有一个 tomcat 挂了,就算是用 kill -9 命令也还没瞬间就结束掉. 这么如果 shell 还没 ...

  10. iOS https plist

    <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key ...