Oracle 创建表空间

2022-09-08 09:39:37 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

–删除表空间 drop tablespace nacos including contents and datafiles

—-创建表空间并定义路径 create tablespace nacos –表空间名 datafile ‘D:/app/Administrator/oradata/nacos/nacos.dbf’ size 500m –大小初始值 autoextend on –自动扩展 next 50m maxsize 20480m –每次扩展50m,最大为20480m extent management local;

—-创建临时表空间并定义路径 create temporary tablespace nacos_temp tempfile ‘D:/app/Administrator/oradata/nacos/nacos_temp.dbf’ size 32m autoextend on next 32m maxsize 1024m extent management local;

—-删除用户 —-1.先查询要删除的用户连接情况,如果还有进行,则先关掉进行再删除用户 select username,sid,serial#,status from v$session where username=’nacos’; alter system kill session ‘134,72’; alter system kill session ‘143,64’; —-2删除用户 drop user nacos cascade;

—-创建用户 create user nacos identified by nacos default tablespace nacos temporary tablespace nacos_temp; –给用户赋权限 grant connect,resource to nacos; grant dba to nacos; –修改用户名和密码 alter user nacos identified by 123456 –给空表分配segment(字符) alter system set deferred_segment_creation=false; –查看当前表空间 select INSTANCE_NAME from v$instance;

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/157374.html原文链接:https://javaforall.cn

0 人点赞