使用Oracle Sql Developer将SQL SERVER 2008数据库移植到Oracle 11g(二)

      这是本系列的第二部分:建立资料档案库(Migration Repository)

 

      一、连接到Oracle

      在程序左边的连接窗口中,点击加号按钮,添加一个到Oracle数据库的dba连接,如下图:

      image

      配置完成后,点击连接按钮,连接到数据库。

      二,建立用户

      打开到Oracle数据的连接,新建一个用户,我们要在该用户的模式中建立所谓的“资料档案库”,并使用该用户去建立SQL Server移植后的用户名,以及做其它的一些工作。按照帮助中的说明,这个用户最少需要以下权限和角色:

Roles
CONNECT WITH ADMIN OPTION,RESOURCE WITH ADMIN OPTION

Privileges
ALTER ANY ROLE,ALTER ANY SEQUENCE,ALTER ANY TABLE,ALTER TABLESPACE,ALTER ANY TRIGGER,COMMENT ANY TABLE,CREATE ANY SEQUENCE,CREATE ANY TABLE,CREATE ANY TRIGGER,CREATE VIEW WITH ADMIN OPTION,CREATE PUBLIC SYNONYM WITH ADMIN OPTION,CREATE ROLE
CREATE USER,DROP ANY SEQUENCE,DROP ANY TABLE,DROP ANY TRIGGER,DROP USER,DROP ANY ROLE,GRANT ANY ROLE,INSERT ANY TABLE,SELECT ANY TABLE,UPDATE ANY TABLE

以下语句直接建立一个名为migrations的用户

-- Create the user
create user MIGRATIONS

identified by MIGRATIONS
  default tablespace USERS
  temporary tablespace TEMP
  profile DEFAULT;
-- Grant/Revoke role privileges
grant connect to MIGRATIONS with admin option;
grant resource to MIGRATIONS with admin option;
-- Grant/Revoke system privileges
grant alter any role to MIGRATIONS;
grant alter any sequence to MIGRATIONS;
grant alter any table to MIGRATIONS;
grant alter any trigger to MIGRATIONS;
grant alter tablespace to MIGRATIONS;
grant comment any table to MIGRATIONS;
grant create any sequence to MIGRATIONS;
grant create any table to MIGRATIONS;
grant create any trigger to MIGRATIONS;
grant create any view to MIGRATIONS;
grant create materialized view to MIGRATIONS with admin option;
grant create public synonym to MIGRATIONS with admin option;
grant create role to MIGRATIONS;
grant create session to MIGRATIONS with admin option;
grant create synonym to MIGRATIONS with admin option;
grant create tablespace to MIGRATIONS;
grant create user to MIGRATIONS;
grant create view to MIGRATIONS with admin option;
grant drop any role to MIGRATIONS;
grant drop any sequence to MIGRATIONS;
grant drop any table to MIGRATIONS;
grant drop any trigger to MIGRATIONS;
grant drop tablespace to MIGRATIONS;
grant drop user to MIGRATIONS;
grant grant any role to MIGRATIONS;
grant insert any table to MIGRATIONS;
grant select any table to MIGRATIONS;
grant unlimited tablespace to MIGRATIONS with admin option;
grant update any table to MIGRATIONS;

       再次点击连接中的加号按钮,添加一个使用刚刚新建立的用户的连接。

       image

      连接后,在该连接上点击右键,选择移植资料档案库-关联移植资料档案库,程序会在该用户下建立移植资料档案库所需要的表、存储过程等等,弹出一个对话框显示当前建立的进度,稍等片刻即建立完毕。

posted @ 2011-07-10 18:34  绝殇  阅读(3613)  评论(0编辑  收藏  举报