如何用sys as sysdba权限连接数据库进行Exp/Imp Windows: exp 'sys/change_on_install@instance as sysdba' tables=scott.emp Unix or Linux (you need to 'escape' the single quote): exp /'sys/change_on_install@instance as sysdba/' tables=scott.emp
如何用sys as sysdba权限连接数据库进行Exp/Imp
Windows:
exp 'sys/change_on_install@instance as sysdba' tables=scott.emp
Unix or Linux (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
小结:
1、USERID 必须是命令行中的第一个参数。(如imp help=y里显示的内容)所以如exp ‘ as sysdba’等价于exp USERID=‘as sysdba’,即可以省略USERID不写。
2、imp/exp命令里参数与参数间的间隔是用空格来区分的(等号两边的空格不算),于是像如下语句:exp USERID= sys/123456 as sysdba就不能被imp/exp工具所理解(参数USERID= sys/123456可以解析出来,但是as sysdba不知道如何理解了,as或sysdba又不属于设定的参数名)。而oracle公司设计的软件里一般用单引号将一字符串常量包括起来。将上面语句改为exp USERID= ’sys/123456 as sysdba‘的话,imp/exp工具就认为sys/123456 as sysdba整体是一个字符串,故而就是参数USERID的一个值。
3.
如果是写在参数文件中,则连接字符串需要用双引号了:
USERID=" as sysdba"
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
注释:imp/exp(
impdp/expdp
)默认目录是什么,即parfile=exp.par里的文件exp.par在什么目录下?附加:
impdp/expdp
)默认目录是什么(5)、数据泵如何决定文件的路径
5.1 如果目录对象是文件标示符的一部分,那么目录对象指定的路径就需要使用。在目录MY_DIR创建dump文件的示例:
> expdp scott/tiger DUMPFILE=my_dir:expdp_s.dmp NOLOGFILE=Y
5.2 如果目录对象不代表一个文件,那么就需要使用DIRECTORY变量命名的目录对象。目录MY_DIR中创建dump文件,目录MY_DIR_LOG中创建日志文件的示例:
> expdp scott/tiger DIRECTORY=my_dir DUMPFILE=expdp_s.dmp \
LOGFILE=my_logdir:expdp_s.log
5.3 如果没有明确目录对象,也没有以DIRECTORY变量命名的目录对象,那么环境变量DATA_PUMP_DIR将会使用。环境变量是在在运行导出和导入数据泵应用的客户端系统中使用操作系统命令定义的,分配给基于客户端环境变量的取值必须和基于服务端的目录对象一致,且必须首先在服务器端建立。
目录MY_DIR中创建dump文件和MY_DIR_LOG中创建日志文件的示例:
在使用expdp的客户端机器上,设定环境变量:
-- On windows, place all expdp parameters on one single line:
C:\> set DATA_PUMP_DIR=MY_DIR
C:\> expdp scott/tiger@my_db_alias DUMPFILE=expdp_s.dmp
LOGFILE=my_logdir:expdp_s.log
注意环境变量DATA_DUMP_DIR对应的目录名称是大小写敏感的。设定错误的DATA_PUMP_DIR环境变量会报错,例如:DATA_PUMP_DIR=My_Dir:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name My_Dir is invalid
5.4 如果之前三种情况都没有创建目录对象,作为一个具有权限的用户(例如具有EXP_FULL_DATABASE或IMP_FULL_DATABASE角色),那么数据泵试图使用默认的基于服务器端的目录对象,DATA_PUMP_DIR。理解数据泵不会创建DATA_PUMP_DIR目录对象是非常重要的。仅当授权用户未使用任何之前提到的机制创建的目录对象时,才会尝试使用DATA_PUMP_DIR。这个默认的目录对象必须首先由DBA创建。不要将这个和同名的基于客户端的环境变量相混淆。
首先,清空DATA_PUMP_DIR环境变量:
C:\> set DATA_PUMP_DIR=
创建DATA_PUMP_DIR的目录:
CONNECT SYSTEM/MANAGER
CREATE OR REPLACE DIRECTORY data_pump_dir AS 'D:\DataPump';
GRANT read, write ON DIRECTORY data_pump_dir TO scott;
-- On windows, place all expdp parameters on one single line:
C:\> expdp system/manager@my_db_alias DUMPFILE=expdp_s.dmp
LOGFILE=expdp_s.log SCHEMAS=scott
如果SCOTT用户不是授权用户,不能使用默认的DATA_PUMP_DIR。
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39145: directory object parameter must be specified and non-null
用户SCOTT的解决方法:如上面5.3,SCOTT可以设置环境变量DATA_PUMP_DIR为MY_DIR:
-- On windows, place all expdp parameters on one single line:
C:\> set DATA_PUMP_DIR=MY_DIR
C:\> expdp scott/tiger@my_db_alias DUMPFILE=expdp_s.dmp
LOGFILE=expdp_s.log SCHEMAS=scott
或者这种特定场景下,用户SCOTT也可以有目录DATA_PUMP_DIR的读和写权限:
-- On windows, place all expdp parameters on one single line:C:\> set DATA_PUMP_DIR=DATA_PUMP_DIR
C:\> expdp scott/tiger@my_db_alias DUMPFILE=expdp_s.dmp
LOGFILE=expdp_s.log SCHEMAS=scott
参考:http://blog.csdn.net/bisal/article/details/24667609
=============================================
Oracle exp备份使用sysdba进行导出和导入的操作
2010-03-29 16:16 佚名 博客园 字号:T | T
如果你在Oracle exp备份的实际应用方面,你是否存在一些不解之处,以下的文章主要是通过对Oracle exp备份的实际应用的。 方案的介绍,来解答你在@@@@@@在实际操作方面的问题。
AD:51CTO学院:IT精品课程在线看!
我们在一些相关的书籍或是网上的相关资料对Oracle exp备份(导出/导入备份)使用sysdba进行导出和导入的实际操作步骤都有相关的介绍,以下的文章就对Oracle exp备份的实际操作步骤的本人的idea。
1. 命令行方式:
A: Windows平台:
C:
<ol><li><span><span>\</span><span>></span><span> exp<span><strong> ‘</strong></span>as sysdba' </span><span>tables</span><span>=</span><span>scott</span><span>.emp </span><span>file</span><span>=e:\emp.dmp </span></span></li></ol>
B: Unix & Linux平台(这时的"'"需要用到转义字符"\"):
<ol><li><span><span>$ exp \'sys/change_on_install@instance as sysdba\<br>' </span><span>tables</span><span>=</span><span>scott</span><span>.emp </span><span>file</span><span>=/home/oracle/emp.dmp </span></span></li></ol>
C:Oracle exp备份(导出/导入备份)使用sysdba进行导出和导入时。你需要在表空间导入和导出
<ol> <li><span><span>$ imp \'usr/pwd@instance as sysdba\'<br> </span><span>tablespaces</span><span>=</span><span>xx</span><span> </span><span>transport_tablespace</span><span>=</span><span>y</span><span> </span></span></li> <li> <span>file</span><span>=</span><span>xxx</span><span>.dmp </span><span>datafiles</span><span>=</span><span>xxx</span><span>.dbf </span> </li> </ol>
2. 交互输入方式: exp tables=scott.emp --不输入连接字符串,直接回车
<ol><li><span><span>Export: Release 10.2.0.3.0 - Production on Fri<br> Jun 25 07:39:46 2004 Copyright (c) 1982, 2005,<br> Oracle. All rights reserved. </span></span></li></ol>
Username: as sysdba --输入连接字符串.
3.如果是写在参数文件中,则连接字符串需要用双引号了:
<ol><li><span><span><span>USERID</span><span>=</span><span>" as sysdba"</span><span> </span></span></span></li></ol>
以上就是对Oracle exp备份(导出/导入备份)使用sysdba进行导出和导入相关的内容的介绍,望你会有所收获。
【编辑推荐】
- 3月第4周要闻回顾:Chrome续写传奇 Oracle舍我其谁
- Oracle宣布GlassFish路线图 定位为“部门内部”使用
- Oracle优化CPU使用的实际操作方案详解
- Oracle Spatial 与 ArcSDE在实际应用中的区别
- Oracle Spatial在实际应用中的六大功能体现
============================================================
如何用sys as sysdba权限连接数据库进行EXP/IMP 2008-07-01 08:55:36
分类: Oracle
使用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-00108: invalid positional parameter value 'as'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
Or:
LRM-00108: invalid positional parameter value 'sysdba'
Or:
LRM-00108: Message 108 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-00105: 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):
1. 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.
2. 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.0 - Production on Fri Jun 25 07:39:46 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Username: sys/change_on_install@instance as sysdba
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
... etc.
3. 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:
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
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
3. The export parameters FLASHBACK_SCN and FLASHBACK_TIME cannot be used if the user that invoked the export is connected AS SYSDBA.
4. Known issues:
Bug
1616035 "EXPORT FAILED WITH ORA-1031 WHEN LOGIN AS SYSDBA" (not a public bug; fixed in 8.1.7.3 and higher)
Bug
2936288 "ORA-1925 OCCURS WHEN IMPORTING AS SYS ACCOUNT"
Bug
2996947 "EXP DID NOT RAISE ERROR WHEN SYSDBA EXPORTS WITH CONSISTENT=Y" (not a public bug; fixed in Oracle10g and higher)
References
Bug
2936288 - Ora-1925 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-00108 and EXP-00019
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-00079 or EXP-00080 Warning (Data in Table xxx is Protected) During Export
参考:exp sysdba 百度

