[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 638
  • 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;
ORACLE ERROR - #26522
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.
Thanks
Darrel
darrel.seymour@fnc.fujitsu.com
0
darrel
Asked:
darrel
  • 3
  • 3
  • 2
1 Solution
 
DrSQLCommented:
darrel,
   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):

http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76959/repnew.htm#3762
0
 
waynezhuCommented:
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.
0
 
darrelAuthor Commented:
I apologize for not giving complete info, I knew better!
We are using Oracle 8.0.5 and oracle lite 4.0.1.0.0
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 & "..."
            frmProjIndex.stsMessage.Refresh
            Call mObjReplication.SnapshotGroupReset
            DoEvents
            Call mObjReplication.SnapshotGroupAdd(mStrLocalDBUser, varTable, kRepOptimumRefresh)
            DoEvents
            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
            DoEvents
        Next varTable

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
DrSQLCommented:
darrel,

   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:
http://otn.oracle.com/doc/server.804/a58245/ch4.htm#7475

and Troubleshooting Snapshots
http://otn.oracle.com/doc/server.804/a58245/ch6.htm#7231

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!
0
 
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
Darrel
0
 
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
Darrel
0
 
DrSQLCommented:
darrel,
   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!
0
 
waynezhuCommented:
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.
Thanks,
Wayne
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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