Welcome 微信登录

首页 / 数据库 / MySQL / Linux系统下Oracle创建和删除表空间及用户

#su - Oracle
$ sqlplus /nolog
SQL> connect / as sysdba
--//创建临时表空间
create temporary tablespace test_temp
tempfile "/data/oracle/oradata/test/test_temp01.dbf" --//Linux下的文件系统
size 64m
autoextend on
next 64m maxsize 2048m
extent management local; --//创建数据表空间
create tablespace test_data
logging
datafile "/data/oracle/oradata/test/test_data01.dbf" --//Linux下的文件系统
size 64m
autoextend on
next 65m maxsize 2048m
extent management local; --//创建用户并指定表空间 用户名和密码均为"test"
create user test identified by test
default tablespace test_data
temporary tablespace test_temp;
--//给用户授予权限 grant connect,resource to test; --//删除表空间
drop tablespace test_temp including CONTENTS and datafiles; --//修改用户密码
alter user test identified by new_password; --//删除用户
drop user 用户名 cascade; --//执行该语句请小心,会级联删除该用户下所有对象。
--//给用户分配权限 SQL> grand connect to test_user;
SQL> grand resource to test_user;
SQL> grand create view to test_user; 建好表后插入数据 查询数据 要对该表加上引号 如: “表名”MySQL在Linux下安装详细教程Oracle 开启autotrace功能相关资讯      Oracle教程 
  • Oracle中纯数字的varchar2类型和  (07/29/2015 07:20:43)
  • Oracle教程:Oracle中查看DBLink密  (07/29/2015 07:16:55)
  • [Oracle] SQL*Loader 详细使用教程  (08/11/2013 21:30:36)
  • Oracle教程:Oracle中kill死锁进程  (07/29/2015 07:18:28)
  • Oracle教程:ORA-25153 临时表空间  (07/29/2015 07:13:37)
  • Oracle教程之管理安全和资源  (04/08/2013 11:39:32)
本文评论 查看全部评论 (2)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款