• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

Oracle replication error

I am supporting a program that uses oracle replication via Repsvr8.exe
(ocx control), and am getting error during the replication process.
Our IT dept. does not support Oracle Lite so I am basically left to
try and figure out the problem myself.
The replication replicates 6 tables from our server database to the
local databases on the client/user's computer.
error I recieve is;
repapi-26522: plsql rpc refresh context get failed
REPAPI-26522: rpc execution error
ORA-06550: line 2, column 10:
PLS-00201: identifier 'SYS.DBMS_SNAP_REPAPI'must be declared
ORA-06550: line 1, column 10:
PL/SQL: statement ignored
ORA-06550: LINE 1, COLUMN 10:
pls-00201: identifier 'SYS.DBMS_SNAP_REPAPI'must be declared
The last two lines are identical to the two lines under the other
PLS-00201 error line.
Any help would be greatly appreciated. I am learning on the fly and
have been having quite a bit of problems with this error.
  • 3
  • 3
  • 2
1 Solution
   You're getting an error finding the supplied PL/SQL packages for the replication.  Unless someone else has done exactly the same thing (I haven't) we'll all need some additional info:

1) Has this EVER worked before?  If so, what changed?
2) What is "the replication process" - what steps do you perform to do the replication?
3) What is the database version of the server database?
4) How did you create the logon user on the server database (what role/privileges)?

Good luck!

P.S.  You might want to read the docs at the location below (it requires registration, but it's free):

On master site:

First  make sure the package installed and valid, for example,
    select status from dba_objects where object_name='DBMS_SNAP_REPAPI';

Second check if the user you are using has sufficient privilidges. If not,  grant execute any procedure
(or simply the DBA privilidge) to the user.
darrelAuthor Commented:
I apologize for not giving complete info, I knew better!
We are using Oracle 8.0.5 and oracle lite
The replication did work at one time, but sometime last year it quit and nobody knows exactly when. I suspect it was when our IT dept. rebuilt the server database when one of our admins deleted 200+ records.
We user a DSN to connect to the database and don't have any roles or priviledges, not a very secure system. I have DBA access to our test database, but am not a DBA. I've been up to my eye-balls in this because I'm not really qualified, but I'm doing the best I can...

The replication code is as follows;
        For Each varTable In mMasterTable
            frmProjIndex.stsMessage.SimpleText = LoadResData(515, kResTypeString) & varTable & "..."
            Call mObjReplication.SnapshotGroupReset
            Call mObjReplication.SnapshotGroupAdd(mStrLocalDBUser, varTable, kRepOptimumRefresh)
            If False = mObjReplication.SnapshotGroupRefresh(kRepContinueOnError) Then
                'Show error: Could not refresh snapshot for master data
                'This will show if there is an error and kRepStopOnError is used above instead of kRepContinueOnError
                Call ShowOracleError(512)
                Exit Function
            End If
        Next varTable

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.


   Run wayne's query.  Then, here are two links (to the same 8.0.5 document) that you need to read:

Preparing for snapshot replication:

and Troubleshooting Snapshots

Which contains this:

Unable to Generate Replication Support for a Table

When you generate replication support for a table, Oracle activates an internal trigger at the local site. If the table will be propagating changes asynchronously, this trigger uses the DBMS_DEFER package to build the calls that are placed in the local deferred transaction queue. EXECUTE privileges for most of the packages involved with advanced replication, such as DBMS_REPCAT and DBMS_DEFER, need to be granted to replication administrators and users that own replicated objects. The Replication Manager setup wizard and the DBMS_REPCAT_ADMIN package performs the grants needed by the replication administrators for many typical replication scenarios. When the owner of a replicated object is not a replication administrator, however, you must explicitly grant EXECUTE privilege on DBMS_DEFER to the object owner.

Problems with Replicated Procedures or Triggers

If you discover an unexpected unresolved conflict, and you were mixing procedural and row-level replication on a table, carefully review the procedure to ensure that the replicated procedure did not cause the conflict. Ensure that ordering conflicts between procedural and row-level updates are not possible. Check if the replicated procedure locks the table in EXCLUSIVE mode before performing updates (or uses some other mechanism of avoiding conflicts with row-level updates). Check that row-level replication is disabled at the start of the replicated procedure and re-enabled at the end. Ensure that row-level replication is re-enabled even if exceptions occur when the procedure executes. In addition, check to be sure that the replicated procedure executed at all master sites. You should perform similar checks on any replicated triggers that you have defined on replicated tables.

Good luck!
darrelAuthor Commented:
Thanks so much DrSQL. I've been pulling my hair out due to little or no support from or IT dept., and the fact that I'm way over my head. If I can get our test DB replication going I can go to my boss and have him request the changes to production.
I've got VB experience, and some database, but far from a DBA.
Thanks for the help
darrelAuthor Commented:
Waynezhu, I apologize I must have skipped over your comment. I'll post points under "Question for Waynezhu" Do I'm going to show my ignorance about the subject, but in the Query do I type in query exactly as you have it typed? Or does dba_objects need to be replaced with something? When I type it as is I get an error on the dba_objects of "table or view does not exist".
Thanks much
   Thanks.  The error you're getting with wayne's query is not good.  DBA_OBJECTS should be available to your account if it has DBA privileges.  If you can't see it, then you probably don't have DBA priv on that account.  Either switch to an account that has DBA privs, or have your DBA grant you DBA:

grant dba to <your test account>;

Good luck!
As inferred in my previous input, the problem is at the master site not at your snapshot site.
Any one who has DBA privilidge can run the query (for non-DBA user, ALL_OBJECTS may
contains the similar information) and fix the problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now