oracle查看表空间所在位置

本文详细介绍了如何在Oracle 11g Enterprise Edition中创建临时表空间,如ccsotest_temp,并为新用户ccsotest_new分配表空间及权限,同时设置了登录名大小写敏感性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

Connected as sys@ip:port/sid AS SYSDBA

管理员用户登录oracle数据库

1、创建临时表空间

select name from v$tempfile;查出当前数据库临时表空间,下面创建临时表空间会使用里面的存放路径;

SQL> select name from v$tempfile;

NAME

--------------------------------------------------------------------------------

/home/oracle/app/oracle/oradata/helowin/temp01.dbf

创建临时表空间:使用上面查询到的临时表空间路径

SQL> create temporary tablespace ccsotest_temp tempfile '/home/oracle/app/oracle/oradata/helowin/ccsotest_temp.dbf' size 100m reuse autoextend on next 20m maxsize unlimited;

Tablespace created

2、创建表空间

select name from v$datafile;查询出当前数据库表空间,下面创建表空间会使用里面的路径

SQL> select name from v$datafile;

NAME

--------------------------------------------------------------------------------

/home/oracle/app/oracle/oradata/helowin/system01.dbf

/home/oracle/app/oracle/oradata/helowin/sysaux01.dbf

/home/oracle/app/oracle/oradata/helowin/undotbs01.dbf

/home/oracle/app/oracle/oradata/helowin/users01.dbf

/home/oracle/app/oracle/oradata/helowin/example01.dbf

创建表空间:使用上面查询到的表空间路径

SQL> create tablespace ccsotest  datafile '/home/oracle/app/oracle/oradata/helowin/ccsotest.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);

Tablespace created

3、创建用户并指定表空间

SQL> create user ccsotest_new identified by ccsotest_new default tablespace ccsotest  temporary tablespace ccsotest_temp;

User created

4、赋予用户权限

SQL> grant dba to ccsotest_new;

Grant succeeded

5、设置ORACLE11g登录名和密码不区分大小写

oracle 11g 以前的版本的用户名和密码是不区分大小写的; 
oracle 11g 用户名和密码默认区分大小写,

可更改alter system set sec_case_sensitive_logon=false; 设置改为不区分大小写,

用DBA用户登录执行就好了,修改后立即生效,不用重启数据库实例。 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值