飞艳小屋

程序--人生--哲学___________________欢迎艳儿的加入

BlogJava 首页 新随笔 联系 聚合 管理
  52 Posts :: 175 Stories :: 107 Comments :: 0 Trackbacks
发贴心情
Oracle+sde数据备份、恢复

1.数据库完整备份
EXP SYSTEM/PASSWORD@SID FULL=Y FILE=D:\SYSTEM.DMP LOG=D:\SYSTEM.LOG
2.数据入库
  (a)从数据库中删除SDE和SDE USER用户
DROP USER SDE CASCADE;
DROP USER SDEUSER CASCADE;
  (b)创建新的SDE用户和SDEUSER
  下为创建SDE用户过程:
  (i)创建表空间  
CREATE TABLESPACE "SDE"
    LOGGING
    DATAFILE 'C:\ORACLE\ORADATA\ORACLE\SDE.ora' SIZE 200M
    EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO  
  (ii)创建用户
CREATE USER "SDE"  PROFILE "DEFAULT"
    IDENTIFIED BY "PASSWORD" DEFAULT TABLESPACE "SDE"
    TEMPORARY TABLESPACE "TEMP"
    ACCOUNT UNLOCK;
  (iii)创建角色
GRANT "DBA" TO "SDE";
GRANT "CONNECT" TO "SDE";
GRANT "RESOURCE" TO "SDE";
  (iiii)系统权限
GRANT ALTER ANY INDEX TO "SDE" WITH ADMIN OPTION;
GRANT ALTER ANY TABLE TO "SDE" WITH ADMIN OPTION;
GRANT ANALYZE ANY TO "SDE" WITH ADMIN OPTION;
GRANT CREATE ANY INDEX TO "SDE" WITH ADMIN OPTION;
GRANT CREATE ANY PROCEDURE TO "SDE" WITH ADMIN OPTION;
GRANT CREATE ANY SEQUENCE TO "SDE" WITH ADMIN OPTION;
GRANT CREATE ANY TRIGGER TO "SDE" WITH ADMIN OPTION;
GRANT CREATE ANY VIEW TO "SDE" WITH ADMIN OPTION;
GRANT CREATE SESSION TO "SDE" WITH ADMIN OPTION;
GRANT DROP ANY INDEX TO "SDE" WITH ADMIN OPTION;
GRANT DROP ANY TABLE TO "SDE" WITH ADMIN OPTION;
GRANT DROP ANY VIEW TO "SDE" WITH ADMIN OPTION;
GRANT DROP ANY PROCEDURE TO "SDE" WITH ADMIN OPTION;
GRANT DROP ANY SEQUENCE TO "SDE" WITH ADMIN OPTION;
GRANT EXECUTE ANY PROCEDURE TO "SDE" WITH ADMIN OPTION;
GRANT SELECT ANY SEQUENCE TO "SDE" WITH ADMIN OPTION;
GRANT SELECT ANY TABLE TO "SDE" WITH ADMIN OPTION;
GRANT UNLIMITED TABLESPACE  TO "SDE" WITH ADMIN OPTION;

3.导入SDE和SDEUSER的数据
注意顺序,先SDE,后SDEUSER
IMP SYSTEM/PASSWOR@SID FROMUSER=SDE TOUSER=SDE
IMP SYSTEM/PASSWOR@SID FROMUSER=SDEUSER TOUSER=SDEUSER

以上提到的SDE和SDEUSER是不同的用户,SDE是ArcSDE安装时的默认用户,SDEUSER
是指用户存储数据的用户,如果之间使用SDE默认用户存储,则省去所以的SDEUSER操作

posted on 2006-03-20 14:18 天外飞仙 阅读(1732) 评论(2)  编辑  收藏 所属分类: 数据库相关

Feedback

# re: Oracle+sde数据备份、恢复 2006-04-13 11:44 ddsdfffffffff
为什么先要删除用户?  回复  更多评论
  

# re: Oracle+sde数据备份、恢复 2006-04-14 16:59 天外飞仙
修改用户信息和权限也可以,  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: