Showing posts with label follows. Show all posts
Showing posts with label follows. Show all posts

Thursday, March 29, 2012

error: Could not find SP upd.sp_MSrepl_xxx_xxxxxx_1

Trying to set up replication as follows:

SQL2000 publisher , acting as it's own distributor (v8.0.760)

Transactional Replication with updateable subscriptions

SQL2005 subscriber (v9.00.3042)

Push subscription with immediate updating from distributor to subscriber and queued updating from subscriber to distributor

The set-up went smoothly and changes in the publication db flow down to the subscriber as expected. However, changes at the subscriber fail to flow up to the publisher.

The Queue Reader agent reports the error "Server MyServer, Database publisher_db : ODBC Error: Could not find stored procedure "upd.sp_MSrepl_ins_mytable_1"

The SP 'sp_MSrepl_ins_mytable_1' exists in the publisher db but the owner is 'dbo' not 'upd' (there is no such login as 'upd' on the server)

The only useful article I have found on the net suggests that this could be caused by a bug (jn SP3?) but the situation described in that article and the fix/workaround for it don't seem to apply for me.

The problem and fix in that article was: table MSsubscription agents in the subscriber db had a queue_id value of 'mssqlqueue' and the fix was to set it to 'mssqlqueuev2'.
However, it is already ''mssqlqueuev2' in my subscription db so I'm at a loss to explain why it's still generating calls looking for SPs owned by 'upd'.


other info:

Just to see if it would work around my immediate peoblem I tried creating a user called 'upd' and duplicating the SPs.
This worked up to a point. Changes replicated up to my publisher ok. However, when I created a conflict (changed same row on publisher and subscriber at same time)
the Queue Reader fell over with error: "Server MyServer, Database publisher_db : ODBC Error: Could not find stored procedure "upd.1".
-


Investigated the stored procdure sys.sp_replqueuemonitor in my subscription database and found statements like this:
select publisher, publisher_db, publication, queue_server, queue_id
from dbo.MSsubscription_agents
where
publisher = case when @.publisher is NULL then publisher else UPPER(@.publisher) end AND
publisher_db = case when @.publisherdb is NULL then publisher_db else @.publisherdb end AND
publication = case when @.publication is NULL then publication else @.publication end AND
update_mode IN (2,3) AND
queue_id != N'mssqlqueue'
note that the queue_id is is looking for is 'mssqlqueue'.
If I manually run sys.sp_replqueuemonitor I get no results (unsurprising since the data in dbo.MSsubscription_agents has queue_id='mssqlqueuev2'.

It looks to me as if some of the SPs created when the publication and/or subscription was set up are incorrect...?
--

Any advice or suggestions on how to approach this problem?


Check your article properties, somehow the destination owner must have been changed to "upd" along the way. You can also query sysarticles in your published database to see if this owner exists anywhere. Please let me know if this is not the case.|||

The owner for each article is set to 'dbo'. When it first happened there wasn't a login (or schema) called 'upd' in existence on the either of the publication or subscriber servers.

I'm just trialling this with a very small test db (2 tables) so no one else would be playing around with it. I've also recreated the database and publication from scratch several times with the same result.

I'm thinking it may be a bug or an incorrectly applied service pack (the servers are not under our control, I don't even know who maintains them) .

It's bound to be probably related to the fact that I'm trying to replicate between SQL2000 and SQL2005 servers. I know that merge replication with a SQL2000 publisher and a SQL2005 subscriber is not supported but transactional replication is supported (though I'm not 100% sure that encompases transactional replication with updateable subscribers...)

|||sorry, i totally missed the updatable subscriber part, let me reread your thread and dig in some more.|||

The plot thickens...

If I create a subscriber on the same box as the publisher (i.e. publisher & subscriber are both SQL2000) it all works fine.

If the subscriber is SQL2005 it errors looking for SPs owned by 'upd'...

|||it's most likely a bug then. You're going to have to call customer support and open a case on this one if you want to get this type of scenario to work.|||

Thanks for the help. We've abandoned replication for now (we were trying to retrofit it into an existing legacy tas a temporary workaround which is really more trouble than it's worth)

If we do need to get it working I'll raise it with customer support...

Cheers

Tony

|||My opinion would be to upgrade the SQL 2000 node to SQL 2005 and look into merge replication or transactional replication using Peer to Peer.

