当前位置:网站首页>Oracle 数据库用户创建、重启、导入导出
Oracle 数据库用户创建、重启、导入导出
2022-08-04 14:31:00 【梦想家DBA】
--数据库用户创建流程
--a.创建表空间:
CREATE SMALLFILE
TABLESPACE "表空间名"
LOGGING
DATAFILE '/home/oracle/app/oradata/表空间名.dbf' SIZE 1024M AUTOEXTEND ON NEXT 512M MAXSIZE 3048M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
--b.创建普通新用户
CREATE USER C##用户名 PROFILE DEFAULT IDENTIFIED BY 用户密码 DEFAULT
TABLESPACE 表空间名 TEMPORARY
TABLESPACE TEMP ACCOUNT UNLOCK;--c.授权
GRANT CONNECT TO C##用户名;
GRANT RESOURCE TO C##用户名;
GRANT DBA TO C##用户名 WITH ADMIN OPTION;
ALTER USER C##用户名 DEFAULT ROLE DBA;
alter user C##用户名 quota unlimited on 表空间名;
--d.用户名去掉C##
select user#,name from user$;---查到到所需修改用户名
update user$ set name='新的用户名称' where user#=139;
commit;
--强制刷新
ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH SHARED_POOL;--e.修改密码
ALTER USER 用户名 IDENTIFIED BY 密码;
COMMIT;
--关闭大小写限制
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON=FALSE;--重启数据库
--a.关闭
lsnrctl stop
sqlplus / as sysdba
shutdown immediate;
--b.启动
lsnrctl start
sqlplus / as sysdba
startup;--数据库导入导出
--使用expdp/impdp命令
--a.创建dmp文件存储路径
create directory dump_dir as '/home/oracle/dmp';
--为用户目录赋读写权限
grant read,write on directory dump_dir to userName;
--b.导出
expdp 用户名/密码 directory=dump_dir dumpfile=name.dmp logfile=name.log schema=用户名
--c.导入
impdp 用户名/密码 directory=dump_dir dumpfile=name.dmp logfile=name.log remap_schema=老用户名:新用户名remap_tablespace=老表空间名:新表空间名边栏推荐
- Lecture 4 SVN
- FRED应用:毛细管电泳系统
- 如何确定异步 I/O 瓶颈
- 技术分享| 融合调度系统中的电子围栏功能说明
- Redis 复习计划 - Redis主从数据一致性和哨兵机制
- [Problem solving] QT update component appears "To continue this operation, at least one valid and enabled repository is required"
- Sum of four squares, laser bombs
- Lixia Action | Kyushu Yunzhang Jinnan: Open source is not a movement for a few people, popularization is the source
- Centos7 install mysql version rapidly
- [LeetCode] 38. Appearance sequence
猜你喜欢

CCF GLCC officially opened | Kyushu Cloud open source experts bring generous bonuses to help universities promote open source

【 HMS core 】 【 Media 】 online video editing service 】 【 material can't show, or network anomalies have been Loading state

南瓜科学产品升级 开启益智探索新篇章

七夕邂逅爱,那人一定在

杭电校赛(逆袭指数)

【模型部署与业务落地】基于量化芯片的损失分析

Cisco-小型网络拓扑(DNS、DHCP、网站服务器、无线路由器)

物联网应用发展趋势

Bluetooth Technology|In the first half of the year, 1.3 million charging piles were added nationwide, and Bluetooth charging piles will become the mainstream of the market

开发者独立搭建一个跨模态搜索应用有多难?
随机推荐
SLAM 05.视觉里程计-2-特征法
【剑指offer33】二叉搜索树的后序遍历序列
【剑指offer59】队列的最大值
企业级优化
如何和程序员谈恋爱
[Problem solving] QT update component appears "To continue this operation, at least one valid and enabled repository is required"
word2003按空格键为什么会出现小数点
异步编程概览
爬虫——动作链、xpath、打码平台使用
并发程序的隐藏杀手——假共享(False Sharing)
快解析结合千方百剂
AlphaFold 如何实现 AI 在结构生物学中的全部潜力
四平方和,激光炸弹
metaRTC5.0新版本支持mbedtls(PolarSSL)
【硬件架构的艺术】学习笔记(1)亚稳态的世界
How to automatically renew the token after it expires?
Lecture 4 SVN
This week to discuss the user experience: Daedalus Nemo to join Ambire, explore the encryption of the ocean
兆骑科创创新创业大赛活动举办,线上直播路演,投融资对接
技术分享| 融合调度系统中的电子围栏功能说明