由于权限,并不总是可以访问某些文件夹,在今天的指南中,我们将向您展示如何在Windows11上的旧硬盘驱动器上访问用户文件夹。此过程很简单,但可能需要一段时间,有时甚至数小时,具体取决于驱动器的大小,因此请格外耐心并严格按照本指南中的说明进行操作。为什么我无法访问旧硬盘上的用户文件夹?用户文件夹的所有权属于另一台电脑,因此您无法对其进行修改。除了所有权之外,您对该文件夹没有任何权限。如何打开旧硬盘上的用户文件?1.取得文件夹的所有权并更改权限找到旧的用户目录,右键单击它,然后选择属性。导航到“安

linux删除文件需要所在文件夹的所有权限,分别是读、写、执行。因为定位这个文件过程就需要进入文件夹,即使使用类似rm /xxx/fle的方式,同样系统内部也会进入文件夹,所以要对文件夹有执行权限,然后读取文件夹内容需要读的权限,最后是删除文件,由于文件是上级文件夹的一部分所以需要对文件夹有写的权限。

在iOS17中,Apple可以更好地控制应用程序可以看到的照片内容。继续阅读,了解如何按应用管理应用访问权限。在iOS中,Apple的应用内照片选取器可让您与应用共享特定照片,而照片图库的其余部分则保持私密。应用必须请求访问您的整个照片图库,您可以选择授予应用以下访问权限:受限访问–应用程序只能看到您可以选择的图像,您可以随时在应用程序中或通过转到“设置”>“隐私和安全”>“照片”来查看所选图像。完全访问权限–App可以查看照片

