[firebird-support] Naming rules for database aliases

2020-02-10 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hello all,

what are the rules for alias names? Which characters are allowed in an
alias? Does it follow the OS rules for a filename?

If that is documented somewhere you are welcome to RTFM me with a
hint to where I can find it ;-)


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] Off-Topic: Firebird future

2019-10-23 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
>> For me it must continue with the development of Flamerobin.
>> 
>> I know many people who feel very comfortable with him.
>> 
>> I really don't understand why its development has stopped.

> Development of a free open source project happens by virtue of its 
> contributors. If those contributors lose interest or have other things 
> to do, and no one else steps up, then things just stop.

AFAIU Milan Babuskov was the main (only?) contributor and he went on
to do other things.

Regards

Stefan




Re: [firebird-support] Off-Topic: Firebird future

2019-10-22 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]

>> If you want to have it for free, like in
>> free beer, you can sit down, write it and publish it

> This is the plan. ;-)

> Gabor


Sounds like a good plan :-))


Regards

Stefan




Re: [firebird-support] Off-Topic: Firebird future

2019-10-21 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]

> Official or not, we need a simple, up to date, Firebird only, native
> GUI.

I don't get the point. There are GUI tools readily available
(IBExpert, Upscene, etc.). If you want to have it for free, like in
free beer, you can sit down, write it and publish it (that's how free
software is made ...). The Firebird Project just doesn't have the
resources to do it. We need the available developers for the database
core and not for a fancy GUI tool.

Best Regards

Stefan Heymann







Re: [firebird-support] Modifying Triggers In Delphi

2019-03-21 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> This may seem like a very naive question, but is it possible to edit
> the SQL of a trigger from within a programming language (Delphi, in
> my case).

> I use IBX components (I know this is not supported, but it seems to
> work fine!), and I want to periodically update the date condition on
> one of the triggers, but cannot work out how to do it / if it is
> possible.

Junk,

you can execute and commit the entire ALTER TRIGGER statement. It is
not easily possible to just alter the SQL body of the trigger.

However, frquently changing DDL elements doesn't generally sound like
a good idea to me. You should also consider another solution. Maybe
you can store the date in a table so the trigger can read this and
work with the date from the table. And you can change the date with a
simple UPDATE statement.


Regards

Stefan


-- 
Stefan Heymann, Tübingen, Germany



[firebird-support] Are SP/Trigger variables NULL on start?

2019-03-04 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hello all,

can I safely assume that all local and RETURNS variables are already
initialized to NULL when my Stored Procedure (or Trigger) starts?

Or do I need to treat them as "undefined" (as in Pascal/Delphi) and
initialize them myself?


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] Connection lost after long inactive time

2019-02-28 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]

>> DummyPacketInterval = 0 (but this should be irrelevant for this type
>> of issue)

>Try to change it. This _is_ relevant for this type of issue.

That did the trick. Thanks, Dimitry!


Regards

Stefan




[firebird-support] Connection lost after long inactive time

2019-01-28 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hello all,

I have a customer who is reporting this scenario:

He has several type C networks (192.168.x.y) routed together. When a
client is inactive for some time (e.g. a few hours) the connection
gets lost, BUT ONLY when the connection is from another network than
the one the server resides in. Connections from the same network stay
open.

The error that the client gives is "Unable to complete network request
to host "XYZ". Error writing data to the connection."
I assume this is because the TCP connection to the server was somehow
half-closed.

Does anybody have an idea what is going on here?

Firebird 2.5.5  64-bit on Windows 2012 R2
DummyPacketInterval = 0 (but this should be irrelevant for this type
of issue)

The admin says there is nothing the routers that would cancel TCP
connections after a while. (I can't check that because I don't know
how to configure routers and I don't know how skilled this person is.)


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] reacreate database with a different charset

2018-07-25 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Issam,

the NONE characterset doesn't "know" how to handle the è in "Absence
de germes pathogènes". There is this byte with the hex value E9, but
this could be any character.

I assume you used Windows 1252 or ISO 8859-1 to store this string in
your NONE field (that's because these are used for western European
languages like French).

When you want to convert this to UTF-8 (which is Unicode, where the
character is called 00E8 LATIN SMALL LETTER E WITH GRAVE), you must
tell Firebird how to treat the string.

You can do this by typecasting:

cast (myfield as varchar(100) character set win1252)

So now Firebird treats this NONE string as a WIN1252 string and then
it knows how to convert all the international characters (like é, è,
ä, ê etc.) to Unicode.


HTH

Best Regards

Stefan


-- 
Stefan Heymann, Tübingen, Germany



Re: [firebird-support] Sudden reboot after 2.5 install

2018-06-13 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
>> On some servers we encounter a sudden reboot after FB install.
>> [...]

> Wasn't it BSOD because of hardware malfunction? In Windows system
> setting turn off automatic reboot on error.

No. A BSOD needs a user intervention in order for the machine to
reboot. In the cases I have seen, Windows did a proper shutdown and
reboot.

I guess this has to do with the VC Runtine installation that the
Windows installer is calling prior to installing and starting the
Firebird service (that's why the Firebird service is still not
installed after the reboot).

I assume that the VC Runtime installation issues a reboot when it
encounters a certain Windows setup where certain files or settings are
missing. Whatever. I googled around but I didn't find any
confirmation.

When I install Firebird on a production machine I always hold my
breath when the installation runs into the VC Runtime installation ...

This is *extremely* annoying and it would be great if we could find
out what is going on. Shutting down a production server without prior
notice is a complete no-go, even if it is rare.


Best Regards

Stefan





Re: [firebird-support] Proper way to handle an open Firebird database...

2018-05-07 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> Besides that, is there any other advantage of gbak or nbackup
> against an ordinary copy of the database?

When a GBAK backup finishes successfully you know that your database
is physically intact. When a restore finishes successfully you also
know that your database is logically intact (consistent).

As you mentioned, running a GBAK or NBACKUP backup doesn't require you
to shutdown the database. You may find some time to do that now but
maybe in a few years your users won't be happy anymore that there is a
service outage once a day.

A GBAK backup does a garbage collection on the database (unless you
use the -g switch).


Best Regards

Stefan



Re: [firebird-support] Proper way to handle an open Firebird database...

2018-05-03 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> When I need to copy my Firebird database: Do I need to shutdown the
> Firebird instance first?

Yes. Becaus when you don't do that, the server may access the file
during your copy process and you would get a corrupt file copy.

> and If yes, what is the proper way to shutdown and startup it?

You can use the GFIX tool with the option

-shut full

to shutdown the database so Firebird will not access the file and

-online normal

to put it back online.

Examples:

gfix -user SYSDBA -password masterkey dbserver:mydb -shut full -force 0

gfix -user SYSDBA -password masterkey dbserver:mydb -online normal


> When I need to restart Windows Server, Do I need to shutdown the
> Firebird instance first?

No.


Best Regards

Stefan





Re: [firebird-support] Time zones

2017-01-13 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
There are requests to implement Time zones in Firebird:

http://tracker.firebirdsql.org/browse/CORE-694
http://tracker.firebirdsql.org/browse/CORE-909

These two are in the "Optional features" list for Firebird 4:
https://www.firebirdsql.org/en/planning-board/


Best Regards

Stefan



-- 
Stefan Heymann, Tübingen, Germany



Re: [firebird-support] How non-SYSDBA user can see connections by other users?

2016-10-20 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
>> SYSDBA users can see other connected users using monitoring tables
>> but is it possible to implement such feature for non-SYSDBA users?

The only one who can also "see" connections from user users is the
database owner. Other than that I don't know of a way to do that.


Regards

Stefan




Re: [firebird-support] Block size exceeds implementation restriction exception for varchar(31000)

2016-09-08 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
>  I want to alter an existing stored procedure with varchar
> parameters having length of 31000. Whenever I try to execute this query I get 
> an exception of

> “Invalid token. Invalid request BLR at offset 102. Implementation limit 
> exceeded. Block size exceeds implementation restriction.”

>  How to remove this restriction….is there any way ?

You very probably use UTF8 has the character set. So your 31000
characters become (times 4) 124000 bytes, which is too large. You
can probably shrink your values by using substring() and cast().

When I migrated my app to UTF8 I had to do things like

select cast (substring (opav2.text_value from 1 for 50) as varchar (50)) 
from ...

in order to get down to sizes that Firebird can handle.


HTH

Stefan








++

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/



Re: [firebird-support] Character sets and collations of columns

2016-08-30 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Tomasz,

> One of the legacy databases I happen to maintain has character sets and
> collations messed up. [...]

