0

I'm trying to move Data form one SQL Server Express 2014 to another. First I have Imported Data though SQL Management Import/Export Wizard. THen I tried to synchronize all Tables using SQL Compare and I got following Error related to one Table:

The following error message was returned from the SQL Server:

[1105] Could not allocate space for object 'dbo.SORT temporary run storage: 422212498751488' in database 'DatabaseName' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. Could not create constraint or index. See previous errors. Error executing the following SQL: ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED ([Table1ID])

The following SQL command caused the error:

ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [PK_Table] PRIMARY KEY CLUSTERED ([Table1ID])

This Table is quite big with Data but not bigger than 4GB.

Reserved(KB): 3,151.496 Data(KB): 2,616.680

Free Disk Space on both Servers is > 200GB

Any idea why I'm getting this Error?

  • 1
    Probably your filegroup has a limit. Check it on database properties. – McNets Jul 4 '17 at 12:22
  • Where exactly I can check is there a limit?In Database Properties in Files TAB my Database has a Filegroup: PRIMARY with Initial Size (MB): 10240 and Autogrowth / Maxsize: By 1 MB, Unlimited – mchrapek Jul 4 '17 at 14:55
  • Try by changing this 1 MB to 50%, click [...] button to get properties dialog. – McNets Jul 4 '17 at 15:04
0

Here is the solution

Check the storage space:

  1. Open the Windows Explorer.
  2. Right click on the disk drive where database files are present.
  3. Select the properties option.
  4. Now check the disk space. I will suggest you leave at least 20% free disk space.

You can also update the storage location of your database. To do so, follow these steps:

  • Open SSMS, select the View tab.
  • Select object explorer, and expand database folder.
  • Right click on the database, select properties.
  • In the select a page option, click on the files option.
  • Now find the database files row with filegroup as primary
  • Increase the size of database (in MB)
  • Click on the OK button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.