Posts Tagged ‘database’

Processing large data volumes


2009
12.15

So a compressed text file that ends up being 72GB sounds like a lot, right? Especially if you have to data-churn it with per-line processing. Fine. Wow. A lot.

That pales in comparison to the (reported) volumes of data processed by Google and Facebook:

In December 2007 (!) Google was processing 400 PB (petabytes) per month, with an average job size of 180GB.

Facebook’s volumes have been steadily increasing, too: From March 2008′s 200GB of daily new data, they’ve moved up to 2TB per day in April 2009, to steady off to 4TB per day in October 2009.

Most of which are, without a doubt, LolCat pictures :)

Shrinking LDF files (SQL Server 2000 etc)


2008
12.17

Some really nifty tips on huuuuuge LDF files I encountered (56G a pop) and came down to 212MB as a result of this process:

In SQL Server 2000 Query Analyzer run the following command (doesn’t matter what db you are in):
backup log [database name] with truncate_only
(don’t include the square brackets)

Open Enterprise Manager and navigate to your database:
–Right click on the database
–Highlight ‘All Tasks’
–Choose ‘Shrink Database…’
–On the bottom of the window on the right, click the ‘Files’ button
–In the drop down at the top make sure you choose the ‘_Log’ option. By default it is the ‘_Data’ option
–Leave the shrink action as: ‘Compress……’
–Click ‘OK’

More verbose information at these links (though just expounding on the above snippet)…:

Backup and Restore in Firebird [and Interbase] (but you knew that already)


2008
11.12

Always nifty to have it all in one spot :) Of course, this works for Interbase, too… all in the documentation.

Where dbserver = 127.0.0.1 (if it’s on localhost) and /databases/dbfile.fdb could be x:\DIR\FILE.[gdb|fdb] etc…

A “normal” Backup

gbak -v -t -user SYSDBA -password masterkey dbserver:/databases/dbfile.fdb c:\backups\dbfile.fbk

Backup with output to a logfile

del c:\backups\dbfile.log
gbak -v -t -user SYSDBA -password masterkey -y c:\backups\dbfile.log dbserver:/databases/dbfile.fdb c:\backups\dbfile.fbk

A “normal” Restore

gbak -c -v -user SYSDBA -password masterkey c:\backups\dbfile.fbk dbserver:/databases/dbfile2.fdb

Restore to an already existing database (Firebird 1.0, 1.5)

gbak -c -r -v -user SYSDBA -password masterkey c:\backups\dbfile.fbk dbserver:/databases/dbfile.fdb

Restore to an already existing database (Firebird 2.0)

gbak -r o -v -user SYSDBA -password masterkey c:\backups\dbfile.fbk dbserver:/databases/dbfile.fdb

Create a read-only database

gbak -c -v -mode read_only -use_all_space -user SYSDBA -password masterkey c:\backups\dbfile.fbk c:\files\dbfiledb.fdb