当前位置:网站首页>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边栏推荐
- Android Sqlite3基本命令
- 1375. 二进制字符串前缀一致的次数-前序遍历法
- F.金玉其外矩阵(构造)
- 【 HMS core 】 【 Media 】 online video editing service 】 【 material can't show, or network anomalies have been Loading state
- Find My技术|防止你的宠物跑丢,苹果Find My技术可以帮到你
- oracle+RAC+linux5.1所需要安装的包
- Sum of four squares, laser bombs
- 职场漫谈:为什么越是内卷的行业越有人争着抢着往里冲?好奇怪的说...
- [机缘参悟-60]:《兵者,诡道也》-1-开篇:“死“与“生“都是天道
- 技术分享| 融合调度系统中的电子围栏功能说明
猜你喜欢

第六届未来网络发展大会,即将开幕!

Sum of four squares, laser bombs

token 过期后,如何自动续期?

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

在腾讯,我的试用期总结!

【HMS core】【Media】【视频编辑服务】 在线素材无法展示,一直Loading状态或是网络异常

化繁为简,聊一聊复制状态机系统架构抽象

职场漫谈:为什么越是内卷的行业越有人争着抢着往里冲?好奇怪的说...

输入输出流总结

MySQL【触发器】
随机推荐
leetcode:241. 为运算表达式设计优先级
NPDP|作为产品经理,如何快速提升自身业务素养?
谷歌插件.crx文件下载后被自动删除的解决方法
[LeetCode] 38. Appearance sequence
CCF GLCC正式开营|九州云开源专家携丰厚奖金,助力高校开源推广
【模型部署与业务落地】基于量化芯片的损失分析
leetcode:250. 统计同值子树
第六届未来网络发展大会,即将开幕!
没有Project Facets的解决方法
Technology sharing | Mini program realizes audio and video calls
如何和程序员谈恋爱
[深入研究4G/5G/6G专题-50]: URLLC-16-《3GPP URLLC相关协议、规范、技术原理深度解读》-10-高可靠性技术-1-低编码率编码调制方案MCS与高可靠性DRB
[Opportunity Enlightenment-60]: "Soldiers, Stupid Ways"-1- Opening: "Death" and "Life" are the way of heaven
Redis 复习计划 - Redis主从数据一致性和哨兵机制
Notes for xpath getting node with namespace
【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
2042. 检查句子中的数字是否递增-力扣双百代码-设置前置数据
Find My Technology | Prevent your pet from getting lost, Apple Find My technology can help you
C# winforms 输入颜色转换颜色名
记录都有哪些_js常用方法总结