create user user_name identified by user_name


create temporary tablespace user_name_temp
tempfile '/oradata/ORA11G/user_name_temp.dbf'
size 50m
autoextend on
next 50m
maxsize unlimited
--maxsize 2048m 
extent management local; create tablespace user_name_tb
logging
datafile '/oradata/ORA11G/user_name_tb2.dbf'
size 32m
autoextend on
next 32m maxsize unlimited
extent management local
default compress;

--有特殊字符需要加双引号
create user
user_name identified by "123!"
default tablespace user_name_tb
temporary tablespace user_name_temp; grant create session to user_name;
grant unlimited tablespace to user_name; grant create any table to user_name;
grant drop any table to user_name;
grant select any table to user_name;
grant insert any table to user_name;
grant update any table to user_name;
grant create any procedure to user_name;
grant execute any procedure to user_name;
--drop user user_name;
--drop tablespace user_name_tb;

插入任何数据显示:ora-01658 unable to create initial extent for segment in tablespace

alter tablespace {表空间名字} add datafile '物理数据文件路径' SIZE 『初始大小M』 AUTOEXTEND ON NEXT 『自动扩展大小M』

alter tablespace SDK_TB add datafile '/oradata/ORA11G/sdk_tb2.dbf' size 1000m autoextend on next 200m

create temporary tablespace dev_temp
tempfile '/data/phonedb/datafile/dev_temp.dbf'
size 50m
autoextend on
next 50m maxsize unlimited -- 2048m
extent management local; create tablespace dev_tb
logging
datafile '/data/phonedb/datafile/dev_tb.dbf'
size 32m
autoextend on
next 32m maxsize unlimited
extent management local
default compress;

create user user_name identified by "aaaaaa"
default tablespace DEV_TB
temporary tablespace DEV_TEMP;
-- Grant/Revoke role privileges
grant connect to user_name;
grant resource to user_name;
-- Grant/Revoke system privileges
grant create session to user_name;
grant select any table to user_name;

grant unlimited tablespace to dev;

  

修改用户默认表空间

alter user user_name default tablespace dev_tb;
alter user user_name temporary tablespace dev_temp;

查看数据文件所在路径

select * from dba_data_files
order by tablespace_name, file_name;
grant select on 表名 to 用户名;

修改密码
alter user 用户名identified by 密码;

最新文章

  1. JS刷新父窗口的几种方式
  2. How and Where Concurrent Asynchronous I/O with ASP.NET Web API 对异步编程分析的非常的好
  3. JavaScript作用域原理(一)——作用域链
  4. 学习C++.Primer.Plus 8 函数探幽
  5. ExtJS4笔记 Data
  6. mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法
  7. PICT实现组合测试用例(一)
  8. (转)使用Aspose.Cell控件实现Excel高难度报表的生成(一)
  9. Sencha touch navigation 内嵌list,itemTap第二次点击不跳转的问题
  10. oralce中exists not exists in not in对于NULL的处理
  11. jquery上传控件个人使用
  12. Clojure操作mysql
  13. 简单天气应用开发——自定义TableView
  14. (Question)CSS中position的绝对定位问题
  15. Antd-Pro2.0版本如何修改代理,让Mock变为真实服务器接口
  16. Settings 参数记录
  17. 实现Repeater控件的记录单选(二)
  18. Springboot:没有src/main/resources目录(引入图片时(或静态资源时)发现没有该目录)
  19. Yii2 cache的用法(1)
  20. target="_blank" 导致的钓鱼攻击

热门文章

  1. spring mvc:常用标签库(文本框,密码框,文本域,复选框,单选按钮,下拉框隐藏于,上传文件等)
  2. Selenium with Python 009 - WebDriver API
  3. SessionUtils
  4. IOS-KVO、KVC
  5. 27-THREE.JS 平面
  6. Activiti快速入门
  7. Struts06---通配符的使用
  8. http keep - alive 与 长连接
  9. Qt之格栅布局(QGridLayout)
  10. C#调用EasyPusher推送到EasyDarwin实现视频流中转