Shrinking Workspace Files

Brian DonahueBrian Donahue Posts: 6,590 New member
edited November 9, 2005 10:27AM in SQL Compare Previous Versions
Hi Jodi,

The workspace files that SQL Compare uses are created by a third-party
component called Desaware Storage (dwstg.dll). The component works sort of
like a database system like Access or SQL Server in the sense that it's in
charge of the allocation and deallocation of the space used, and therefore,
the size of the file. You'll notice that if you load a workspace with two
databases, and delete one, the file will not shrink. If you load up a second
(different) smaller database, the file remains the same size (it doesn't
grow). But if you load a second, larger database, it will grow.

What I will do is contact the company and see if there is a way to set
the storage area allocated by their product to allow the files to shrink.

Thanks for writing!

Regards,

Brian Donahue
Technical Support

"Jodi Wheeler" <[email protected]> wrote in message
news:[email protected]
> I am currently using SQL Compare v2.03 and had a quick question regarding
> growth and the ability to shrink saved workspace (.scw) files.
> I registered several databases and saved them as a single workspace file.
I
> subsequently unregistered all but two of the databases and saved the
> workspace file again. Both workspace files were the same size although the
> second one contained only a subset of the original registered databases. I
> also created a new workspace file containing only the same two databases
to
> verify the actual amount of space used by the two remaining registered
> databases; it was a much smaller file.
> I would expect the file with fewer registered databases to be smaller, but
> it appears that once the file grows, it does not shrink in size when
> database are unregistered. Is there any way to shrink a workspace file
after
> unregistering databases?
> Thank you!
> ~Jodi
>
>

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jodi,

    It turns out that the version of DWSTG.dll that ships with SQL Bundle
    has a bug that affects the CompressStorageFile method. Desaware has sent an
    improved version of the file, version 3, which fixes the problem. That's
    only half the story: SQL Compare never actually calls the
    CompressStorageFile method, so the workspaces still will not shrink. Since
    SQL Compare is going through a re-write, and any non-clitical updates to the
    current code are cancelled, I've written a little utility that will compress
    your workspace files.

    Extract the files from the attached archive and run setup. This
    installation includes the updated Desaware component.

    Yours,

    Brian Donahue
    Red Gate Technical Support

    "Jodi Wheeler" <[email protected]> wrote in message
    news:[email protected]
    > I am currently using SQL Compare v2.03 and had a quick question regarding
    > growth and the ability to shrink saved workspace (.scw) files.
    > I registered several databases and saved them as a single workspace file.
    I
    > subsequently unregistered all but two of the databases and saved the
    > workspace file again. Both workspace files were the same size although the
    > second one contained only a subset of the original registered databases. I
    > also created a new workspace file containing only the same two databases
    to
    > verify the actual amount of space used by the two remaining registered
    > databases; it was a much smaller file.
    > I would expect the file with fewer registered databases to be smaller, but
    > it appears that once the file grows, it does not shrink in size when
    > database are unregistered. Is there any way to shrink a workspace file
    after
    > unregistering databases?
    > Thank you!
    > ~Jodi
    >
    >
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Note -- if anybode needs this workspace compressor (SCWCompressor.exe), please write [email protected]. Please note that the application is designed to shrink SQL Compare 2.x workspace files and is not designed for SQL Compare 3 and up.
This discussion has been closed.