我是Oracle Warehouse Builder 11gR2的新手,但已经不喜欢了!我在具有2GB RAM和XP 32位的VM中使用它。
我从平面文件到目标,从源关系BD到目标等有9个映射。其中3个映射中的问题似乎是当我从源和舞台区域连接表时。我不知道它是否相关,但是我的源数据库它与舞台区域(目标)在同一台机器上,但在不同的表空间中。
我可以告诉你:
1-我如何创建源数据库用户表空间:
CREATE TABLESPACE insrc DATAFILE 'C:\IN\tablespaces\in_src.dbf' SIZE 100M;
CREATE TEMPORARY TABLESPACE insrc_temp TEMPFILE 'C:\IN\tablespaces\insrc_temp.dbf' SIZE 50M;
CREATE USER insrc IDENTIFIED BY insrc DEFAULT TABLESPACE insrc TEMPORARY TABLESPACE insrc_temp QUOTA 0 on system;
GRANT ALL PRIVILEGES TO insrc;
-- Grant this role to be able to import a dump file
GRANT IMP_FULL_DATABASE to insrc;
-- Grant this role to be able to export to a dump file
GRANT EXP_FULL_DATABASE to insrc;
然后,在cmd行我输入的内容如下:imp SYSTEM/%PASSWORD_DO_ORACLE% FROMUSER=trab2 TOUSER=insrc file='trab2.DMP'
2-我如何为目标阶段区域用户表空间和角色创建表空间:
CREATE TABLESPACE indw DATAFILE 'C:\IN\tablespaces\indw.dbf' SIZE 128M AUTOEXTEND ON NEXT 512K MAXSIZE 250M;
CREATE TEMPORARY TABLESPACE indwtemp TEMPFILE 'C:\IN\tablespaces\indwtemp.dbf' SIZE 3M AUTOEXTEND ON NEXT 512K MAXSIZE 200M;
CREATE USER indw IDENTIFIED BY indw DEFAULT TABLESPACE indw TEMPORARY TABLESPACE indwtemp;
ALTER USER indw account unlock;
GRANT CREATE SESSION TO indw;
-- grant all system privileges
GRANT ALL PRIVILEGES TO indw;
-- grant all ROLES
GRANT "OLAP_XS_ADMIN" TO "INDW" ;
GRANT "WFS_USR_ROLE" TO "INDW" ;
GRANT "DELETE_CATALOG_ROLE" TO "INDW" ;
GRANT "HS_ADMIN_SELECT_ROLE" TO "INDW" ;
GRANT "CWM_USER" TO "INDW" ;
GRANT "SPATIAL_WFS_ADMIN" TO "INDW" ;
GRANT "OLAP_DBA" TO "INDW" ;
GRANT "OWB$CLIENT" TO "INDW" ;
GRANT "RESOURCE" TO "INDW" ;
GRANT "APEX_ADMINISTRATOR_ROLE" TO "INDW" ;
GRANT "OWB_DESIGNCENTER_VIEW" TO "INDW" ;
GRANT "CTXAPP" TO "INDW" ;
GRANT "SPATIAL_CSW_ADMIN" TO "INDW" ;
GRANT "GATHER_SYSTEM_STATISTICS" TO "INDW" ;
GRANT "AUTHENTICATEDUSER" TO "INDW" ;
GRANT "CONNECT" TO "INDW" ;
GRANT "HS_ADMIN_EXECUTE_ROLE" TO "INDW" ;
GRANT "PLUSTRACE" TO "INDW" ;
GRANT "LOGSTDBY_ADMINISTRATOR" TO "INDW" ;
GRANT "JAVADEBUGPRIV" TO "INDW" ;
GRANT "XDB_WEBSERVICES_WITH_PUBLIC" TO "INDW" ;
GRANT "XDBADMIN" TO "INDW" ;
GRANT "XDB_WEBSERVICES_OVER_HTTP" TO "INDW" ;
GRANT "CSW_USR_ROLE" TO "INDW" ;
GRANT "OLAPI_TRACE_USER" TO "INDW" ;
GRANT "JAVAIDPRIV" TO "INDW" ;
GRANT "DBFS_ROLE" TO "INDW" ;
GRANT "ADM_PARALLEL_EXECUTE_TASK" TO "INDW" ;
GRANT "AQ_ADMINISTRATOR_ROLE" TO "INDW" ;
GRANT "JAVA_DEPLOY" TO "INDW" ;
GRANT "OEM_MONITOR" TO "INDW" ;
GRANT "XDB_WEBSERVICES" TO "INDW" ;
GRANT "JAVAUSERPRIV" TO "INDW" ;
GRANT "MGMT_USER" TO "INDW" ;
GRANT "OWB_USER" TO "INDW" ;
GRANT "JAVA_ADMIN" TO "INDW" ;
GRANT "JMXSERVER" TO "INDW" ;
GRANT "EXECUTE_CATALOG_ROLE" TO "INDW" ;
GRANT "SCHEDULER_ADMIN" TO "INDW" ;
GRANT "DATAPUMP_IMP_FULL_DATABASE" TO "INDW" ;
GRANT "WM_ADMIN_ROLE" TO "INDW" ;
GRANT "ORDADMIN" TO "INDW" ;
GRANT "AQ_USER_ROLE" TO "INDW" ;
GRANT "DATAPUMP_EXP_FULL_DATABASE" TO "INDW" ;
GRANT "SELECT_CATALOG_ROLE" TO "INDW" ;
GRANT "RECOVERY_CATALOG_OWNER" TO "INDW" ;
GRANT "OLAP_USER" TO "INDW" ;
GRANT "DBA" TO "INDW" ;
GRANT "JAVASYSPRIV" TO "INDW" ;
GRANT "XDB_SET_INVOKER" TO "INDW" ;
GRANT "HS_ADMIN_ROLE" TO "INDW" ;
GRANT "EJBCLIENT" TO "INDW" ;
GRANT "OEM_ADVISOR" TO "INDW" ;
ALTER USER "INDW" DEFAULT ROLE "EXP_FULL_DATABASE","IMP_FULL_DATABASE";
-- Might be needed ...just in case
-- run plustrace.bat before grant this privilege
-- GRANT plustrace TO indw;
/* To create a database directory, a user requires the CREATE DIRECTORY and DROP DIRECTORY privileges.
When you create a Warehouse Builder user, these privileges are not automatically granted
to the user. Therefore, the database administrator must explicitly grant these privileges
to the Warehouse Builder user.*/
GRANT CREATE ANY DIRECTORY TO indw;
GRANT DROP ANY DIRECTORY TO indw;
其中一个有问题的映射是CLIENTS_MAPPING,它需要CUSTOMERS(来自src),COUNTRIES(来自src),DEMOGRAPHY(来自目标)和CLIENT_LAST_BUY(来自目标)。插入应该包含50,000行,并且在CLIENTS表上花费超过30分钟并且根本没有数据。
在包含表格源和目标的其他映射上也会出现此问题。当我在一个地方或另一个地方使用时,没有问题。
如上所述,我将为您提供表CLIENTS的Power Designer自动生成代码:
create table CLIENTS
(
CLIENT_ID NUMBER not null,
CLIENT_ID_SRC NUMBER,
COUNTRY_ID_SRC CHAR(2 BYTE),
DEMOG_ID NUMBER not null,
CLIENT_NAME VARCHAR2(70),
CLIENT_BIRTH_YEAR NUMBER(4),
CLIENT_PHONE VARCHAR2(25),
CLIENT_CREDIT_LIMIT NUMBER,
CLIENT_EMAIL VARCHAR2(30),
CLIENT_STREET_ADDRESS VARCHAR2(40),
CLIENT_LAST_BUY DATE,
CLIENT_COUNTRY VARCHAR2(40),
CLIENT_STATE_PROVINCE VARCHAR2(50),
CLIENT_CITY VARCHAR2(50),
constraint PK_CLIENTS primary key (CLIENT_ID)
);
/*==============================================================*/
/* Index: CLIENT_INFO_FK */
/*==============================================================*/
create index CLIENT_INFO_FK on CLIENTS (
DEMOG_ID ASC
);
alter table CLIENTS
add constraint FK_CLIENTS_INFO foreign key (DEMOG_ID)
references DEMOGRAPHY (DEMOG_ID);
我正在登录OWB GUI作为rep_owner(具有所有权限)。奇怪的是,我的同事在OWB 11gR1中的机器上运行了这个完全映射,没有任何问题。但他将源数据库导入到目标用户......这是他唯一不同的事情。
有人可以帮帮我吗?
答案 0 :(得分:1)
检查DBA_RESUMABLE,您可能用完了临时表空间。
您可能希望尝试尽可能地合并表空间。分割存储的次数越多,Oracle就越容易耗尽空间。