Wednesday, December 06, 2006

Secondary name

Some company had a database corruption - based on InterBase 5.6 system, oversized >4gb database. That company was not able to send database over internet, and their office also was one metro station from me, so I came to them to take broken database.
Since this was a security office, I tried not to touch anything, and just looked at screen and told local administrator what to do.
He showed me directory with database, and I told him to copy database, let's say named 'A.GDB'. I need to say that there were also some things that took my attention away.
When I brought database to repair people, they said - Hey, this file is OK, but there must be another database file (secondary), named employee.gd1.
Hell! Yes, I saw some file named like that, but at the security room I couldn't imagine that someone will name secondary database file with another name!
When at last we had all database files, we found that the cause of corruption was incorrect parameters for secondary file length (also 'starting at' was specified, unnecessary).
So, why secondary file of database was named EMPLOYEE.GD1 instead of A.GD1 ?

The answer is simple - someone who did that just looked directly into documentation, and nearly copied 'alter database' command word by word. And he not tried to think much. Documentation says employee.gd1? Let it be.
And the corruption happened because secondary file length was set to 5000000 pages - 5 gigabytes- not 4.

p.s. Secondary database files are not needed anymore in latest Firebird and InterBase versions (at least in 1.5 and 7.1). If you use these versions, you must check free space on database drive, and may not care about database file size.

Tuesday, November 21, 2006

Computerworld, slowdown please....

Interesting that press starting to write more news about Firebird. For example, look at Firebird 2.0 announce at Computerworld. This is great, but, a lot of mistakes.
First, I don't understand this kind of humour naming Firebird as "namesake open-source database". Next, operating systems list that Firebird supports a bit wider than "Windows, Linux and Solaris". And, at last, Borland's last releas of InterBase is 2007, not 7.0.
Anyway, "good news, everyone!", as professor Farnsworth says.

Sunday, October 15, 2006

1-st Russian Firebird and InterBase conference

We did it! 14 October 2006. It went very fine. 200 visitors. ~25 people from sponsors and Firebird developers. Interesting sessions.
2-nd conference will be next year, for sure.

Sunday, October 08, 2006

IBAnalyst 2 is ready

IBAnalyst 2.0 is ready! New features list:
  • Improved algorithms of statistics analysis
  • Full Firebird 2 support
  • InterBase 2007 compatible
  • Uses InterBase and Firebird client libraries
  • Transaction Calculator - enables to understand how many transactions per seat your applications starts
  • Database size and % of tables and indices
  • Broken or incomplete indices detection
  • Many interface changes - toolbar menu, server/database list, "reload" button...
  • New statistics save format
Buy it now at ShareIt or Plimus standalone or within IBSurgeon Pack.

For those who still do not know about this perfect tool - it can take statistics from InterBase or Firebird databases, and analyze it giving complete reports about transaction state, record versions, index selectivity and other database parameters that can affect performance.

Wednesday, September 20, 2006

Migrating from MS SQL

David Burton started series of articles about migration from MS SQL to Firebird.

There is also "MS SQL to Firebird Migration Guide" at documentation page.

Monday, September 18, 2006

Names identity

I found that Google Alerts is sometimes useless. During 3 weeks I tried to monitor news & web about Delphi, Firebird and Interbase, and the only news I've got were about Delphi Corp. (auto-parts company), Firebird tale and Stravinsky's music, and some protocol named "interbase".

This is interesting at least because those keywords in their wanted meaning (IDE, RDBMS) can easily be found by Google search right on first results page. If you have some positive experience about Google Alert, please tell me :-)

p.s. Oh, right now got the first real alert -

Friday, September 01, 2006

Overloaded by transactions

Do you remember old InterBase 5.6 bug when maximum number of transactions in database is depending on page size ?
Strange, but early InterBase 6.0 versions have the same, sure. Yesterday we got database with the same sympthoms, but this is ODS 10.0 database with dialect 3, created with InterBase 6.0. Let's look at statistics from IBAnalyst:

Sorry about numbers format, if it is hard to read - there are 534 million transactions in database. Since January 2005. And, if this database was put into production right after creation (or restore), there are 880 thousands transactions each day.
Why I was so impressed? This works on WinXP.
While database exists 607 days (more than 1.5 years), transaction inventory page became very big - 130 megabytes (Next transaction div 4 bytes). Database size is 160 megabytes, with the only 13 megabytes data in it.

Friday, August 18, 2006

New DataDirect ODBC driver

Borland released new DataDirect ODBC driver for InterBase customers (thanks Craig for the info). Also separate ADO .Net driver for InterBase (BDP 2.5.0) available.
Both drivers are free for InterBase users, but there is another OLE DB driver that is very useful, especially for Visual Studio - IBProvider. It uses all existing and possible OLE DB features, like many transactions per one connect and others, and can provide nearly the same special InterBase functionality accessible in native components like FIBPlus and IBX.

Repair issue

Yesterday we got broken database from some popular (in tight range) commercial system. It is built on InterBase 4.1, and still being sold by developers for wide range of shops. But, sometimes in these shops server power failure happens. In this case damage was increased by old InterBase 4 bug when data in header page is being shiffled. Hopefully, information was not broken, just mixed.
Repair process was a bit tricky, and took about 3 hours. First, database needed to be repaired to work with Firebird 1.5. Second, it was repaired again. And then, it was moved back to InterBase 4 format.
Everything went fine, except 7 records in one table were completely lost. Anyway, it was a small data loss, so database now works fine.

Unbroken database

In May our support got a customer alert that his InterBase 7.5 database is broken right after restore. We found that really, even after only metadata restore gfix reports about broken indices on rdb$dependencies and other system tables. Borland responded very quickly, telling that this is gfix error - it does not understand correctly new index structure introduced in ODS 11.2 databases. Hopefuly, gfix does not "fix" these "errors", so database stays correct. This issue have number 240075 in internal Borland's bugtracking system, and will be fixed only in next InterBase version.
Stay tuned.