[firebird-support] Re: FB 3 - Per database configurations (Providers and Security Database vs Legacy Auth)

2016-07-06 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
07.07.2016 07:25, Alexandre Benson Smith wrote:
>
> I am looking at the per-database configuration (FB 3) and have two doubts:
>
> I defined my databases.conf like:
> demo_naolocal=c:\bd\demo_naolocal.fdb
> {
>   Providers = Remote,Loopback
> }
>
> after that on the same machine I tryed:
>
> C:\fb3>isql demo_naolocal -user teste -password abc
> Statement failed, SQLSTATE = 08001
> I/O error during "CreateFile (open)" operation for file "demo_naolocal"
> -Error while trying to open file
> -O sistema não pode encontrar o arquivo especificado. (Translates to:
> The system could not find the specified file)
> Use CONNECT or CREATE DATABASE to specify a database
> SQL> quit;
>
> C:\fb3>isql localhost/3053:demo_naolocal -user teste -password abc
> Statement failed, SQLSTATE = 08001
> unavailable database
> Use CONNECT or CREATE DATABASE to specify a database
> SQL>
>
> I expected the first one to fail and the second to succeed.

Your expectation is correct from the client POV. But you miss the fact 
that the network server (namely: firebird.exe) also connects to the 
database through the y-valve so the same configuration is used again. 
And now the engine provider is strictly required.

I.e. if c:\fb3 contains a default config but isql runs from a different 
directory (with modified configuration), then it would work.


Dmitry








++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] FB 3 - Per database configurations (Providers and Security Database vs Legacy Auth)

2016-07-06 Thread Alexandre Benson Smith ibl...@thorsoftware.com.br [firebird-support]
Hi !

I am looking at the per-database configuration (FB 3) and have two doubts:

I defined my databases.conf like:
demo_naolocal=c:\bd\demo_naolocal.fdb
{
 Providers = Remote,Loopback
}

after that on the same machine I tryed:

C:\fb3>isql demo_naolocal -user teste -password abc
Statement failed, SQLSTATE = 08001
I/O error during "CreateFile (open)" operation for file "demo_naolocal"
-Error while trying to open file
-O sistema não pode encontrar o arquivo especificado. (Translates to: 
The system could not find the specified file)
Use CONNECT or CREATE DATABASE to specify a database
SQL> quit;

C:\fb3>isql localhost/3053:demo_naolocal -user teste -password abc
Statement failed, SQLSTATE = 08001
unavailable database
Use CONNECT or CREATE DATABASE to specify a database
SQL>


I expected the first one to fail and the second to succeed.


On the release notes page 18 I found this:

Disable embedded connections
If you don't want any type of direct access, you may disable embedded 
mode (= direct filesystem-level
access) altogether by opening firebird.conf and locating the Providers 
entry. The default (which is
probably commented out) is:
#Providers = Remote,Engine12,Loopback
Now, either remove the hash mark and the Engine12 provider (this is the 
one that makes the embedded
connections), or – better – add an uncommented line:
Providers = Remote,Loopback
The Remote provider takes care of remote connections; the Loopback 
provider is responsible for TCP/IP
connections via localhost, as well as (on Windows) WNET/NetBEUI and XNET 
connections to databases
on the local machine. All these connection types require full 
authentication and have the server process, not
the user process, open the database file.
Please notice that you can also set the Providers parameter on a 
per-database basis. You can set a default
in firebird.conf as shown above, and then override it for individual 
databases in databases.conf
like this:
bigbase = C:\Databases\Accounting\Biggus.fdb
{
  Providers = Engine12,Loopback
}


if I change the databases.conf to:
demo_naolocal=c:\bd\demo_naolocal.fdb
{
 Providers = Remote,Loopback,Engine12
}

I can connect with both alternatives.

C:\fb3>isql demo_naolocal -user teste -password abc
Database: demo_naolocal, User: TESTE
SQL> quit;

C:\fb3>isql localhost/3053:demo_naolocal -user teste -password abc
Database: localhost/3053:demo_naolocal, User: TESTE
SQL> quit;

C:\fb3>

What I am doing wrong ?

The second doubt is regarding per-database security vs Legacy User Manager

I have on databases.conf the following entry:

demo_s2=c:\bd\demo_s2.fdb
{
 SecurityDatabase = demo_s2
}

SQL> create user t4 password 't4' using plugin legacy_usermanager;
Statement failed, SQLSTATE = 42S02
add record error
-table PLG$VIEW_USERS is not defined
SQL>

I can create SRP users without a problem, my question is:

Is it possible to have legacy users stored on a database distinct from 
security3.fdb ? if so... I just need to create the missing view ?

SQL> show view plg$view_users;
PLG$USER_NAME   (SEC$USER_NAME) VARCHAR(31) CHARACTER 
SET UNICOD
E_FSS Not Null
PLG$GROUP_NAME  (SEC$USER_NAME) VARCHAR(31) CHARACTER 
SET UNICOD
E_FSS Nullable
PLG$UID (PLG$ID) INTEGER Nullable
PLG$GID (PLG$ID) INTEGER Nullable
PLG$PASSWD  (PLG$PASSWD) VARCHAR(64) CHARACTER SET 
OCTETS No
t Null
PLG$COMMENT (RDB$DESCRIPTION) BLOB segment 80, 
subtype TEXT
CHARACTER SET UNICODE_FSS Nullable
PLG$FIRST_NAME  (SEC$NAME_PART) VARCHAR(32) CHARACTER 
SET UNICOD
E_FSS Nullable
PLG$MIDDLE_NAME (SEC$NAME_PART) VARCHAR(32) CHARACTER 
SET UNICOD
E_FSS Nullable
PLG$LAST_NAME   (SEC$NAME_PART) VARCHAR(32) CHARACTER 
SET UNICOD
E_FSS Nullable
View Source:
 ==
SELECT PLG$USER_NAME, PLG$GROUP_NAME, PLG$UID, PLG$GID, PLG$PASSWD,
 PLG$COMMENT, PLG$FIRST_NAME, PLG$MIDDLE_NAME, PLG$LAST_NAME
 FROM PLG$USERS
 WHERE CURRENT_USER = 'SYSDBA'
OR CURRENT_ROLE = 'RDB$ADMIN'
OR CURRENT_USER = PLG$USERS.PLG$USER_NAME
SQL>

TIA

see you !






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

Re: [firebird-support] gfix full or reserve required

2016-07-06 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Thursday, July 7, 2016, 10:20:50 AM, Hugo Eyng wrote:


> I tried to use gfix -w async -u USER -p PASSWAORD MYDB.FDB and gfix 
> displayed "full or reserve required".

> What does it mean? That "full" or "reserve" is required? :))

The -u switch in gfix is NOT an abbreviated form for the username but
for page-fill capacity, i.e., -u[se] with the argument reserve (for
reserve space) or full (for use the full page).  It's not what you
want, I know, but don't set this to full unless the database is also
read-only.

Your password abbreviation is wrong for gfix, too.  It is -pa[ssword].
 The -p abbreviation in gfix is for something else, used in
 recovery of transactions from broken multi-database connections.

You want:

gfix -w async -user USER -password PASSWAORD MYDB.FDB

Helen



[firebird-support] gfix full or reserve required

2016-07-06 Thread Hugo Eyng hugoe...@msn.com [firebird-support]

  Hello.

I tried to use gfix -w async -u USER -p PASSWAORD MYDB.FDB and gfix 
displayed "full or reserve required".

What does it mean? That "full" or "reserve" is required? :))



-- 


Atenciosamente,

Hugo Eyng



[firebird-support] List connected Firebird databases

2016-07-06 Thread Köditz, Martin martin.koed...@it-syn.de [firebird-support]
Hi,

I want to know which databases are currently used by SuperServer. Is there a 
possibility to list all connected Firebird databases to the server? I know I 
can list the attachments within the database but is there a way to get the 
connections handled by the server?

Regards
Martin