[firebird-support] Can I restrict sysdba to login from localhost?

2019-03-13 Thread cyc...@gmail.com [firebird-support]
SYSDBA has full access to firebird database server.  Can I restrict the sysdba 
to be able to login to firebird server on localhost only?


[firebird-support] Firebird doesn't free the RAM properly after a long time usage

2018-01-25 Thread cyc...@gmail.com [firebird-support]
I am running Firebird-3.0.2.32703-0_x64.zip on ArchLinux.  The firebird service 
has working for more than 20 days without stop.

 

 At some point, I disconnect all client connections to the firebird service.  I 
notice the /tmp (using tmpfs) folder has these file handles without free.  This 
is the memory status:
 

 # free -h
   totalusedfree  shared  buff/cache   available
 Mem:21G 13G4.6G3.2G3.7G4.8G
 Swap:0B  0B  0B
 

 and the lsof status:
 

 [root@archlinux] # lsof
 COMMAND PID   USER  FDTYPE  DEVICE SIZE/OFF
   NODE NAME
 firebird367   firebird  cwd   DIR   0,39 80
  14496 /tmp
 firebird367   firebird  DEL-R REG   0,39   
 160633 /tmp/firebird/fb12_monitor_020817000a00
 firebird367   firebird  DEL-R REG   0,39   
 119619 /tmp/firebird/fb12_monitor_020817000a00
 firebird367   firebird  DEL-R REG   0,39   
  13015 /tmp/firebird/fb12_monitor_020809001a00
 firebird367   firebird  DEL-R REG   0,39   
  13843 /tmp/firebird/fb_lock_020809001a00
 firebird367   firebird  mem-R REG   0,391048576
  16552 /tmp/firebird/fb12_monitor_02081f001a00
 firebird367   firebird  mem-R REG   0,391048576
  13838 /tmp/firebird/fb_lock_02081f001a00
 firebird367   firebird  mem-R REG   0,391048576
  16533 /tmp/firebird/fb12_monitor_02080a001a00
 firebird367   firebird  DEL-R REG   0,39   
  13814 /tmp/firebird/fb_lock_02080a001a00
 firebird367   firebird  DEL-R REG   0,39   
   1444 /tmp/firebird/fb_user_mapping
 firebird367   firebird  DEL-R REG   0,39   
  13777 /tmp/firebird/fb12_trace
 firebird367   firebird1u  REG   0,39  0
  13776 /tmp/firebird/fb_init (deleted)
 firebird367   firebird2uR REG   0,39   4192
  13777 /tmp/firebird/fb12_trace (deleted)
 firebird367   firebird3u  REG   0,39  0
  13778 /tmp/firebird/fb_trace_o5S0GX (deleted)
 firebird367   firebird8uR REG   0,391048576
   1444 /tmp/firebird/fb_user_mapping (deleted)
 firebird367   firebird   11uR REG   0,391048576
 160633 /tmp/firebird/fb12_monitor_020817000a00 (deleted)
 firebird367   firebird   14uR REG   0,391048576
  13814 /tmp/firebird/fb_lock_02080a001a00 (deleted)
 firebird367   firebird   15uR REG   0,391048576
  16533 /tmp/firebird/fb12_monitor_02080a001a00
 firebird367   firebird   18uR REG   0,391048576
  13838 /tmp/firebird/fb_lock_02081f001a00
 firebird367   firebird   19uR REG   0,391048576
  16552 /tmp/firebird/fb12_monitor_02081f001a00
 firebird367   firebird   23uR REG   0,391048576
  13843 /tmp/firebird/fb_lock_020809001a00 (deleted)
 firebird367   firebird   24uR REG   0,391048576
  13015 /tmp/firebird/fb12_monitor_020809001a00 (deleted)
 firebird367   firebird   38uR REG   0,391048576
 119619 /tmp/firebird/fb12_monitor_020817000a00 (deleted)
 firebird367   firebird   40uW REG   0,39 1151336448
  14292 /tmp/fb_table_X7copz (deleted)
 firebird367   firebird   45uW REG   0,39 1945894912
  14299 /tmp/fb_table_vdAaLR (deleted)
 firebird367   firebird   46uW REG   0,39  324427776
  14300 /tmp/fb_table_7tG6VK (deleted)
 firebird367   368 firebird  cwd   DIR   0,39 80
  14496 /tmp
 firebird367   368 firebird  DEL-R REG   0,39   
 160633 /tmp/firebird/fb12_monitor_020817000a00
 firebird367   368 firebird  DEL-R REG   0,39   
 119619 /tmp/firebird/fb12_monitor_020817000a00
 firebird367   368 firebird  DEL-R REG   0,39   
  13015 /tmp/firebird/fb12_monitor_020809001a00
 firebird367   368 firebird  DEL-R REG   0,39   
  13843 /tmp/firebird/fb_lock_020809001a00
 firebird367   368 firebird  

[firebird-support] How to install Firebird 1.5 on ArchLinux x86-64

2017-10-14 Thread cyc...@gmail.com [firebird-support]
I am trying to install FirebirdSS-1.5.6.5026-0.i686 on Linux archlinux 
4.13.5-1-ARCH x86-64 but fail. 

 I suspect it is due to ELF problem but not sure how to make it work.
 

 When I try to run ./fbserver, I encounter -bash: ./fbserver: No such file or 