Friday, March 9, 2012

error with trigger

Hi ,
I have created a trigger as follows :
========================================
=========================
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER trigger Usr_Trig_GL53
ON Gl530106
FOR INSERT , UPDATE
NOT FOR REPLICATION
AS
IF UPDATE(GL53001) OR UPDATE(GL53003) or UPDATE(GL53004)
-- this is an update
BEGIN
UPDATE b
SET b.[GL53001] = a.[GL53001] , b.[GL53003] = a.[GL53003] , b.[GL53004] = a.
[GL53004]
FROM inserted as a INNER JOIN ALTIRISSERVER.ScalaDB_SGO_TEST.dbo.Gl530106
as b ON a.GL53001 = b.GL53001
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
========================================
=========================
however when i made some modifications i was prompted the follow error
message
"another user has modified the contents of this table or view ; the database
row you are modifying no longer exists in the database .
Database Error : [Microsoft][ODBC Server Driver][SQL Server][OLD/DB provider
returned Message : New transaction cannot enlist in the specified transactio
n
coordinator ]
[Microsoft][ODBC Server Driver][SQL Server][ The operation cannot be
performed because the OLD DB Provider 'SQLOLEDB' was unable to begin a
distributed transaction "
Is this due to any services that not running ? --> i have started the SQL
Server Agent and the DTC from SQL EM
i am using SQL Standard Edition sp3 but this test wqas carried out from my
machine which is installed with MSDE2000
appreciate ur advise
tks & rdgs
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200603/1Hi,
I guess there is no primary key on the table whereas SQL Server could
decide what row to update there, so put a primary key on the table you
want to access / update and that should be fine. If you want to change
a view on the remote server, make sure that the view is updateable,
otherwise the row cannot be changed either.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Hi,
I guess there is no primary key on the table whereas SQL Server could
decide what row to update there, so put a primary key on the table you
want to access / update and that should be fine. If you want to change
a view on the remote server, make sure that the view is updateable,
otherwise the row cannot be changed either.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Hi ,
I have added PK to both the source & destination table but i still have the
same error
appreciate ur advice
tks & rdgs
Jens wrote:
>Hi,
>I guess there is no primary key on the table whereas SQL Server could
>decide what row to update there, so put a primary key on the table you
>want to access / update and that should be fine. If you want to change
>a view on the remote server, make sure that the view is updateable,
>otherwise the row cannot be changed either.
>HTH, Jens Suessmeyer.
>--
>http://www.sqlserver2005.de
>--
Message posted via http://www.webservertalk.com

Sunday, February 19, 2012

Error While Running Dts

Hi,
I am trying to run a DTS from SP. The SQL code that I am using is as follows.......

exec master..xp_cmdshell 'dtsrun /S 142.102.27.207 /U sa /P sa /N DTS_TEST1'

But Running this I am getting the the following errror......
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: Error opening datafile: The system cannot find the path specified.
Error source: Microsoft Data Transformation Services Flat File Rowset Provider
Help file: DTSFFile.hlp
Help context: 0

Error Detail Records:
Error: 3 (3); Provider Error: 3 (3)
Error string: Error opening datafile: The system cannot find the path specified.
Error source: Microsoft Data Transformation Services Flat File Rowset Provider

Help file: DTSFFile.hlp
Help context: 0

DTSRun OnFinish: DTSStep_DTSDataPumpTask_1
DTSRun: Package execution complete.

NULLGuys......... Help me in this regard..............|||Is the SQL Instance your connecting to (142.102.27.207) local (the same server where you're running DTSRun)?

Also it's running from the context of the windows-account that's running SQL Server. Is that account allowed to access the file?|||The SqlServer Computer has been given the full control to the file where the data is to be transferred in the application server through DTS.|||where as when I am running from the command prompt of the application server, its running successfully...............

dtsrun /S 142.102.27.207 /U sa /P sa /N DTS_TEST1

NOTE:
SQLSERVER: 142.102.27.207
APPLICATION SERVER: 142.102.27.154

I have a folder named "TEST" in the application server, where i have given the "full control" to 142.102.27.207 (DB Server). Folder Test is having an excel file which is the destination object for the DTS. DTS is transferring teh data from a table to this excel file.|||it is definitly security related. Does the account running the sql server agent and sql server service have full control on test?