Oracle之表空间/用户以及dblink的创建

--创建表空间
CREATE TABLESPACE SDWZ
DATAFILE 'D:\O-Oracle命名空间\SDWZ.DBF' 
SIZE 50M AUTOEXTEND ON;

--删除表空间
--drop tablespace SXGY2 including contents and datafiles;
--drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;
--删除用户
--drop user sxgy_wcs2 cascade;
--创建用户
CREATE USER sxgy_wcs2
IDENTIFIED BY sxgy_wcs2
DEFAULT TABLESPACE SXGY;
--授予权限
GRANT connect, resource,dba TO sxgy_wcs2;
grant create session to sxgy_wcs2;

grant create table to sxgy_wcs2;
grant create view to sxgy_wcs2;
grant create procedure to sxgy_wcs2;
grant create synonym to sxgy_wcs2;
--授权一个用户访问另一个用户的权限
--grant select ON loudi_pick.t_device_supply_task TO ldkyx  
--删除用户
--drop user ldkyx cascade;    
--删除表空间
--DROP TABLESPACE ldyc INCLUDING CONTENTS AND DATAFILES;

--创建DBLINK
/*create public database link pick
  connect to loudi_pick  identified by loudi_pick
  using '(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=10.74.132.9)(PORT=1521))
)
(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME=orcl))
)';*/

 

你可能感兴趣的:(Oracle)