For a database that is messed up like this, I'd go the clean way and
use a pump. That would also give you the opportunity to change it to
Unicode (UTF-8) at the same time, which is a transition that you will
have to do anyway.

Regards

Stefan







Re: [firebird-support] deploy Windows Application to access Firebird database

2016-08-30 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> Does it apply to remote servers also such as
> www.myserver.com:/opt/database/fbdata.fdb
> The release note README file in the embbeded zip says:
> [...]

You are mixing up access to a remote database (only fbclient.dll
needed) and the Embedded Firebird server (fbembed.dll, renamed to
fbclient.dll).

Regards

Stefan




Re: [firebird-support] Number of Firebird Users

2016-08-29 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> I have INSERT about 10 records in a Table, the size of the FB Database 
> grew up to 15MB

> I DELETE the records the size remains 15MB.

That is normal. A Firebird database is organized in pages that are
allocated when needed. When you delete the records, the pages will be
marked as free and will be reused when you add more data.

> After BACKUP and RESTORE thru FlameRobin then the size was reduce to 788Kb

That is also normal because GBAK (the tool that FlameRobin calls to do
the job) will build the new database from scrath and then fill it with
the data from the backup (also done with GBAK) that you have done
before. So there are no empty pages after the Restore.

> Is this normal ? or can it me done automatically within the settings
> and configs

As I said before, you don't have to do it because Firebird will reuse
the unused pages before it will allocate new pages. So there is
nothing to worry about.

If you want to do it anyway on a regular basis you can write a batch
file that calls GBAK (which is a command-line tool) for a backup and
then again for a restore. However, you must be aware that the database
will not be usable during the restore and that everything that is
added/changed/deleted in the database *after the time the backup has
started* is lost.


Best Regards

Stefan



Re: [firebird-support] deploy Windows Application to access Firebird database

2016-08-23 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> What's required for the Windows app to access a remote Firebird database ?
> The minimal installation

The absolute minimum you need is the fbclient.dll (same 32/64-bitness
as your application). I put it in the same folder as my application's
.exe file so it can be found easily.

My customers can start the application from a share's UNC path without
installing anything (DB driver, Aliases etc.) on the local client
machine. All they need is the link to that UNC path.


Regards

Stefan




Re: [firebird-support] Server reboot during Windows exe setup?

2016-07-19 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
>> Is there a remote chance that this reboot has anything to do with the
>> Firebird installation that went on at that very second? Can it be
>> related to the installation of the Win32 runtimes that was going on at
>> this time?

>Look into Windows Event Log to find out the reason for reboot.

The last entry in the Windows Event log before the reboot is a message
related to the installation of the 32-bit CRT library. This matches
what I have already guessed. The message reads:

Product: MSI to redistribute MS VS2005 CRT libraries -- Error
1719. The Windows Installer Service could not be accessed. This
can occur if the Windows Installer is not correctly installed.
Contact your support personnel for assistance.

(I especially like the last sentence. LOL.)

Is this the reason for the "hard" reboot? I assume that the Firebird
installer calls the MSI in a "silent" mode so this can not ask back if
it wants to reboot and "just does it". Can this be the reason?

Is this the right forum to discuss installer related questions?


Best Regards

Stefan



-- 
Stefan Heymann, Tübingen, Germany







++

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] Server reboot during Windows exe setup?

2016-07-15 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hello all,

I recently installed Firebird 2.5.6 x64 on a customer's machine
(Windows 2012 R2), using the Firebird installer from
http://sourceforge.net/projects/firebird/files/firebird-win64/2.5.6-Release/Firebird-2.5.6.27020_0_x64.exe/download

During or after the installation of the Win32 components (at least
that's the last thing I've seen in my Remote Support session), the
server rebooted suddenly and without any pre-warning or any further
user inquiry. That was a production server and it was not funny.

After the reboot, the Firebird installation was not completed (the
service was neither installed nor started, even though that's what the
Checkboxes required).

Is there a remote chance that this reboot has anything to do with the
Firebird installation then went on at that very second? Can it be
related to the installation of the Win32 runtimes that was going on at
this time?


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] Case and Accent insensitive compares

2016-06-16 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> UNICODE_AI collation is useless, but DE_DE_AI can work unless Stefan
> needs to keep words in other languages in the same field as well.

That's the point. I don't know what language is used (can be every
European language) and so I'll have to live with that.

How can I work with that DE_DE_AI collation you mention? Firebird
doesn't seem to know it.


Regards

Stefan




Re: [firebird-support] Case and Accent insensitive compares

2016-06-16 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> Also, it is questionable if you should consider a and ä different
> letters, even in German. See e.g. 
> https://de.wikipedia.org/wiki/Alphabetische_Sortierung

For sorting, treating them as "same" is correct. However, for things
like comparisons (in a unique key for example) they are not the same.

I understand that this is an international thing so I'll have to deal
with this behaviour. Thanks for your reply.


Stefan



[firebird-support] Case and Accent insensitive compares

2016-06-15 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
I expect that an accent insensitive compare treats accented characters
as the "same" as their un-accented counterparts because the accent
does not change the character itself but things like pronounciation or
stress.

So in Frech, à is similar to a, é is similar to è and you use an
accent insensitive compare to find Gérard even though your search term
says Gerard (without the accent).

However, in the German language, the letters Ö and O are two different
characters with a completely different pronounciation (the same is
true for A/Ä and U/Ü). As they look similar, the sorting is done so
that they stay together, but they can _not_ be treated as accented
versions of each other.

When I use the UNICODE_CI_AI collation to compare them, Firebird
treats them as the same:

select case when 'a' = 'ä' collate unicode_ci_ai then 'equal' else 'not equal' 
end || ' expected: not equal' from rdb$database
union all
select case when 'O' = 'Ö' collate unicode_ci_ai then 'equal' else 'not equal' 
end || ' expected: not equal' from rdb$database
union all
select case when 'Ä' = 'ä' collate unicode_ci then 'equal' else 'not equal' end 
|| ' expected: equal' from rdb$database
union all
select case when 'a' = 'à' collate unicode_ci_ai then 'equal' else 'not equal' 
end || ' expected: equal' from rdb$database
union all
select case when 'c' = 'ç' collate unicode_ci_ai then 'equal' else 'not equal' 
end || ' expected: equal' from rdb$database
union all
select case when 'é' = 'è' collate unicode_ci_ai then 'equal' else 'not equal' 
end || ' expected: equal' from rdb$database

delivers:

equal expected: not equal
equal expected: not equal
equal expected: equal
equal expected: equal
equal expected: equal
equal expected: equal


Is there something that can be done to improve this?


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-11-04 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
> While that answer is correct, the better answer would be for the
> Project to modify engine and installer to be Windows Vista+
> compliant  and have all configuration files stored in All
> Users\Application Data\Firebird and not in Programs Files\Firebird

I just wanted to suggest that "\ProgramData\Firebird" was probably
better. But it seems this folder is the same as "All Users\Application
Data\Firebird".

This non-tree structure can be quite confusing ...


Regards

Stefan



Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Bhavbhuti,

> My application allows users to create a database and it's entry in
> aliases.conf is created by the application.  This essentially is
> fine and works well in Admin mode, as soon as the same is tried to
> be done using the normal non-admin mode I am not able to update aliases.conf

> Question is, in normal user mode, is there a way to update
> aliases.conf using some FireBird API?  or any other way?

I don't know of any method that allows this. The aliases.conf file
belongs to the administration/configuration of Firebird and that's why
it can only be modified by an administrator.

It should be possible to change to access rights (once, by an
administrator) so "everybody" can have write access to the
aliases.conf file.


Regards

Stefan




Re: [firebird-support] Chararacter set NONE to ISO8859_1

2015-07-22 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
  I wonder what is wrong with simply invoking ALTER TABLE X ALTER
 COLUMN Y TYPE CHAR(N) CHARACTER SET ISO8859_1

This will only change the metadata of that field. It will not check if
the data really is ISO8859_1. When *you* are sure about that, it
shouldn't be a problem.

Regards

Stefan




Re: [firebird-support] How to determine Role of attached user?

2015-05-26 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
 when I call SELECT * FROM MON$ATTACHMENTS (logged in as the database
 owner), the MON$ROLE field always shows 'NONE', even when the user is
 logged in with a specific role.
 
 Is there a way to find out the role another user (with a specifid
 attachment_id) is logged in?

 AFAIR, the MON$ROLE field only provides a valid role name, when the
 user was a member (GRANT role TO USER user) of that role at connect time.

Thanks. That - of course - did the trick. Always a good idea to grant
a role to a user that wants to use it ;-)

Regards

Stefan