CentOS搭建web服务器前需注意的权限与访问控制策略在搭建web服务器的过程中,权限与访问控制策略是非常重要的一环。正确设置权限和访问控制策略可以保护服务器的安全性,防止非授权用户访问敏感数据或者对服务器进行不当操作。本文将介绍在CentOS系统下搭建web服务器时需要注意的权限与访问控制策略,并提供相应的代码示例。用户与组的管理首先,我们需要创建一个专

如果您遇到SYSTEM_SERVICE_EXCEPTION蓝屏错误,并发现Cldflt.sys文件出现故障,本文将为您提供解决此问题的方法。什么是Cldflt.sys?云文件小过滤驱动(Cldflt.sys)是Windows系统中一项关键的服务,用于管理Windows云存储功能。它的作用是协助用户在本地设备和云端之间同步和管理数据文件,以确保文件存储的及时更新。是什么导致Cldflt.sysBSOD错误?OneDrive的问题:由于Cldflt.sys文件或与云存储及其同步相关的错误,Micro

PHP是一种广泛应用的编程语言,被广泛用于创建和开发各种Web应用程序。在许多Web应用中,角色权限管理系统是一个重要的功能,它可以确保不同用户拥有适当的访问权限。本文将介绍如何使用PHP来实现一个简单而实用的角色权限管理系统。角色权限管理系统的基本概念是将用户分为不同的角色,并为每个角色分配相应的权限。这样,用户只能执行他们有权限执行的操作,从而保证系统的

win7修改文件提示更改权限拒绝访问如何解决?一些系统文件在进行修改的时候,常常会提示我们没有权限去进行操作。我们可以去进行文件夹权限的功能关闭,或者获取管理员权限。需要修改此类文件的用户,一起来看看接下来具体的教程分享吧。win7修改文件提示更改权限拒绝访问解决办法 1、首先选中对应文件夹,点击上方工具,选中文件夹选项。 2、进入查看选项卡。 3、取消勾选使用简单文件共享然后确定。 4、然后右键选择对应文件夹,点击属性。 5、进入安全选项卡。 6、选择图示位置,点击高级。 7

手机档案存取权限是指允许APK文件读写手机的内存;如果允许APK文件访问手机的内存,那么就可以将应用安装在手机中,如果不允许APK文件访问手机的内存,那么手机就不能安装应用。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

SublimeText3 Linux新版
SublimeText3 Linux最新版

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

WebStorm Mac版
好用的JavaScript开发工具

SublimeText3 英文版
推荐:为Win版本,支持代码提示!