Re: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
> Thanks for instructions. It does work.
>
>
>
> Is there a way to use created case insensitive collation as database wide 
> default? It would be easier for me not to specify collation for each and 
> every index definition.

http://www.firebirdsql.org/refdocs/langrefupd25-ddl-charset.html

This does not affect existing character fields though.


-- 
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.


>
>
>
> Thanks.
>
>
>
> From: firebird-support@yahoogroups.com 
> [mailto:firebird-support@yahoogroups.com]
> Sent: Friday, April 8, 2016 10:36 AM
> To: firebird-support@yahoogroups.com
> Subject: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key 
> question
>
>
>
>
>
> On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr
> [firebird-support] wrote:
>> Would you be so kind to provide an example SQL which shows how to do
>> primary key with a case insensitive collation?
>
> 1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf,
> but not included by default in Firebird):
>
> create collation WIN1254_UNICODE for win1254
>
> 2. Derive a case insensitive collation from WIN1254_UNICODE:
>
> create collation win1254_ci for win1254 from win1254_unicode case
> insensitive
>
> 3. Create table
>
> create table win1254test (
> stringkey varchar(30) character set win1254 primary key collate
> win1254_ci
> )
>
> 4. Test it:
>
> INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
> INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
> INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
> INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails
>
> I hope this helps,
> Mark
>


Re: [firebird-support] FB on LAN

2016-04-08 Thread Hugo Eyng hugoe...@msn.com [firebird-support]
Thank you Dimitry.

I have this book. I will search.

Bye


Em 08/04/2016 10:29, Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support] escreveu:
> 08.04.2016 15:17, Hugo Eyng hugoe...@msn.com [firebird-support] wrote:
>> Do you know where could I find information about string connections and 
>> protocols?
> In "The Firebird Book: a Reference for Database Developers", for example.
>

-- 


Atenciosamente,

Hugo Eyng







++

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: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr [firebird-support]
Thanks for instructions. It does work.

 

Is there a way to use created case insensitive collation as database wide 
default? It would be easier for me not to specify collation for each and every 
index definition.

 

Thanks.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, April 8, 2016 10:36 AM
To: firebird-support@yahoogroups.com
Subject: !!***SPAM***!! Re: [firebird-support] Firebird V3RC2 Primary Key 
question

 

  

On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr 
[firebird-support] wrote:
> Would you be so kind to provide an example SQL which shows how to do
> primary key with a case insensitive collation?

1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf, 
but not included by default in Firebird):

create collation WIN1254_UNICODE for win1254

2. Derive a case insensitive collation from WIN1254_UNICODE:

create collation win1254_ci for win1254 from win1254_unicode case 
insensitive

3. Create table

create table win1254test (
stringkey varchar(30) character set win1254 primary key collate 
win1254_ci
)

4. Test it:

INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails

I hope this helps,
Mark
-- 
Mark Rotteveel





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



Re: [firebird-support] Find rarely used or unused indices

2016-04-08 Thread Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
Hi,

> What is the best way to go about to find out about this?
>
> I have several projects that are using the FB database and I would like
> to cleanup and remove all the indices that are just taking up space and
> thus indirectly reduces performance?

It is not that easy to clearly define the usefulness of an index. 
Usually indexes with a low selectivity (high number of duplicates) is a 
questionable candidate for a good index, but it depends from a query 
perspective.

Imagine you have an index with 1 million nodes pointing to records but 
with only 2 unique values (e.g. BOOLEAN), one row only with a value of 0 
and the rest with a value of 1. If you query the one row with value 0, 
the index will be definitely useful, but for querying 99 records 
with value 1, it is better to scan the entire table instead of the 
additional "hop" via the index to locate the row. Histograms 
(distribution among unique values) will help the optimizer there to 
choose a better execution plan. AFAIK histograms are planned for Firebird 4.

To get an overview across all your indices in your database from various 
perspectives (size, index depth, selectivity, duplicates etc.), you can 
run the gstat command-line tool and process and interpret the raw output.

