ArcGIS oracle空间数据库的备份,导入

前提:保证ArcSDE能用

第一步,检查数据库字符集是否一致

    SQL>select userenv(‘language’) from dual;

第二步,导出数据库1 SDE表空间

    Exp sde/sde@SID file=D:\exp\exp.dmp

第三步,导入原sde数据内容


首先停止ArcSDE服务器中的sde服务,删除数据库2中的sde用户及表空间。
    drop tablespace sde including contents and datafiles;  
    drop user sde cascade;
使用sql语句建立新的sde用户及空的表空间,并授权SDE用户相同的权限(cmd sysdba连接)
     create tablespace sde
     logging  
    datafile 'D:\app\Administrator\product\11.2.0\client_2\sde.dbf'
    size 3072m  
    autoextend on  
    next 1050m maxsize 20480m  
    extent management local;
    create user sde identified by sde default tablespace sde temporary tablespace temp;  
    grant  CREATE SESSION to sde;  
    grant  CREATE TABLE to sde;  
    grant  CREATE PROCEDURE to sde;  
    grant  CREATE SEQUENCE to sde;  
    grant  CREATE TRIGGER to sde;  
    grant  CREATE TYPE to sde;  
    grant  CREATE LIBRARY to sde;  
    grant  CREATE PUBLIC SYNONYM to sde;  
    grant  CREATE OPERATOR to sde;  
    grant  CREATE INDEXTYPE to sde;  
    grant  DROP PUBLIC SYNONYM to sde;  
    grant  CREATE VIEW to sde;  
    grant  UNLIMITED TABLESPACE to sde;  
    grant  ADMINISTER DATABASE TRIGGER to sde;

    grant connect,resource,dba to sde;

    grant EXECUTE ON dbms_pipe to sde;
    grant EXECUTE ON dbms_lock to sde;

    imp username/password@SID file=D:\exp\exp.dmp fromuser=sde touser=sde ignore=y(cmd直接)

第四步,重新启动Arcsde服务器上的服务,成功

注:(cmd sysdba连接数据库)

      1.sqlplus /nolog
      2.connect sys/[email protected]/myorcl as sysdba(conn /as sysdba;)
     SQLPLUS SYS/SYS@myorcl AS SYSDBA

猜你喜欢

转载自blog.csdn.net/u013237351/article/details/78032777