Chinaunix首页 | 论坛 | 博客
  • 博客访问: 13412
  • 博文数量: 8
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 11
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-22 20:30
文章分类
文章存档

2014年(8)

我的朋友

分类: Oracle

2014-03-22 20:44:59

下面的数据库文件路径可根据实际情况改变。如E:\Oracle\oradata\smart\smartdata.dbf数据库安装目录可改为D:\Oracle\oradata\smart\smartdata.dbf.
在UNIX环境下,路径应使用UNIX形式。如:
 D:\oracle\oradata\smart\smartdata.dbf
运行SQL PLUS或SQLPlus Worksheet,以system/manager登录。
1、 建立表空间SMARTDATA。命令:
create tablespace SMARTDATA
datafile 'D:\oracle\oradata\smart\smartdata.dbf' size 10M reuse
autoextend on
default storage (initial 128K next 128K maxextents UNLIMITED  pctincrease 0)
MINIMUM EXTENT 128K;
2、 建立表空间SMARTINDEX。命令:
create tablespace SMARTINDEX
datafile 'D:\oracle\oradata\smart\smartindex.dbf' size 10M reuse
autoextend on
default storage (initial 128K next 128K maxextents UNLIMITED  pctincrease 0)
MINIMUM EXTENT 128K;
3、 建立表空间SMARTDATA_HISTORY。命令:
create tablespace SMARTDATA_HISTORY
datafile 'D:\oracle\oradata\smart\smartdata_history.dbf' size 10M reuse
autoextend on
default storage (initial 256K next 256K maxextents UNLIMITED  pctincrease 0)
MINIMUM EXTENT 256K;
4、 建立表空间SMARTINDEX_HISTORY。命令:
create tablespace SMARTINDEX_HISTORY
datafile 'D:\oracle\oradata\smart\smartindex_history.dbf' size 10M reuse
autoextend on
default storage (initial 256K next 256K maxextents UNLIMITED  pctincrease 0)
MINIMUM EXTENT 256K;
5、 建立表空间SMART_TEMP。命令:
create tablespace SMART_TEMP
datafile 'D:\oracle\oradata\smart\smart_temp.dbf' size 10M reuse
autoextend on
default storage (initial 128K next 128K maxextents UNLIMITED  pctincrease 0)
MINIMUM EXTENT 128K;
2.4.2 建立ORACLE用户
运行SQL PLUS或SQLPlus Worksheet,以system/manager登录。
1、建立ORACLE用户和密码:lytu/lytu。命令:
-- Create the user
create user SQMINTEGRATE  identified by SQMINTEGRATE 
  default tablespace SQM_INTEGRATE
  temporary tablespace TEMPSQM
  profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to SQMINTEGRATE;
grant dba to SQMINTEGRATE;
grant resource to SQMINTEGRATE;
-- Grant/Revoke system privileges
grant create table to SQMINTEGRATE;
grant delete any table to SQMINTEGRATE;
grant select any table to SQMINTEGRATE;
grant unlimited tablespace to SQMINTEGRATE;
2、修改用户的缺省表空间和临时表空间。命令:
alter user smart default tablespace smartdata temporary tablespace temp;
阅读(456) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~