But as Alexey has pointed out, there is tool support out there. HQbird 
is one. Upscene's FB TraceManager 
(http://www.upscene.com/fb_tracemanager/) is another product which can 
help you in that area. To get a first impression how this may look lie, 
have a look on that screen:
http://www.upscene.com/fb_tracemanager/images/products/fbtm/fbtm_ss_databasestatistics_index_monitoring.png

In combination with the live tracing functionality including execution 
plans of executed statements etc., you may find suspicious things.



-- 
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.



Re: [firebird-support] Find rarely used or unused indices

2016-04-08 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi,

Check your database with Database Analyst from HQbird (trial will be 
enough) and look at the list of Useless indices (indices with only 1 key 
for all values) and Bad indices (with a few keys for many values).


Then, you need to run tracing of your database in action, for example, 
with HQBird PerfMon with option Show plan text, and analyse log database 
for indices included in plans - essentially, build a list of them (it 
should be done manually).


Then perform
select rdb$index_name from rdb$indices
and compare these 2 lists, then figure out which indices are not used.

In general, this idea is not so good as it appears - if index has good 
selectivity, Firebird usually uses it very effectively, until you have 
some abandoned parts in the database, where you never send SQL queries.


Regards,
Alexey Kovyazin
IBSurgeon
www.ib-aid.com







Hi

What is the best way to go about to find out about this?

I have several projects that are using the FB database and I would 
like to cleanup and remove all the indices that are just taking up 
space and thus indirectly reduces performance?


Best regards

jardar





Re: [firebird-support] FB on LAN

2016-04-08 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
08.04.2016 15:17, Hugo Eyng hugoe...@msn.com [firebird-support] wrote:
> Do you know where could I find information about string connections and 
> protocols?

   In "The Firebird Book: a Reference for Database Developers", for example.

-- 
   WBR, SD.






++

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] Find rarely used or unused indices

2016-04-08 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

What is the best way to go about to find out about this?

I have several projects that are using the FB database and I would like to
cleanup and remove all the indices that are just taking up space and thus
indirectly reduces performance?

Best regards

jardar


Re: [firebird-support] FB on LAN

2016-04-08 Thread Hugo Eyng hugoe...@msn.com [firebird-support]

Hello Mark.

I changed the firebird.conf by another one and restarted the server.

Now my string connection 192.168.0.158:C:\DIR1\BASEDIR\MYDATABASE.FDB is 
working.


I compared both firebird.conf and found two differences:

1) In the line near

# Remove protection against opening databases on NFS mounted volumes on
# Linux/Unix and SMB/CIFS volumes on Windows.

that appears in original

# ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING***

in my firebird.conf the line was brioked, like

# ***WARNING*** ***WARNING**
* ***WARNING*** ***WARNING***

2)  There was difference in this line too, but the lines are commented.

#CpuAffinityMask = 1

#CpuAffinityMask = 192

I am sure this could not cause problems, but the item 1 could? I don´t 
think so.


---
You told me something about using WNET protocol.
Do you know where could I find information about string connections and 
protocols?


Thank you for answering.



Em 08/04/2016 04:12, Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support] escreveu:


On 7-4-2016 20:54, Hugo Eyng hugoe...@msn.com [firebird-support] wrote:
> Hello Mark.
>
> I was like you showed 192.168.0.158:C:\DIR1\BASEDIR\MYDATABASE.FDB
>
> Than I changed from FB 32 to FB 64 and it stopped working. After that,
> after that even turnning to FB 32 it doesn´t work using this structure.
> I only works
> using \\192.168.0.158\C:\DIR1\BASEDIR\MYDATABASE.FDB or
> C:\DIR1\BASEDIR\MYDATABASE.FDB

In your first question your connection string was:

192.168.0.158:\DIR1\BASEDIR\MYDATABASE.FDB

Note the absence of _C:_ This means you are connecting with a relative
path. And the root of this path depends on the configuration (and maybe
on the user running Firebird).

> I open the 3050 port in FW. But it keep not connecting.

I just realised that you never specified the exact error you received.
Can't you connect to Firebird at all? What error do you get?

In that case it might be that it is 1) configured to use a different
port (setting RemoteServicePort), 2) is blocked by the (Windows)
firewall (make sure there is an exclusion for the process), 3) another
process is running on port 3050, or 4) the firebird process is only
listening on 127.0.0.1 (setting RemoteBindAddress).

Mark
--
Mark Rotteveel




--


Atenciosamente,

Hugo Eyng



[firebird-support] Re: help to repair a corrupted database

2016-04-08 Thread korkl...@yahoo.it [firebird-support]
thanks for the replies, a little unrelated question: in this topic what does 
the replies with only 'checking' related words mean?

gfix was correctly running, it finished in 2 hours but the database is still 
corrupted, i try also with the -full command line argument but it didn't repair 
the db.
now i'm executing the -mend command

