Showing posts with label boxes. Show all posts
Showing posts with label boxes. Show all posts

Wednesday, March 7, 2012

Indexes being replicated

I have set up transactional replication between two SQL Server 2000 boxes. I
am replicating a table. On the publisher this table has a primary key, a
clustered index, number of non clustered indexes and a check constraint.
I want to replicate only the table structure and data, but none of the other
objects associated with the table.
When I use Enterprise Manager to set the snapshot options I want to uncheck
"Include declared referential integrity", "Clustered Indexes" and
"Nonclustered indexes" in the "Copy objects to destination" section .
However, the "Nonclustered indexes" checkbox is greyed out and ticked. If I
check "Include declared referential integrity" then I can uncheck
"Nonclustered indexes". So far so good, but then when I uncheck "Include
declared referential integrity" the "Nonclustered indexes" box gets
autmoatically checked and greyed out.
Why is it not possible to uncheck both "Include declared referential
integrity" and "Nonclustered indexes"?
Is there something I'm misunderstanding here?
Thanks
Stephen
Stephen,
only a few of the possible permutations are covered in this dialog box. For
a more fine control, you can set the @.schema_option argument of
sp_addarticle.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

indexes being ignored

sql2k sp3
Two boxes. Same db's, tables, indexes, queries. Indexes
are being used by 1 but not the other. Any ideas?
Thanks in advance.I'd check the statistics on the tables in question (SELECT
STATS_DATE(id, indid) FROM sysindexes). If the table that
isn't using an index has older statistics, then update
them.
I'm assuming the data content of the table is identical
(same number of rows, same result set, etc.).
Bruce.
>--Original Message--
>sql2k sp3
>Two boxes. Same db's, tables, indexes, queries. Indexes
>are being used by 1 but not the other. Any ideas?
>Thanks in advance.
>.
>|||I tried updating the stats to no avail. I didnt realize
amount of data would have any effect. The one ignoring the
indexes has data. The one using the indexes is empty. Any
ideas?
>--Original Message--
>I'd check the statistics on the tables in question
(SELECT
>STATS_DATE(id, indid) FROM sysindexes). If the table
that
>isn't using an index has older statistics, then update
>them.
>I'm assuming the data content of the table is identical
>(same number of rows, same result set, etc.).
>Bruce.
>>--Original Message--
>>sql2k sp3
>>Two boxes. Same db's, tables, indexes, queries. Indexes
>>are being used by 1 but not the other. Any ideas?
>>Thanks in advance.
>>.
>.
>|||If the selectivity of the value is too low it may not use the index. If you
don't have any data then the selectivity is pretty high<g>.
--
Andrew J. Kelly
SQL Server MVP
"chris" <chrisr@.fingps.com> wrote in message
news:050601c3789d$d6ec6100$a101280a@.phx.gbl...
> I tried updating the stats to no avail. I didnt realize
> amount of data would have any effect. The one ignoring the
> indexes has data. The one using the indexes is empty. Any
> ideas?
>
> >--Original Message--
> >I'd check the statistics on the tables in question
> (SELECT
> >STATS_DATE(id, indid) FROM sysindexes). If the table
> that
> >isn't using an index has older statistics, then update
> >them.
> >
> >I'm assuming the data content of the table is identical
> >(same number of rows, same result set, etc.).
> >
> >Bruce.
> >
> >>--Original Message--
> >>sql2k sp3
> >>
> >>Two boxes. Same db's, tables, indexes, queries. Indexes
> >>are being used by 1 but not the other. Any ideas?
> >>
> >>Thanks in advance.
> >>.
> >>
> >.
> >|||Are the physical machines the same? Same number of CPUs
and Memory? If not then execution plans can be different.
>--Original Message--
>If the selectivity of the value is too low it may not use
the index. If you
>don't have any data then the selectivity is pretty
high<g>.
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"chris" <chrisr@.fingps.com> wrote in message
>news:050601c3789d$d6ec6100$a101280a@.phx.gbl...
>> I tried updating the stats to no avail. I didnt realize
>> amount of data would have any effect. The one ignoring
the
>> indexes has data. The one using the indexes is empty.
Any
>> ideas?
>>
>> >--Original Message--
>> >I'd check the statistics on the tables in question
>> (SELECT
>> >STATS_DATE(id, indid) FROM sysindexes). If the table
>> that
>> >isn't using an index has older statistics, then update
>> >them.
>> >
>> >I'm assuming the data content of the table is identical
>> >(same number of rows, same result set, etc.).
>> >
>> >Bruce.
>> >
>> >>--Original Message--
>> >>sql2k sp3
>> >>
>> >>Two boxes. Same db's, tables, indexes, queries.
Indexes
>> >>are being used by 1 but not the other. Any ideas?
>> >>
>> >>Thanks in advance.
>> >>.
>> >>
>> >.
>> >
>
>.
>