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 ...
随机推荐
- Git的升级版本
关于升级版本,例如我们要升级service版本,我们可以这样子操作 1.在master里面pull完了之后,到自己的分支,然后merge master里面的代码,然后把pom文件 里面的版本升一级,然 ...
- C# Winform 实现屏蔽键盘的win和alt+F4的实现代码
最近在做一个恶搞程序,就是打开后,程序获得桌面的截图然后,然后全屏显示在屏幕上,用户此时则不能进行任何操作. 此时希望用户不能通过键盘alt+F4来结束程序及通过Win的组合键对窗口进行操作.我在网上 ...
- No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser").警告解决方法
在使用BeautifulSoup库时出现该警告,虽然不影响正常运行,但强迫症不能忍啊!! 详细警告信息如下: UserWarning: No parser was explicitly specifi ...
- NSDictionary底层实现原理
一言以蔽之:在OC中NSDictionary是使用hash表来实现key和value的映射和存储的. 那么问题来了什么是hash表呢? 哈希表(hash表): 又叫做散列表,是根据关键码值(key v ...
- 用链表实现nodejs的内存对象管理
虽然javascript拥有垃圾收集,但是垃圾收集机制并不会自动释放持久对象,比如websocks连接. 为了能够在某些特定情况下中止一些连接(比如内存不足),显然要建立全局的对象管理器进行管理. 显 ...
- YAGNI 声明
1.YAGNI介绍 YAGNI 全名是 You aren't Going to Need It,在你设计草案的初稿中,应该努力使用最简单可以工作的事物,直至程序的某个方面要求你添加额外的特性. 2.思 ...
- MySQL☞dual虚拟表
Dual表:虚拟表,专门用来测试各种函数:(本来以为跟Oracle中的dual表一样,发现还是不太一样)
- lua敏感词过滤
--过滤敏感词(如果onlyKnowHas为true,表示只想知道是否存在敏感词,不会返回过滤后的敏感词,比如用户注册的时候,我们程序是只想知道用户取的姓名是否包含敏感词的(这样也能提高效率,检测到有 ...
- resetroot_169route_python2(用于ubuntu12.04和14.04,centos系列)
#!/usr/bin/python import os import json import subprocess from cloudinit.sources.DataSourceConfigDri ...
- coreos install hpssacli
基于官方的coreos ramdisk安装hp raid管理工具,其版本为debian8 apt-get install curl nano /etc/apt/sources.list deb htt ...