in my firebird.log i have a lot of log as:

internal Firebird consistency check (cannot find record back version (291), 
file: dpm.cpp line: 1189)
INET/inet_error: read errno = 10054

and something related to my table named NODES

Chain for record 8163 is broken in table NODES (133)
Index 4 is corrupt on page 888411 level 1. File: 
..\..\..\src\jrd\validation.cpp, line: 1709
 in table NODES (133)
Page 4327362 is an orphan


from this logs is it possible to know what can be the cause of the corruption? 
for example some query with a bad locking type or something wrong in the 
firebird configuration (i'm using the default settings)

thanks

Re: [firebird-support] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
08.04.2016 11:32, Elmar Haneke el...@haneke.de [firebird-support] wrote:
> You can use database encryption for that purpose

   No. Encryption can protect "cold" database on HDD in garbage collector, for 
example, 
but not an active one.

-- 
   WBR, SD.






++

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] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Elmar Haneke el...@haneke.de [firebird-support]

> How can I prevent that my database can be opened with another
> security.fdb.

You can use database encryption for that purpose - without knowing the
encryption key there is no way to access database.

In FB3 there is a new plugin mechanism for encryption added you should
have a look ath that.

Elmar



Re: [firebird-support] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
08.04.2016 10:12, 'Mueller, Roland (GE87)' roland.muel...@honeywell.com 
[firebird-support] 
wrote:
> Is there any way to prevent this and only use our authentication ?

   No.

-- 
   WBR, SD.






++

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] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread 'Mueller, Roland (GE87)' roland.muel...@honeywell.com [firebird-support]
Thanks for your suggestions.

I am actually searching for another way. This database is part of an 
application that is deployed at our customers.
In the new firebird release it is possible to choose security authentication 
via external .fbd file or programmed into the database itself.

We want to use the authentication in our own database and prevent any use of 
.fdb files for access. Now if a customer has our database, he simply can set 
security3.fdb and gain access to the DB.
Is there any way to prevent this and only use our authentication ?

regards Roland



Re: [firebird-support] VIEW optimization

2016-04-08 Thread Gabor Boros gaborbo...@yahoo.com [firebird-support]
2016. 04. 07. 21:41 keltezéssel, Ann Harrison aharri...@ibphoenix.com 
[firebird-support] írta:
> You're thinking of a case where there is a (possibly unstated) referential
> relationship between the table that you're getting fields from and the other
> table in the view.  The table you're getting data from is the referencing
> table and the other is the referenced table.  In that particular case, the
> join doesn't matter, but there's no way that Firebird can know that.

Hi Ann,

Thank you for the detailed answer! So, I am smarter than Firebird, 
because I know which JOIN needed and which not. :-)

Gabor






++

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] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Virna Constantin costel...@yahoo.com [firebird-support]
Suggestion
event studies "on connect"
1. an application with minimum rights connects to the database
1 '. in table "mon$attachmnts" field "MON$REMOTE_PROCESS" will record the 
application name
2.  in the trigger event "on connect" if the user connects SysAdmin, verifies 
the application name in "MON$REMOTE_PROCESS"

sorry for my English

 


Re: [firebird-support] Firebird V3RC2 Primary Key question

2016-04-08 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 7-4-2016 23:01, Ertan Küçükoğlu ertan.kucuko...@1nar.com.tr 
[firebird-support] wrote:
> Would you be so kind to provide an example SQL which shows how to do
> primary key with a case insensitive collation?

1. Register the WIN1254_UNICODE collation (it is defined in fbintl.conf, 
but not included by default in Firebird):

create collation WIN1254_UNICODE for win1254

2. Derive a case insensitive collation from WIN1254_UNICODE:

create collation win1254_ci for win1254 from win1254_unicode case 
insensitive

3. Create table

create table win1254test (
stringkey varchar(30) character set win1254 primary key collate 
win1254_ci
)

4. Test it:

