Berkeley DB with SQL API: Where to start?

Hi,
I am an Oracle DBA and just starting to look at Berkeley DB for a new project at work. I intend to use the SQL API, so I have downloaded and installed Berkeley 11g R2 (using the windows msi).
However, I have been browsing around the documentation for 2 days now but still don't understand how to actually create a database! Is this not possible with the SQL API? Do I have to do it from "somewhere else" and just use the API to access the data?
The strange thing is, if I open the API (dbsql) I can create a table:
dbsql> create table test_tab(x int) ;
dbsql> .tables
test_tab
dbsql> exitBut I have no idea where that table is actually created and stored? I don't see a file on disk (a "database" is a file, right?). If I open dbsql again, the table is not shown.
Sorry for the dumb questions but I'm really an old relational-DB guy struggling to come to terms with this architecturally and functionally different idea of a database. Hope someone can help, or at least point me to a "Berkeley DB using SQL API for complete and utter dummies" type guide.
Regards,
El DBA

Hi Sandra,
Thanks very much for the information. I have been looking through the documentation and starting to get to grips with this now.
We do have one important issue though, which comes from within the FAQ you mentioned. I see it's also been talked about in this thread:
ado.net provider
In the FAQ, it says:
Does Berkeley DB support ADO.NET?
There are some known issues related to using the public domain SQLite ADO.NET provider with Berkeley DB. We are actively working on clearly defining those issues, and hopefully resolving them. Is there any idea of a date for the ado.net support? In our development, we are using that very same provider, which is the same one as mentioned in that thread (it's system.data.sqlite.dll from http://sqlite.phxsoftware.com) but will not be able to commit to developing with Berkeley until the support is offered.
Kind regards,
Adam
Edited by: El DBA on Jul 29, 2010 1:13 PM
Edited by: El DBA on Jul 29, 2010 1:16 PM

Similar Messages

  • How can I use the latest Berkeley DB with SQL API in PHP app?

    Hi,
    I'm a PHP developer and I already use Berkeley DB in my applications using the [DBA Functions|http://www.php.net/manual/en/ref.dba.php] . I'm very interested in the latest Berkeley DB release. How can I write a PHP program that uses the SQL API of the latest Berkeley DB release?

    Hi Kurt,
    I'm not a PHP expert (far from it), but the simplest way to get started with the Berkeley DB SQL interface is to run Berkeley DB's <tt>configure</tt> script with the <tt>--enable-sql_compat</tt> flag.  This will create a library called <tt>libsqlite3.so</tt> that you can use as a drop-in replacement for SQLite at the API level.  Database files still need to be converted with a SQLite <tt>.dump</tt> followed by a <tt>.read</tt> with the <tt>dbsql</tt> tool.
    This should then allow the existing PHP driver and application code to switch over to Berkeley DB without any code changes by setting <tt>LD_LIBRARY_PATH</tt> to find the Berkeley DB version of <tt>libsqlite3.so</tt> ahead of SQLite. Note that any other code that relies on SQLite will also run against Berkeley DB with this configuration, which can cause problems if the system libraries use SQLite (for example, on Mac OS X). For that reason, a better long term solution would be for the PHP SQLite driver to have a mode where it loads <tt>libdbsql.so</tt> rather than <tt>sqlite3.so</tt>.
    I hope this helps, please let us know how you go because I'm sure lots of other PHP developers will be interested in the answer.
    Regards,
    Michael Cahill, Oracle Berkeley DB.

  • Segmentation fault when enabling replication with SQL API

    Hi,
    I've compiled BDB 5.3.21 on Ubuntu 11.04 (x86) with the following configure options:
    ../dist/configure enable-sql enable-sql_compat enable-debug enable-tcl --with-tcl=/usr/lib
    I was able to follow the Replication Usage Examples given in "Getting Started with the SQL APIs" to set up a set of replicated master/client databases.
    However, after I exited out of the dbsql session that started replication on the master database and re-opened the master database with dbsql, executing "pragma replication_initial_master=ON;" followed by "pragma replication=ON;" led to a segmentation fault. gdb showed that the segmentation fault occurred at:
    dbsql> pragma replication=ON;
    Program received signal SIGSEGV, Segmentation fault.
    0x0032d42b in __env_ref_get (dbenv=0x8056ad8, countp=0xbfffd498)
    at ../src/env/env_region.c:772
    772          renv = infop->primary;
    (gdb) list
    767          REGENV *renv;
    768          REGINFO *infop;
    769     
    770          env = dbenv->env;
    771          infop = env->reginfo;
    772          renv = infop->primary;
    773          *countp = renv->refcnt;
    774          return (0);
    775     }
    776     
    (gdb)
    Does anybody know of a solution to this or could this be a bug? Thanks in advance.
    P.S. here's a stack trace:
    (gdb) bt
    #0 0x0032d42b in __env_ref_get (dbenv=0x8056ad8, countp=0xbfffd498)
    at ../src/env/env_region.c:772
    #1 0x001786fc in hasDatabaseConnections (p=0x8056708)
    at ../lang/sql/generated/sqlite3.c:44420
    #2 0x00178a11 in bdbsqlPragmaStartReplication (pParse=0x80648e0,
    pDb=0x80561cc) at ../lang/sql/generated/sqlite3.c:44533
    #3 0x001797f5 in bdbsqlPragma (pParse=0x80648e0,
    zLeft=0x8062e20 "replication", zRight=0x8062dc0 "ON", iDb=0)
    at ../lang/sql/generated/sqlite3.c:44812
    #4 0x001c215d in sqlite3Pragma (pParse=0x80648e0, pId1=0x8064b60,
    pId2=0x8064b70, pValue=0x8064b90, minusFlag=0)
    at ../lang/sql/generated/sqlite3.c:78941
    #5 0x001e5c83 in yy_reduce (yypParser=0x8064b20, yyruleno=256)
    at ../lang/sql/generated/sqlite3.c:96668
    #6 0x001e6761 in sqlite3Parser (yyp=0x8064b20, yymajor=1, yyminor=...,
    pParse=0x80648e0) at ../lang/sql/generated/sqlite3.c:97051
    #7 0x001e7537 in sqlite3RunParser (pParse=0x80648e0,
    zSql=0x80648b8 "pragma replication=ON;", pzErrMsg=0xbfffdba0)
    at ../lang/sql/generated/sqlite3.c:97877
    #8 0x001c730e in sqlite3Prepare (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, saveSqlFlag=1,
    ---Type <return> to continue, or q <return> to quit---
    pReprepare=0x0, ppStmt=0xbfffdc8c, pzTail=0xbfffdc88)
    at ../lang/sql/generated/sqlite3.c:80736
    #9 0x001c7739 in sqlite3LockAndPrepare (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, saveSqlFlag=1,
    pOld=0x0, ppStmt=0xbfffdc8c, pzTail=0xbfffdc88)
    at ../lang/sql/generated/sqlite3.c:80828
    #10 0x001c7a5e in sqlite3_prepare_v2 (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;", nBytes=-1, ppStmt=0xbfffdc8c,
    pzTail=0xbfffdc88) at ../lang/sql/generated/sqlite3.c:80903
    #11 0x0804baf6 in shell_exec (db=0x8056010,
    zSql=0x80648b8 "pragma replication=ON;",
    xCallback=0x804a3c4 <shell_callback>, pArg=0xbfffde14, pzErrMsg=0xbfffdcfc)
    at ../lang/sql/sqlite/src/shell.c:1092
    #12 0x0805030e in process_input (p=0xbfffde14, in=0x0)
    at ../lang/sql/sqlite/src/shell.c:2515
    #13 0x08051453 in main (argc=2, argv=0xbffff3f4)
    at ../lang/sql/sqlite/src/shell.c:2946
    -Irving
    Edited by: snowcrash on Jan 15, 2013 2:16 PM

    Thank you for reporting this. I have been able to reproduce this crash in-house.
    You need to specify the replication_initial_master and replication pragmas as part of initially creating your SQL database. The replication_initial_master pragma is not used or needed after the initial database creation at the initial master site. The replication=on pragma is a persistent setting that we remember internally the first time you specify it. This means that after specifying replication=on for the first time on a site, we will automatically restart replication for you in future dbsql sessions when we open the underlying Berkeley DB environment.
    This gives you a very simple workaround: don't respecify replication=on when you reenter dbsql.
    Of course, we shouldn't be crashing on an unnecessary pragma. I have added this to our list of fixes to consider for the future.
    Thanks,
    Paula Bingham
    Oracle

  • Can I use Berkeley DB sqlite3 SQL API in tmpfs?

    Hi
    To improve the efficiency of data access, I want to use Berkeley DB as in-memory SQL database. At the beginning, I assigned the argument of filename as “:memory:” when I called sqlite3_open(). Then I found in this way, it just built a private temporary in-memory database which could not be accessed between processes or between threads.
    So I tried in the following way:
    1.     Firstly, built a tmpfs on my OS:
    mkdir /dev/shm/tmp
    chmod 1777 /dev/shm/tmp
    mount --bind /dev/shm/tmp /tmp/bdb_test
    2.     Then I called the function sqlite3_open() with the argument /tmp/bdb_test/test.db, thus Berkeley DB would create the database test.db in memory, but it is transparent to BerkeleyDB.
    Can I do this in the above way? Is there any potential risk?
    Is there any other method to build a in-memory SQL database which could be shared between processes and threads?
    Thanks!
    Ps: My testbed information:
    CentOS6
    $ uname -a
    Linux localhost.localdomain 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
    Berkeley DB version: db-5.2.28
    When I build BDB, I using the following options:
    ../dist/configure enable-sql_compat enable-test --with-tcl=/usr/lib64
    Edited by: 882071 on 2011-9-6 下午7:27

    Hi,
    Then I called the function sqlite3_open() with the argument /tmp/bdb_test/test.db, thus Berkeley DB would create the database test.db in memory, but it is transparent to BerkeleyDB.
    Can I do this in the above way? Is there any potential risk? I do not see any problem with using a tmpfs (temporary filesystem) to host the database. Of course, as you probably know, there are no durability guarantees with tmpfs, no recoverability for the database in this case.
    Is there any other method to build a in-memory SQL database which could be shared between processes and threads?I do not have the resources to look into this now, but I would suggest trying the sqlite3_open_v2() function for opening the connections, with the shared cache mode (the SQLITE_OPEN_SHAREDCACHE flag), like this (making these calls in each process that opens a connection to the database):
    #define TRUE 1
    sqlite3_enable_shared_cache(TRUE);
    sqlite3_open_v2(":memory:", &pDbHandle, SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, "");(look into the SQLITE_OPEN_FULLMUTEX and SQLITE_OPEN_NOMUTEX flags as well, for specifying the threading model for opening the database connection)
    Regards,
    Andrei

  • Where are the Api's that start with com?

    When i see the online documentation i don't find api's which starts with package name "com.sun.*". where can i find documentation for this Api's. these are shipped with jdk by default. I am talking about jdk6.

    Muralidhar wrote:
    When i see the online documentation i don't find api's which starts with package name "com.sun.*". where can i find documentation for this Api's. these are shipped with jdk by default. I am talking about jdk6.Those are not API's and you should not use them. They are implementation classes for the Java platform and subject to change from version to version, from platform to platform or from vendor to vendor.
    Edited by: baftos on Jan 11, 2011 7:56 AM

  • Binding parameters to dynamic VO with PL/SQL API call with no where clause

    Hi all,
    I am required to change exisiting queries to queries with "bind" parameters. Some of our VOs are dynamic and with PL/SQL api calls like below:
    String stmtStr = "selectXXX_API_UTILS.chk_urg_since_last_prg("
    + projectId + "," + PPCId + ",'XYZ_TASKS'," + taskId+ ")"
    +" from dual ";
    ViewObject tmpVO = transaction.createViewObjectFromQueryStmt(stmtStr);
    In this regard, I am unsure how to bind the PPCId and taskId parameters to the VO. setWhereClauseParams() would not work here as there is now where clause.
    Thanks in advance,
    Srini

    In case of preparedStatement, we mention bind parameters to be passed using "?". Then we pass paramters sequencially.
    But in the your case following is enough:
    int projectId = 100 ; (hardcoding values for example)
    int taskId = 500 ;
    String stmtStr = "selectXXX_API_UTILS.chk_urg_since_last_prg("
    + projectId + "," + PPCId + ",'XYZ_TASKS'," + taskId+ ")"
    +" from dual ";
    -Anand

  • Having issues with getting SQL Server Express to start services and run.

    Good afternoon everyone,
    I have been working on a 2012 R2 server getting ready to move databases to new hardware.  I had SQL Server Express 2008 R2 running on this server with no issues.  I was handed another software package that ran SQL Express 2012 and had to for compatibility
    reasons.  I have had multiple versions run on Server 2012 before with no issues.  This time, not so lucky.  When the installer from the updated package put on SQL Express 2012 it completed with errors ( error log posted at the end of post) and
    would not allow me to run software.  I then tried the db that I had installed on 2008 R2 and it also gave the  same error as the 2012 version.  IN basic terms the required services attempted to start and shut back down again.  I have received
    Error 1068 about database handles and error %%945.   I know this db has plenty of space and the permissions were added for the Admin account to access both db's.  I then uninstalled both versions and tried again, with the same errors listed when
    I tried to start the services.     I am thinking that a clean install would fix the issue however I am not certain what files/folders/reg entries need to be deleted or modified.  I have researched all the errors I can find, however I am very
    new with SQL anything so I know I am missing something.   I also do not have an "E:" drive on this server (not sure why it is going there). Input would be very welcome as I am not certain where to go from here. 
    Thanks,
    Matt
    Error Log follows, server and domain names have been blacked out with ****.
    2015-04-15 11:57:55.16 Server      Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) 
    Dec 28 2012 20:23:12 
    Copyright (c) Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    2015-04-15 11:57:55.16 Server      (c) Microsoft Corporation.
    2015-04-15 11:57:55.16 Server      All rights reserved.
    2015-04-15 11:57:55.16 Server      Server process ID is 4104.
    2015-04-15 11:57:55.16 Server      System Manufacturer: 'HP', System Model: 'ProLiant ML350p Gen8'.
    2015-04-15 11:57:55.16 Server      Authentication mode is WINDOWS-ONLY.
    2015-04-15 11:57:55.16 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
    2015-04-15 11:57:55.17 Server      The service account is 'NT AUTHORITY\LOCAL SERVICE'. This is an informational message; no user action is required.
    2015-04-15 11:57:55.17 Server      Registry startup parameters: 
    -d C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\master.mdf
    -e C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG
    -l C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
    2015-04-15 11:57:55.17 Server      Command Line Startup Parameters:
    -s "SQLEXPRESS"
    2015-04-15 11:57:55.48 Server      SQL Server detected 1 sockets with 6 cores per socket and 12 logical processors per socket, 12 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message;
    no user action is required.
    2015-04-15 11:57:55.48 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2015-04-15 11:57:55.48 Server      Detected 8157 MB of RAM. This is an informational message; no user action is required.
    2015-04-15 11:57:55.48 Server      Using conventional memory in the memory manager.
    2015-04-15 11:57:55.68 Server      This instance of SQL Server last reported using a process ID of 7840 at 4/15/2015 11:57:47 AM (local) 4/15/2015 3:57:47 PM (UTC). This is an informational message only; no user action is required.
    2015-04-15 11:57:55.68 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message
    only. No user action is required.
    2015-04-15 11:57:55.69 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2015-04-15 11:57:55.72 Server      Software Usage Metrics is disabled.
    2015-04-15 11:57:55.73 spid5s      Starting up database 'master'.
    2015-04-15 11:57:55.79 spid5s      20 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
    2015-04-15 11:57:55.79 spid5s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
    2015-04-15 11:57:55.80 Server      CLR version v4.0.30319 loaded.
    2015-04-15 11:57:55.86 spid5s      Service Master Key could not be decrypted using one of its encryptions. See sys.key_encryptions for details.
    2015-04-15 11:57:55.89 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
    2015-04-15 11:57:55.91 spid5s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
    2015-04-15 11:57:55.91 spid5s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
    2015-04-15 11:57:55.94 spid5s      SQL Trace ID 1 was started by login "sa".
    2015-04-15 11:57:55.94 spid5s      Server name is '********\SQLEXPRESS'. This is an informational message only. No user action is required.
    2015-04-15 11:57:55.96 spid5s      Failed to verify Authenticode signature on DLL 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Binn\ftimport.dll'.
    2015-04-15 11:57:55.96 spid5s      Starting up database 'msdb'.
    2015-04-15 11:57:55.96 spid9s      Starting up database 'mssqlsystemresource'.
    2015-04-15 11:57:55.96 spid5s      Error: 17204, Severity: 16, State: 1.
    2015-04-15 11:57:55.96 spid5s      FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
    2015-04-15 11:57:55.96 spid5s      Error: 5120, Severity: 16, State: 101.
    2015-04-15 11:57:55.96 spid5s      Unable to open the physical file "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
    2015-04-15 11:57:55.96 spid5s      Error: 17207, Severity: 16, State: 1.
    2015-04-15 11:57:55.96 spid5s      FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'.
    Diagnose and correct the operating system error, and retry the operation.
    2015-04-15 11:57:55.96 spid5s      File activation failure. The physical file name "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf" may be incorrect.
    2015-04-15 11:57:55.99 spid9s      The resource database build version is 11.00.3000. This is an informational message only. No user action is required.
    2015-04-15 11:57:56.02 spid12s     A self-generated certificate was successfully loaded for encryption.
    2015-04-15 11:57:56.03 spid12s     Server is listening on [ 'any' <ipv6> 53345].
    2015-04-15 11:57:56.03 spid12s     Server is listening on [ 'any' <ipv4> 53345].
    2015-04-15 11:57:56.03 spid12s     Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
    2015-04-15 11:57:56.03 spid12s     Server named pipe provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
    2015-04-15 11:57:56.04 spid12s     Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806.
    This is an informational message only. No user action is required.
    2015-04-15 11:57:56.04 Server      SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational
    message. No user action is required.
    2015-04-15 11:57:56.04 Server      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/********.****.local:SQLEXPRESS ] for the SQL Server service. Windows return code: 0xffffffff, state: 53.
    Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been
    manually registered.
    2015-04-15 11:57:56.04 Server      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/********.****.local:53345 ] for the SQL Server service. Windows return code: 0xffffffff, state: 53. Failure
    to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually
    registered.
    2015-04-15 11:57:56.09 spid9s      Starting up database 'model'.
    2015-04-15 11:57:56.10 spid9s      Error: 17204, Severity: 16, State: 1.
    2015-04-15 11:57:56.10 spid9s      FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
    2015-04-15 11:57:56.10 spid9s      Error: 5120, Severity: 16, State: 101.
    2015-04-15 11:57:56.10 spid9s      Unable to open the physical file "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\model.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
    2015-04-15 11:57:56.10 spid9s      Error: 17207, Severity: 16, State: 1.
    2015-04-15 11:57:56.10 spid9s      FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf'.
    Diagnose and correct the operating system error, and retry the operation.
    2015-04-15 11:57:56.10 spid9s      File activation failure. The physical file name "e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf" may be incorrect.
    2015-04-15 11:57:56.10 spid9s      Error: 945, Severity: 14, State: 2.
    2015-04-15 11:57:56.10 spid9s      Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
    2015-04-15 11:57:56.10 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
    

    Hi HMLunger,
    Did you install the SQL Server instance successfully? If not, please help to post the summary and detail logs for analysis. By default, the logs can be found in: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log.
    However, if you fail to start SQL Server Express service after successfully installing SQL Server,
    you might have to change the paths of the files by running the following scripts from the command prompt. For more details, please review this similar
    thread.
    NET START MSSQL$SQLEXPRESS /f /T3608
    SQLCMD -S .\SQLEXPRESS
    ALTER DATABASE model MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    ALTER DATABASE model MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    go
    exit;
    ALTER DATABASE msdb MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    ALTER DATABASE msdb MODIFY FILE (NAME = logical_name , FILENAME = 'new_path\os_file_name');
    NET STOP MSSQL$SQLEXPRESS
    In addition, you can follow the steps in this KB article to uninstall SQL Server.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Define a Standalone Download Integrator with an Additional Where clause - SQL error

    Hi,
    I am trying to create a standalone integrator with an Additional Where clause. Followed the steps mentioned in the metalink note 360105.1. When I run the integrator, I get the following error message.
    Please resolve the following error to continue.
    SQL error: ORA-00936: missing expression occurred
    processing stored SQL for Content 20007:GENERAL_441_CNT.
    When I look at the log file, here is what I can see:
    10/22/14 10:50 AM AJPRequestHandler-HTTPThreadGroup-15 TRACE          BneHrSQLControl - SQL:SELECT  FROM PER_PEOPLE_V where last_name=$PARAM$.last_name
    10/22/14 10:50 AM AJPRequestHandler-HTTPThreadGroup-15 TRACE          validateSQLStatement value of sqlStatement is: SELECT  FROM PER_PEOPLE_V where last_name=:RSQLP1
    10/22/14 10:50 AM AJPRequestHandler-HTTPThreadGroup-15 DETAIL         BneHrSQLControl.validateSQLStatement() paramName: last_name
    10/22/14 10:50 AM AJPRequestHandler-HTTPThreadGroup-15 DETAIL         BneHrSQLControl.validateSQLStatement() error in SQL: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
    So, clearly, the SQL statement that is getting built internally is wrong. Ideally, I would expect the statement to be something like this:
    SELECT *  FROM PER_PEOPLE_V where last_name=$PARAM$.last_name.
    RDBMS : 11.2.0.3.0
    Oracle Applications : 12.1.3
    Any pointers towards the resolution of the issue would be of great help.
    Thanks in Advance!
    Lalitha.

    This is a duplicate post of your other question:  create trigger automatic
    DO NOT start duplicate threads for the same question.
    Locking this thread

  • How to get  Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES

    Hi ,
    how to get Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES.
    who can help me ? Thank you very much !

    i get it from private API.
    SELECT SUM(decode(ra.status, 'UNAPP', nvl(ra.amount_applied, 0), 0)) unapplied_amount
    FROM ar_receivable_applications ra
    WHERE ra.cash_receipt_id = 1820
    AND ra.status IN ('UNAPP', 'ACTIVITY')

  • I have a long-existing iPhone 4s with one apple id and started a job where I received a macbook with another apple id. how do i get my phone to sync with the Mac Pro and secondly how do i get my music on there?

    i have a long-existing iPhone 4s with one apple id and started a job where I received a macbook with another apple id. how do i get my phone to sync with the Mac Pro and secondly how do i get my music on there?

    No not bothered about sycing apps etc it is all about calendars and maybe notes. IN terms of how its done I just want it the easiest way and preferably so that if an entry is made on one calendar then it populates the other.
    Thgius is beacuse I have my work diary on outlok, which I then link with my ical. I want to make sure that information is then shared with her.
    Chris

  • Multiple problems with 80GB classic, don't know where to start.

    Hey guys,
    I got an Apple classic 80GB for my bday early August and lately i've been having so many problems i dont know where to start, i'll try to explain them as best as i can.
    *problem 1:* Whenever i plug my iPod into my PC, it locks up the system for about 5 minutes, then comes up with an error box saying that 'There is a problem with your iPod yadda yadda restore etc'.
    I proceed to restore the iPod, then once its restored and reconnects itself, it repeats the cycle by freezing then telling me to restore. The only way i can do a restore and have it not give me an error is if i reboot when it is disconnected.
    *Problem 2:* When i finally get it up and ready to sync, i go to sync all my files (About 2000 songs). It gets to around the 1500 song mark then says there is an error and the iPod disconnects itself.
    It then instantaneously reconnects itself and starts syncing from where it left off.
    Once it has then sync'd all of the music ad tells me its ready to be ejected. I eject the iPod and disconnected it.
    I then go into the iPod and it has no songs/videos/photos, yet it has still used up about 15gb. If i reconnect it, it will just sit there for 5 minutes not syncing, it will then randomly say the sync is done and it will eject itself.
    FINALLY after all that i have my music on there
    *Problem 3* Once the songs are on the iPod, it becomes insanely laggy. If i navigate to a song and press play, it will take about 10 seconds for the actual song to play. The delay is just as bad for next song, pause etc. Even using it in my cars head unit causes it to lag.
    *Problem 4* If i do get a song playing after all that, about 1/5 songs will just randomly skip to the next song without letting it play through.
    I have all the latest iTunes/Firmware/Drivers for everything on my PC and iPod.
    I have sent it back to Apple for repair yet they could not find anything wrong (Yeah right :|)
    If anyone out there could help me please, im at my wits end with this infernal machine.
    Thankyou

    *Outdated operating system:* Cant be, im running XP SP3 with the latest updates
    *Computer needs updates:* I've got the latest drivers for all of my hardware, including BIOS
    *Software interference:* THe only other program i have running in the background is Kaspersky Antivirus, but that is disabled when i try to sync
    *Damaged Files* Possibly, i played through the album where it froze at and even reo-imported it, it seemed to play and import fine
    *Unregistered .dll files (Windows):* Tried this fix, but it did the same problems as the original post. Such as freezing on a certain song, then reconnecting itself only to put the music on there, yet it is really laggy
    *Damaged disk structure:* Tried this fix, didn't help
    *Corrupt iPod photo Cache* I have never tried to put photos on it, so i dont see how this could be it.
    *Lost connection:* Checked it, it's very firm and unlikely to come loose.
    *Conflict with third-party hardware:* I dont have any connected, nor have i ever
    *Bad hardware:* I tried it on all of my 8 USB drives. I dont use any hubs or firewire cards so this couldn't be it.
    Also i forgot to add that 1/5 times i go to restore, it locks the computer up and windows gives me a 'delayed write failed' bubble

  • Working with BDB SQL API (libsqlite3.a) on iPhone Simulator

    Hi,
    I downloaded latest BDB and got a static library libsqlite3.a by compiling the code on Mac OS X (1.6.8 64bit).
    I am now trying to use this library as a drop in replacement into a SQLite project.
    I copied the SQLite database (with only one table) to a new Berkeley DB.
    I want to access this new Berkeley DB with existing code using SQLite.
    I followed following steps:
    1. Added (copied) libsqlite3.a from build directory to my project
    2. Added #import <db.h> and left #import <sqlite3.h> as it is
    3. compiled the code and ran it in iPhone simulator
    The code runs fine until I go to prepare a statement. Please see the snippet from the function below:
    - (void)initializeDatabase {
    NSMutableArray *todoArray =[[NSMutableArray alloc] init];
    self.todos = todoArray;
    [todoArray release];
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"todo.db"];
    if (sqlite3_open([path UTF8String], &database) == SQLITE_OK) {      // This is ok, opens berkeley DB
    const char *sql = "SELECT pk FROM todo";
    const char *tail;
    sqlite3_stmt *statement;
    if (sqlite3_prepare_v2(database, sql, -1, &statement, &tail) != SQLITE_OK) {    *// Fails here - table and records exist in Berkeley DB*
    if (sqlite3_step(statement) == SQLITE_ROW) {
    int primarykey = sqlite3_column_int(statement, 0);
    Todo *td = [[Todo alloc] initWithPrimaryKey:primarykey database:database];
    [todos addObject:td];
    [td release];
    } else {
    NSAssert1(0, @"Failed to read from the table '%s'.", sqlite3_errmsg(database));
    sqlite3_close(database);
    sqlite3_finalize(statement);
    } else {
    NSAssert1(0, @"Failed to open database with message '%s'.", sqlite3_errmsg(database));
    sqlite3_close(database);
    The log dump:
    GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
    Attaching to process 14578.
    Pending breakpoint 1 - ""todoAppDelegate.m":109" resolved
    Current language: auto; currently objective-c
    /Users/kpotnis/Library/Application Support/iPhone Simulator/4.3.2/Applications/0322BCD5-4C71-498E-82EC-469133B7A935/Documents/todo.db: BDB0113 Thread/process 14578/2696754496 failed: BDB1507 Thread died in Berkeley DB library
    Any thoughts?
    Edited by: 868618 on Jul 11, 2011 4:51 AM

    Hi,
    I was looking over this and I was wondering if you've got the chance to progress with this issue or if you need assistance?
    Thanks,
    Bogdan Coman

  • Beginners question - making sense of form, item, pane & variable (with relation to where data is stored in the SQL database)

    Hi Everyone,
    I am new to writing reports (SQL code) for SAP, however I am aware that inside SAP Business One it is necessary to enable System Information (from the View menu) in order to see which tables (and related table attributes / column names) are related to various aspects of the various SAP 'modules' (e.g.: A/R Invoice).
    Using an A/R Invoice as an example I can see at the row (or line) level that an item with the description of 'Opening Balance Transfer' is contained in the table INV1, within the attribute (or column) called Dscription.
    However not every 'on screen object' shows a table / attribute. For example in the same A/R Invoice if I hover my mouse over the Balance Due field all I see is Form related information.
    My question is 'How do I make sense of the Form, Item, Pane, Variable information?', with relation to where data is stored within the SQL database?
    Links to online tutorials explaining how this feature of SAP Business One will be much appreciated, along with any personal advice regarding working with this information.
    Any (and all) help will be greatly appreciated.
    Kind Regards,
    David

    Hi David,
    1.Here I am explaining use of each field except pane
    a. Form ---> Used in additional authorization creator
    b. Item, column--->Useful in creating Formatted search queries (FMS)
    c. Variable --> Some of the field values based on another values. ie. indirect values.
    d. INV1---Table name
    2. How to get variable?
    As per your second attachment, to get balance due ,you need doc total field from OINV table. For example,
    SELECT T0.[DocNum], T0.[DocTotal] FROM OINV T0 WHERE T0.[DocNum] = 612004797
    Thanks & Regards,
    Nagarajan

  • Not 'Getting started with SQL server' but 'Getting SQL server started'

    As a developer, I hate it when I lose valuable time because Windows 'is not working' and thus I can not work.
    I don't know what would be the best forum to post this, please let me know if there is a better one.
    Today after, a Windows Update and a reboot SQL server won't start anymore.
    The error in the event log:
    The SQL Server (MSSQLSERVER) service terminated with the following service-specific error:
    An attempt was made to access a socket in a way forbidden by its access permissions.
    I stopped the firewall, but the problem remains.
    As it is apparently not the firewall I have no idea how to resolve this problem, any suggestions welcome.
    Thanks :(
    And these are the updates that were installed:
    Installation Successful: Windows successfully installed the following update: Definition Update for Windows Defender - KB2267602 (Definition 1.193.2423.0)
    Installation Started: Windows has started installing the following update: Definition Update for Windows Defender - KB2267602 (Definition 1.193.2423.0)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3033889)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3035527)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3036612)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3039066)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3018133)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3035132)
    Installation Successful: Windows successfully installed the following update: Cumulative Security Update for Internet Explorer 11 for Windows 8.1 for x64-based Systems (KB3032359)
    Installation Successful: Windows successfully installed the following update: Security Update for Internet Explorer Flash Player for Windows 8.1 for x64-based Systems (KB3044132)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3024751)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3035017)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3030377)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3035131)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3035553)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3013172)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3027209)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3030947)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3036228)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3029606)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3034348)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3029803)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3032323)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3022796)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3012235)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3034344)
    Installation Successful: Windows successfully installed the following update: Security Update for Windows 8.1 for x64-based Systems (KB3046049)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3012702)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3036562)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3025417)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3024755)
    Installation Successful: Windows successfully installed the following update: Update for Windows 8.1 for x64-based Systems (KB3000850)

    Refer the below similar link
    https://social.technet.microsoft.com/Forums/windows/en-US/e0cc1b3e-2c63-451a-abc8-8e1e66a23287/an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissions?forum=w7itpronetworking
    --Prashanth

  • How to "where any of(b,c,d,e,f,g,h..) is null" with SQL(not PL/SQL)

    With the combinations of case, decode and coalesce function this can be done via pl/sql function, but is it possible to do it with SQL(any similar operator for this need I mean).
    This need is because this is a report and the data processed is large so if this can be done within SQL engine it may help with performance.
    Best regards.

    I don't think coalesce is what you need, but maybe I'm missing something here.
    You can use some nested nvl2 expression, but why doing it complicated. As s.rajaram says, using the or-operator will do just fine.
    SQL> create table mytable
      2  as
      3  select 1 b, 1 c, 1 d, 1 e, 1 f, 1 g, 1 h from dual union all
      4  select 1, 1, 1, 1, null, 1, 1 from dual union all
      5  select null, null, null, null, null, null, null from dual union all
      6  select 1, null, 1, null, 1, null, 1 from dual
      7  /
    Tabel is aangemaakt.
    SQL> select b, c, d, e, f, g, h
      2       , coalesce(b,c,d,e,f,g,h)
      3       , nvl2(b, nvl2(c, nvl2(d, nvl2(e, nvl2(f, nvl2(g, h, null), null), null), null), null), null) anyone_null
      4    from mytable
      5  /
    B  C  D  E  F  G  H COALESCE(B,C,D,E,F,G,H) ANYONE_NULL
    1  1  1  1  1  1  1                       1           1
    1  1  1  1     1  1                       1
    1     1     1     1                       1
    4 rijen zijn geselecteerd.
    SQL> select b, c, d, e, f, g, h
      2    from mytable
      3   where nvl2(b, nvl2(c, nvl2(d, nvl2(e, nvl2(f, nvl2(g, h, null), null), null), null), null), null) is null
      4  /
    B  C  D  E  F  G  H
    1  1  1  1     1  1
    1     1     1     1
    3 rijen zijn geselecteerd.
    SQL> select b, c, d, e, f, g, h
      2    from mytable
      3   where b is null
      4      or c is null
      5      or d is null
      6      or e is null
      7      or f is null
      8      or g is null
      9      or h is null
    10  /
    B  C  D  E  F  G  H
    1  1  1  1     1  1
    1     1     1     1
    3 rijen zijn geselecteerd.Regards,
    Rob.

