oracle数据库的使用

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle数据库的使用相关的知识,希望对你有一定的参考价值。

【oracel创建表空间的方法】
--创建永久表空间--
create tablespace 表空间名(如:table_1)
datafile ‘文件路径及文件名(如:F:\java\Oracle表空间.dbf)‘注意:后缀为bdf
size 表空间大小(如:100M)
autoextend on next 每次自动扩展大小(如:50m);

--创建临时表空间--
create temporary tablespace 表空间名(如:table_1)
tempfile ‘文件路径及文件名(如:F:\java\Oracle表空间.dbf)‘注意:后缀为bdf
size 表空间大小(如:100M)
例如:
create temporary tablespace table_1
Tempfile F:\java\Oracle表空间\A.dbf
size 100M

--查看表空间名称、id、文件存储位置、初始大小
select tablespace_name,file_id,file_name
bytes
from dba_data_files
order by file_id;


【oracel创建用户的方法】
角色权限:
connect
resource

设置用户权限:
在sql窗口
create user usename
identified by password;

grant connect to usename;
grant resource to usename;
grant create session to usename;
grant create any index to usename;
grant create any view to usename;
grant select any table to usename;
grant update any table to usename;
grant delete any table to usename;

--授权DBA权限给用户
grant dba to usename;

以上是关于oracle数据库的使用的主要内容,如果未能解决你的问题,请参考以下文章

oracle使用工具

oracle 中的控制文件和数据文件

python使用cx_oracle模块连接oracle数据库

oracle数据库如何查看表空间大小

如何检查oracle数据库性能

Oracle数据库实验---Oracle环境配置及组件的使用