oracle数据库常用命令

本文介绍如何在Oracle数据库中创建表空间、用户及权限分配,并演示了数据导入导出操作及表空间和用户的删除过程。

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

 

创建表空间
create tablespace TESTDB datafile 'E:\oracle\product\10.2.0\oradata\test\testdb.dbf' size 10240M
autoextend on next 10250M maxsize 10270M
default storage(initial 10M next 1M)
permanent
online
logging;
create tablespace YLBXTEMP datafile 'D:\oracle\product\10.2.0\oradata\ylbx\ylbxtemp.dbf' size 5120M
autoextend on next 7680M maxsize 10240M
default storage(initial 10M next 1M)
permanent
online
logging;

创建用户并指定表空间
create user SYSDATA identified by SYSDATA
default tablespace TESTDB
profile DEFAULT;


create user webuser identified by web
default tablespace ylbx01
temporary tablespace YLBXTEMP
profile DEFAULT;

给用户授予权限

grant dba,connect,resource to SYSDATA;
grant connect to webuser;

导入数据备份文件
imp userid=yjjcdb/yjjcdb file='D:\yjjc.dmp'  fromuser=yjjcdb touser=yjjcdb  log='D:\import.log'

imp userid=yjjcdb/yjjcdb@igrp_127.0.0.1  file='D:\yjjc.dmp'  fromuser=yjjcdb touser=yjjcdb  log='D:\import.log'

exp yjjcdb/yjjcdb@igrp_127.0.0.1 file=yjjcdb_20110617.dmp   owner=yjjcdb


exp carmot/carmot@igrp_127.0.0.1 file=D:\carmot_20110822_tbmenurolelist.dmp   owner=carmot

++

删除表空间
drop tablespace ylbx01 including contents and datafiles;
删除用户名:
drop user jmyb cascade;

drop user SYSDATA cascade;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值