[firebird-support] How to determine Role of attached user?

2015-05-25 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hallo all,

when I call SELECT * FROM MON$ATTACHMENTS (logged in as the database
owner), the MON$ROLE field always shows 'NONE', even when the user is
logged in with a specific role.

Is there a way to find out the role another user (with a specifid
attachment_id) is logged in?

Using Firebird 2.5.3.26778 on Windows 7 Pro.


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

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/



Re: [firebird-support] Case insensitive search on a memo field

2014-09-05 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
 I’m using Firebird 2.5.3, and I am looking for text in a emo field, eg.
 I’m tempted to do something like
   Select * from mytable t where lowercase(t.mymemo) like ‘%find me%’
 but since this memo field could be enormous, I’m guessing that wold be 
 horribly inefficient.

I use upper() for that and it's surprisingly fast (lowercase shouldn't
be different).

What you can do is try to use a case insensitive collation like
unicode_ci or unicode_ci_ai, but I don't know if that really speeds
things up.

Regards

Stefan











++

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/



Re: [firebird-support] UTF8 and ANSI column in one table?

2014-02-14 Thread Stefan Heymann
 We are thinking (and thinking and thinking and thinking...) about
 converting our database to UTF8. The thing is that we have some
 columns that we would like to keep as ANSI columns, the reasons for that are:

It is no problem to mix various types of character sets in one
database.

For the blob columns you should probably use NONE as the character
set so these won't get altered by a transliteration or string
conversion.

You should do some tests though to see what will happen when you use
UTF8 as the client connection character set.


Regards

Stefan




Re: [firebird-support] where is firebird installed

2014-01-20 Thread Stefan Heymann
Robert,

  I need to detect where a firebird installation is on windows
 so I can auto copy my UDF there. How can I find this out? It seems
 to have a different location per windows version and/or firebird version.

You can retrieve the path from the Windows Registry, it is located in

HKEY_LOCAL_MACHINE\SOFTWARE\Firebird Project\Firebird Server\Instances


Regards

Stefan



Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-20 Thread Stefan Heymann
 No, sorry, I meant to say that every reference I have ever found
 has suggested the correct way to move a FB database from one
 machine to another is to simply copy the FDB file while the server
 is down.

 Oops, that's not good advice. Although this may be safe, it may
 also not be (depending on platform, possibility of embedded connections, etc.)

 It also requires you to stop the server, which may be a nuisance if
 there are also other databases in use.

AFAIK, after a FULL shutdown you can also access the .fdb file on a
file basis. So you don't have to stop the entire service.


Regards

Stefan






Re: [firebird-support] Confused about delta files

2014-01-16 Thread Stefan Heymann
 Looking at my production system I see that I have an FDB file and an
 FDB.delta. The date of the FDB is May 2nd, 2013. The date of the
 delta is today.

These are just 2 separate databases. Firebird does not require a
special extension, .fdb ist just the usual extension to use.

From the names I would guess that the .delta database has been derived
(copied) from the .fdb database and then changed (hence the delta).

 I believe that this is the reason I cannot directly connect to the
 FDB file on my new server?

It's difficult to say that when you don't specifiy *how* you cannot
connect to the fdb file (is there an error message? if so, which one?)

 In any event, is there some way to fold these two files back
 together into a single FDB?

No. At least not a simple, one-click merge databases way.


Regards

Stefan




Re: [firebird-support] v2.5 64-bit DLL analog

2013-11-06 Thread Stefan Heymann
Lucas,

 i am currently converting to firebird 2.5 from 1.5.  i am used to the 
 fdclient.dll file being copied on the client computer, setting up the 
 registry, and using it to connect the client application to the dll to
 connect to the fb database somewhere off locally or through a network 
 server, where ever firebird is.

 what is the pure firebird 2.5 64-bit way of doing this?  what are the 
 minimum files i need to copy to a firebird virgin client computer in 
 order to be able to access the database server through an client 
 application?  also, what if the client computer is legacy windows 
 32-bit, what is the best way to adapt to that situation, still under 
 firebird 2.5?

You can use the 32-Bit client DLL to connect to your Firebird
database. When your application is a 32-Bit application, you even MUST
use the 32-Bit fbclient.dll. So on a 32-Bit Windows you can only run
32-Bit applications and have to use the 32-Bit fbclient.

HTH

Stefan



Re: [firebird-support] Size of my database

