BDB XML 2.2.13 on Linux (CentOs)

I installed BDB XML 2.2.13 on Linux machine. I have a few questions:
1. How do I set DB_HOME so that I don't need to give directory each time I run dbxml?
2. How do I create a container inside of another container: by saying this, the path I am looking for is db/tv_show. I want to have a container called "db" and inside of the container would be "tv_show"
3. How can I list all the containers that I have already created?
Thanks.

Hi Agnes,
1) DB_HOME was broken in DB XML 2.2.13. It has been fixed in DB XML 2.3.9, which I suggest you upgrade to.
2) DB XML does not directly support creating containers inside other containers. You could emulate this behaviour using a custom XmlResolver, but for performance reasons I don't suggest you do that.
3) DB XML does not keep track of what containers exist - that is left for the user application to do. Most people find that this isn't necessary, but if it is a simple solution is to create a known container specifically to hold this information.
John

Similar Messages

  • BDB XML 2.4 : Xquery from file

    Hi
    I am using BDB XML 2.4 (on Fedora Linux - C++) . Is it possible to run Xquery from xquery file (instead of placing the query string in a string variable)? If so please let me know what API i have to use?
    Thanks,
    Santhosh

    Hi Santhosh,
    DB XML doesn't provide API to do that directly. You'll have to write a small wrapper function that reads the file into a string and passes that to DB XML.
    John

  • .oui error in the install of oracle database client in a linux CentOS

    I am installing oracle database client in eqipo linux CentOS, after making all the passages for the creation of the user oracle and its groups beginning the ./runInstaller application and appears to me the following error:
    ./runInstaller: line 66: /install/.oiu: cannot excecute binary file
    as I can solve this
    they can notify me the possible solution to the following e-mail?
    [email protected] or
    [email protected]

    You may want to check these references for CentOS install:
    Installing 10g Release 2 on Centos 4.3 & 4.4
    http://www.dizwell.com/prod/node/50
    http://download-uk.oracle.com/docs/cd/B19306_01/install.102/b15660/toc.htm
    Oracle® Database Installation Guide
    10g Release 2 (10.2) for Linux x86
    Part Number B15660-02
    Installing Oracle 10.2.0.1 on CentOS 5.0 (x86_64)
    http://bderzhavets.blogspot.com/2007/04/installing-oracle-10.html
    Installing 9i (9.2.0.1) Database on Centos 4.5
    Installing 9i (9.2.0.1) Database on Centos 4.5
    installing 10.2.0 on CentOS
    Re: Got "java.lang.NullPointerException" installing 10.2.0 on CentOS
    Link error installing 10gR2 on CentOS 4.4
    Link error installing 10gR2 on CentOS 4.4
    Re: 10g in vmware Centos
    10g in vmware Centos
    ~ Madrid.

  • How to install BDB XML on shared server?

    Hi All,
    1. I want to install BDB XML on a shared server (bluehost). Can anyone suggest me how to do it? Since I dont have enough permissions, some of the 'php shared extensions' are not being installed. I get warning like-
    Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20060613/
    cp: cannot create regular file `/usr/lib/php/extensions/no-debug-non-zts-20060613/#INST@343#': Permission denied
    make: *** [install-modules] Error 1
    2. Also, how can I add new libraries to library path? (Again no permission)
    Any help on these issues would be highly appreciated,
    Thanking you in anticipation.

    I'm talking about Berkeley DB XML, just in case it was not clear.

  • Issues while iterating BDB XML

    Hello there,
    to begin with the issue, I've got a BDB XML, with couple of inserted documents. Using Java API.
    I'm creating an application which integrates the database within and displays the contents (that is, documents) of a container in a JTree.
    Next, I've overridden toString() of XmlDocument:
    class MyTreeModelChild extends XmlDocument{
        ContainerManager cmanager; //ContainerManager is the class, which deals with the environments settings, opening containers, putting documents etc.
        public MyTreeModelChild(XmlDocument v, ContainerManager cmanager) throws Exception{
            super(v);
            this.cmanager = cmanager;
        public String toString(){
            //executeQuery is the method, which executes XPath queries. It's located in ContainerManager class and takes a string argument
            try{
                XmlResults xResults = cmanager.executeQuery("collection('demo.dbxml')/info/title/string()");
                while(xResults.hasNext()){
                    XmlValue value = xResults.next();
                    return value.asString();
                return null;
            catch(Exception e){
                return e.toString();
    }The content of XML documents (don't mind the validation, that's an example):
    first.xml
    <info>
       <title>One</title>
    </info>
    second.xml
    <info>
       <title>Two</title>
    </info>Finally, I run the compiled code and watch the documents appear in the tree. They both have same titles (the second document is overridden by the first):
    -One
    -OneIf I check the query using dbxml shell, everything's nice:
    -One
    -TwoAny ideas, suggestions?
    Andy

    John,
    thank you for the reply.
    Indeed. The query returns the title of every document.
            try{
                XmlResults xResults = cmanager.executeQuery("collection('demo.dbxml')/info/title/string()");
                while(xResults.hasNext()){
                    XmlValue value = xResults.next();
                    return value.asString();
                }I execute the query and while it has some results to return, do the loop. Take the first value as a XmlValue and return it as String. If I have more results (in this case -- yes, I do), the loop runs again.
    Unfortunately, I cannot figure out what's from now on. The loop will return the same value.
    I'm nor a geek in BDB XML neither in Java. Almost there, just a few obstacles in the way :)

  • Installing BDB XML and including it into a java application

    Hi there :)
    I'm new to BDB XML and I've got some questions about it :
    1/ The documentation says about BDB XML that it is based on BDB. Does it mean that I need to install the standard BDB first to use BDB XML ? (I'm pretty sure I don't have to but I would like a confirmation =))
    2/ I want to developp a web application which will use BDB XML. The documentation says I need to add some jars into my project to use it but do I need to install it on my computer (Windows XP) first ? (with the .msi file ?)
    3/ Where will the xml files be physically stored after I add them into the database ? (what is the default database folder on the hard disk ?)
    Thank you for you help :)
    Regards,
    Gary

    Hi Gary,
    1) You need to install only DB XML. BDB is bundled with DB XML, so you don't have to worry.
    2) Yes, you need to add two jars: db.jar and dbxml.jar. But these jars depend on native DB XML libraries, so you will have to install DB XML anyway: only jars wouldn't be sufficient. Moreover, I would recommend to install DB XML from sources providing the --enable-java+ flag to the buildall.sh script
    3) All XML files will be stored in a container or containers (depending on how many of those you will decide to utilize in your application). It is up to you where you are going to reside DB XML environment/containers -- DB XML is quite low-level XML-database.
    Hope this helps,
    Vyacheslav

  • How to output full-text document from BDB-XML

    I put a XML document(test.xml) into BDB-XML; Edit and modify use BDB-XML API.
    After, if I want to output(roll out) my XML document(test.xml) which was storage in BDB-XML.
    Are there any support in BDB-XML API or Shell to output full-text document from DB??
    Thank you very much :)

    In the shell:
    dbxml> getDocument "document name"
    dbxml> print ["output_file_name"]
    In a (Java) program:
    XmlDocument doc = container.getDocument("document name");
    String output = doc.getContentAsString();
    Regards,
    George

  • Some doubt about Bdb XML Normal Recovery

    Hi, everyone
    I have read the document Getting Started with Transaction Processing for Java shipped with Bdb XML 2.4.13. In the book, there is something about Normal Recovery:
    Normal recovery is run only against those log files created since the time of your last checkpoint.To test this, I have designed a scenario as below:
    The ENVIRONMENT directory is under E:/bdb-xml/environment, and the BACKUP directory is under E:/bdb-xml/backup, the CONTAINER name is entry.dbxml, and there is already a document 1.xml in this container.
    1. run db_recover against ENVIRONMENT.
    2. copy entry.dbxml to BACKUP.
    3. create a document 2.xml.
    4. run checkpoint against ENVIRONMENT.
    5. modify document 1.xml.
    6. run checkpoint against ENVIRONMENT.
    7. copy log.0000000001(there is only one log file in ENVIRONMENT) to BACKUP, Note that I didn't copy the entry.dbxml in ENVIRONMENT.
    8. run db_recover agaist BACKUP(now there are 2 files : entry.dbxml, log.log.0000000001).After that, I used the BACKUP as environment directory, and try to query 2.xml. And I retrieved the document correctly, which I feel very curious. As the document says, the last checkpoint is created by step 6, after that, there is no other modifications happens, so the modification happened at step 3 and step 5 will not take effect when db_recover executed. But the two changes have committed to entry.dbxml.
    So, which is the last checkpoint. And what is the those log files created since the time of your last checkpoint.
    I also want to know where the checkpoint be writen, in the db files or the log files.
    thanks advance.
    Regards,
    John Kao.

    Jhon,
    You really do want to know the gory details don't you? :-)
    Running recovery in your backup directory will cause the container there to pick up all changes from the log file that it does not yet have. The checkpoint on the original container doesn't mean anything to the backup container.
    Let me point you to even more interesting documentation that is in the Berkeley DB documentation set. This page has all of the BDB documentation, including links that are not included in the BDB XML doc:
    http://www.oracle.com/technology/documentation/berkeley-db/db/index.html
    The "Getting Started with Transaction Processing" documents on that page have the sort of information you seem to want.
    Regards,
    George

  • Correct installation of BDB XML on Mac OS X, and use with XCode

    I downloaded the tarball, compiled the whole thing without a problem, and then copied the contents of the install directory to /usr/ (trying to change the prefix on the configure script stopped it from compiling, for some reason) because I didn't want to add stuff to my path (and the contents looked like they belonged in /usr anyway)
    But now I'm not sure how to get XCode to find the search paths and libraries. Does anyone who has a working installation of BDB XML on mac os feel like giving me some pointers as to how they did it?
    Thanks,
    Daniel Peebles

    I don't know the exact answer to your question, but you can probably figure it out on your own like:
    1) Create a File object that represents an existing file. Play around with the path until the file can be found.
    2) Now that you have a File object representing a valid, existing path, use MyFile.getAbsolutePath() to see what the full path string is. MyFile.getCanonicalPath() might provide some answers as well.
    Whatever getAbsolutePath() returns is the correct format for the file path string.

  • Multimedia Information on BDB XML

    Hello,
    I was searching on google for some databases that support multimedia information, as the project I'm working on will need it. Most DBMSes provide a BLOB field where you can store any kind of MM information on it.
    Some folks advised me to use the filesystem itself and avoid the DB for this kind of storage. But I wonder, how can you assure integrity, if the information on the fs can be moved, erased, changed in so many ways, and the DB would be unaware of this. I dont think this is a good solution.
    So, does BDB XML provide support for MM information?
    thanks,
    -- Breno Jacinto

    Breno,
    Storing binary information in BDB XML metadata or in Berkeley DB records would maintain the integrity of the data, and ensure that it's as safe as the rest of your data. It also makes backup/restore of the complete system simpler. The arguments against doing this include:
    o storing/retrieving binary data happens through the cache, so your cache ends up abused by the binary information, possibly flushing valuable information such as indexes and frequently-accessed content. This has performance implications, and can result in more disk activity when querying your containers than would normally occur.
    o without special streaming support, it's hard to stream binary data reliably from the database (not a problem if your data is relatively small)
    As for storing binary info in the file system and linking it (via names) to your XML, it's not hard to provide as much protection for that data as you do for your database. The database files are just files in the file system themselves, and subject to the same attacks as normal files.
    If you protect your binary files with the same level of protection as your database files, they are safe. The major down sides of separate storage are:
    o you don't have transactions on the file system, so you need to program in a way to ensure that your database and binary data are in sync.
    o backup and restore are more complicated (mentioned above)
    Better support for large binary objects is on the list for a future release of Berkeley DB, and that support will address the issues; however, that's not an option today.
    I hope this helps,
    George

  • BDB XML DOM Implementation

    Hi all---
    I have some newbie questions about BDB/XML's DOM Implementation and its interaction with Xerces-c.
    We are trying to deploy BDB/XML underneath our current database abstraction layer. The application makes use of Xerces-c and the abstraction layer query/get interfaces return objects of type Xercesc-XXXX::DOMDocument*. I can easily get documents out of BDB/XML and return the DOM to the upper layer by use of the XmlDocument::getContentAsDOM() interface.
    The problem occurs as the upper application layers start to manipulate the Document. For instance, in order to print the document, some code creates a serializer (DOMWriter) using Xerces-c, but when applied to the Document returned by BDB/XML the serializer corrupts the DOM and we get an ugly crash.
    I'm completely new to the intricacies/compatibility issues between DOM implementations---is what I am describing here supported in theory? Or is there a fundamental problem---some incompatibility between a Xerces-c DOMWriter and a BDB/XML DOMDocument?
    fwiw, the error appears to be caused by the Xerces-c memory manager which apparantly has no idea about pages being used by BDB, and is allocating structures on top of BDB objects.
    Any ideas? Advice where to investigate?
    thanks,
    SF

    Steve,
    First, the Xerces-C DOM implementation in BDB XML is not entirely complete, and is mostly read-only from an application perspective. So if you are doing anything to modify the returned DOM you run some risk. It's implemented using Xerces-C 2.7.
    Second, the availability of the Xerces-C DOM in BDB XML has a limited lifetime. It will almost certainly not be availble in the next release of BDB XML, so it's not something you should rely on. You may be best off serializing your results and if you want to manipulate them using Xerces, re-parse it into a DOM implementation that you control. I realize there is loss of efficiency in doing this.
    In our next release there are changes being made (for very good reasons) that make it impossible to maintain the XmlDocument::getContentAsDOM() interface. If we did keep it, we'd just be serializing and re-parsing anyway.
    Regards,
    George

  • Use BDB XML API on MS Visual C++ compiler problem

    Excuse me
    I install BDB XML 2.3.8, and I use MS Visual C++ 6 compiler.
    In VC6, I add fellow path setting ~
    include files:
    C:\Program Files\Oracle\Berkeley DB XML 2.3.8\include
                                       C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\debug
                                       C:\Program Files\Oracle\Berkeley DB XML 2.3.8\include\dbxml
    Library files:
    C:\Program Files\Oracle\Berkeley DB XML 2.3.8\lib
                                       C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\debug
    Source files:     
    C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin
                                       C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\debug
    Executable files:     
    C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin
                                                 C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\debug
    and in Link setting, add 「 libdb45.lib libdbxml23.lib xerces-c_2.lib xqilla10.lib 」
    I write some test code:
    #include "stdafx.h"
    #include "DbXml.hpp"
    using namespace DbXml;
    int main(int argc, char* argv[])
         printf("= BDBtest Programe =\n");
         XmlManager myManager;
    try {
                   XmlContainer myContainer = myManager.createContainer("test.dbxml");
                   printf(" finish test.dbxml create \n");
              } catch (DbXml::XmlException &xe) {
                   // Error handling goes here
                   printf("!! error 1 !!\n");
                   printf ("%s\n", xe.what());
              } catch (std::exception &e) {
                   // Error handling goes here
                   printf("!! error 2 !!\n");
                   printf ("%s\n", e.what());
         return 0;
    but when I executable program, the screen print:
    !! error 2 !!
    bad allocationIf I have setting wrong, or missing some setting??

    And when I run in debug mode, it produce follow information..
    Loaded 'ntdll.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
    Loaded 'C:\Documents and Settings\wang\compiler\VC6\BDBtest\Debug\libdbxml23.dll', no matching symbolic information found.
    Loaded 'C:\Documents and Settings\wang\compiler\VC6\BDBtest\Debug\libdb45.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\msvcr71.dll', no matching symbolic information found.
    Loaded 'C:\WINDOWS\system32\msvcp71.dll', no matching symbolic information found.
    Loaded 'C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\xerces-c_2_7.dll', no matching symbolic information found.
    Loaded 'C:\Program Files\Oracle\Berkeley DB XML 2.3.8\bin\xqilla10.dll', no matching symbolic information found.
    HEAP[BDBtest.exe]: Invalid allocation size - CCCCCCD0 (exceeded 7ffdefff)
    HEAP[BDBtest.exe]: Invalid allocation size - CCCCCCCD (exceeded 7ffdefff)
    First-chance exception in BDBtest.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
    First-chance exception in BDBtest.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
    First-chance exception in BDBtest.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
    The program 'C:\Documents and Settings\wang\compiler\VC6\BDBtest\Debug\BDBtest.exe' has exited with code 0 (0x0).

  • Miscellanous questions about BDB XML

    Hi !
    I'm in search for a storage solution for a Matlab app that manipulates big volumes of datas (several Gb), and so can't load them fully in memory without crashing. I also can't load / unload them each time I need a bit of these data, since it is rather long to load a file in memory (about 0.12s). So I was thinking about using a DMB like BDB XML, and I have a few questions about it :
    <ul><li>What about performances to create a 3-5Gb database in a single batch ?</li>
    <li>What about performances to excecute a XQuery request on a db this large ? Longer or shorter than loadin directly the file in memory ? With an index or without ?
    </li>
    <li> No matlab integration is provided, so I have to way : use Matlab C integration to make an interface to use BDB XML, or using the shell via an exec like command to interact with BDB ? Is the shell trick performant ? Or does it spend a lot of time parsing the input ?</li>
    </ul>
    Thanks for those who will take a bit of their precious time to answer my questions !

    Hello,
    I'm in search for a storage solution for a Matlab app that manipulates big volumes of datas (several Gb), and so can't load them fully in memory without crashing. I also can't load / unload them each time I need a bit of these data, since it is rather long to load a file in memory (about 0.12s). So I was thinking about using a DMB like BDB XML, and I have a few questions about it :
    <ul><li>What about performances to create a 3-5Gb database in a single batch ?</li>It will take a while. If you bulk load you should avoid using transactions and sync/exit the environment when you are done. Note that you should determine what indexes you might want/need before doing the load and create them. Reindexing 5GB of data will take another really large chunk of time. I recommend experimentation with indexes, queries and a small representative subset of the data.
    Be sure to create a node storage container with nodes indexed.
    Is this one document or many? Many is better. One 5Gb document is less than ideal but will work.
    <li>What about performances to excecute a XQuery request on a db this large ? Longer or shorter than loadin directly the file in memory ? With an index or without ?You really need indexes. The query will likely succeed without indexes but depending on the query and the data could take a very long time. See above on experimentation first.
    </li>
    <li> No matlab integration is provided, so I have to way : use Matlab C integration to make an interface to use BDB XML, or using the shell via an exec like command to interact with BDB ? Is the shell trick performant ? Or does it spend a lot of time parsing the input ?</li>There is no C interface, just C++. I would not recommend using the dbxml shell for this although you could if you really need to.
    Let the group know how this turns out.
    Regards,
    George

  • Very urgent (bdb xml)

    actually in my requirement doc they mentioned that Berkely BD should use no more than 32 MB of shared memory.
    so what does it mean????????????
    i AM USING bdb xml ,SO wheather by enabling BD_INIT_MPOOLflag will serve this purpose.

    I am not quite sure of what you are asking, based on my understanding, the anser is:
    When you are setting the cache size via Berkeley DB API DB->set_cachesize, you can specify the cache size. And yes, you need to set DB_INIT_MPOOL in DB_ENV->open.
    If this is not the anwser you look for, can you describe your issue in much more detail?
    David

  • Any Windows 7 64bit version for bdb xml available?

    Dear experts,
    I received the following:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Oracle\Berkeley DB XML 2.5.16\bin\libdb_java48.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1028)
         at com.sleepycat.db.internal.db_javaJNI.<clinit>(db_javaJNI.java:38)
         at com.sleepycat.db.internal.DbEnv.<init>(DbEnv.java:264)
         at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:77)
         at com.sleepycat.dbxml.XmlManager.<init>(XmlManager.java:101)
         at berkeleydbxml.BDBXML.createContainer(BDBXML.java:29)
         at berkeleydbxml.BDBXML.main(BDBXML.java:173)
    Process exited with exit code 1.
    I do not have any visual studio version installed to rebuild the source.
    Is there a way of having the bdb xml working with a 64bit jdk?
    Is it possible to get a 64bit compatible version of dbxml-2.5.16.msi?
    TIA!

    I'm having a problem building for the x64 platform using a 64-bit Windows 7 Pro system with Visual Studio 8 and dbxml 2.5.16. Building for Win32 works just fine. When I switch to the x64 platform, the build skips every project:
    ========== Build: 0 succeeded or up-to-date, 0 failed, 52 skipped ==========
    Looking in the Configuration Manager, every project shows the x64 platform; but selecting one of these platform menus reveals that x64 isn't an option in the menu and the platform for that project is automatically changed to Win32 (the only valid option).
    The same problem occurs with dbxml 2.5.13 and Windows XP.
    Any ideas?

Maybe you are looking for