Link to home
Start Free TrialLog in
Avatar of Mateen
Mateen

asked on

Replication and error message. SQL2K

In transactional replication pushed by subscriber and pull disallowed what does this error message mean.
I am using the articles snapshot property, "Delete all data in the existing table"

No -1-

Error:
The process could not bulk copy into table "order_from_mst"

Full message:
[ Premature end of message while reading from current row from host. Host program may have terminated.


No -2-

Error:
The process could not bulk copy into table "count"

Full message:
[String data, right truncation]
Avatar of Aneesh
Aneesh
Flag of Canada image

Make sure that both the machines have the same Sql server version, Service packs  and MDAC installed
Avatar of imran_fast
imran_fast

for error No -2-

Make sure that the schema of count table is same at the subscriber and the publisher.
you have selected "Delete all data in the existing table" option so the schema at two places might be different try using drop and recreate existing table. or manually check the schema at subscriber should be same at publisher.
>No -1-
Error:
table "order_from_mst"

I think there is schema mismatch for this table as well please check the design of this table at both servers and if possible try selecting option drop and recreate table and reinitialize the structure.
Avatar of Mateen

ASKER

Hi Imran_fast,

I also sensed the same. I have already tried this.

I dropped the table from subscriber. Ran utility Adeptsqldiff and have made table in both side same.

I do want to say , I did not remove the article from publication before doing this.
>I did not remove the article from publication before doing this.
not nessasary when you are  changing the structure at the subscriber.

there are some triggers and stored procedure created by sql server to handle
replication at subscriber and publisher if you are changing the structure better inititalize
the subscriber or use replication procedure like sp_addreplcolumn.

or the work around is run these procudure on your pulication database
and run the result on subscriber database
sp_script_synctran_commands [@publication =] 'publication'
    [ , [@article =] 'article']
sp_scriptpublicationcustomprocs [@publication]= 'publication_name'

Avatar of Mateen

ASKER

Hi imran_fast
I tried
exec sp_script_synctran_commands @publication =  'siddiqsons' , @article = 'supplier'

The result pan says
The command(s) completed sucessfully.
Where is the script generated
Avatar of Mateen

ASKER

Hi imran_fast

I have solved the problem, but not sure about the order/theory.

After seeing a couple of things I becam 100% sure that the schema changes are not being refreshed and every time the error I am seeing is not the current error because replication has not run.

Then I did the following

1) Clicked Snapshot Agent
2) Clicked publication in the snapshot agent. ( property)
3) Clicked Start Agent

then
1) Clicked log reader agent.
2) Clicked publisher sdmsrv. (property)
3) Clicked stop agent and after a whil re-clicked start agent.

then
1) Clicked Distribution Agents
2) Clicked Publisher sdmsrv
3) Clicked stop agent and after a whil re-clicked start agent.

after this every thing was fine.

Could you guide me now, what action should I take and in what order.
Avatar of Mateen

ASKER

Hi aneeshattingal,

It seems that imran_fast is busy with his work. (It's ok Imran).

Could u please make any comments on my previous comment.

Thanks and regards


ASKER CERTIFIED SOLUTION
Avatar of imran_fast
imran_fast

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mateen

ASKER

By the way please tell

when I tried
sp_script_synctran_commands [@publication =] 'publication'
    [ , [@article =] 'article']
sp_scriptpublicationcustomprocs [@publication]= 'publication_name'

The parsing was correct, but no script generated.

I am curious to see the resulting script.
i think your replication is configured as one way if you have two way replication i.e data is comming from the subscriber as well only then you will get the result. ( i.e merge replication or transaction replication with qued updateing)