2013-10-16 Thread Stefan Heymann
  as l can tell the size of my database, thanks

select mon$pages * mon$page_size as db_size_in_bytes from mon$database

Regards

Stefan




Re: [firebird-support] Why a database grows after a cycle backup/restore?

2013-06-19 Thread Stefan Heymann
 The source database has 3.1 Gb but after the backup/restore have 4.2 Gb

Did you specify a larger page size for the restore?


Regards

Stefan




Re: [firebird-support] Problem with Sharp s and UNICODE_CI_AI

2013-05-23 Thread Stefan Heymann
 In test 4you compare lower letter f with upper letter F then you got
 difference.
 All is ok in this test case

 The collation being used should be case insensitive. Test 4 results show it
 is not, so all is not well.

 Or am I reading this wrong?

No. Test 3 proves that the case insensitive comparison for 'Fu' and
'fu' works correctly. But as soon as you include the Sharp S
character (comparing 'Fuß' with 'fuß', Test 4) it doesn't work.

There is no such thing as an uppercase Sharp S *) so maybe the lookup
tables for case insensitiveness or accent insensitiveness are wrong in
that place?

Regards

Stefan


*) The German Sharp S is derived from a ligature between a Fraktur
small long s and a small z (that's wy it's also called Eszet in
German). Don't be fooled by the Unicode Consortium having defined a
U+1E9E LATIN CAPITAL LETTER SHARP S - this is a completely abstract
concept, there is no such letter (or glyph). In cases where only
uppercase letters are available, the Sharp S is replaced by an SS
sequence (or, where this could be misleading or ambuguous, by an SZ
sequence). In Switzerland, the Sharp S is not used at all.





++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

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

++
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:
http://docs.yahoo.com/info/terms/



[firebird-support] Problem with Sharp s and UNICODE_CI_AI

2013-05-20 Thread Stefan Heymann
Hi all,

I am using UTF8 as the character set and the UNICODE_CI_AI collation.
However, when I use the German Sharp S character
(U+00DF  LATIN SMALL LETTER SHARP S)
a select doesn't work.

I have put up an example ISQL script here:
http://www.destructor.de/firebird/eszettest.sql
You can run this with ISQL and see the problem.

Am I doing something wrong or is this a bug?

Database: Firebird 2.5.2.26540 SuperServer 64-Bit
OS: Windows 7 Pro 64-Bit


Regards

Stefan




[firebird-support] Slow connection establishment to database

2013-04-24 Thread Stefan Heymann
Hello everybody,

I had a strange effect on a customer's system today. We usually deploy
our application with a minimal Firebird client. So the application
folder contains
  MyApp.exeand
  fbclient.dll and a few other application-related files.
We are using the current incarnation of Firebird 2.5.2.26540, for both
server and fbclient.

Usually the app folder is shared (read-only) and people start
MyApp.exe from their clients. This is easy to set up and works
perfectly.
  \\myserver\myapp\MyApp.exe

The installation today was on a Windows 2008 64-bit server that serves
as a database server and serves this file share at the same time. When
we started the application from a client, the program came up
immediately, but the connection to the database took very long (10 to
20 seconds). After that, database communication was fast and normal.

When I copied the folder to the local client, the connection was
established immediately. Deactivating virus checks on the server did
not help.

When I share the folder *above* my application folder, the connection
is also established immediately and very fast.

My suspicion to what is happening here is:

During connection establishment, fbclient.dll tries to load a file it
usually finds one level above itself (firebird.conf? firebird.msg?
firebird.log?)

As my program starts from the root of a Share, there is no parent
folder, but it takes some time until the OS reports that back (some
sort of timeout when trying to access \\myserver instead of
\\myserver\myshare ???) - so I suspect that is what takes so long.

When the app folder is a sub-folder of the share, fbclient.dll
immediately finds that empty folder one level up. As it can work
perfectly without firebird.msg (or whatever it tries to read there),
everything goes well from there on.

Can somebody confirm that this is/was the problem?


Best Regards

Stefan Heymann



Re: [firebird-support] Database version

2013-04-10 Thread Stefan Heymann
 what is the best approach to assign a version to the database.
 Let's say it's starts with 1.0.1.1 then 1.0.1.2.. etc,,
 I'm looking at storing it with the DB itself. Is there a way to
 store it and read it from system variables?..
 I wanted to use a DB field but it sounds too much for what I want to 
 accomplish.

