News We Recently Launched AD Migrator and AD Reporter | News SysTools Commitment to Child Safety: Upholding the Fight Against CSAM |

How to Fix Incorrect PFS Free Space Information Error for SQL Pages?

  author
Written By Tej Pratap Shukla
Anuraag Singh
Approved By Anuraag Singh  
Published On October 26th, 2024
Reading Time 7 Minutes Reading

incorrect PFS free space information error solved

SQL Server users and administrators often get issues with their Page Free Space (PSF) information system. As a result, they get the incorrect PFS free space information error in the database which hinders the usual DB working. We have been getting emails for the same for the past few weeks, so we decided to put up an article and cater to the needs of the entire world.

This article is dedicated to users in order to understand the entire error, its causes, the best four methods, and a few troubleshooting tips. By following this article in depth, we’re sure that users can get the best possible solution without a doubt.

Why Does this PSF Error Occur in SQL Server Database?

In total, we can not specify the fixed reasons as the reasons keep on changing based on different database conditions, and variable factors. However, we observed the majority of users are having similar problems so we categorized some common reasons that users need to know. Understanding these reasons to fix incorrect PFS free space information errors for pages in SQL Server is a big milestone for troubled users.

  • Hardware Failure: Hardware disk failure, RAID controller issues & bad sectors in drives are some of the major reasons for faults in the PFS system.
  • Software Errors or Bugs: Errors in the software of PFS or incorrect information added to the software error aspect of the whole scenario.
  • Abrupt System Shutdown: A sudden power cut or improper shutdown of a running SQL Server often causes incomplete transactions leading to false information.
  • Oversize SQL Database File: Although SQL supports large-sized data files. However, oversized files with unmanaged data cause trouble with the PFS system.
  • Virus-Infected or Compromised Data: Whenever the database is infected with a virus or attacked by SQL injection, ransomware, etc.

Best Methods to Fix Incorrect PFS Free Space Information Error for Pages in SQL

We have 3 ways to protect users from such a frustrating error in SQL Server. The reason is that this error is not complicated but it does trouble users a lot if not paid attention timely. All the four methods are:

  • Moving Data Method
  • Restore from Database Method
  • DBCC CHECKDB Command Method
  • SysTools Advanced Software Method

Users can select any of these solutions based on their requirements. For example, a quick, hassle-free, and simplified solution is of advanced tool. A core technical solution of the manual ones.

#1 Move Data to New Pages to fix SQL PFS Error

Moving the data to new pages is a very basic solution to fix the Incorrect PFS Free Space Information for page in SQL. The easiest solution for this is to just move the data to new pages so that PFS can adjust accordingly & process the new information.

But the question arises of how do we do it. So, it’s quite easy. Database console commands are required for this. Especially the CHECKDB command. It helps us to identify the pages having issues with the PFS system.

Once the pages with issues are identified, users can simply copy the data from those tables to a completely new table. This will allow the system to create a new PFS system for the table with fresh entries. Thus, the problem is more likely to be resolved. Users must keep one thing in mind the table name should be the same which is why they have to delete the previous table.

#2 Restore Database In Case Users Have A Backup File

In case the database is corrupted, damaged, or just unreadable, users can try to restore the database. However, the Backup file (.bak) is necessary for users to execute this operation. The application we are going to use here is the SQL Server Management Studio (SSMS). Just follow the steps mentioned below in the SSMS:

  1. Launch the SSMS & Navigate to the Object Explorer.
  2. Right-Click on the Database option & Select Restore DB option.
  3. General Page > Source Section > Select Device > Specify Source & Destination
  4. Enter Name in Destination > Select the last backup taken in the Restore field.
  5. Select the Backup file you need to restore to the database.
  6. Set the required options on the Options page.

In case users do not want to go through these long steps, they can simply execute the exact same operation with this below-mentioned SQL command:

RESTORE DATABASE [clients] FROM  DISK = N'C:\Backup\clients.bak' WITH  FILE = 1,  NOUNLOAD,  STATS = 10

#3 Repairing Existing Data with SQL T-SQL Commands

There are scenarios where users do not have the backup file from which they can restore the entire database. Therefore, in such cases, repairing the damaged DB is the solution do for users. The DBCC CHECKDB command must be in knowledge of the SQL users to execute this method without any hassles at all.

The most suitable repair option here is the Allow data loss option so the steps for the same are:

Step-1. Set the Database in Single User Mode with this command:

ALTER DATABASE Your_DB_Name SET SINGLE_USER WITH ROLLBACK IMMEDIATE

Step-2. Run the DBCC command with Allow Data Loss option.

DBCC CHECKDB ('clients', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;

GO

Step-3. Finally, Put the Database back in Multi-User mode.

ALTER DATABASE Your_DB_Name SET MULTI_USER

#4 Fix the Damaged MDF File Automatically

Last but not least, we have expert-recommended advanced software solutions. This software can repair the existing MDF and NDF files which results in fixing the incorrect PFS free space information error for SQL pages. The process is quite simplified without any complex commands. The tool offers an interactive GUI which makes it easy for all users irrespective of their SQL knowledge.

Download Now Purchase Now

Step-1. Launch the Software and then Select the Open button.

click open button

Step-2. Select Scan Mode for damaged files as quick or advanced.

select scan mode

Step-3. Select Destination Platform to export the healthy files after the scan.

select destination

Step-4. Click on the Export/Save button to complete the process & fix PFS issue.

click export to fix PFS error in SQL

Troubleshoot Incorrect PFS Free Space information Error – Tips

Now, apart from these major solutions, there are some additional considerations or tips to resolve the PFS error in SQL Server. Fixing these can increase the chances of error prevention.

Rebuild Indexes: Another consideration for users is to just rebuild indexes from scratch. It reorganizes the information on the pages with more accuracy.

Reorganize Data: Reorganize the data in the SQL server database frequently & always after PFS failure. It can fix the solution in some of the cases.

Monitor Database Health: Monitoring the database health often helps users simply know the ongoing activities that can lead to the identification of any malicious event.

Run Disaster Recovery Tests: Always run disaster recovery plans to check how well the strategy is working. This helps users to prepare for disasters & know the workability of their backups.

Keep the SQL Server Updated: Always keeping the SQL Server updated results in the constantly refreshed PFS system. It minimizes the chances of FS failure.

Also Read: How to Fix SQL Server Fatal Error 8946 Easily

Conclusion

In the end, users are aware of how to fix the incorrect PFS free space information for SQL pages. All methods are reliable but not simple. Therefore selection of the right solution depends on the requirements & technical knowledge level of users.

  author

By Tej Pratap Shukla

A versatile technocrat, always in the search for new and interesting areas related to technology. Works on multiple technical problems faced by users frequently. Provides the user-friendly solutions to deal with numerous technical issues.