Subject Re: unavailable db 4 users with no admin rights
Author Adam
--- In firebird-support@yahoogroups.com, "Rony Cesana" <r.cesana@...>
wrote:
>
> > I am wondering what you are telling it to connect to. Obviously
> > something is listening on 3050 (presumably FB, but make sure
> > especially if IB is installed). I use components that wrap the API
> > itself, and you can not attempt to connect without providing a
> > connection string (so perhaps we are on different wavelengths).
> >
> > Can you connect using iSQL? It should be using the form
> >
> > [hostname]:[path to database]
> >
> > eg
> >
> > Localhost:c:\data\mydb.fdb
> >
> > I know that if you forget the hostname, then you will have problems
> > with terminal services, but I have not experienced this problem on XP
> > or 2K desktop varieties.
>
> Oh my!!!
> It's true... if I run this having administrative rights:
> C:\Programmi\Firebird\bin>isql d:\cvs\OA.FDB -u artin -p whatever
> Database: d:\cvs\OA.FDB, User: artin
> SQL>
>
> And it obviously works with the explicit host specification:
> C:\Programmi\Firebird\bin>isql localhost:d:\cvs\OA.FDB -u artin -p
> whatever
> Database: localhost:d:\cvs\artin\artinoa\data\OA.FDB, User: artin
> SQL>
>
> But, if I run it from another user, with no admin rights:
> C:\Programmi\Firebird\bin>isql d:\CVS\OA.FDB -u artin -p whatever
> Statement failed, SQLCODE = -904
> unavailable database
> Use CONNECT or CREATE DATABASE to specify a database
>
> And now, thanks to Mr Adam:
> C:\Programmi\Firebird\bin>isql localhost:d:\CVS\OA.FDB -u artin -p
> whatever
> Database: localhost:d:\CVS\OA.FDB, User: artin
>
> Thanks a lot!!!
> Rony


The c:\Program Files tree only allows administrators to write (by
default). I am not sure what happens differently when using a local
connection, it is possibly as simple as the log or locking mechanism
can not be written to disk, or maybe the client tries to directly
write something to the fdb file (although I would expect that only the
server process is allowed to do this which should be under
localsystem). Maybe someone more knowledgable can shed some light.

In any case, if you don't use the hostname, then only one user can
access it at a time. I must say that we never use local connection for
this reason (exception of embedded engine which we are trialing but
that is different, it lives in a folder to which the user has write
permissions).

Adam