当前位置:网站首页>Oracle database user creation, restart, import and export
Oracle database user creation, restart, import and export
2022-08-04 14:36:00 【Dreamer DBA】
--Database user creation process
--a. Create tablespace:
CREATE SMALLFILETABLESPACE "tablespace name"LOGGINGDATAFILE '/home/oracle/app/oradata/tablespace name.dbf' SIZE 1024M AUTOEXTEND ON NEXT 512M MAXSIZE 3048MEXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
--b. Create a normal new user
CREATE USER C##username PROFILE DEFAULT IDENTIFIED BY user password DEFAULTTABLESPACE tablespace name TEMPORARYTABLESPACE TEMP ACCOUNT UNLOCK;--c.Authorization
GRANT CONNECT TO C##username;GRANT RESOURCE TO C##username;GRANT DBA TO C##username WITH ADMIN OPTION;ALTER USER C##username DEFAULT ROLE DBA;alter user C##username quota unlimited on tablespace name;
--d. Remove C## from the username
select user#,name from user$;--- find the user name to be modifiedupdate user$ set name='new user name' where user#=139;commit;
--force refresh
ALTER SYSTEM CHECKPOINT;ALTER SYSTEM FLUSH SHARED_POOL;--e.Change password
ALTER USER username IDENTIFIED BY password;COMMIT;
--close case limit
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON=FALSE;--Restart the database
--a.Close
lsnrctl stopsqlplus / as sysdbashutdown immediate;
--b.Start
lsnrctl startsqlplus / as sysdbastartup;--Database import and export
--use expdp/impdp command
--a. Create dmp file storage path
create directory dump_dir as '/home/oracle/dmp';
--Assign read and write permissions to the user directory
grant read,write on directory dump_dir to userName;
--b.Export
expdp username/password directory=dump_dir dumpfile=name.dmp logfile=name.log schema=username
--c.Import
impdp username/password directory=dump_dir dumpfile=name.dmp logfile=name.log remap_schema=old username:new username remap_tablespace=old tablespace name:new tablespace name边栏推荐
- 【 HMS core 】 【 Media 】 online video editing service 】 【 material can't show, or network anomalies have been Loading state
- CCF GLCC officially opened | Kyushu Cloud open source experts bring generous bonuses to help universities promote open source
- CF1527D MEX Tree (mex & tree & inclusive)
- RS|哨兵二号(.SAFE格式)转tif格式
- 【硬件架构的艺术】学习笔记(1)亚稳态的世界
- vim common operation commands
- word2003按空格键为什么会出现小数点
- 【模型部署与业务落地】基于量化芯片的损失分析
- 如何和程序员谈恋爱
- 本周讨论用户体验:Daedalus 的 Nemo 加入 Ambire,探索加密海洋
猜你喜欢

MySQL【触发器】

leetcode:241. 为运算表达式设计优先级

【北亚数据恢复】IBM System Storage存储lvm信息丢失数据恢复方案

Find My Technology | Prevent your pet from getting lost, Apple Find My technology can help you

快解析结合千方百剂

【剑指offer59】队列的最大值

爬虫——selenium基本使用、无界面浏览器、selenium的其他用法、selenium的cookie、爬虫案例

开发者独立搭建一个跨模态搜索应用有多难?

理论篇1:深度学习之----LetNet模型详解

idea removes spark logs
随机推荐
JCMsuite应用:倾斜平面波传播透过光阑的传输
[LeetCode] 38. Appearance sequence
编程思想_编程有必要给孩子学吗?
xampp安装包含的组件有(php,perl,apche,mysql)
AOSP built-in APP franchise rights white list
电子行业MES管理系统有哪些特殊功能
LCP 06. 拿硬币-遍历
Rust 从入门到精通04-变量
Crawler - basic use of selenium, no interface browser, other uses of selenium, cookies of selenium, crawler cases
Oracle RAC环境下vip/public/private IP的区别
CF1527D MEX Tree(mex&树&容斥)
【剑指offer33】二叉搜索树的后序遍历序列
leetcode:212. 单词搜索 II
【HMS core】【Media】【视频编辑服务】 在线素材无法展示,一直Loading状态或是网络异常
集合划分差最小问题(01背包)
Google plug-in. Download contents file is automatically deleted after solution
[深入研究4G/5G/6G专题-50]: URLLC-16-《3GPP URLLC相关协议、规范、技术原理深度解读》-10-高可靠性技术-1-低编码率编码调制方案MCS与高可靠性DRB
F.金玉其外矩阵(构造)
我爱七夕哈哈哈
F. Jinyu and its outer matrix (construction)