常用oracle语句备忘

/*==============================================================*/
/* DBMS name:      ORACLE Version 11i                           */
/* Created on:     2008-4-24 10:53:10                           */
/*==============================================================*/


create tablespace WRMID
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRMID.ORA'
    size 50M
    reuse
    autoextend on
        next 2M
        maxsize UNLIMITED
logging
permanent;

create tablespace WRPLA
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRPLA.ORA'
    size 100M
    reuse
    autoextend on
        next 5M
        maxsize UNLIMITED
logging
permanent;

create tablespace WRPER
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRPER1.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED,
     'C:\ORACLE\MAIN\DBSPACE\WRPER2.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED
logging
default storage
(
    initial 200K
    next 200K
    minextents 10
    maxextents unlimited
    pctincrease 50
)
permanent;

create tablespace WRORG
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRORG1.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED,
     'C:\ORACLE\MAIN\DBSPACE\WRORG2.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED
logging
default storage
(
    initial 200K
    next 200K
    minextents 10
    maxextents unlimited
    pctincrease 50
)
permanent;

create tablespace WRLOB
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRLOB1.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED,
     'C:\ORACLE\MAIN\DBSPACE\WRLOB2.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED
logging
default storage
(
    initial 200K
    next 200K
    minextents 10
    maxextents unlimited
    pctincrease 50
)
permanent;

create tablespace WRIDX
datafile
     'C:\ORACLE\MAIN\DBSPACE\WRIDX1.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED,
     'C:\ORACLE\MAIN\DBSPACE\WRIDX2.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED
logging
default storage
(
    initial 200K
    next 200K
    minextents 10
    maxextents unlimited
    pctincrease 50
)
permanent;

create temporary tablespace WRTMP
tempfile
     'C:\ORACLE\MAIN\DBSPACE\WRTMP1.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED,
     'C:\ORACLE\MAIN\DBSPACE\WRTMP2.ORA'
    size 1000M
    reuse
    autoextend on
        next 10M
        maxsize UNLIMITED
extent management local;

-- Create the user 
create user wrmid
  identified by admin
  default tablespace WRMID
  temporary tablespace WRTMP;
-- Grant/Revoke role privileges 
grant connect to wrmid;
grant dba to wrmid;
-- Grant/Revoke system privileges 
grant unlimited tablespace to wrmid;


-- Create the user 
create user wrserver
  identified by admin
  default tablespace WRPLA
  temporary tablespace WRTMP;
-- Grant/Revoke role privileges 
grant connect to wrserver;
grant dba to wrserver;
-- Grant/Revoke system privileges 
grant unlimited tablespace to wrserver;


--删除表空间
DROP TABLESPACE data01 INCLUDING CONTENTS AND DATAFILES;

drop user tmsweb cascade;

exp userid=system/systempassword@tsg file=d:\1.dmp log=d:\1.log owner=tsg buffer=1024000 


imp userid=system/systempassword fromuser=tsg touser=tsg2007 file=d:\1.dmp buffer=10240000

imp userid=tmsweb/tms123@192.168.105.212/cdptms fromuser=tmsweb touser=tmsweb file=d:\tmsweb20090625233002.dmp buffer=10240000 log=d:\1.log

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值