oracle导入和导出和授权
导入数据库:
imp demo/123456@orcl file=d:/bak_1023.dmp full=y ignore=y
导出数据库:
exp demo/123456@orcl file=d:/bak_1023.dmp
exp yhtj/123456@127.0.0.1:1521/orcl file=d:\tijian.dmp
create user lis_xh identified by 123456;
grant create session to lis_xh; --授予用户创建session的权限,即登陆权限
grant CREATE VIEW to lis_xh;--创建视图
--授予dba权限 grant connect,resource,dba to his_nh;
--视图
grant select on lis_xh_clc to lis_xh; --授予
grant select on lis_xh_inp to lis_xh; --授予
grant select on lis_xh_user to lis_xh; --授予
grant select on lis_xh_dept to lis_xh;--授予
grant select on lis_xh_labitem to lis_xh;--授予
grant select on lis_peis_tminfo to lis_xh; --授予
--存储过程
grant execute on lis_xh_return_confirm to lis_xh;
grant execute on peis_transmitresult to lis_xh;
grant execute on peis_saveresult to lis_xh;
grant execute on peis_reverse_audit to lis_xh;
--表
grant select on lis_dangerousnum to lis_xh;
grant insert on lis_dangerousnum to lis_xh;
grant update on lis_dangerousnum to lis_xh;
查询某个表空间下的表:
Select Table_Name, Tablespace_Name From Dba_Tables Where Tablespace_Name = 'USERS'; dmp文件数据导出:
1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中
exp system/manager@TEST file=d:\daochu.dmp full=y
2 将数据库中system用户与sys用户的表导出
exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
3 将数据库中的表inner_notify、notify_staff_relat导出
exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat)
4 将数据库中的表table1中的字段filed1以"00"打头的数据导出
exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
上面是常用的导出,对于压缩,既用winzip把dmp文件可以很好的压缩。
也可以在上面命令后面 加上 compress=y 来实现。
dmp文件数据导入
1 将D:\daochu.dmp 中的数据导入 TEST数据库中。
imp system/manager@TEST file=d:\daochu.dmp
imp aichannel/aichannel@HUST full=y file=file= d:\data\newsmgnt.dmp ignore=y
上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。
在后面加上 ignore=y 就可以了。
2 将d:\daochu.dmp中的表table1 导入
imp system/manager@TEST file=d:\daochu.dmp tables=(table1)
基本上上面的导入导出够用了。不少情况要先是将表彻底删除,然后导入。
exp yhtj/123456@orcl file=d:\tijian.dmp full=y
oracle导入和导出和授权的更多相关文章
- ORACLE导入、导出命令使用方法
oracle导入.导出命令使用方法: 给用户增加导入数据权限的操作 第一,启动sql*puls 第二,以system/manager登陆 第三,create user 用户名 IDENTIFIED B ...
- Oracle 导入、导出DMP(备份)文件
首先说明dmp文件: Oracle备份文件是以dmp结尾,这种文件是oracle的逻辑备份文件,常用于数据库逻辑备份,数据库迁移等操作. 一.Oracle导入备份文件步骤:我用的是Oracle 11g ...
- ORACLE导入、导出所有数据到文件的SQL语句
打开cmd窗口,执行如下SQL语句即可 --导出 exp 用户名/密码@localhost/orcl file=d:\111.dump log=d:111.log --或者 1.登录管理员system ...
- oracle导入imp导出exp命令的简单使用
1.登录: 原始: 用户名:sys 密 码:安装oracle设置的口令 数据库:ip:port/数据库名(默认是orcl) 连接为:SYSDBA 用户: 用户名:safe_csmp 密 码:safe_ ...
- oracle导入及导出dmp文件
导出数据库步骤: exp 用户名/密码@实例名 file=导出的dmp文件存放路径(绝对路径) log=导出日志存放路径(建议记录log文件,方便后续核实数据是否完整导出和导入) 导入数据库步骤: 1 ...
- Oracle导入和导出
导出:EXP userid=<username>/<password>@<service_name> file=<dmpname> e.g.exp sa ...
- Oracle导入、导出数据库dmp文件
版本 1.实例数据完全导出 即导出指定实例下的所有数据 exp username/password@192.168.234.73/orcl file=d:/daochu/test.dmp full=y ...
- Linux下oracle导入(exp)导出(imp)出现"Failed to open ...for reader/write"错误
- Oracle导入导出之dmp
Oracle导入导出有两种方式,分别是imp/exp与impdp/expdp. 1.imp/exp exp scott/tiger file=d:\test.dmp log=d:\test.log o ...
随机推荐
- java练习题——类与对象
一.请依据代码的输出结果,自行总结Java字段初始化的规律 public static void main(String[] args) { InitializeBlockClass obj=new ...
- 【TRICK】[0,n)中所有大小为k的子集的方法
<< k) - ; <<n)) { int x = comb & -comb, y = comb + x; comb = (((comb & ~y)/x)> ...
- 1 opencv2.4 + vs2013
http://blog.csdn.net/poem_qianmo/article/details/19809337 1.安装vs2013 2.安装opencv2.4 下载地址:https://sour ...
- 线程池ThreadPoolExecutor使用
一.简介 线程池类为 java.util.concurrent.ThreadPoolExecutor,常用构造方法为: ThreadPoolExecutor(int corePoolSize, int ...
- Django-modelfrom组件
ModelForm a. class Meta: model, # 对应Model的 fi ...
- c++ combination by next_permutation
#include <iostream> #include <algorithm> #include <vector> int main() { int n, r; ...
- golang模拟新浪微博登录
1.基于幽灵蛛pholcus开源项目的规则 直接贴代码,代码可以更改后用于其他爬虫项目 package pholcus_lib // 基础包 import ( // "github.com/ ...
- gcc6.3编译c++11的程序链接opencv时字符型函数未定义
在Windows下编写图像处理程序,由于要使用regex,升级了mingw,编译c++11代码.之前代码中使用了opencv2.4.10,一直运行良好,升级编译器以后发现了错误:undefined r ...
- MySQL初识3
随着对MySQL的熟识,今次总结一下MySQL数据库的删除.备份和还原操作 1.数据库的删除: a.删除数据库的命令:drop database dbname; b.删除数据库中的表: 单个表:dro ...
- 软工实践Beta冲刺(2/7)
队名:起床一起肝活队 组长博客:博客链接 作业博客:班级博客本次作业的链接 组员情况 组员1(队长):白晨曦 过去两天完成了哪些任务 描述: 1.界面的修改与完善 展示GitHub当日代码/文档签入记 ...