Showing posts with label modify. Show all posts
Showing posts with label modify. Show all posts

Monday, March 26, 2012

MSQuery Question

I have a worksheet written by another programmer that I have to modify.
He uses MSquery to extract from a SQl 2003 DB. That part I understand
and I can duplicate. The hard part, is that for each row that is
displayed three additional columns show up (in all seven queries) and
in one case he changes the sorting of the query as well. These
functions use the columns output by MSquery. There very simple
functions and tests. In the SQL I can not find them or any reference to
them. There is no module in VBA. No add-in, just the MSQuery. How can
he do this. What should I be searching in Google to understand this
feature?On 23 Jun 2005 08:28:04 -0700, catsinheat wrote:

> I have a worksheet written by another programmer that I have to modify.
> He uses MSquery to extract from a SQl 2003 DB. That part I understand
> and I can duplicate. The hard part, is that for each row that is
> displayed three additional columns show up (in all seven queries) and
> in one case he changes the sorting of the query as well. These
> functions use the columns output by MSquery. There very simple
> functions and tests. In the SQL I can not find them or any reference to
> them. There is no module in VBA. No add-in, just the MSQuery. How can
> he do this. What should I be searching in Google to understand this
> feature?

What is sql 2003?

It helps if you post some SQL and examples.

Tony
--
http://www.dotnet-hosting.com
Free web hosting with ASP.NET & SQL Server
No ads - No trials - Innovative features

Friday, March 23, 2012

MSmerge_tombstone confusion

We have merge replication set up between a SQL Enterprise server and an
MSDE instance. We modify both databases through an inhouse app.
Things were great until after one synch a whole bunch of rows
mysteryously disapeared from the server. The kicker was that MSDE
instance had no changes made to it, when I looked at the job history I
discovered that the MSDE had apparently uploaded 40k some odd deletes.
Fortunatly I had a backup from that morning so there was no real loss
outside a chilling feeling that I couldn't trust replication. Today
I've been experimenting with various fixes I found in the MS
knowledgebase (I set 'compensate_for_errors' to false). I've got a few
upfront questions. When we first set up replication we planned to only
replicate the smaller tables as the larger tables wouldn't fit the
MSDE, later we filtered the larger tables and included them in
replication. The end result is that we have some 131 tables who's
identity columns are 'Not for Replication' and 9 tables whose identity
columns apparently are being replicated. Also all the foriegn keys are
being replicated. Both of these things seem to be often mentioned as
problematic for replication but I'm not really sure why. Thats all
background relating to my confusion over how replication works. I set
up a subscription and got my first replication fired off and running.
When it weas finished I poked around on the servers tombstone table,
lots of records as I expected. Then I looked at the tombstone on the
subscriber, empty also as expected. I then ran my second synch and was
very suprised to find that the tombstone table on the subscriber was
now filled with records. Will these records upload and delete data on
the server at the next synch?
Thanks, Phil Howard
Phil,
I have a proc on my website (url below, in the scripts section) that'll help
you to determine which records will be synchronized from the subscriber.
As for identities, they'll need to be set for NFR, so the replication
process can do an identity insert. Also, they must be partitioned - either
manually or using the automatic option. If you do a manual partitioning and
set the publisher to use odds and the subscriber evens (assuming one
subscriber only) then you can subsequently forget about it. If using
automatic range management you set up a range of 10,000,000 values, you can
usually forget about it also.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)