Maybe you are looking for

  • 2-seat license not working on Mac running Windows 7

    We have a full retail copy of Adobe Acrobat Pro XI.  We are trying to get it installed on an Intel-Mac (2009 Macbook Pro) running Windows 7 on Bootcamp. After a fresh install, we successfully license the software with the license key.  All works well

  • Schedule job...

    i schedule a job using SYS.DBMS_JOB.SUBMIT for every 2 hours... its execution slot is 12PM and our DB is going down between 10PM to 1AM once the DB is up, the job will automatically stat for the next interval ie @2AM?

  • [SOLVED]NetworkManager won't work since updating to KDE 4.3.4

    Hello there, I'm running Arch64 on Qosmio X300 notebook. I have just updated to KDE 4.3.4 and since the update the NetworkManager won't connect to my wifi (I haven't tried wired yet). I use following packages for NetworkManager and KNetworkManager ap

  • Cs4 upgrade on new Mac PowerBook

    How do I install cs4 upgrade version on brand new Mac PowerBook with no previous version on computer

  • Itunes will not let me sync WHAT-SO-EVER

    So i see where you would have to click "sync ipod" on itunes, but i cannot click it. The manual also suggests going under some place where it will connect me with my ipod. but i can not find that. i know my ipod is connecting to the computer becuase