您的位置:首页 > 博客中心 > 数据库 >

oracle项目部署维护最常用sql语句

时间:2022-03-14 02:09

    大家好,这是小编我整理的 每次开发完项目到现场部署服务器时最常用到的一些oracle数据库sql语句,希望能帮到大家。


-- 创建数据表空间

create tablespace pssts
logging  
datafile ‘D:\oracle\product\10.2.0\oradata\orcl\pssts.dbf‘ 
size 10m  
autoextend on  
next 10m maxsize 20480m  
extent management local;  

-- 新建用户并指定表空间

create user pssts identified by pssts123 default tablespace pssts temporary tablespace temp; 


-- 为用户授权

grant connect,dba to pssts ;

--导入数据库
imp pssts/pssts123@orcl fromuser=stpssts touser=pssts file=D:\log=D:\2.log     

--导出数据库   
          
exp pssts/pssts123@orcl  file=D:\pssts.dmp owner=pssts log=D:\pssts.log


-- 删除用户
drop user pssts  cascade;


-- 删除表空间


drop tablespace pssts including contents and datafiles;

热门排行

今日推荐

热门手游