北京移动话管平台建库脚本备份

1、进入命令行

   sqlplus / as sysdba 回车

2、create tablespace bca

logging  

datafile 'D:\oracle10\product\10.2.0\oradata\orcl\bca.dbf' 

size 1024m  

autoextend on  

next 50m maxsize 20480m  

extent management local; 

 

3、create user bjyd identified by bjyd 

default tablespace bca ;

 

create user bcacc identified by shark

default tablespace bca ;

create user bca identified by shark

default tablespace bca ;

create user bcalog identified by shark

default tablespace bca ;

 

grant dba,resource,connect to bjyd;

grant select any table to bjyd;

grant update any table to bjyd;

grant delete any table to bjyd;

grant insert any table to bjyd;

 

grant resource,connect to bca;

 

grant resource,connect to bcacc;

 

grant resource,connect to bcalog;

 

 

imp bjyd/bjyd 'dump文件目录' fromuser='数据来源用户' touser='导入用户'

 

imp bjyd/bjyd  'dump文件目录' full=y  // 默认导入到bjyd用户下

你可能感兴趣的:(脚本)