Wednesday, March 21, 2012

Problem with SnapShot replication

Hi
I'm trying to set up a snapshot replication to replicate data out to a SQL
server in our DMZ. I have created the snapshot etc. but when I then run the
distribution agent to synchronize data out to the server, it stops after a
few seconds and comes up with the error message below:
Line 17: Incorrect syntax near 'UPDATE STATISTICS '.
(Source: xxx.xxx.xxx.xxx (Data source); Error number: 170)
----
--
The name ' ' is not permitted in this context. Only constants, expressions,
or variables allowed here. Column names are not permitted.
(Source: xxx.xxx.xxx.xxx (Data source); Error number: 128)
----
--
The name 'Statistics have been updated for all tables.' is not permitted in
this context. Only constants, expressions, or variables allowed here. Column
names are not permitted.
(Source: xxx.xxx.xxx.xxx (Data source); Error number: 128)
----
--
I'm a little bit stucked with this.error message. The Source is the IP
adress of my SQL server in the DMZ (subscriber) so it looks like it's
something out that isn't right. Is there anywhere I can view the slq
statements that are being ran? Since it refers to a Line 17 it must run some
code somewhere. I'm also a bit stumped on why it does an "UPDATE
STATISTICS", but that's maybe a part of the Replication job?
Regards
SteenProblem solved...(I hope...).
I tried to run a trace on the subscriber, to see which commands it was
actually running when trying to apply the subscription. I then found that
one of the stored procedures it applied from the source, had a syntax error.
When I omit that SP from the synchronization, it works......
Regards
Steen
Steen Persson wrote:
> Hi
> I'm trying to set up a snapshot replication to replicate data out to
> a SQL server in our DMZ. I have created the snapshot etc. but when I
> then run the distribution agent to synchronize data out to the
> server, it stops after a few seconds and comes up with the error
> message below:
> Line 17: Incorrect syntax near 'UPDATE STATISTICS '.
> (Source: xxx.xxx.xxx.xxx (Data source); Error number: 170)
> ----
--
> --
> The name ' ' is not permitted in this context. Only constants,
> expressions, or variables allowed here. Column names are not
> permitted. (Source: xxx.xxx.xxx.xxx (Data source); Error number: 128)
> ----
--
> --
> The name 'Statistics have been updated for all tables.' is not
> permitted in this context. Only constants, expressions, or variables
> allowed here. Column names are not permitted.
> (Source: xxx.xxx.xxx.xxx (Data source); Error number: 128)
> ----
--
> --
> I'm a little bit stucked with this.error message. The Source is the IP
> adress of my SQL server in the DMZ (subscriber) so it looks like it's
> something out that isn't right. Is there anywhere I can view the slq
> statements that are being ran? Since it refers to a Line 17 it must
> run some code somewhere. I'm also a bit stumped on why it does an
> "UPDATE STATISTICS", but that's maybe a part of the Replication job?
> Regards
> Steen

No comments:

Post a Comment