By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

How stopping and restarting full text indexing?

P: n/a
Hi,

I've got a full text index which works fine, SQLSERVER2000/WIN 2000 SERVER.

The system requires to update indexes immediately, so I use a timestamp
field to enable this. No problems so far.

Now, I've got a stored procedures which nearly daily inserts about 10.000
rows. When doing this while full text indexing is active, all users start
complaining about performance. In order to work around this problem I tried
doing the following ...

Create myStoredProcedure
-- begin of stored procedure
exec sp_fulltext_table 'adsfull', 'stop_background_updateindex'
exec sp_fulltext_table 'adsfull', 'stop_change_tracking'
--
-- insert 10.000 rows
--
-- end of stored procedure
exec sp_fulltext_table 'adsfull', 'start_change_tracking'
exec sp_fulltext_table 'adsfull', 'start_background_updateindex'

Now, it seems this doesn't work. SQL Server keeps tracking changes and
updating indexes. Also if I cut away the stop instructions and paste them
into query analyzer before starting the stored procedure.

So, if I check the status via select fulltextcatalogproperty('FTADS',
'Populatestatus') ... it returns value 6 (incremental in progress) instead
of 0 (idle) while executing

(0=idle, 1=full population in progress, 6=incremental in progress, 9=change
tracking)

The only way I can resolve this issue is to stop the indexing via the
enterprise manager and to restart after the stored procedure is executed.

Any help appreciated.

--
Kind regards,
Perre Van Wilrijk,
Remove capitals to get my real email address,
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Perre Van Wilrijk" <pr****@AkoopjeskrantWAY.be> wrote in message
news:Jt********************@scarlet.biz...
Hi,

I've got a full text index which works fine, SQLSERVER2000/WIN 2000
SERVER.

The system requires to update indexes immediately, so I use a timestamp
field to enable this. No problems so far.

Now, I've got a stored procedures which nearly daily inserts about 10.000
rows. When doing this while full text indexing is active, all users start
complaining about performance. In order to work around this problem I
tried
doing the following ...

Create myStoredProcedure
-- begin of stored procedure
exec sp_fulltext_table 'adsfull', 'stop_background_updateindex'
exec sp_fulltext_table 'adsfull', 'stop_change_tracking'
--
-- insert 10.000 rows
--
-- end of stored procedure
exec sp_fulltext_table 'adsfull', 'start_change_tracking'
exec sp_fulltext_table 'adsfull', 'start_background_updateindex'

Now, it seems this doesn't work. SQL Server keeps tracking changes and
updating indexes. Also if I cut away the stop instructions and paste them
into query analyzer before starting the stored procedure.

So, if I check the status via select fulltextcatalogproperty('FTADS',
'Populatestatus') ... it returns value 6 (incremental in progress) instead
of 0 (idle) while executing

(0=idle, 1=full population in progress, 6=incremental in progress,
9=change
tracking)

The only way I can resolve this issue is to stop the indexing via the
enterprise manager and to restart after the stored procedure is executed.

Any help appreciated.

--
Kind regards,
Perre Van Wilrijk,
Remove capitals to get my real email address,


I have no real idea about why your proc isn't stopping the indexing, however
if it works from EM then it's possible that EM is doing something extra
behind the scenes. It might be worth using Profiler to trace what EM is
doing when you stop the indexing, and then copy that in your procedure.

You might also want to post to microsoft.public.sqlserver.fulltext to see if
someone has a better answer.

Simon
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.