Running out of disk space with data compare

jrowlandjrowland Posts: 9
edited November 19, 2007 3:42AM in SQL Data Compare Previous Versions
I am running out of disk space on my c: drive before the compare is finished. Is there a way to redirect the output of temporary files generated to another volume?

Thanks,
Jason R.

Comments

  • I found the answer in SQL Data Compare FAQ's.

    If SQL Data Compare causes you to run out of hard disk space, you may want to move SQL Data Compare's temporary workspace to another drive or folder. To do this, go to the Control Panel, double-click System, then click the Advanced tab, and finally, Environment Variables. Edit TMP and replace the path with the temporary folder you'd like to use. In order for the change to take effect, you must log out of Windows and back on again. Note this setting will affect other programs as well.
  • Jason,

    There is also an RGTEMP environmental variable which should change where these files are stored.

    - James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
  • Where is the RGTEMP environment? I can't seem to find it.

    Thanks

    Wen
  • You have to create it yourself. Go to My computer/Properties/Advanced/Environment Variables/New

    Then type RGTEMP as the name of the variable and in the value field specify a path. All Red-Gate-related temporary files will now be created here.

    Hope this helps,

    David
    David Atkinson
    Product Manager
    Redgate Software
  • To set it you need to do the following:

    Right click on "My Computer" and choose Properties
    On the advanced tab then choose environement variables button
    Then under user or system varaibles click NEW and give the variable name as RGTEMP and the variable value as the path you want Red Gate SQL Compare and Data Compare to use as their temp directory.

    - James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
  • I noticed that Temp folder in my Local settings is full of binary data left by Data Compare. Most of the files are named RGDC-<guid> and its idx.

    It seems to be happening since I upgraded to version 5 months ago.

    ¿Should these files be deleted when DC is closed? ¿Is there a way to get rid of them?

    Thanks...

    ++Vitoco
  • They should all be deleted whenever you close sql data compare. I'm surprised that they're being left intact. Does this happen with every comparison you perform or only occasionally? What sort of way do you use SQL Data Compare from start to close as this may help us identify the scenario when they are not deleted as they should be?

    Thanks
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
  • We found a similar problem to the one posted previously, RGDC* files not being deleted when we ran out of disk space on our SQL Server.

    We are using Red Gate Data Compare as follows:
    1) Start RGDC on the server.
    2) Select an existing COMPARISON PROJECT.
    3) Run the project to do the comparison.
    4) Modify the parameters of the project after the existing compare was completed without actually closing the comparison (same server, user id, just a different database).

    RDGC v. 5.3.0.68

    Sounds like we have to actually close out the comparison project, then open it and change the parameters.

    Disk space recovered from the C: drive when we changed the tmp file location to a drive with lots of space disk space: 20GBytes.
  • The above is almost the same scenario I had: one master database and some development and testing databases. I had to synchronize some data from the master to the rest of the databases, using the project related to the tables that changed.

    BTW, some times appears the same project many times in the list, which I can recognize by it's comment. I guess that this is also related to the fact that I have selected another database just to see if there is any change in some data before closing the project or selecting another one. ¿Is it possible to set/modify the comment from within a project?

    ++Vitoco
  • I'm trying to get to the bottom of the issue of temporary files not being correctly deleted. Are you saying that when SQL Data Compare is shut down, there are still files in the RGTEMP folder? If so, could you please specify what the filenames are? (specifically the SC or RGDC prefix, as well as the extension.

    If SQL Data Compare isn't shut down nicely (the process is killed or it crashes out) the temporary files will need to be deleted manually. This is expected behaviour.

    Vitoco, I'm not sure I understand your request - where would you like to be able to set/modify the project comment? Currently you can do so by selecting "Comparison Projects" and clicking on the comment text.

    Thanks,

    David Atkinson
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
  • Argh! I was trying to simulate a the situation that does not delete temp files, without success. Every time, the files were replaced my newer ones, during each new comparison :?

    Unfortunatelly, I deleted old files, only a set of files remains in my temp, and I guess that DC run out of space and crashed that time, because all of them have the same time, and that seems to be a full database compare. The names are in groups: RGDC-guid, RGDC-guid.idx, RGDC-guid.1.idx, RGDC-guid.2.idx, RGDC-guid.D.idx and RGDC-guid.S.idx, where guid is a random hex string with some dashes, one for each compared table.
    Vitoco, I'm not sure I understand your request - where would you like to be able to set/modify the project comment?
    Sometimes I get unexpected behaviour when I go to the Comparison Projects window, so I avoid to go there while working with a project. Then, It would be nice to acces the comment field from within the project, may be in the Options tab from the Project Configuration Window.

    It would also be nice if I could save a project without actually running it, just loading the database's schemas and setting which tables to compare the next time I open that project. I suggest a pair of "Save Changes" and "(Re)Compare Now" buttons instead of a single "Done" or "Compare Now" button when editing a project. "Cancel" button is fine ;-)

    A last request: a "Save Script..." button directly in the synchronization wizard window. This way, we won't have to go to the SQL Script window just to press the "Save..." button. This also applies to SQL Compare!

    Thanks a lot...

    ++Vitoco
  • Is there a way to predict how much disk space will be needed in a compare? I remapped the TMP to my D drive (32GB) and it ran out of space at 80%. 32GB!
  • Hi,

    That of course depends on how big your databases are :-). From what I remember, we only store one copy of the data when it's identical between the two databases, but of course have to store both copies when it differs.

    So, as a very rough guide, I'd assume about once to twice the size of the data set you're comparing.

    If you're running short on disk space, you might like to try comparing a subset of the tables at a time, and doing multiple comparisons - that way you'll only need that fraction of the disk space available.

    Hope that helps,
    Robert
    Robert Chipperfield
    Red Gate
  • Another thought (just pointed out to me by Richard) is that there's an option in "Project Options" called "Show identical values in results". If you un-check this, then any rows that compare as identical won't be stored at all. This could give you a big reduction in disk space if your databases are largely the same.
    Robert Chipperfield
    Red Gate
  • Oh where is the RGTEMP environment? I can't seem to find it.

    Thanks

    :D
    kenny
    you got me thinking clearer here am i gonna be you and your sky as i stand
  • Just create it in your environment variables. On XP this is in computer properties->Advanced tab->Environment Variables.

    Simply add a variable called RGTEMP and set that to the temporary directory you want to use for Red Gate products.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.