Wednesday, March 21, 2012
Problem with SnapShot replication
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
Problem 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
Problem with SnapShot replication
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
Problem with SnapShot replication
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
Friday, March 9, 2012
Problem with replication of view which depend on other view in merge replication
I am trying to replicate the sql server 2000 db with merge and pull
subscription.
When i try to initialize the ini. snapshot, the error message is
generated saying
"the schema script "JobPriceLookupQueryNew.sch" could not be
propagated to the subscriber". This view depend on
JobPriceLookupQuery.
I try to read in this group and get one post suggesting to run
sp_refreshview for the view but i am getting error message for this
also.
exec sp_refreshview [@.JobPriceLookupQuery =] 'JobPriceLookupQuery'
error "incorrect syntax near 'JobPriceLookupQuery'
2nd try:
exec sp_refreshview JobPriceLookupQuery
Invalid object name 'JobPriceLookupQuery;
exec sp_refreshview [@.JobPriceLookupQuery =]
Invalid object name 'JobPriceLookupQuery
I have many view with depend on other view, and its not working now.
could i please get some information how can I solve this problem.
Thanks in advance.
Indra.
Indra,
exec sp_refreshview JobPriceLookupQuery should work, as long as you are in the correct database.
Running sp_depends will show you that the values in sysdepends are incorrect, and need updating.
What you need to do is (manually) work out the order of dependencies of views, and refresh them from the bottom up. Then you'll be able to let replication create the snapshot in the right order.
HTH,
Paul Ibison
Wednesday, March 7, 2012
Problem with remote replication
I have a number of dialup users who are trying to replicate against a master database.The first few times worked fine.but now each user is getting the following message
"The process could not change generation history at the publisher"
Any help or pointers gratefully received
many thanks
David J.
1) How many days has it run smoothly and end up with that error?
2) What is the number of transaction run per day?
3) Is this transactional replication?
|||The first replication was done over the wirless network, after that the replication was done via a dialup connection over the Internet.Most users got 2/3 replications befor encountering the error message
"The process could not change generation history as the Publisher"
Not sure what you mean - Each user might add 400/500 new transactions each day
We are using Merge Replication
|||It could be a timeout issue or a network related issue (due to flakiness)
Have you encountered the problem repeatedly now?
|||What will be the solution for timeout or network issues?|||If it is a Timeout issue, it can be dealt with increasing the timeout value.
If it is a network issue, you will have to ensure that your network is connectable and the servers can talk to each other.
You should monitor your servers and see when you start encountering these problems. Analyze if there are any other external factors that influence it and then take some actions based on that fact.
|||Thanks, do you mean increasing timeout in SQL Enterprise Managers properties?|||Kind of. You would increase the timeout values (QueryTimeout/LoginTimeout) values for the agent jobs. But again, this suggestion holds if it is a timeout related problem.