Groups | Blog | Home
all groups > sql server replication > july 2006 >

sql server replication : Unable to replicate a view or function because the referenced obje


Methodology
7/21/2006 6:58:01 AM
Hi

ive been having masive problems setting up replication between to sql 2005
whgrp boxes. following advise from here Im now following these steps:

1. Create publication and select ‘copy full text indexes’ to true

2. Create replica database, and tick to allow full text replication and run

sp_fulltext_database 'enable'

From query prompt opened with rep dbase selected.


3. reinitialize snapshot BUT DO NOT CREATE SNAPHOT NOW


4. Run

sp_changepublication '<yourpublicationname>', 'sync_method', 'native'


From query prompt opened with primary dbase selected.


5. create snapshot.

6. create subscription and run.

ive got past the

Cannot use a CONTAINS or FREETEXT predicate on table or indexed

error, and im now getting:

Date 7/21/2006 2:48:12 PM
Log Job History
(METHODOLOGY9-Mailarchive-Mail_Archive_Pub-METHODOLOGY-AKJ-mail-2F6DE092-1619-49F4-B5DD-10691BB8355F)

Step ID 1
Server METHODOLOGY-AKJ
Job
Name METHODOLOGY9-Mailarchive-Mail_Archive_Pub-METHODOLOGY-AKJ-mail-2F6DE092-1619-49F4-B5DD-10691BB8355F
Step Name Run agent.
Duration 00:00:16
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
2006-07-21 13:48:28.250 Category:COMMAND
Source: Failed Command
Number:
Message: CREATE FUNCTION "dbo"."SearchFrom"
(@paramid bigint, @hash bigint)
RETURNS TABLE

AS

RETURN select "id" from dbo.arc_add WHERE
(
((SELECT operator from _queryParams where pid=@paramid)
= '=' AND (email = (SELECT param from _queryParams where pid=@paramid) OR
"name" = (SELECT param from _queryParams where pid=@paramid)) AND type=0)

2006-07-21 13:48:28.250 Category:NULL
Source: Microsoft SQL Native Client
Number: 208
Message: Invalid object name 'dbo.arc_add'.
2006-07-21 13:48:28.250 Category:AGENT
Source: AGENT
Number:
Message: Unable to replicate a view or function because the referenced
objects or columns are not present on the Subscriber.


anyone?

thanks

Alastair Jones

Hilary Cotter
7/21/2006 10:30:54 AM
To make matters simple for your self why don't you replicate the tables in
one publication, and put your schema objects (views, functions, etc) in a
different publication (snapshot is best), and run the first publication and
distribute it, and then the second.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Paul Ibison
7/21/2006 3:44:39 PM
Are you replicating the table (or view?) called dbo.arc_add? One of your
functions needs it but I reckon it's not in the publication and not already
on the subscriber.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

AddThis Social Bookmark Button