1752590 Members
4072 Online
108788 Solutions
New Discussion юеВ

Re: Compress DB

 
SOLVED
Go to solution
Rudi Martin
Advisor

Compress DB

Hi there

I need help as soon as possible please.

I got a request to we shut down on DB that's grown quite big, compress the file into a new file, and copy the new , smaller file across.

How do I do this ? I haven't got a clue !

Thanks
Regards
Rudi

5 REPLIES 5
twang
Honored Contributor

Re: Compress DB

Do you need some commands to compress file? If yes, you may use gzip with -9 option
-9 indicates the slowest compression method but best compression.
eg.
to compress:
# gzip -9 /stand/vmunix
to expand:
# gunzip /stand/vmunix

hope this helps.
Rudi Martin
Advisor

Re: Compress DB

Hi Twang...

Thanx for the command , but I still am in the dark with compressing it to a new file.

Chris Wilshaw
Honored Contributor

Re: Compress DB

It sounds more like your DBA's need to purge old data from the database. (what database are you using?)

It's not possible to simply take a database file, run it through a normal file compression utility, and then let the database run against the compressed file.
Indira Aramandla
Honored Contributor
Solution

Re: Compress DB

Hi Rudi,

Did you mean to compress the database data file. If so you cannot compress the datafile and re-create an empty new datafile. The database will not funtion at all.

If you know that your database has grown large, then you should ask your DBA to archive some of the old data. Move that data to a different tablespace or export that part of the data and save it some where. then you can shrink the remaining data, by exporting and coalesing the tablespaces.

If you were refering to the archive logs then you can compress the older archive logs and move them to a different file system.

I hope this helps.
Never give up, Keep Trying
Volker Borowski
Honored Contributor

Re: Compress DB

Hi,

there was a function to compress an
MS ACCESS database.

Never heard about this for real RDBMS of any type.

Volker