Subject Re: [firebird-support] Firebbird 2.1.2 on a Mac (newbie)
Author Helen Borrie
At 01:51 PM 14/07/2009, you wrote:
>Can anyone point me to some resources or documentation that is Mac specific for 2.1.2.
>
>Unfortunately I'm very new to the Mac (cant say I think much of it when you start to do anything remotely advanced) and I'm investigating porting my windows application over. Unfortunately I am stuck on step 1 - getting FB to work on the mac.
>
>I have installed the classic server and copied over my windows fdb file but all attempts to connect to it with isql have failed.
>
>I have tried to connect to the "employee.fdb" also but that too fails.
>The error I receive connecting to the sample database is:
>
>isql localhost:/Library/Frameworks/Firebird.framework/Resources/examples/empbuild/employee.fdb
>Statement failed, SQLCODE = -902
>Your user name and password are not defined. Ask your database administrator to setup a Firebird login.

You need to provide the sysdba user name and password to log in to the employee database.

Also, since you are attempting to connect through TCP/IP local loopback, make sure the xinetd daemon is running. That daemon listens for connection requests and launches a Classic process for the client if successful.


>If I attempt to connect to my database (from a windows system) I get:
>
>isql ./Documents/ShowFiles/DEFAULTSHOW.FDB -user SYSDBA -password masterkey
>Statement failed, SQLCODE = -902
>cannot attach to password database

It certainly sounds as though xinetd isn't running.

>Further to this problem: I cant see any sign of the FB server running in the process list. Dusted off my Unix knowledge and found my way to the "top" command.

The ps command is more useful (and doesn't chew up resources as top does). Look it up. But you won't see any fb_inet_server processes running if there are no connections. However, you should be interested to know whether xinetd is running.

>Does the install not set this up? Does it need to be running or do local connections work without it.

There's a fog of newbieness here. ;-) Classic doesn't run a listening process itself: it uses xinetd to listen on its behalf.

Next, "localhost" is not a local connection. It is a TCP/IP connection that uses a specialised local transport known as "local loopback".

On the other hand, one *can* make a local connection to a database in one's own user space, using the libfbembed.so embedded client/server library (not certain that it retains its proper unix name on mac osx though...but it will be something with "fbembed" in its name). That gives you (user) a direct connection to the local database. You don't need to know its name. As long as it is installed (and why wouldn't it be, if you used the pkg installer?), it will be invoked if you provide a "serverless" path to the database file.

But note that, for this direct connection, you (OS user) must have all the permissions for the file (as distinct from, but not exclusive of, correct login credentials as a user of the database).

>All help much appreciated.

Tried reading the installation document? Except for the idiomatic Mac naming and location conventions, that which applies to POSIX in general applies to Mac OSX. It also seems you need to study the Quick Start Guide as well, to get clear about the differences between Superserver and Classic.

Re file-copying the database: not a great idea. Make a transportable backup on the Windows machine it is coming from and restore it on the Mac. In fact, if your Mac is PowerPC, an Intel 64-bit or 32-bit database won't be compatible at all.

./heLen