[firebird-support] embedded database with Chinese path
I'm trying to connect to a database with a filename containing Chinese characters. The full path to my file is: C:\Users\汉密斯\AppData\Local\Rising Software\data5cloud\rising5.fdb I'm not able to connect to this filename - I'm always told that the path name is wrong. I've tried using the full name as above, and also converting it to Windows short filename syntax which is C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb, but neither work. It doesn't matter if I use the embedded server (Windows) or network. If I use the proper name: C:\>dir "C:\Users\汉密斯\AppData\Local\Rising Software\data5cloud\rising5.fdb" Volume in drive C has no label. Volume Serial Number is 5837-4B6E Directory of C:\Users\汉密斯\AppData\Local\Rising Software\data5cloud 10/03/2017 10:08 AM58,019,840 rising5.fdb 1 File(s) 58,019,840 bytes 0 Dir(s) 46,259,064,832 bytes free C:\>isql "C:\Users\汉密斯\AppData\Local\Rising Software\data5cloud\rising5.fdb" Statement failed, SQLSTATE = 08001 I/O error during "CreateFile (open)" operation for file "C:\USERS\???\APPDATA\LOCAL\RISING SOFTWARE\DATA5CLOUD\RISING5.FDB" -Error while trying to open file -The filename, directory name, or volume label syntax is incorrect. Use CONNECT or CREATE DATABASE to specify a database If I use the short name: C:\>dir C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb Volume in drive C has no label. Volume Serial Number is 5837-4B6E Directory of C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1 10/03/2017 10:08 AM58,019,840 rising5.fdb 1 File(s) 58,019,840 bytes 0 Dir(s) 46,259,068,928 bytes free C:\>isql C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb Statement failed, SQLSTATE = 08001 I/O error during "CreateFile (open)" operation for file "C:\Users\F1DC~1\AppData\Local\RISING~1\DATA5C~1\rising5.fdb" -Error while trying to open file -The filename, directory name, or volume label syntax is incorrect. Use CONNECT or CREATE DATABASE to specify a database Ultimately I'm trying to connect from a Qt application, but I've tried the above with isql just to rule out errors with the db driver. Any ideas? Thanks Hamish
Re: [firebird-support] CTE Recursive left join problem
Hi, this is normal sql behavior if you do not need to implicit INNER JOIN condition then move filter to left join itself in your situation: instead “where mytable.id is not null” write “ AND mytable.id is not null” ... select aux.n, mytable.id from aux LEFT JOIN mytable on aux.n between mytable.id and mytable.id +1 and mytable.id is not null ... regards, Karol Bieniaszewski From: Germán Balbi bal...@yahoo.com [firebird-support] Sent: Monday, October 2, 2017 7:37 PM To: Firebird-support Subject: [firebird-support] CTE Recursive left join problem Hello everyone I'm having a problem, and I do not understand why. I have a structure similar to:with recursive aux as ( select 0 as nfrom rdb$database union all select aux.n + 1from auxwhere aux.n <= 20 ) select aux.n, mytable.id from aux LEFT JOIN mytable on aux.n between mytable.id and mytable.id +1 where mytable.id is not null Where the left join behaves as join. Any condition that I put in the clause WHERE referred to mytable, converts the LEFT JOIN into JOIN
Re: [firebird-support] Cannot grant user by code
Tuesday, October 3, 2017, 5:02:21 AM, Pierre wrote: > I want to add readonly user creation/granting after database initialisation. > I create the database using a bunch of SQL scripts. After the last > script runs, I create a user using "create user MYUSER password > 'myPassword'" the I grant this user read only (select, references) > access to every table of the database using EXECUTE BLOCK : > https://gist.github.com/zedalaye/6300b679e56349c40b973d35bb4c91ee > On Transaction Commit, I get this error : > add record error violation of PRIMARY or UNIQUE KEY constraint > "INTEG_2" on table "PLG$USERS" Problematic key value is > ("PLG$USER_NAME" = 'RO_USER') Unsuccessful execution caused by > system error that does not preclude succe ssful execution of > subsequent statements GDS Code: 336723987 - SQL Code: -901 - Error Code: 19. CREATE USER adds users to the security database, whichever one you have configured as security database. The key violation occurs because either (1) you already created that user using that plug-in or (2) the user does not exist. Regarding (1), you can have more than one user having the same user name as long as they are created using different plug-ins. For your scripts it would be wise to specify the plug-in explicitly with a USING PLUGIN clause, even if you want to use the default plug-in. Regarding (2), remember that the CREATE USER command is run from the connection to the application database, but under the surface, the instructions are applied to PLG$USERS in the security database. Your GRANT commands apply to the application database. The CREATE (ALTER/DROP) USER command needs to be committed for its effects to become visible for reference by statements affecting the application database. If your problem is caused by (2), I think you will need to isolate your CREATE USER statement(s) into a different SP, to be run and committed in a separate transaction, before you run the script assigning the permissions in the application database. Helen
Re: [firebird-support] Re: Installing Firebird on Fedora 26
Hello Allan, Tuesday, October 3, 2017, 1:02:48 AM, Allan Jardine wrote: > In the mean time I've tried installing the Firebird package from > dnf (I actually tried this first and have just tried it again). It > appears to install okay, but then any interaction I try to make with > the database I get a "Install incomplete" message. > $ isql-fb > Use CONNECT or CREATE DATABASE to specify a database SQL>> connect localhost:employee user sysdba password masterkey; > Statement failed, SQLSTATE = 28000 > Install incomplete, please read the Compatibility chapter in the release > notes for this version > This happens with the cli, FlameRobin and PHP. So - did you read the Compatibility chapter and follow the instructions there? HB
[firebird-support] CTE Recursive left join problem
Hello everyoneI'm having a problem, and I do not understand why.I have a structure similar to: with recursive aux as ( select 0 as n from rdb$database union all select aux.n + 1 from aux where aux.n <= 20 ) select aux.n, mytable.id from aux LEFT JOIN mytable on aux.n between mytable.id and mytable.id +1 where mytable.id is not null Where the left join behaves as join. Any condition that I put in the clause WHERE referred to mytable, converts the LEFT JOIN into JOIN
[firebird-support] Cannot grant user by code
Hi, I want to add readonly user creation/granting after database initialisation. I create the database using a bunch of SQL scripts. After the last script runs, I create a user using "create user MYUSER password 'myPassword'" the I grant this user read only (select, references) access to every table of the database using EXECUTE BLOCK : https://gist.github.com/zedalaye/6300b679e56349c40b973d35bb4c91ee On Transaction Commit, I get this error : add record error violation of PRIMARY or UNIQUE KEY constraint "INTEG_2" on table "PLG$USERS" Problematic key value is ("PLG$USER_NAME" = 'RO_USER') Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements GDS Code: 336723987 - SQL Code: -901 - Error Code: 19. I use latest Firebird 3.0.2.32703, Delphi XE2 and UIB from Git Repository. The database is created in a Linux instance hosted by a VM on the same machine using inet4 connexion with SYSDBA user. Many thanks, -- Pierre Yager
[firebird-support] Backup & restore without dump using service manager
Hi, is there a way to backup and restore a database using the service manager? The documentation gives example without service manager: tux> gbak -backup emptest stdout | gbak -replace stdin emptest_2 But that needs to open the database in exclusive mode. I've tried the following code but got errors: tux> gbak -b -user sysdba -password masterkey -se localhost/3050:service_mgr /srv/firebird/db01.fdb stdout | gbak -replace stdin /srv/firebird/test.fdb tux> gbak: ERROR:expected backup description record tux> gbak:Exiting before completion due to errors Regards, Martin
[firebird-support] Re: Installing Firebird on Fedora 26
Le 01/10/2017 à 18:26, Allan Jardine allan.jard...@sprymedia.co.uk [firebird-support] a écrit : > > I'm running into a problem installing Firebird on Fedora 26. > Please use the Fedora package yum install firebird and if really you need 3.0.2, under f26, ask for an update to Fedora , or move to f27