I know this sounds stupid but have you confirmed that all the dependant
objects (tables) exist on the fail over server? OR is your problem
that the view depends on the function or vice verca.
I have experenced such interdependancy problems. If you look in the
SQL Server query analyser for object dependencies are all of them
shown? I have found that dependencies get lost!
The replication process inspects data in the sysdepends table to work
out the order to create the objects. If data is missing then the
objects get created in the wrong order and the process fails.
you must run an alter function / view / procedure to get SQL server to
rebuild the dependencies list for an object. BUT remember that when
you do this the dependency between the object you are modifying and the
things that depend on it will be lost! You can end up chasing yourself
in a circle!
eg
Create View vA
as select * from table A
Create View vB
as select * from vA
Create View vC
as select * from vB
so view vB depends on vA and view vC depends on vB
if you find that the dependency between vB and vA is missing you will
run Alter View vB ....
now you will find that the dependency between vA and vB shows but the
dependeny between vB and vC has been lost - you therefore need to run
alter view on vC to reinstate the dependency. Very annoying!
That said i have applied microsoft security rollup MS03-031 which
apprered to address a number of replication issues! see KB815495
http://www.microsoft.com/downloads/details.aspx?FamilyID=9814AE9D-BD44-40C5-ADD3-B8C99618E68D&displaylang=en Regards
Alex