INSERT INTO win1254test(stringkey) VALUES('EK'); -- succeeds
INSERT INTO win1254test(stringkey) VALUES('ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('Ek'); -- fails
INSERT INTO win1254test(stringkey) VALUES('eK'); -- fails

I hope this helps,
Mark
-- 
Mark Rotteveel


Re: [firebird-support] Antivirus Exclusions

2016-04-08 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 5-4-2016 17:18, tcanfiel...@hotmail.com [firebird-support] wrote:
> I'm trying to set the exclusions for one of our servers and I see
> Firebird running.
>
> I don't have any experience with this program and I was hoping someone
> on the forum could shed some light on the needed exclusions.
>
> Any help would be greatly appreciated.

It is advisable (but not strictly necessary) to exclude files with the 
extension .fdb (or whatever extension you use for the database file).

Mark
-- 
Mark Rotteveel


Re: [firebird-support] FB on LAN

2016-04-08 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 7-4-2016 20:54, Hugo Eyng hugoe...@msn.com [firebird-support] wrote:
> Hello Mark.
>
> I was like you showed 192.168.0.158:C:\DIR1\BASEDIR\MYDATABASE.FDB
>
> Than I changed from FB 32 to FB 64 and it stopped working. After that,
> after that even turnning to FB 32 it doesn´t work using this structure.
> I only works
> using \\192.168.0.158\C:\DIR1\BASEDIR\MYDATABASE.FDB or
> C:\DIR1\BASEDIR\MYDATABASE.FDB

In your first question your connection string was:

192.168.0.158:\DIR1\BASEDIR\MYDATABASE.FDB

Note the absence of _C:_ This means you are connecting with a relative 
path. And the root of this path depends on the configuration (and maybe 
on the user running Firebird).

> I open the 3050 port in FW. But it keep not connecting.

I just realised that you never specified the exact error you received. 
Can't you connect to Firebird at all? What error do you get?

In that case it might be that it is 1) configured to use a different 
port (setting RemoteServicePort), 2) is blocked by the (Windows) 
firewall (make sure there is an exclusion for the process), 3) another 
process is running on port 3050, or 4) the firebird process is only 
listening on 127.0.0.1 (setting RemoteBindAddress).

Mark
-- 
Mark Rotteveel


Re: [firebird-support] How can I prevent that my database can be opened with another security.fdb.

2016-04-08 Thread Norman Dunbar nor...@dunbar-it.co.uk [firebird-support]
I would suggest that the best way to prevent anyone getting hold of your 
database and opening it with a separate security database is to have good 
security & physical protection on your server, limited access to the server 
room (if appropriate) and so on. Normal security precautions in other words.

Keep all your backups safe and secure as well. These can be used against you 
also. You might want to consider encrypting them with something like GPG before 
sending them off-site - if that's what you would do in a production environment 
- or even storing them on-site where they might be accessible by "too many" 
people.

Just a few thoughts.


HTH

Cheers,
Norm.

On 7 April 2016 16:02:10 BST, "'Mueller, Roland (GE87)' 
roland.muel...@honeywell.com [firebird-support]" 
 wrote:
>Hi all
>How can I prevent that my database can be opened with another
>security.fdb.
>
>
>For testing we use firebird 3.
>
>
>We use our database as its own security database.
>If we copy our database to another Firebird installation it
>
>is possible to open it with sysdba and masterkey.
>Is there a way to prevent The use of another security.fdb.
>
>
>Roland Müller
>Dipl.Ing. (FH)
>Honeywell | Security and Fire
>Novar GmbH
>Johannes-Mauthe-Straße 14
>72458 Albstadt
>Büro: 07431 801-0
>Fax: 07431 801-1512
>
>
>roland.muel...@honeywell.com
>www.honeywell.com/security/de
>
>
>
>
>
>
>
>
>Novar GmbH
>Rechtsform: GmbH
>Sitz: Albstadt
>Registergericht: AG Stuttgart, HRB 401195
>Geschäftsführung: Martin Bemba, Klaus Hirzel, Marcus Lindenlaub, Marcus
>Ostländer
>Aufsichtsratsvorsitzender:  Martin Göth
>
>
>
>THIS E-MAIL AND ATTACHED FILES ARE CONFIDENTIAL, PROTECTED BY COPYRIGHT
>AND MAY BE LEGALLY PRIVILEGED. If you are not the intended addressee or
>have received this e-mail in error, any use of this e-mail or any
>copying, distribution or other dissemination of it is strictly
>prohibited. If you have received this transmission in error, please
>notify the sender immediately and then delete the e-mail. E-mail cannot
>be guaranteed to be secure, error free or free from viruses. Neither
>the sending company nor its group of companies accepts any liability
>whatsoever for any loss or damage that may be caused as a result of the
>transmission of this message by e-mail. If verification is required,
>please request a hard copy version.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [firebird-support] Re: First-In-First-Out (FIFO) stock valuation

2016-04-08 Thread Venus Software Operations venussof...@gmail.com [firebird-support]