directory
 

 # readelf -l fbserver 
 Elf file type is EXEC (Executable file)

 Entry point 0x804da70
 There are 7 program headers, starting at offset 52
 

 Program Headers:
   Type   Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
   PHDR   0x34 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
   INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R   0x1
   [Requesting program interpreter: /lib/ld-linux.so.2]
   LOAD   0x00 0x08048000 0x08048000 0x205d38 0x205d38 R E 0x1000
   LOAD   0x206000 0x0824e000 0x0824e000 0x13b84 0x19f04 RW  0x1000
   DYNAMIC0x2194ec 0x082614ec 0x082614ec 0x00108 0x00108 RW  0x4
   NOTE   0x000128 0x08048128 0x08048128 0x00020 0x00020 R   0x4
   GNU_EH_FRAME   0x1e2498 0x0822a498 0x0822a498 0x0517c 0x0517c R   0x4
 

 It seems related to /lib/ld-linux.so.2, but I could find this file in my /lib 
folder.

 



[firebird-support] How to use isc_spb_bkp_skip_data or isc_spb_res_skip_data in firebird parameter block?

2016-07-29 Thread cyc...@gmail.com [firebird-support]
I would like to use skip some tables while backup or restore firebird database 
in Firebird 3.  How to use these parameters in isc_service_start?
  


Re: [firebird-support] An SQL query perform badly after firebird database file size grow beyond 8GB

2016-01-09 Thread cyc...@gmail.com [firebird-support]
It is strange why the firebird choose wtong plan when database file size grow 
beyond 8GB. I thought it should be consistent for same query.

[firebird-support] An SQL query perform badly after firebird database file size grow beyond 8GB

2016-01-08 Thread cyc...@gmail.com [firebird-support]
I am using Firebird 2.5.5 x64 on Windows 8.1 x64.  I wrote an application 
access a Firebird database.  So far so good.
 

 One day, I notice a function running query accessing the database become 
extremely slow.  After I debug, I found the query is the cause:
 

 SELECT MAX(A.PostDate) MaxPostDate
 FROM SL_CS A, SL_CSDTL B
 WHERE A.DocKey=B.DocKey 
   AND A.Code='300-10001' 
   AND B.ItemCode='OCC' 
   AND B.UOM='UNIT' 
   AND A.Cancelled='F' 
   AND B.UnitPrice<>0
 

 Further investigation and I found an interesting problem.  If the database 
file size is below 8GB, the query works normal.  Once the database file size 
grow beyond 8GB, the query become very slow.
 

 Here is the plan before 8GB:
 

 PLAN JOIN (B INDEX (SL_CSDTL_ITEMCODE), A INDEX (RDB$PRIMARY212))
 

 Adapted Plan
 PLAN JOIN (B INDEX (SL_CSDTL_ITEMCODE), A INDEX (INTEG_2872))
 

 -- Performance info --
 Prepare time = 0ms
 Execute time = 312ms
 Avg fetch time = 312.00 ms
 Current memory = 14,858,352
 Max memory = 14,972,720
 Memory buffers = 2,048
 Reads from disk to cache = 42,429
 Writes from cache to disk = 0
 Fetches from cache = 360,726
 

 And the plan after grow to 8GB:
 

 PLAN JOIN (A INDEX (SL_CS_CODE), B INDEX (SL_CSDTL_DOCKEY, SL_CSDTL_ITEMCODE))
 

 -- Performance info --
 Prepare time = 0ms
 Execute time = 2m 0s 875ms
 Avg fetch time = 120,875.00 ms
 Current memory = 14,943,040
 Max memory = 15,005,768
 Memory buffers = 2,048
 Reads from disk to cache = 44,818
 Writes from cache to disk = 0
 Fetches from cache = 11,454,178
 Both plan works on same tables with same row count.  Increasing of database 
file size is due to insertion on other tables.  I believe the performance issue 
was due to "Fetches from cache" increasing dramatically on 2nd plan.

 

 Is this an issue related to Windows file system? Firebird service or my query?
 
 

 



[firebird-support] Encounter invalid request BLR at offset %d when running gbak while other changing database's meta data

2014-11-13 Thread cyc...@gmail.com [firebird-support]
Hi,
 

 I start two connections to a firebird 2.5.3 x64 server running the following 
actions:
 

 Connection1: Keep running CREATE GLOBAL TEMPORARY and DROP TABLE on a 
database for 5 minutes
 

 Connection2: Run GBAK to backup the database
 

 In connection 2, I encounter this error regularly when running GBAK:
 gbak: ERROR:invalid request BLR at offset 51
 gbak: ERROR:table id 16809 is not defined
 gbak: ERROR:gds_$compile_request failed
 gbak:Exiting before completion due to errors
 
 As learned from other's experience, I knew it is not encourage to backup 
database while others trying to change the metadata of database.
 

 Is there a way to detect either:
 Prior to GBAK, detech is someone is changing meta data OR
 Prior to changing meta data, is someone running GBAK on the database Best 
Regards,
 Chee-Yang Chau


[firebird-support] Unable to repair a corrupt database

2014-07-03 Thread cyc...@gmail.com [firebird-support]
I have a Firebird 2.5.2 database (ODS 11.2).  The database has corrupted.  When 
I open the database, I receive a message 
 page 1577 is of wrong type (expected 4, found 5)
 I have tried using gfix, gfix -mend, gbak to attempt backup but it doesn't 
work.  I also try if qli may extract the data, and again, I can't open the 
database in ready statement.  Same corrupt message prompt out.
 

 I even try to change the byte at position (1577 * 4096) from 0x05 to 0x04 but 
it turn out to the following message when I perform gfix or gbak:
 Reached the end of the file.
 I think IBSurgeon shall works but the price isn't something I can afford.  Is 
there any other alternate way to fix the database?