| DotNetFirebird Using Firebird SQL in .NET. |
|
Home
Features
Download
Documentation
FAQ
Tools and Code
About
Blog
|
Sunday, February 27, 2005
Firebird ADO.NET Provider 1.7 RC2
Firebird ADO.NET Provider 1.7 Release Candidate 2 is available:
Wednesday, February 16, 2005
FBCopy: Command-line Tool for Copying Data between Tables and Databases
Features:
Vulcan: Major Firebird Upgrade
Vulcan is a codename of Firebird next major version. The planned new features include:
Connection PoolingFirebird ADO.NET provider supports connection pooling. By default, connection pooling is turned on. That means that when you call Close method on FbConnection instance the connection to the server is not closed but is returned to the pool. Connection pooling is useful especially for Web applications. Each page request would otherwise need to open a new connection and that can be time expensive. You can modify the behavior of connection pooling in the connection string by using these parameters:
Since version 1.7 of the Firebird ADO.NET Provider you can check the number of connections in the pool using FbConnection.GetPooledConnectionCount(). You can explicitly clear a pool using FbConnection.ClearPool() or all pools using FbConnection.ClearAllPools(). Things to remember:
Working with Character Sets
Nice introduction to using character sets: Everything You Need to Know About InterBase Character Sets
A Few Performance Tuning LinksSome links to performance tuning articles (most of them about Interbase and Delphi and are a bit older but you will get the idea): Using Database AliasesFirebird newcomers often complain that you need to specify the full path to the database file in the connection string, like this: FbConnection c = new FbConnection(@"Server=localhost;Database=C:\data\mydb.fdb;User=SYSDBA;Password=masterkey"); In Firebird 1.5 and higher you can use database aliases. Just add the database path to the aliases.conf file on the server: mydb = c:\data\mydb.fdb Then you can use this alias in the connection string instead of a database path: FbConnection c = new FbConnection(@"Server=localhost;Database=mydb;User=SYSDBA;Password=masterkey"); This has many advantages:
Monday, February 14, 2005
EXECUTE STATEMENTThis statement executes SQL or DDL command specified as a (string) parameter. It is a great tool for stored procedures where you can dynamically create the SQL code to be executed. Syntax: /* For statements that return nothing or a single row */ Example: SET TERM ^ ; You see that this is a really dumb example. It doesn't create the SQL dynamically so there is no reason to call it using EXECUTE STATEMENT. Ability to create the SQL dynamically gives you much more power in your stored procedures. EXECUTE STATEMENT can be used for example for:
Wednesday, February 09, 2005
Embedded Firebird and Microsoft SQL Server 2005 Express Feature ComparisonThis is a basic comparison of embedded Firebird 1.5 and Microsoft SQL Server 2005 Express. Remember that it compares the embedded version of Firebird which doesn't run as a separate service but is fully embedded in the application. I plan to come with a server-server comparison in some of the future posts.
* Embedding. SQL Server Express can be installed with the host application but it still is a separate server. Firebird can be installed as a server or can be used as as a part of the application (just a single DLL copied into the application directory that doesn't expose any TCP/IP or other interface to other applications). ** Multiple processors support. Full multiprocessor support will come in Firebird 3.0 which is expected to be released in a few months. *** Database file size limitation. Firebird is limited only by file system (e.g. 16+ TB on NTFS). To summarize: Embedded Firebird is a clear win when you need a fully embedded database that users are not aware of. The clear advantages of Embedded Firebird are:
Related Tuesday, February 08, 2005
Embedded Firebird SecuritySecuring embedded Firebird is a lot different from securing a server:
Related Saturday, February 05, 2005
Firebird Server SecurityThese guidelines only apply to Firebird Server. When using embedded Firebird, there is no TCP/IP interface. We are talking about securing Firebird on a server level. There will be a separate article about security on a database level. 1. IP Address Binding By default, Firebird is bound to 0.0.0.0 IP address. That mean it will be reachable on all available IP addresses. When you are using Firebird only as a backend to your web application you should bind it to local 127.0.0.1 that makes it unavailable from network. You can change the bind address in firebird.conf: RemoteBindAddress = 127.0.0.1 2. TCP Port Firebird server runs on port 3050 by default. You can change it in firebird.conf: RemoteServicePort = 3050 Use your firewall to limit access to that port. You should not expose it directly to the internet. 3. Database Paths When connecting to Firebird, you can specify the database by either:
By default you can open any database that is located on the server and the server process is permitted to read/write by filesystem. To make your server more secure you can limit the databases that can be open to:
The options in firebird.conf are as follows: # Unrestricted access (default) 4. Network Communication Firebird uses unencrypted network communication. To make it more secure, you can use e.g. SSL tunnelling. 5. SYSDBA Password The administrator account name in Firebird is SYSDBA and the default password is masterkey. (Actually, only first 8 characters of the password are significant.) You should change the SYSDBA password after server installation. Friday, February 04, 2005
Migration from Microsoft SQL to FirebirdThere is a new article on Firebird on Code Project: MS SQL Server to FireBird migration. That's a Pain!. Firebird may sometimes seem strange to newcomers. A few tips to make the start easier:
Wednesday, February 02, 2005
Transaction Isolation Levels in FirebirdEvery database operation in Firebird runs inside a transaction. The transactions have these features: Atomicity, Consistency, Isolation, Durability (read more about ACID). Let's talk a bit about the isolation feature. Isolation says that the transaction shouldn't interfere with other transactions. Achieving full isolation would mean serializing the transactions and that would slow down the database. Therefore there are four transaction isolation levels defined and every of them represents a different balance between isolation and performance:
Firebird doesn't match the standard (SQL92) isolation levels exactly. The following table compares the isolation levels that are supported by Firebird ADO.NET with the SQL92 standard.
All transactions have these additional Firebird transaction options set:
You can use the predefined isolation levels by calling public FbTransaction BeginTransaction(IsolationLevel) or you can tune the transaction options more precisely by using this BeginTransaction overload: public FbTransaction BeginTransaction(FbTransactionOptions). IsolationLevel.ReadUncommittedANSI/ISO Read Uncommitted isolation level is not supported by Firebird. IsolationLevel.ReadUncommitted behaves like ReadCommitted but it returns the latest committed version of a rowand ignores any other (uncommitted) versions.
IsolationLevel.ReadCommitted
IsolationLevel.RepeatableRead
IsolationLevel.Serializable
Previous
Archives
Copyright © 2005 - 2007 DotNetFirebird |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||