db:list via basexclients doesn't show all databases
Wednesday, 21 November 2012 · 5 messages
AW
Hi Stefan,
does the user have permission to see all databases?
Regards,
Andreas
Quoted text · Stefan Koch · 18 lines
Am 21.11.2012 um 12:21 schrieb Stefan Koch: > Hi, > > I was wondering why our backupskript isn't exporting all databases, one is missing. > The I found out why - our backuptool connects via Java and uses db:list to get the names of alle databases. > > If I connect via basexclient - there is one missing, if I check via basex (from the shell) the database is shown. > I added the database also via basex and not like the others via the client. > > Is this intended behaviour? How can I tell the client, that there is one more database? > > Regards, > > Stefan > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
SK
Stefan Koch21 Nov 2012 12:21 #
Hi,
I was wondering why our backupskript isn't exporting all databases, one is missing.
The I found out why - our backuptool connects via Java and uses
db:list to get the names of alle databases.
If I connect via basexclient - there is one missing, if I check via basex (from the shell) the database is shown.
I added the database also via basex and not like the others via the client.
Is this intended behaviour? How can I tell the client, that there is one more database?
Regards,
StefanAW
Andreas Weiler21 Nov 2012 12:51 #
uh same problem for me...
steps to reproduce:
1. start server
2. start GUI and create db "test", close GUI
3. run list...DB "test" is not there, but can be accessed with open test
I guess just client connections can add new databases to a running server instance.
-- Andreas
Quoted text · Stefan Koch · 39 lines
Am 21.11.2012 um 12:48 schrieb Stefan Koch: > ... the user has all privileges. I tried to added R/W Access via Grant (though basex standalone). > But the client still can't see it. > > Stefan > > > Am 21.11.2012 12:15, schrieb Andreas Weiler: >> Hi Stefan, >> >> does the user have permission to see all databases? >> >> Regards, >> Andreas >> >> Am 21.11.2012 um 12:21 schrieb Stefan Koch: >> >>> Hi, >>> >>> I was wondering why our backupskript isn't exporting all databases, one is missing. >>> The I found out why - our backuptool connects via Java and uses db:list to get the names of all databases. >>> >>> If I connect via basexclient - there is one missing, if I check via basex (from the shell) the database is shown. >>> I added the database also via basex and not like the others via the client. >>> >>> Is this intended behaviour? How can I tell the client, that there is one more database? >>> >>> Regards, >>> >>> Stefan >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
AW
Andreas Weiler21 Nov 2012 13:06 #
The server creates an index of all existing databases on startup. Afterwards only by client created databases are added to that index. So all databases created by other processes (GUI, Console) are not in the index. Restart the server and you will see all databases.
I guess the
db:list() function uses that index and the db:list("dbname") function does not.
-- AndreasQuoted text · Andreas Weiler · 59 lines
Am 21.11.2012 um 13:01 schrieb Stefan Koch: > Strange thing is: Our application has access to the db. > ... found out that db:list('dbname') has access to the database, while db:list() can't see it. > > > > Am 21.11.2012 12:51, schrieb Andreas Weiler: >> uh same problem for me... >> >> steps to reproduce: >> >> 1. start server >> 2. start GUI and create db "test", close GUI >> 3. run list...DB "test" is not there, but can be accessed with open test >> >> I guess just client connections can add new databases to a running server instance. >> >> -- Andreas >> >> Am 21.11.2012 um 12:48 schrieb Stefan Koch: >> >>> ... the user has all privileges. I tried to added R/W Access via Grant (though basex standalone). >>> But the client still can't see it. >>> >>> Stefan >>> >>> >>> Am 21.11.2012 12:15, schrieb Andreas Weiler: >>>> Hi Stefan, >>>> >>>> does the user have permission to see all databases? >>>> >>>> Regards, >>>> Andreas >>>> >>>> Am 21.11.2012 um 12:21 schrieb Stefan Koch: >>>> >>>>> Hi, >>>>> >>>>> I was wondering why our backupskript isn't exporting all databases, one is missing. >>>>> The I found out why - our backuptool connects via Java and uses db:list to get the names of all databases. >>>>> >>>>> If I connect via basexclient - there is one missing, if I check via basex (from the shell) the database is shown. >>>>> I added the database also via basex and not like the others via the client. >>>>> >>>>> Is this intended behaviour? How can I tell the client, that there is one more database? >>>>> >>>>> Regards, >>>>> >>>>> Stefan >>>>> _______________________________________________ >>>>> BaseX-Talk mailing list >>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Christian Grün21 Nov 2012 13:38 #
Hi Stefan,
as Andreas correctly indicated, in order to make future database locking realizable, the database server has been using an internal list of databases and backup files, which was the reason why database changes from other JVMs were not reflected in the client/server architecture. This restriction will be lifted with 7.5, the release of which we all are working on hard. I recommend everyone to already switch to the current stable snapshot [1], which already shows the new behavior.
Christian
PS: Still, please note that the parallel usage of the client/server architecture and the standalone version may result in unexpected behavior [2].
[1] http://files.basex.org/releases/latest/
[2] http://docs.basex.org/wiki/Startup
Quoted text · Andreas Weiler · 74 lines
On Wed, Nov 21, 2012 at 1:06 PM, Andreas Weiler <andreas.weiler at uni-konstanz.de> wrote: > The server creates an index of all existing databases on startup. Afterwards only by client created databases are added to that index. > So all databases created by other processes (GUI, Console) are not in the index. Restart the server and you will see all databases. > > I guess the db:list() function uses that index and the db:list("dbname") function does not. > > -- Andreas > > Am 21.11.2012 um 13:01 schrieb Stefan Koch: > >> Strange thing is: Our application has access to the db. >> ... found out that db:list('dbname') has access to the database, while db:list() can't see it. >> >> >> >> Am 21.11.2012 12:51, schrieb Andreas Weiler: >>> uh same problem for me... >>> >>> steps to reproduce: >>> >>> 1. start server >>> 2. start GUI and create db "test", close GUI >>> 3. run list...DB "test" is not there, but can be accessed with open test >>> >>> I guess just client connections can add new databases to a running server instance. >>> >>> -- Andreas >>> >>> Am 21.11.2012 um 12:48 schrieb Stefan Koch: >>> >>>> ... the user has all privileges. I tried to added R/W Access via Grant (though basex standalone). >>>> But the client still can't see it. >>>> >>>> Stefan >>>> >>>> >>>> Am 21.11.2012 12:15, schrieb Andreas Weiler: >>>>> Hi Stefan, >>>>> >>>>> does the user have permission to see all databases? >>>>> >>>>> Regards, >>>>> Andreas >>>>> >>>>> Am 21.11.2012 um 12:21 schrieb Stefan Koch: >>>>> >>>>>> Hi, >>>>>> >>>>>> I was wondering why our backupskript isn't exporting all databases, one is missing. >>>>>> The I found out why - our backuptool connects via Java and uses db:list to get the names of all databases. >>>>>> >>>>>> If I connect via basexclient - there is one missing, if I check via basex (from the shell) the database is shown. >>>>>> I added the database also via basex and not like the others via the client. >>>>>> >>>>>> Is this intended behaviour? How can I tell the client, that there is one more database? >>>>>> >>>>>> Regards, >>>>>> >>>>>> Stefan >>>>>> _______________________________________________ >>>>>> BaseX-Talk mailing list >>>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>>> _______________________________________________ >>>>> BaseX-Talk mailing list >>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery