当前位置:网站首页>Common Oracle statements
Common Oracle statements
2022-07-27 16:12:00 【FD vacation fish】
https://download.csdn.net/download/u014096024/21109113
oracle practice
1. How to query the permissions included in a role
a. System permissions contained in a role
select * from dba_sys_privs where grantee='DBA';
b. The object permissions contained in a role
2.oracle How many roles are there
( Inquire about oracle All the characters in , It's usually dba)
select * from dba_roles;
3. Inquire about oracle All system permissions in , It's usually dba
select * from system_privilege_map order by name;
4. Inquire about oracle All object permissions in , It's usually dba
select distinct privilege from dba_tab_privs;
Be careful : If you don't write here distinct Words , It's easy to crash
5. Query the table space of the database
select tablespace_name from dba_tablespaces;
6. Query what role a user has
select * from dba_role_privs where grantee=' user name ';
7. Query which system permissions a role includes
select * from dba_sys_privs where grantee='DBA';
perhaps :
select * from role_sys_privs where role='DBA';
8. Query the object permissions included in a role
select * from dba_tab_privs where grantee=' The role of ';
practice oracle Import and export
First step :
When importing and exporting , Need to go to oracle The directory bin Under the table of contents
First find exp.exe The catalog of :E:\oracle\product\10.2.0\db_1\BIN
function cmd Access control
E: enter
cd E:\oracle\product\10.2.0\db_1\BIN enter
------------------------------------------
The second step :
export
Export table
To export this user's table , be :
exp userid=scott/[email protected] tables=(emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp enter
The structure of the exported table
exp userid=scott/[email protected] tables=(emp) file=d:\emp3.dmp rows=n
Use direct export
exp userid=scott/[email protected] tables=(emp) file=d:\e3.dmp direct=y
To export other users' tables , be :
exp userid=system/[email protected] tables=(scott.emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp enter
Export scheme
To export the scheme of this user , be :
exp userid=scott/[email protected] owner=scott file=e:\Oracle Information \LearnOracleByMyself\scott.dmp
To export other users' schemes , be :
exp userid=system/[email protected] tables=(scott.emp) file=e:\Oracle Information \LearnOracleByMyself\scott2.dmp enter
Export database
exp userid=system/[email protected] full=y inctype=complete file=e:\Oracle Information \LearnOracleByMyself\orcl.dmp
Import
The import table
To import this user's table , be :
imp userid=scott/[email protected] tables=(emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp
To import tables to other users , be :
imp userid=system/[email protected] tables=(emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp touser=scott
If you just want to import the structure of the table without importing data , be :
imp userid=scott/[email protected] tables=(emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp rows=n
If you import data to an existing table , be :
imp userid=scott/[email protected] tables=(emp) file=e:\Oracle Information \LearnOracleByMyself\emp.dmp ignore=y
Import scheme
To import your own scheme , be :
imp userid=scott/[email protected] file=e:\Oracle Information \LearnOracleByMyself\emp.dmp
To import other schemes , The user is required to have dba Or imp_full_database
imp userid=system/[email protected] file=e:\Oracle Information \LearnOracleByMyself\emp.dmp touser=scott
Import database
By default , When importing a database , All object structures and data will be imported , The case is as follows :
imp userid=system/[email protected] full=y file=d:\xx.dmp
边栏推荐
- DeFi安全之DEX与AMMs
- Breaking through soft and hard barriers, Xilinx releases Vitis unified software platform for developers
- 多行文本溢出打点
- ARIMA模型选择与残差
- Keil implements compilation with makefile
- Understand │ what is cross domain? How to solve cross domain problems?
- juc包下常用工具类
- profileapi.h header
- 编码技巧——全局异常捕获&统一的返回体&业务异常
- 解决MT7620不断循环uboot(LZMA ERROR 1 - must RESET board to recover)
猜你喜欢

JSP Foundation

Ncnn reasoning framework installation; Onnx to ncnn

Servlet基础知识点

JSP基础
![[sword finger offer] interview question 54: the k-largest node of the binary search tree](/img/13/7574af86926a228811503904464f3f.png)
[sword finger offer] interview question 54: the k-largest node of the binary search tree

Scratch crawler framework

JWT简介

Clickhouse 20.x distributed table testing and chproxy deployment (II)
![[sword finger offer] interview question 41: median in data flow - large and small heap implementation](/img/c3/7caf008b3bd4d32a00b74f2c508c65.png)
[sword finger offer] interview question 41: median in data flow - large and small heap implementation

webRTC中的coturn服务安装
随机推荐
新版jmeter函数助手不在选项菜单下-在工具栏中
Oracle 常用语句
少见的按位操作符
43亿欧元现金收购欧司朗宣告失败!ams表示将继续收购
[sword finger offer] interview question 53-i: find the number 1 in the sorted array -- three templates for binary search
快速高效删除node_modules
centos上mysql5.7主从热备设置
IO流简介
vant-ui toast和dialog使用
Openwrt adds RTC (mcp7940 I2C bus) drive details
微信小程序个人号开通流量主
juc包下常用工具类
TSMC's counterattack: it accused lattice core of infringing 25 patents and asked for prohibition!
DRF学习笔记(五):视图集ViewSet
测试新手学习宝典(有思路有想法)
[regular expression] matching grouping
Pycharm导入已有的本地安装包
[sword finger offer] interview question 46: translating numbers into strings - dynamic programming
Introduction and use of redis
Nacos