SQL Source Control 6

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 and as a result it can only access a maximum of 2GB RAM - even if the system it's running on is 64-bit.

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

You can also raise the amount of RAM available by using the Large Address Aware utility on ssms.exe (see https://www.techpowerup.com/forums/threads/large-address-aware.112556/)

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?