
ppyrzynski asked a question.
Hi,
I'm in the middle of FNMS upgrade from 2022R1 to 2023R1. During the process I decided to re-index the FNMSCompliance DB.
Re-indexing took over 23 hours. And resulted "Query completed with errors". The Messages window in SSMS shows multiple lines this:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
then there is an error
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 's'.
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ')'.
And then the lines again:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Completion time: 2023-08-02T13:24:18.8593646+02:00
So it looks to me like on overall the re-indexation went well, right?
Another question is related to Data drive space. Before running the script I had 665 GB Free space out of total 1,5 TB. Now I'm at just 137BG free space. I would think that after re-indexing there might be some increase in space used but not this much! Is it normal behavior? Can the space be somehow reclaimed?
edit: forgot to mention that the indexes has not been rebuilt for at least 3 years.
Best,
Paweł
@ppyrzynski
In our environment we are using a slightly customized script as described under following link under section "D. Use sys.dm_db_index_physical_stats in a script to rebuild or reorganize indexes"
sys.dm_db_index_physical_stats (Transact-SQL) - SQL Server | Microsoft Learn