Oracle建库常用命令
Windows:用户 create temporary tablespace SP_MINES_TMP tempfile ‘E:\Oracle\oradata\orcl\SP_MINES_TMP.dbf‘ size 50m autoextend on next 50 maxsize 2048m extent management local; create tablespace SP_MINES logging datafile ‘E:\Oracle\oradata\orcl\SP_MINES.dbf‘ size 50m autoextend on next 50 maxsize 2048m extent management local; create user mines identified by 123456 default tablespace SP_MINES temporary tablespace SP_MINES_TMP grant connect,resource,dba to mines; Linux用户: 管理员用户登录oracle数据库 1、创建临时表空间 查出当前数据库临时表空间,主要是使用里面的存放路径; select name from v$tempfile; 得到其中一条记录/opt/oracle/oradata/orcl/temp01.dbf 创建临时表空间:create temporary tablespace SP_MINES_TMP tempfile ‘/opt/oracle/oradata/orcl/SP_MINES_TMP.dbf‘ size 100m reuse autoextend on next 20m maxsize unlimited; 2、创建表空间 查询出当前数据库表空间,使用里面的路径 select name from v$datafile; 得到其中一条记录/opt/oracle/oradata/orcl/system01.dbf 创建表空间:create tablespace SP_MINES datafile ‘/opt/oracle/oradata/orcl/SP_MINES.dbf‘ size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited); 3、创建用户并指定表空间 create user MINES identified by 123456 default tablespace SP_MINES temporary tablespace SP_MINES_TMP; 4、赋予用户权限 grant connect,resource,dba to mines; 快速导出导入数据: exp mines/[email protected]:1521/orcl file=D:\data\mine-2019-12-17.dmp log=D:\data\mine-2019-12-17.log imp mines/123456@localhost:1521/orcl full=y file=D:\data\mine-2019-12-17.dmp
相关推荐
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
流云追风 2020-07-04
dataminer 2020-06-25
yanghuatong 2020-08-16
LuoXinLoves 2020-08-09
Justdoit00 2020-06-26
娜娜 2020-06-22
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
zhuzhufxz 2020-09-16
数据库设计 2020-08-16
dbasunny 2020-08-16
罗罗 2020-08-16
ihuaqiang 2020-08-16
choice0 2020-07-30
娜娜 2020-07-28
solarspot 2020-07-28
踩风火轮的乌龟 2020-07-26
娜娜 2020-07-20
xwb 2020-07-19
娜娜 2020-07-18
zhangchaoming 2020-06-21