I use plain integers (1, 2, 3, ...) as schema version numbers and
store them in a table (with a key and value column) that I also use
for other general settings.


Regards

Stefan




Re: [firebird-support] Is this actually firebird?

2013-03-27 Thread Stefan Heymann
 As far as I can see, totally unrelated to the Firebird RDBMS project.

 Yes. Trademark infringement?

This has already been brought to the attention of the FF Committee. It
looks like a dead project so there's probably not much to do.

Regards

Stefan






Re: [firebird-support] Is this good advice?

2013-01-20 Thread Stefan Heymann
 http://www.destructor.de/firebird/minimumclient.htm

 Is this still current info? Is it good advice? Any thoughts or comments

I just revised it and it is still current. Thanks for the reminder.

Stefan Heymann



Re: RES: [firebird-support] Version number

2012-11-21 Thread Stefan Heymann
GSTAT -h will tell you the On-Disk Structure (ODS) version. AFAIK
there is no way to tell what Firebird (point release) version was used
to initially create the database.

If you don't need to know the exact point release, this is how things
are:

Firebird 1.0 - ODS 10.0
Firebird 1.5 - ODS 10.1
Firebird 2.0 - ODS 11.0
Firebird 2.1 - ODS 11.1
Firebird 2.5 - ODS 11.2
Firebird 3.0 - ODS 12.0


Best Regards

Stefan



 I use this batch file on Win 7 to check the database 
 d:\fbdata\frontdesk.fdb:

 @echo off
 @mode con cols=80 lines=29
 echo .
 c:\Program Files\Firebird\Firebird_2_5\bin\gstat -h 
 d:\fbdata\frontdesk.fdb
 echo .
 pause

 Regards
 Wolfgang Kluge




 On 11/21/2012 01:56 AM, Fabiano wrote:

 It is named ODS number! Try searching in google for this.

 How to obtain the firebird number version of a FDB or GDB file ?
 (I've got a database file, but I don't known the version of firebird 
 used to
 build it...)
 Thank you.

 [Non-text portions of this message have been removed]

 



 [Non-text portions of this message have been removed]



 

 ++

 Visit http://www.firebirdsql.org and click the Resources item
 on the main (top) menu.  Try Knowledgebase and FAQ links !

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

 ++
 Yahoo! Groups Links






-- 
Stefan Heymann, Tübingen, Germany





++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

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

++
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:
http://docs.yahoo.com/info/terms/



[firebird-support] Firebird system requirements

2012-04-20 Thread Stefan Heymann
What are the minimum system requirements for Firebird 2.1 and
2.5 on Windows?

This page
http://www.firebirdsql.org/manual/ufb-about-sysreq.html
lists Windows NT 4.0, 95/98, and Windows 2000. Is that still valid?


Regards

Stefan



Re: [firebird-support] character set

2012-02-20 Thread Stefan Heymann
 we have some problems by inserting data into an table. In our case, the
 customer inserts characters in a field varchar(XX) with special character
 “°”. This little ° with character set iso8859_1 and collation de_de by
 inserting generates a gds-exception error: 335544321 arithmetic exception,
 numeric overflow, or string truncation. Cannot transliterate character
 between character sets.

Both,

U+00B0DEGREE SIGN (see above)
  and
U+00BAMASCULINE ORDINAL INDICATOR

are part of ISO 8859-1 and at the same position (Unicode in the range
U+ to U+00FF and ISO 8859-1 are congruent). So the problem seems
to be with the Client Connection Character Set. Which one do you use?
Which Firebird version do you use on Server and Client?

Regards

Stefan




Re: [firebird-support] How to build Firebird TCP/IP ConnectionString

2011-12-22 Thread Stefan Heymann
 Whether the folder where the database should be shared?
 if yes? whether this share is full or read only.

You should not share the folder where the database is located. All
access to the database file is done via the Firebird server, not via
the file system.

Best Regards

Stefan Heymann







++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

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

++
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:
http://docs.yahoo.com/info/terms/



Re: [firebird-support] Best Practice re null

2011-11-08 Thread Stefan Heymann

 In certain queries I wish nulls to be treated as empty strings. For example:
   Select Field1 || ' ' || Field2 AS MyOutputValue;

Try this:

select coalesce (Field1, '') || ' ' || coalesce (Field2, '') AS MyOutputValue;


HTH

Regards

Stefan