I have a sql server 2012 box that hosts hundreds of databases. All databases use full text indexing. The indexing has stopped working.
executing this query:
SELECT status_description
FROM sys.dm_fts_index_population
returns status_description equal to Starting for all databases where there has been recent activity.
I created a new database and created a full text index. It has the same problem, the population is not completing.
What can be the cause? Can I somehow reset the full text index service without restaring SQL Server service itself?
Related
I'm trying to create an Always On AG between SQL Server 2017 and SQL Server 2019 instances with a very simple database (just a single table test database for proof of concept).
Everything appears to work fine except the secondary replica is stuck in "Synchronizing / In Recovery" status in SSMS.
I cannot connect to the replica even though I marked it as allowing all connections.
If I make changes to the database and fail over to the replica, the changes are there. Everything LOOKS ok but I cannot connect to the replica, with either a normal connection string or a with read only intent.
I saw the below topic and see that the resolution was to use the same version of SQL Server on both replicas. I would ideally like to use 2017 on my primary and 2019 on the secondary as that is our current production environment. If I can get the AG group up that will ultimately allow me to bring SQL Server 2017 instance up to SQL Server 2019 without downtime.
Databases stuck in “Synchronized / In Recovery” mode after adding server to SQL Avaylability Group
SSMS status
AG Group status query
When you have different versions like this, the system can't run recovery. If it did, the AG would then be useless, as you couldn't go back. And without it, you can't access it.
How to save the results of a query (table) to SQL database which is on different server?
I have the following problem. I have only READ access to a HugeDatabase. I can execute Select commend an then I want to JOIN the results with another table 'TableB' which is on my local server. I cannot create views on HugeDatabase server (no rights, READ ONLY). I cannot make a linked server on HugeDatabes server to my local server (admin of the server does not allow that). Note that I have only sufficient permission to change settings of my local SQL server. Dropping the HugeDatabase to my local server is pointless since it is huge and my query takes only seconds.
Of course I can save the results as CSV and import it to a table on my local server. But this is Middle Ages way. I am in a need to execute the query every 5 minutes and make a JOIN with results, so dropping results to CSV is a fatal solution. Can you please suggest me a better way?
I have two databases on the same Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64)
The CIKK table merge replicated. There is a same FULL text indexes on both.
All of the indexes (Full text also) are the same.
I run the same query on both
select cikkszam
from cikk
where delstatus=1
and webmegjel=1
and contains(*,'"spi*"')
On the master database it takes 120 sec. on the Slave database it takes 0 sec.
The results are the same.
The problems is the query plan.
On the slow one, firstly uses an indexes (delstatus, webmegjel) and the result set is checked with the full text index. On the fast one it does the opposite.
A saved the query plans and the statistic plans also, but Stackoverflow only allow 2 links, so here the sqlplans.
https://www.dropbox.com/s/zvcizijn1yxlrvj/plan1.sqlplan
https://www.dropbox.com/s/4yi0c1q2ly8spsk/plan2.sqlplan
What can be the solution to this?
I want to set up some monitoring software that will generate an SMNP trap if a database log file goes beyond about 95% usage. It can only look at the first result in the first column of an SQL query, so what I'm looking for is an SQL Query which will just return the percentage figure ONLY in the result - eg, 95
I've found several different ways of doing similar things, but all return table heading etc, whereas I just want the figure. It'll be running this query every hour so nothing too intensive. I'm running SQL version 8.
Thanks, Mike
You could write a query against the OS DMVs to get just the single value you're looking for.
Not sure if this will work for SQL Server 2000, but I know it works as far back as SQL Server 2005. It also requires that performance counters are enabled on the host server (i.e. OS, not just SQL Server).
This query should do the trick:
SELECT cntr_value as PercentUsed
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Percent Log Used'
AND instance_name = 'your_database_name'
I have created a full text index on my dev server on a view that returns few rows.
The population schedule is currently set to run once a day.
However the full text index is returning no results as though it is not populated.
If I run SELECT FULLTEXTCATALOGPROPERTY('My Catalog', 'PopulateStatus'), the result is always 1, indicating that a full population is in progress. It has been like this for hours.
If I run ALTER FULLTEXT INDEX ON myView START FULL POPULATION, I receive an error message saying that a population is in progress.
I couldn't take the database offline because of this population so I had to restart the whole server.
I'm using SQL 2005 SP3.
What is going on?
What version of SQL server are you running?
This hot fix applies to 2005 SP1, where full text searches take a long time to populate on an indexed view. (Note this is fixed in SP2)
http://support.microsoft.com/kb/928537
If that doesn't help post some more details about your environment, table size etc.
I gave up and moved the whole database over to an SQL 2008 server - the problem no longer occurs.
Must be something wrong with SQL 2005.