Chinaunix首页 | 论坛 | 博客
  • 博客访问: 112295
  • 博文数量: 36
  • 博客积分: 2260
  • 博客等级: 大尉
  • 技术积分: 400
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-27 22:49
文章分类

全部博文(36)

文章存档

2011年(10)

2010年(26)

我的朋友

分类: Oracle

2010-06-18 23:51:16

Executing dbms_repcat.create_snapshot_repobject Fails With ORA-23328 [ID 210081.1]  

  Modified 25-NOV-2003     Type PROBLEM     Status PUBLISHED  

Problem Description: 
==================== 
 
Executing dbms_repcat.create_snapshot_repobject fails with the 
following error.

Error:	  ORA-23328  (ORA-23328)
Text:	  mview base table %s . %s differs from master table %s . %s 
---------------------------------------------------------------------------
Cause:	When creating a materialized view through repcat, the 
	materialized view base table name did not match a replicated table 
	name at the master. 
Action:	Change the materialized view ddl to use the same base table as 
	the replicated table name at the master. 




Problem Explaination:
=====================

The base table is not referenced in the replication group on the 
master site or the snapshot name does not match the base tables name if you
are on a release < 7.3.



Solution Description: 
===================== 
 
If the base table is not in a replication group then add the base table to a 
replication group on the master site.

You must go through ALL the following steps to create an updatable snapshot:

(ON THE MASTER SITE)

1. create a snapshot log on the master table
	create snapshot log on ....                                
2. create a replication group on the master site    
	execute dbms_repcat.create_master_repgroup(..)                           
3. add  the master table to the replication group
	execute dbms_repcat.create_master_repobject(..)                         
4. generate replication support on the master:
	execute dbms_repcat.generate_replication_support(..) 
5. resume master activity on the master group
	execute dbms_repcat.resume_master_activity(..)

(ON THE SNAPSHOT SITE)

6. create an updatable snapshot       
7. create a snapshot group 
	execute dbms_repcat.create_snapshot_repgroup(..)
8. create a snapshot repobject
	execute dbms_repcat.create_snapshot_repobject(..)       
(the following 2 steps are optional)
9. make a refresh group :
	execute dbms_refresh.make(..)
10. add the snapshot to the refresh group:
	execute dbms_refresh.add(..)


For releases prior to 7.3 change the name of the snapshot to match the name of 
the master table. 
 
This means that we must change the name of the snapshot to match the name of 
the  object being referenced on the master site, as follows: 
 
If the base table on the master is called DEPT you would issue the following 
on the  MV/Snapshot site.

    execute dbms_repcat.create_snapshot_repobject('SCOTT','DEPT','SNAPSHOT'); 
 
 
Solution Explanation: 
===================== 
 
The base table needs to be in a replication group and have replication support 
generated.

For releases prior to 7.3, the updatable snapshot will create correctly 
if the snapshot object name matches the name of the master table on 
the master site.   Oracle 7.3 and beyond does not have this restriction.



Solution References:  
====================  

 OERR:  OERR:  ORA-23328  mview base table \"%s\".\"%s\" differs 
                      from master table \"%s\
阅读(1064) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~