SQL Source Control 7

System.OutOfMemoryException

This error means there isn't enough free memory for SQL Source Control to work. It has several possible causes:

Management Studio is using too much memory

If Management Studio is using more than around 700MB-1GB of memory, this might be causing the problem. You can see how much memory Management Studio uses in Task Manager.

SSMS is a 32-bit application, version 17.2 and older can only access a maximum of 2GB RAM - even if the system it's running on is 64-bit. Starting with version 17.3, ssms.exe is now Large Address Aware which means that even though it is still a 32-bit application it can now access more RAM.

If you are unable to use  SSMS 17.3 or earlier, you can raise the amount of RAM available in older versions by using the Large Address Aware utility on ssms.exe (see https://www.techpowerup.com/forums/threads/large-address-aware.112556/)

It is our recommendation that users install version 17.3 or above.

If you have Management Studio add-ins installed that you don't use (eg from Redgate's SQL Toolbelt), uninstalling them may free memory.

The static data tables are too large

Source-controlling very large static data tables uses lots of memory, so we don't recommend it.

The database is too large

If the SQL created from the objects in your database is very long, this can cause the error. The long SQL might be created by having lots of long stored procedures; for example, stored procedures including long comment blocks.

You might need to restructure the database to make it smaller, or remove comment blocks from stored procedures.

There isn't enough space on disk

Redgate tools store temporary data in the %TMP% folder. By default, this folder is in your Windows profile folder (eg C:\Users\<username>\Temp). If you don't have much space on the hard drive, this folder might fill up and cause memory errors.

To fix this, Redgate tools can use a different hard drive. For example, to use the folder RGtemp on drive D:

  1. On the Start menu, right-click Computer and select Properties.
  2. In the Advanced tab, click Environment Variables.
  3. Click New.
  4. In the Variable name field, type: RGTEMP
  5. In the Variable value field, type: D:\RGtemp
  6. Click OK.
  7. Close Management Studio and any Redgate tools you have open.
  8. Log out of Windows and log in again.

Redgate tools will use the folder you specified to save temporary data. To test this, you can commit a change in SQL Source Control (or run an operation in another Redgate tool) and check that files are added to the new location.

To undo this and have Redgate tools use the default folder, delete the RGTEMP variable from the Environment Variables list and repeat steps 7 and 8.


Didn't find what you were looking for?