首页 > 代码库 > Oracle创建表空间与用户

Oracle创建表空间与用户

/*    说明:若已经存在相应的用户和表空间,则需要先删除相应的用户和表空间	      然后再全部重新建立*/--删除用户drop user XDAYWEIXIN cascade;--删除表空间drop tablespace WEIXIN_DATA_TEMP including contents and datafiles;drop tablespace WEIXIN_DATA      including contents and datafiles;--创建临时表空间create temporary tablespace WEIXIN_DATA_TEMP tempfile ‘WEIXIN_DATA_TEMP.DBF‘        size 500M autoextend on;--创建表空间create tablespace WEIXIN_DATA logging datafile ‘WEIXIN_DATA.DBF‘        size 500M autoextend on;--创建用户并指定表空间create user XDAYWEIXIN        identified by XDAYWEIXIN 	   default tablespace WEIXIN_DATA 	   temporary tablespace WEIXIN_DATA_TEMP	   profile default;--给用户授予角色权限grant connect to XDAYWEIXIN;grant resource to XDAYWEIXIN;--grant dba to thinkcms;--给用户授予系统权限grant unlimited tablespace to XDAYWEIXIN;--给用户赋予dba权限--grant dba to XDAYWEIXINexit;

  

Oracle创建表空间与用户