Firebird News

Monday, August 23, 2010

Installing firebird python power console

If you want to install the Firebird power console here are some steps on Debian/Ubuntu machines
under ipython shell

ipython -p sh

1. Install setup

tar -zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
run install

2.install the power console

tar -zxvf  PowerConsole-0.7.5.tar.gz
cd PowerConsole-0.7.5
run install

3.install the firebird pack

tar -zxvf pwcfb-0.9.1.tar.gz

cd pwcfb-0.9.1/
run install

4. if you get that kinterbasedb is not installed just do an (This is on Debian sid and is quite recent 3.3.0)
apt-get install python-kinterbasdb

PowerConsole v0.7.5 [CLI version]
Python 2.6.6rc2 (r266rc2:84114, Aug 18 2010, 07:33:44) 
[GCC 4.4.5 20100816 (prerelease)] on linux2

Installed packages: pwcfb(0.9.1)

Type "help" for more information.

>>> help
To get help about specific topic, PowerConsole command
or Python object/function/expression, type help .

Simple PowerConsole commands:
connect  disconnect  help  list  ready  run  set  show

Miscellaneous help topics:
firebird  python  sql  terminator

>>> help firebird
TODO: Help for topic Firebird.
>>> help sql
Firebird package for PowerConsole should support all valid DSQL statements and
many ISQL commands as well (see Firebird documentation for details).

However, there are some exceptions and additions:
- SET TRANSACTION does not support table reservation options (yet).
- CREATE DATABASE and CONNECT support addtional optional argument (must be last one):
AS  that makes the Database object accessible under specified name instead
default alias "db".


>>> help connect
Attach to the Firebird database.

CONNECT 'dsn or db' [HOST host][USER 'user'][PASSWORD 'password']
  [CACHE int ][ROLE 'role'][AS var][;]

If connection is sucessfuly established, this database connection is set
as main working database. Database object is stored and accessible under
default alias "db" or as alias specified by optional AS argument. If
alias name is already used for other attached database, this database is

Some of the examples are here
help connect
connect 'employee' user 'sysdba' password 'masterkey'
select * from country;
xshow procedures
xshow tables
list name,owner_name in db.tables
list name in (t for t in db.triggers if 'POST_EVENT' in t.source)
list name in (i for i in db.indices if i.unique)
Post a Comment