linux oracle建立表空间 用户 以及导库

1.连接到服务器,由root账户切换到orale账户下(su - oracle ) ,在切换至dba 账户(sqlplus / as sysdba)
2 建立临时表空间 和永久表空间(实际存放地址)
(1)临时:

select name from v$tempfile;(查询当前的临时表)

create temporary tablespace temp tempfile ‘/home/yyt/oracle/y_temp.dbf’ size 500m autoextend on ;
(2)永久:

select name from v$datafile;(查看当前永久表)

create tablespace user datafile ‘/home/yyt/oracle/yuser_temp.dbf’ size 500m autoextend on;(当前开启了表空间的自动扩展功能,一般是开启的。)
3 建立用户:
create user uname identified by password default tablespace user temporary tablespace temp;
可能出现的问题:表空间不存在,(关闭当前oracle 重启一下 shutdown startup )
4 授权:
grant dba to name ;
grant connect,resource to name ;
grant select any table to name ;
grant delete any table to name ;
grant update any table to name ;
grant insert any table to name ;
5 表空间出现问题,重装,修改name等
查询当前的表空间:
select tablespace_name from user_tablespaces;
drop:(移除掉所有的表空间以及文件)
drop tablespace name including contents and datafiles;
修改表空间name:
alter tablespace userdname rename to nowname;
删除用户:drop user uname cascade;
6 liunx下面进入oracle乱码问题
xshell 解决:export NLS_LANG=“SIMPLIFIED Chinese_CHINA.AL32UTF8” (单次进入有效);
或者进入 vim /etc/profile 修改path (永久)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值