linux下安装完数据库后,新建表空间的地址不在oracle安装目录内,相关操作记录如下:
用root用户授权:
chown -R oracle.dba /mnt/
切换回oracle用户,
su - oracle
登录sqlplus
sqlplus / as sysdba
创建表空间
create tablespace usc logging datafile'/mnt/oracle/oradata/orcl/usc/usc.dbf' size 1024m autoextend on next 100m maxsize unlimited extent management local;
创建用户
create user usc identified by usc default tablespace usc temporary tablespace temp;
用户授权
grant dba to ups,usc;
数据库的连接地址
ups-cloud = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =IP地址)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
导入数据库
impdp ups/ups@ip:1521/orcl schemas=dmp内用户 dumpfile=ups.dmp remap_schema=dmp用户:ups REMAP_TABLESPACE=dmp表空间:ups REMAP_TABLESPACE=mp表空间::ups REMAP_TABLESPACE=mp表空间::ups version=10.2.0
百度:
create tablespace hos05 logging datafile'/data/oracle/oradata/orcl11g/hos05.dbf' size 1024m autoextend on next 100m maxsize unlimited extent management local;
create user hos05 identified by xxxx default tablespace hos05 temporary tablespace temp;
grant dba to ups,usc,mps,mhs,hos01,hos02,hos03,hos04,hos05;
开发库:
create tablespace uhq logging datafile'/u01/app/oracle/oradata/orcl/uhq.dbf' size 1024m autoextend on next 100m maxsize unlimited extent management local;
create user uhq identified by uhq default tablespace uhq temporary tablespace temp;
grant dba to uhq;
欢迎光临 临海小憇 (http://www.czidea.cn/) | Powered by Discuz! X3.3 |