Exclusive Access To The Database

Is there a way for my code to know if I have
Exclusive Access To The Database?  If so, what would the
Compress Database Command be?
Application:  I would like my update script to include a command to compress the database, when no one else is in the database.

Hi Mark,
>> Is there a way for my code to know if I have Exclusive Access To The Database?
I think you could check whether the Access is exclusive with vba code, some key code as below:
Function IsCurDBExclusive () As Integer
' Purpose: Determine if the current database is open exclusively.
' Returns: 0 if database is not open exclusively.
' -1 if database is open exclusively.
' Err if any error condition is detected.
Dim db As Database
Dim hFile As Integer
hFile = FreeFile
Set db = dbengine.workspaces(0).databases(0)
If Dir$(db.name) <> "" Then
On Error Resume Next
Open db.name For Binary Access Read Write Shared As hFile
Select Case Err
Case 0
IsCurDBExclusive = False
Case 70
IsCurDBExclusive = True
Case Else
IsCurDBExclusive = Err
End Select
Close hFile
On Error GoTo 0
Else
MsgBox "Couldn't find " & db.name & "."
End If
End Function
For more information, you could turn to the link below:
# ACC: How to Determine If a Database Is Open Exclusively
http://support.microsoft.com/kb/117539
>> If so, what would the Compress Database Command be?
For compressing the database, I think you could use
# Application.CompactRepair Method (Access)​
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Similar Messages

  • Can you set a single FILEGROUP to READONLY without getting exclusive access to the entire DB?

    I'm in the process of building a partitioned table with a sliding-window partition.  I have several years of historical static image data that will be moved to individual filegroups created to hold year's worth of data each.  The Business
    requires that the last 60 days of images be updateable, everything older needs to be readonly which simplifies the backup process.
    Since the PRIMARY filegroup is always READWRITE, I'm going to use the PRIMARY filegroup for the upper range of my partition to allow users to make necessary modifications to images in this 60 day window.  On a nightly basis, I'm going to run
    a process that changes the upper range on the partition to the daterange = (getdate() - 60).  The 61st day moves seamlessly from PRIMARY filegroup to my 2013FileGroup in milliseconds. 
    The process runs almost flawlessly, however, I'd like to change the FILEGROUP to READ-ONLY after moving the data to the archive partition.  In my process, I can quickly switch this archive filegroup to READWRITE and run the Partition MERGE \ SPLIT to
    change my upper range and move records between partitions.  However, I cannot change the FILEGROUP back to READ_ONLY without getting exclusive access to the entire database to save the change.
    Is there any way to set a single FILEGROUP to read-only quickly without setting the entire DB to SINGLE-USER with ROLLBACK IMMEDIATE?  I've tried the WITH ROLLBACK IMMEDIATE on the ALTER DB statement to modify the filegroup without any success. 
    I need WRITE access for a matter of seconds before setting it back to read only. Any help would be greatly appreciated.
    I'm dealing with a TB of data, a full restore could take 60+ hours to recover the entire db.  However, doing partial backups on the READWRITE portion of the DB is done quickly and I can get the business back online quickly by recovering the
    PRIMARY filegroup and then restore readonly filegroups in the background.  If I can't change these filegroups to read-only on the fly, I may have to maintain more backups for extended periods of time and may need to wait for maintenance windows to set
    filegroups to READONLY.

    Is there any way to set a single FILEGROUP to read-only quickly without setting the entire DB to SINGLE-USER with ROLLBACK IMMEDIATE?  I've tried the WITH ROLLBACK IMMEDIATE on the ALTER DB statement to modify the filegroup without any success. 
    I need WRITE access for a matter of seconds before setting it back to read only. Any help would be greatly appreciated.
    I am moving it to Tools. Consider setting up a separate database for the 60+ days data.
    Related thread:
    USE TempDB
    GO
    ALTER DATABASE SampleDb
    MODIFY FILEGROUP [Archive] READONLY
    GO
    The following error appears:
    Msg 5070, Level 16, State 2, Line 1
    Database state cannot be changed while other users are using the database 'SampleDB'http://www.sqlservercentral.com/Forums/Topic1328084-391-1.aspx
    Kalman Toth Database & OLAP Architect
    sqlusa.com
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Assign access for the database to None with maxl?

    I need to assign access to the database to none with maxl. Any help will be appreciated. <img src="i/expressions/beer.gif" border="0">

    Do you mean setting the minimum access permission on the database?<BR>For that the command is 'alter database 'Sample'.'Basic' set minimum permission no_access;'<BR><BR>If you want to prevent users from logging on to the database then use something like<BR>'alter application 'Sample' disable connects;'<BR><BR>HTH<BR>

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • I can´t access to the database using SQLPlus

    Hello to everybody,
    I have installed Oracle XE without problems and my listener is running. Anyway I can´t acces to the database, when I try to log in i have this message:
    ORA-01033: ORACLE initialization or shutdown in progress.
    I have tried to shutdown and restart the database and in startup i have start and mount confirmation messages but at the end appear this message:
    ORA-01589: you must use RESETLOGS or NORESETLOGS option to open the database.
    Ok, I try but an invalid option message appear. This is normal because RESETLOGAS and NORESETLOGS isn´t startup command options.
    So I don´t know how to continue, any idea??
    Thank you.

    When I try to connect to the database:
    [yuner@leyla bin]$ sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Beta on Vie Dic 16 16:22:57 2005
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Introduzca el nombre de usuario: sys
    Introduzca la contraseña:
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress
    When I connect as sysdba to restart the db:
    [yuner@leyla bin]$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Beta on Vie Dic 16 16:23:20 2005
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn sys as sysdba
    Introduzca la contraseña:
    Conectado.
    SQL> shutdown
    ORA-01109: base de datos sin abrir
    Base de datos desmontada.
    Instancia ORACLE cerrada.
    SQL> startup
    Instancia ORACLE iniciada.
    Total System Global Area 146800640 bytes
    Fixed Size 1218208 bytes
    Variable Size 58722656 bytes
    Database Buffers 83886080 bytes
    Redo Buffers 2973696 bytes
    Base de datos montada.
    ORA-01589: debe utilizar la opcion RESETLOGS o NORESETLOGS para abrir la base
    de datos
    This is my problem, any idea?
    Thank you.

  • Concurrent access to the database

    Hello,
    I have two separate processes sharing the same recno database. One of the processes needs to write data in the database, and the other one needs to consume it.
    I have two test programs that try to simulate this.
    First program when it runs, writes 5 records in the database and then exits.
    Second program when run will try to consume the data from the database in an infinite loop.
    If I run the second program while some data exists already in the database, the program will consume all the data with no problems. While the second program is still running in a loop, if I insert some more data by running first program again, the second program will not see any of the newly inserted data.
    I checked the documentation and set all the flags to bypass the system cache, and write direct to the file (without using any caching mechanism), and even call db->sync(0) after each write without any success.
    Although somebody might recommend dbenv as a solution to my problem, system I use (MIPS R3000 with Linux 2.4) does not support process shared mutexes therefore dbenv can not be used.
    I hope that somebody knows a way to make this work. Any help would be appreciated.
    Thank you and regards,
    Sebastian

    Hi Sebastian,
    I think that you have an "isolation" issue. For more details on how this one works, you should read here: http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/inc.html
    Also, did you specified DB_READ_UNCOMMITTED, in order to have a degree 1 isolation? Here are some of the methods which are using this flag:
    DB->cursor: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_cursor.html#DB_READ_UNCOMMITTED
    DB->get: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_get.html#DB_READ_UNCOMMITTED
    DB->open: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_open.html#DB_READ_UNCOMMITTED
    DBcursor->c_get: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc_get.html#DB_READ_UNCOMMITTED
    DB_ENV->txn_begin: http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/txn_begin.html#DB_READ_UNCOMMITTED
    Regards,
    Bogdan Coman, Oracle

  • Enterprise Manager is not able to connect to the database instance....

    Hi all,
    Currently i'm facing a big issue here.
    I have install the Oracle 10g on Window 2003 SE.
    And currently the Enterprise manager is not be able to conenct to the database and my database is still running.With my listener is up.
    But from the Enterprise manager's it show that everythg is down.
    and when i try to restart it,i ask for os id and password and dbuser and dbpassword.
    frm the SQL plus,i can easily startup and shutdown the database.
    So i would like to know i can rectify this problem.
    please kindly help me.I have post the setting of the databse as below
    tnsnames.ora
    ==========
    # Filename......: tnsnames.ora
    # Created.......: created by SAP AG, R/3 Rel. >= 6.10
    # Name..........:
    # Date..........:
    # @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/TNSNAMES.ORA#4 $
    SDB.WORLD=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = SAP_SOLMAN)
    (PORT = 1527)
    (CONNECT_DATA =
    (SID = SDB)
    (GLOBAL_NAME = SDB.WORLD)
    sqlnet.ora
    ========
    # sqlnet.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\sqlnet.ora
    # Generated by Oracle configuration tools.
    # 05.01.06 set to default
    #TCP.NODELAY=YES
    # 05.01.06 set to 32768
    # 05.01.06 unsorported parameter now
    #NAME.DEFAULT_ZONE = WORLD
    # 05.01.06 set the default to 10
    # Filename......: sqlnet.ora
    # Created.......: created by SAP AG, R/3 Rel. >= 6.10
    # Name..........:
    # Date..........:
    # @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/SQLNET.ORA#4 $
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME, LDAP)
    NAMES.DEFAULT_DOMAIN = WORLD
    DEFAULT_SDU_SIZE = 32768
    SQLNET.EXPIRE_TIME = 10
    Listener.ora
    =========
    # Filename......: listener.ora
    # Created.......: created by SAP AG, R/3 Rel. >= 6.10
    # Name..........:
    # Date..........:
    # @(#) $Id: //bc/700-1_REL/src/ins/SAPINST/impl/tpls/ora/ind/LISTENER.ORA#4 $
    ADMIN_RESTRICTIONS_LISTENER = on
    LISTENER =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = SDB.WORLD)
    (ADDRESS=
    (PROTOCOL = IPC)
    (KEY = SDB)
    (ADDRESS =
    (COMMUNITY = SAP.WORLD)
    (PROTOCOL = TCP)
    (HOST = SAP_SOLMAN)
    (PORT = 1527)
    STARTUP_WAIT_TIME_LISTENER = 0
    CONNECT_TIMEOUT_LISTENER = 10
    TRACE_LEVEL_LISTENER = OFF
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = SDB)
    (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
    Listener status
    ===========
    LSNRCTL> status
    Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=SDB.WORLD))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 15-AUG-2006 15:14:48
    Uptime 0 days 2 hr. 43 min. 31 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File E:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File E:\oracle\product\10.2.0\db_1\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\SDB.WORLDipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\SDBipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SAP_solman)(PORT=1527)))
    Services Summary...
    Service "SDB" has 1 instance(s).
    Instance "SDB", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    emoms.log
    ========
    2006-08-15 18:03:20,562 [HttpRequestHandler-2254042] ERROR conn.ConnectionService verifyRepositoryEx.433 - Invalid Connection Pool. ERROR = Io exception: The Network Adapter could not establish the connection
    2006-08-15 18:03:21,547 [HttpRequestHandler-2254042] WARN jdbc.ConnectionCache _getConnection.303 - Got a fatal exeption when getting a connection; Error code = 17002; Cleaning up cache and retrying
    2006-08-15 18:03:21,547 [HttpRequestHandler-2254042] WARN jdbc.ConnectionCache _getConnection.306 - Io exception: The Network Adapter could not establish the connection
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:493)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
         at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:324)
         at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:114)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:694)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:540)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:346)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:324)
         at oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:296)
         at oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:423)
         at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:156)
         at oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:605)
         at oracle.sysman.emdrep.receiver.OMSHandshake.getParameterFromDB(OMSHandshake.java:387)
         at oracle.sysman.emdrep.receiver.OMSHandshake.getMaxAgentCompatVer(OMSHandshake.java:369)
         at oracle.sysman.emdrep.receiver.OMSHandshake.handshake(OMSHandshake.java:794)
         at oracle.sysman.emdrep.receiver.OMSHandshake.handshake(OMSHandshake.java:648)
         at oracle.sysman.emdrep.receiver.FxferRecv.doGet(FxferRecv.java:658)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:239)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:604)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    2006-08-15 18:03:22,531 [HttpRequestHandler-2254042] ERROR eml.OMSHandshake getParameterFromDB.402 - Io exception: The Network Adapter could not establish the connection
    2006-08-15 18:03:22,531 [HttpRequestHandler-2254042] ERROR eml.OMSHandshake processFailure.619 - OMSHandshake failed.(AGENT URL = http://SAP_solman:3938/emd/main)(ERROR = INTERNAL_ERROR)
    2006-08-15 18:03:35,547 [HttpRequestHandler-9249408] WARN jdbc.ConnectionCache _getConnection.303 - Got a fatal exeption when getting a connection; Error code = 17002; Cleaning up cache and retrying
    2006-08-15 18:03:35,547 [HttpRequestHandler-9249408] WARN jdbc.ConnectionCache _getConnection.306 - Io exception: The Network Adapter could not establish the connection
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:493)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
         at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:324)
         at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:114)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:694)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:540)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:346)
         at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:324)
         at oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:296)
         at oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:423)
         at oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:156)
         at oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:605)
         at oracle.sysman.emSDK.svc.conn.ConnectionService.getRepositoryVersionAndMode(ConnectionService.java:368)
         at oracle.sysman.emSDK.svc.conn.ConnectionService.verifyRepositoryEx(ConnectionService.java:395)
         at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:144)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    2006-08-15 18:03:36,531 [HttpRequestHandler-9249408] ERROR conn.ConnectionService verifyRepositoryEx.433 - Invalid Connection Pool. ERROR = Io exception: The Network Adapter could not establish the connection
    2006-08-15 18:03:36,531 [EMUI_18_03_36_/console/aboutApplication] ERROR em.console doGet.311 - java.lang.IllegalStateException: Response has already been committed
    java.lang.IllegalStateException: Response has already been committed
         at com.evermind.server.http.EvermindHttpServletResponse.resetBuffer(EvermindHttpServletResponse.java:1901)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:211)
         at oracle.sysman.emSDK.svlt.PageHandler.render(PageHandler.java:773)
         at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:396)
         at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:688)
         at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:291)
         at oracle.sysman.eml.app.Console.doGet(Console.java:135)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:101)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.sysman.db.adm.inst.HandleRepDownFilter.doFilter(HandleRepDownFilter.java:123)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
         at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:239)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    OracleDBConsoleSDBsrvc.log
    ======================
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/09/06 15:11:59 Start pending...
    08/09/06 15:11:59 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/09/06 15:12:04 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/09/06 15:12:04 Tracking process launch...
    08/09/06 15:12:41 Received exitCode 3 from emctl istatus
    08/09/06 15:12:41 dbconsole started
    08/11/06 08:46:03 Recieved ServCtrlHdlr command, 5
    08/11/06 08:46:03 Stopping dbconsole
    08/11/06 08:46:03 Launching stop EMD process...
    08/11/06 08:46:03 Waiting for stop EMD process to exit. numRetries=74
    08/11/06 08:46:06 Stop process has exited with exitCode: 0
    08/11/06 08:46:06 Waiting for emwd process to exit. numRetries=74
    08/11/06 08:46:06 Watchdog process exited with exit code 15
    08/11/06 08:46:06 Signal Shutdown event.
    08/11/06 08:46:06 Shutdown thread exited.
    08/11/06 08:46:06 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/11/06 08:45:17 Start pending...
    08/11/06 08:45:17 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/11/06 08:45:26 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/11/06 08:45:26 Tracking process launch...
    08/11/06 08:46:11 Received exitCode 3 from emctl istatus
    08/11/06 08:46:11 dbconsole started
    08/11/06 08:48:58 Recieved ServCtrlHdlr command, 5
    08/11/06 08:48:58 Stopping dbconsole
    08/11/06 08:48:58 Launching stop EMD process...
    08/11/06 08:48:58 Waiting for stop EMD process to exit. numRetries=74
    08/11/06 08:49:02 Stop process has exited with exitCode: 0
    08/11/06 08:49:02 Waiting for emwd process to exit. numRetries=74
    08/11/06 08:49:02 Watchdog process exited with exit code 15
    08/11/06 08:49:02 Signal Shutdown event.
    08/11/06 08:49:02 Shutdown thread exited.
    08/11/06 08:49:02 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/11/06 08:53:20 Start pending...
    08/11/06 08:53:20 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/11/06 08:53:29 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/11/06 08:53:29 Tracking process launch...
    08/11/06 08:54:14 Received exitCode 3 from emctl istatus
    08/11/06 08:54:14 dbconsole started
    08/11/06 11:37:30 Recieved ServCtrlHdlr command, 5
    08/11/06 11:37:30 Stopping dbconsole
    08/11/06 11:37:30 Launching stop EMD process...
    08/11/06 11:37:30 Waiting for stop EMD process to exit. numRetries=74
    08/11/06 11:37:34 Stop process has exited with exitCode: 0
    08/11/06 11:37:34 Waiting for emwd process to exit. numRetries=74
    08/11/06 11:37:34 Watchdog process exited with exit code 15
    08/11/06 11:37:34 Signal Shutdown event.
    08/11/06 11:37:34 Shutdown thread exited.
    08/11/06 11:37:34 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/11/06 11:36:48 Start pending...
    08/11/06 11:36:48 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/11/06 11:36:56 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/11/06 11:36:56 Tracking process launch...
    08/11/06 11:37:41 Received exitCode 3 from emctl istatus
    08/11/06 11:37:41 dbconsole started
    08/15/06 09:31:52 Recieved ServCtrlHdlr command, 5
    08/15/06 09:31:52 Stopping dbconsole
    08/15/06 09:31:52 Launching stop EMD process...
    08/15/06 09:31:52 Waiting for stop EMD process to exit. numRetries=74
    08/15/06 09:31:56 Stop process has exited with exitCode: 0
    08/15/06 09:31:56 Waiting for emwd process to exit. numRetries=74
    08/15/06 09:31:56 Watchdog process exited with exit code 15
    08/15/06 09:31:56 Signal Shutdown event.
    08/15/06 09:31:56 Shutdown thread exited.
    08/15/06 09:31:56 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/15/06 09:31:06 Start pending...
    08/15/06 09:31:06 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/15/06 09:31:14 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/15/06 09:31:14 Tracking process launch...
    08/15/06 09:31:49 Did not hear back from emctl istatus.
    08/15/06 09:31:49 Waiting a further 5 secs...
    08/15/06 09:31:51 Received exitCode 3 from emctl istatus
    08/15/06 09:31:51 dbconsole started
    08/15/06 15:15:31 Recieved ServCtrlHdlr command, 5
    08/15/06 15:15:31 Stopping dbconsole
    08/15/06 15:15:31 Launching stop EMD process...
    08/15/06 15:15:31 Waiting for stop EMD process to exit. numRetries=74
    08/15/06 15:15:34 Stop process has exited with exitCode: 0
    08/15/06 15:15:34 Waiting for emwd process to exit. numRetries=74
    08/15/06 15:15:34 Watchdog process exited with exit code 15
    08/15/06 15:15:34 Signal Shutdown event.
    08/15/06 15:15:34 Shutdown thread exited.
    08/15/06 15:15:34 ServiceMain wake up by ShutdownProc, emwd has exited. ServiceMain exits
    -------------- [OracleDBConsoleSDB] ------------
    EMDROOT=E:\oracle\product\10.2.0\db_1
    ORACLE_HOME=E:\oracle\product\10.2.0\db_1
    EMDSTATE=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB
    CONSOLE_CFG=dbconsole
    TRACE_LEVEL=16
    TIMEOUT=15
    08/15/06 15:14:46 Start pending...
    08/15/06 15:14:46 Verifying dbconsole is not started already. Command line "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istatus dbconsole
    08/15/06 15:14:54 dbconsole launch commandline is "E:\oracle\product\10.2.0\db_1\bin\emctl.bat" istart dbconsole
    08/15/06 15:14:54 Tracking process launch...
    08/15/06 15:15:29 Did not hear back from emctl istatus.
    08/15/06 15:15:29 Waiting a further 5 secs...
    08/15/06 15:15:32 Received exitCode 3 from emctl istatus
    08/15/06 15:15:32 dbconsole started
    Command prompt for emctls status
    =========================
    E:\oracle\product\10.2.0\db_1\BIN>emctl status
    Environment variable ORACLE_SID not defined. Please define it.
    emd.properties
    ===========
    # perl executable directory
    perlBin=E:\oracle\product\10.2.0\db_1\perl\5.8.3\bin\MSWin32-x86-multi-thread
    # script directory
    scriptsDir=E:\oracle\product\10.2.0\db_1/sysman/admin/scripts
    # emd Root directory(read-only location). Metrics should not create files
    # under this directory
    emdRoot=E:\oracle\product\10.2.0\db_1
    # agent Root directory(writeable).
    # Use this property to base any temporary file creation.
    agentStateDir=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB
    # Chronos root directory
    chronosRoot=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/emd/chronos
    # OMS Upload URL
    # if there is no receiving OMS or if you wish to disable the UploadManager
    # please set this value to empty or comment out below line
    REPOSITORY_URL=http://SAP_solman:5500/em/upload/
    # Proxy settings used for fetchlets. not applicable for uploader.
    #proxyHost=www-proxy.us.oracle.com
    #proxyPort=80
    #dontProxyFor=.us.oracle.com
    # If it is necessary to go through an http proxy server to get to the
    # repository, uncomment the following two lines
    #REPOSITORY_PROXYHOST=
    #REPOSITORY_PROXYPORT=
    #REPOSITORY_PROXYREALM=%EM_REPOS_PROXYREALM%
    #REPOSITORY_PROXYUSER=%EM_REPOS_PROXYUSER%
    #REPOSITORY_PROXYPWD=%EM_REPOS_PROXYPWD%
    # This string is used by the agent to connect to remote targets
    # ***IMPORTANT*** Do not change the contents of this setting. Only the
    # install should modify this value.
    agentSeed=1329576760
    # This string is used by the agent to determine which algorithm to use for encrypted data
    # The string value will be same as the release version
    agentVersion=10.1.0.4.0
    # How long, in minutes, collector will wait until next load.
    UploadInterval=5
    # If an upload fails, we want to backoff by UploadFailBackoff
    # percentage more each time for each successive upload failure
    # e.g. if we start the retry at 1 minute. If we fail in our next
    # upload attempt, we try again 1minute 12 seconds later etc.
    UploadFailBackoffPct= 20
    # Maximum amount of time, in seconds, upload will wait for response from
    # repository before timing out.
    # 0 means infinite.
    UploadTimeout=1800
    # Timeout for upload a file, HealthMonitor will abort the EMD process if
    # UploadManager does not finish uploading one file within this time
    # Unit is minite, the default value is 1 hour ( 15 Min)
    #UploadMaxTime=15
    # How big the file the collector will upload (in KB)
    # the actual file size could be slightly bigger.
    # This is only a guidance.
    UploadFileSize=2048
    # The maximum number of megabytes(MB) the upload manager will support in the
    # upload directory before temporarily being disabled
    UploadMaxBytesXML=50
    # The maximum number of files the upload manager will support in the
    # upload directory before temporarily being disabled
    UploadMaxNumberXML=5000
    # The maximum amount (%) of disk space that can be used on the EMD filesystem
    # before the following is disabled:
    # - Collection of data (upload manager)
    # - Logging and tracing
    UploadMaxDiskUsedPct=98
    # The amount (%) of disk space that can be used on the EMD filesystem
    # before the following is re-enabled after being disabled previously:
    # - Collection of data (upload manager)
    # - Logging and tracing
    UploadMaxDiskUsedPctFloor=95
    # Time out for the Agent to think that the access to the database could be
    # hung. The Agent would not allow more threads to go and hang with a database
    # if any one access to the database does not return within DbHangTimeout
    # seconds.
    # The more the timeout more the possibility of allowing more threads
    # to be hung in the EMD with a bad database.it is specified in seconds.
    #DbHangTimeout=200
    # The script to run if disk space usage exceeds parameters or if certain other
    # error conditions occur.
    #emdFailureScript=emdfail.command
    # The location of the file that contains the root certificate.
    emdRootCertLoc=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/b64LocalCertificate.txt
    internetCertLoc=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/b64InternetCertificate.txt
    # The download URL for the EMD Oracle Wallet and its local file location.
    # Note: Ensure that this URL references a valid port number at which the
    # console is available on http
    emdWalletSrcUrl=http://SAP_solman:5500/em/wallets/emd
    emdWalletDest=E:/oracle/product/10.2.0/db_1/SAP_solman_SDB/sysman/config/server
    # The email address for out-of-band notifications
    emd_email_address=
    emd_email_gateway=
    # The return email address for out-of-band notifications
    emd_from_email_address=
    # EMD main servlet URL
    EMD_URL=http://SAP_solman:3938/emd/main
    # Whether the EMD should listen on all NICs on the current host (the default)
    # or just the NIC associated with the hostname in EMD_URL
    AgentListenOnAllNICs=TRUE
    # This parameter indicates the thread model to use. uncomment one of the
    # following ThreadPoolModel line to indicate the model, agent need to use.
    # SMALL if number of targets is less than 11.
    # MEDIUM if number of targets is from 11 to 50.
    # LARGE if number of targets is greater than 50.
    # This parameter can be overriden by 'MaxThreads' which indicates the maximum
    # number of threads that CEMD can have running at any point of time. User can
    # mostly use the other parameter ThreadPoolModel to indicate what model for the
    # agent to use.
    # ThreadPoolModel = SMALL
    # ThreadPoolModel = MEDIUM
    # ThreadPoolModel = LARGE
    # This parameter indicates the stack size, threads have to be created with.
    # we can set it to 0 to use the OS default value.
    # In some version of solaris(such as 2.9 ) specify a stack size may cause Java Hotspot warning
    # when JVM is used.
    NormalThreadStackSize=0
    #Signals that users want to ignore.
    #It can be one or combination of SIGTERM, SIGINT
    # The signals can listed with ',' as delimiter.
    #IgnoreSignals=
    # This property is NO LONGER USED for host config collection (instead, hostConfigClasspath is used).
    # If noone else uses it, it can be removed.
    ouiLoc=E:\oracle\product\10.2.0\db_1/oui
    # Classpath for host config collection
    # VERY IMPORTANT NOTE: If you change the host config classpath entries in this section, you HAVE
    # to change the HOST_CONFIG_TEST_CLASSPATH entry in the utl/emdwqaenv file too.
    # NOTE: if the location of emd_java.jar and/or log4j-core.jar is changed
    # make sure that appropriate changes are also made
    # to the CLASSPATH variable in this file if necessary
    # PORTING NOTE: Check OUI-required jar files for OUI APIs to work. They could be different on your platform.
    # Also, our version of xmlparserv2.jar must be compatible with the one OUI expects (both OUI and ECM use XML parser).
    hostConfigClasspath=E:\oracle\product\10.2.0\db_1/oui/jlib/xmlparserv2.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/OraInstaller.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/srvm.jar;E:\oracle\product\10.2.0\db_1/oui/jlib/share.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar
    # JAVA HOME required for JavaExt metric calls
    JAVA_HOME=E:\oracle\product\10.2.0\db_1/jdk/jre
    # CLASSPATH required for JavaExt metric calls
    CLASSPATH=E:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;E:\oracle\product\10.2.0\db_1/opmn/lib/ons.jar;E:\oracle\product\10.2.0\db_1/lib/xmlparserv2.jar;E:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar;E:\oracle\product\10.2.0\db_1/oc4j/j2ee/home/lib/http_client.jar;E:\oracle\product\10.2.0\db_1/lib/dms.jar;E:\oracle\product\10.2.0\db_1/lib/dmsEmd.jar;E:\oracle\product\10.2.0\db_1/jlib/share.jar;E:\oracle\product\10.2.0\db_1/jdbc/lib/ojdbc14dms.jar;E:\oracle\product\10.2.0\db_1/jlib/jssl-1_1.jar;E:\oracle\product\10.2.0\db_1/jlib/javax-ssl-1_1.jar;E:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;E:\oracle\product\10.2.0\db_1/lib/em_test.jar;E:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;E:\oracle\product\10.2.0\db_1/jlib/repository.jar;E:\oracle\product\10.2.0\db_1/opmn/lib/optic.jar
    # this is the java option
    #JAVA_OPTIONS=-Xmx128m
    # These are the optional Java flags for the in-process Java
    # Native Interface (JNI)
    agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true
    # When set to true, the emd.log and emd.trc file will be appended by a pid
    # For example:
    # emd_15789.log
    # emd_15789.trc
    # By default, it is not set for regression test purpose.
    # After installed, please uncomment this line because when EMD is restarted,
    # previous log information will be lost if not set to true.
    #LogFileWithPID=true
    # Default log file maximum size before rolling in Kilobytes
    LogFileMaxSize=4096
    # Maximum number of log file roll files to maintain before deletion
    LogFileMaxRolls=4
    # Default trace file maximum size before rolling in Kilobytes
    TrcFileMaxSize=4096
    # Maximum number of trace file roll files to maintain before deletion
    TrcFileMaxRolls=4
    # To enable the metric browser, uncomment the following line
    # This is a reloadable parameter
    #enableMetricBrowser=true
    # To disable Remote operations (non-reachable agent) uncomment the following
    # line:
    #disableRemoteOperations=true
    # add an additional admin path from which the agent will read additional
    # target metadata. The specified path should have the mandatory 4 directories
    # under it. 1. metadata 2. scripts 3. default_collection 4. discover
    #altAdminPath=<additional admin path>
    # The health monitor executes callbacks in a separate thread. if for some
    # reason the threads spawned from health monitor to execute callbacks are
    # hung, the agent could run out of resource and freeze.
    # so when the current thread count spawned from the Health monitor reaches
    # this limit, the agent is bounced. the default is set to 5.
    #MaxHealthMonitorThreads=5
    # dynamicPropsComputeTimeout default to 30s
    dynamicPropsComputeTimeout=60
    # emagent perl tracing levels
    # supported levels: DEBUG, INFO, WARN, ERROR
    # default level is ERROR
    EMAGENT_PERL_TRACE_LEVEL=ERROR
    # other optional parameters for perl tracing
    # EMAGENT_PERL_TRACE_DIR default to $ORACLE_HOME/sysman/log
    #EMAGENT_PERL_TRACE_DIR=
    # EMAGENT_PERL_TRACE_FILESIZE default to 5M
    #EMAGENT_PERL_TRACE_FILESIZE=5
    # this section define the logging level for each component,
    # it is "reloadable", you can change the level at runtime to reset
    # the logging level, but if you remove the line, it will not be
    # changed.
    tracelevel.main=WARN
    tracelevel.emSDK.xml=WARN
    tracelevel.emSDK.utl=WARN
    tracelevel.ResMonitor=WARN
    tracelevel.Dispatcher=WARN
    tracelevel.ThreadPool=WARN
    tracelevel.pingManager=WARN
    tracelevel.collector=WARN
    tracelevel.http=WARN
    tracelevel.ssl=WARN
    tracelevel.ssl.io=WARN
    tracelevel.blackouts=WARN
    tracelevel.upload=WARN
    tracelevel.command=WARN
    tracelevel.reload=WARN
    tracelevel.scheduler=WARN
    tracelevel.Authentication=WARN
    tracelevel.metadata=WARN
    tracelevel.targets=WARN
    tracelevel.TargetManager=WARN
    tracelevel.engine=WARN
    tracelevel.javaproc=WARN
    tracelevel.vpxoci=WARN
    tracelevel.javavm=WARN
    tracelevel.fetchlets=WARN
    tracelevel.fetchlets.os=WARN
    tracelevel.fetchlets.osline=WARN
    tracelevel.fetchlets.oslinetok=WARN
    tracelevel.fetchlets.UDM=WARN
    tracelevel.fetchlets.sql=WARN
    tracelevel.fetchlets.url=WARN
    tracelevel.fetchlets.urllines=WARN
    tracelevel.fetchlets.urllinetoken=WARN
    tracelevel.fetchlets.URLTiming=WARN
    tracelevel.fetchlets.propEcho=WARN
    tracelevel.fetchlets.readFromFile=WARN
    tracelevel.fetchlets.readMultFromFile=WARN
    tracelevel.fetchlets.throwable=WARN
    tracelevel.fetchlets.resourceGrab=WARN
    tracelevel.fetchlets.emSDK=WARN
    # The following three properties are for HTTP timeout
    # Timeout value for reading Http primary header, default is 30 seconds.
    httpTimeoutPrimaryHeader=30
    # Timeout value for reading http secondary headers, default is 30 seconds
    httpTimeoutSecondaryHeaders=30
    # Timeout value for reading http body, default is 60 seconds.
    httpTimeoutBody=60
    omsRecvDir=E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\sysman\recv
    agentTZRegion=+08:00
    And i would like to know how to set up the environment variable for Oracle_HOME and ORACLE_SID.
    Please kindly assist me on this.

    Looking at the error message "The Network Adapter could not establish the connection" , It appears hostname and port may be incorrect. Review the targets.xml under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\emd and
    emoms.properties under E:\oracle\product\10.2.0\db_1\SAP_solman_SDB\config folder to make sure host ( sap_solman) and port (1527) are correct.
    As far as setting the environment variables goes, you can go to control panel -> system -> advanced -> environment variables and set the ORACLE_HOME and ORACLE_SID
    -Ramesh

  • Can multiple threads write to the database?

    I am a little confused from the statement in the documentation: "Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time."
    1. Can multiple threads write to the "Simple Data Store"?
    2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    #include "stdafx.h"
    #include <stdio.h>
    #include <windows.h>
    #include <db.h>
    static DB *db = NULL;
    static DB_ENV *dbEnv = NULL;
    DWORD WINAPI th_write(LPVOID lpParam)
    DBT key, data;
    char key_buff[32], data_buff[32];
    DWORD i;
    printf("thread(%s) - start\n", lpParam);
    for (i = 0; i < 200; ++i)
    memset(&key, 0, sizeof(key));
    memset(&data, 0, sizeof(data));
    sprintf(key_buff, "K:%s", lpParam);
    sprintf(data_buff, "D:%s:%8d", lpParam, i);
    key.data = key_buff;
    key.size = strlen(key_buff);
    data.data = data_buff;
    data.size = strlen(data_buff);
    db->put(db, NULL, &key, &data, 0);
    Sleep(5);
    printf("thread(%s) - End\n", lpParam);
    return 0;
    int main()
    db_env_create(&dbEnv, 0);
    dbEnv->open(dbEnv, NULL, DB_CREATE | DB_INIT_MPOOL | DB_THREAD, 0);
    db_create(&db, dbEnv, 0);
    db->open(db, NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0);
    CreateThread(NULL, 0, th_write, "A", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "C", 0, 0);
    th_write("C");
    Sleep(2000);
    }

    Here some clarification about BDB Lock and Multi threads behavior
    Question 1. Can multiple threads write to the "Simple Data Store"?
    Answer 1.
    Please Refer to http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    A Data Store (DS) set up
    (so not using an environment or using one, but without any of the DB_INIT_LOCK, DB_INIT_TXN, DB_INIT_LOG environment regions related flags specified
    each corresponding to the appropriate subsystem, locking, transaction, logging)
    will not guard against data corruption due to accessing the same database page and overwriting the same records, corrupting the internal structure of the database etc.
    (note that in the case of the Btree, Hash and Recno access methods we lock at the database page level, only for the Queue access method we lock at record level)
    So,
    if You want to have multiple threads in the application writing concurrently or in parallel to the same database You need to use locking (and properly handle any potential deadlocks),
    otherwise You risk corrupting the data itself or the database (its internal structure).
    Of course , If You serialize at the application level the access to the database, so that no more one threads writes to the database at a time, there will be no need for locking.
    But obviously this is likely not the behavior You want.
    Hence, You need to use either a CDS (Concurrent Data Store) or TDS (Transactional Data Store) set up.
    See the table comparing the various set ups, here: http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    Berkeley DB Data Store
    The Berkeley DB Data Store product is an embeddable, high-performance data store. This product supports multiple concurrent threads of control, including multiple processes and multiple threads of control within a process. However, Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time. The Berkeley DB Data Store is intended for use in read-only applications or applications which can guarantee no more than one thread of control updates the database at a time.
    Berkeley DB Concurrent Data Store
    The Berkeley DB Concurrent Data Store product adds multiple-reader, single writer capabilities to the Berkeley DB Data Store product. This product provides built-in concurrency and locking feature. Berkeley DB Concurrent Data Store is intended for applications that need support for concurrent updates to a database that is largely used for reading.
    Berkeley DB Transactional Data Store
    The Berkeley DB Transactional Data Store product adds support for transactions and database recovery. Berkeley DB Transactional Data Store is intended for applications that require industrial-strength database services, including excellent performance under high-concurrency workloads of read and write operations, the ability to commit or roll back multiple changes to the database at a single instant, and the guarantee that in the event of a catastrophic system or hardware failure, all committed database changes are preserved.
    So, clearly DS is not a solution for this case, where multiple threads need to write simultaneously to the database.
    CDS (Concurrent Data Store) provides locking features, but only for multiple-reader/single-writer scenarios. You use CDS when you specify the DB_INIT_CDB flag when opening the BDB environment: http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envopen.html#envopen_DB_INIT_CDB
    TDS (Transactional Data Store) provides locking features, adds complete ACID support for transactions and offers recoverability guarantees. You use TDS when you specify the DB_INIT_TXN and DB_INIT_LOG flags when opening the environment. To have locking support, you would need to also specify the DB_INIT_LOCK flag.
    Now, since the requirement is to have multiple writers (multi-threaded writes to the database),
    then TDS would be the way to go (CDS is useful only in single-writer scenarios, when there are no needs for recoverability).
    To Summarize
    The best way to have an understanding of what set up is needed, it is to answer the following questions:
    - What is the data access scenario? Is it multiple writer threads? Will the writers access the database simultaneously?
    - Are recoverability/data durability, atomicity of operations and data isolation important for the application? http://docs.oracle.com/cd/E17076_02/html/programmer_reference/transapp_why.html
    If the answers are yes, then TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    Question 2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    Answer 2.
    Definitely yes, You can see data loss and/or data corruption.
    You can check the behavior of your testcase in the following way
    1. Run your testcase
    2.After the program exits
    run db_verify to verify the database (db_verify -o test.db).
    You will likely see db_verify complaining, unless the thread scheduler on Windows weirdly starts each thread one after the other,
    IOW no two or ore threads write to the database at the same time -- kind of serializing the writes
    Question 3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    Answer 3.
    In Your case the TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    doing this You have proper deadlock handling in place and proper transaction usage
    so
    You are protected against potential data corruption/data loss.
    see http://docs.oracle.com/cd/E17076_02/html/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf
    Multi-threaded and Multi-process Applications
    DB is designed to support multi-threaded and multi-process applications, but their usage
    means you must pay careful attention to issues of concurrency. Transactions help your
    application's concurrency by providing various levels of isolation for your threads of control. In
    addition, DB provides mechanisms that allow you to detect and respond to deadlocks.
    Isolation means that database modifications made by one transaction will not normally be
    seen by readers from another transaction until the first commits its changes. Different threads
    use different transaction handles, so this mechanism is normally used to provide isolation
    between database operations performed by different threads.
    Note that DB supports different isolation levels. For example, you can configure your
    application to see uncommitted reads, which means that one transaction can see data that
    has been modified but not yet committed by another transaction. Doing this might mean
    your transaction reads data "dirtied" by another transaction, but which subsequently might
    change before that other transaction commits its changes. On the other hand, lowering your
    isolation requirements means that your application can experience improved throughput due
    to reduced lock contention.
    For more information on concurrency, on managing isolation levels, and on deadlock
    detection, see Concurrency (page 32).

  • Read only access for a Database!

    Hi All,
    I need to create a user for my database who can have readonly access to the database and can work as *"Read Only Apps".*
    Senario:-* I want to give access to development team through TOAD/ SQL* but that user can not delete/update any thing from apps schema.
    Thanks,
    Anchorage

    Anchorage,
    Please refer to the following link:
    Read Only Schema in Oracle APPS 11i
    http://oracle.anilpassi.com/read-only-schema-in-oracle-apps-11i.html
    You may also search this forum as the same topic was discussed here many times before.

  • Running HTML DB apps on one machine with the database on another

    I first want to apologize for this question being asked AGAIN.
    I have spent the better part of the day reading through a lot posts regarding this issue (and there are a lot). My boss sent me this requirement on a new project that Oracle Forms and Reports run on one server and connect back to the database on another server for security. HTML DB needs to do the same thing.
    The question:
    I have found out that the DAD file needs to be modified to allow this type of set up to work and the HTTP server needs to be running on that server. He is asking what in the DAD file needs to be changed to allow this to work. Would someone provide me with an example of what would need to be changed?
    Also, I'm confused on the implementation of this. Currently all the applications I've created are for "in-house" users. This project is the first (that I've done) that is going to be open to users outside the company. I'm confused on the link that will be supplied to the users. After I import my application into the production database, I run it to get the link and send that to our users. If the application is going to be run from a different server from the database, how is/will the link to run the application be built? I hope I'm describing this well.
    Thanks,
    Joe

    Joe,
    You wouldn't have the database server "open to the outside world". All you'd need to have open would be the port for HTTP traffic.
    There are two scenarios -
    1) Having them both (DB & Apache) on the same machine
    You would still only have the HTTP port open. The "fear" is that if the Apache server is compromised then they have access to the database machine.
    2) Having them on separate machines.
    In this case if the Apache server is compromised then, since by definition, you have a route from the Apache server to the DB server then they can still reach the DB machine from the Apache server machine.
    The thing to do here is to ensure your Apache server is patched and secure, regardless of whether it's running on the same machine as the DB or not.
    I'd be interested to see what others think.

  • Javabean for file up-/down-load to/from the database

    Dear all,
    Has anyone any experience in client-side customizing/extending
    through the use of standard JavaBeans or
    Pluggable Java Components (PJCs) within the Oracle (Web-)Forms
    Developer 6i environment? We want to realize the
    following:
    By using a Java Bean within a (Web-)Forms 6i client that is
    capable of file uploads to and file downloads from a database
    (end tier).
    Important requirement is to uploads/downloads files (BLOB, CLOB)
    directly to/from the database, NOT TO/FROM THE FILESYSTEM.
    We have found a sample JavaBean on
    http://otn.oracle.com/sample_code/products/forms/content.html.
    Unfortunately, this code is based on file transfering to/from
    the filesystem.
    Is there someone who did customizations enabling file
    uploads/downloads into/from the database? Are there any
    other suggestions?
    Please contact:
    Deep Nanda
    Developer
    Wolters Kluwer Academic Publishers
    The Netherlands
    email: [email protected]
    Thanks in advance,
    Deep

    I've not tried this out but in theory since a Java Bean is just
    a piece of Java code you could do this using JDBC. However,
    while you may have a valid reason for this, it really defeats
    the purpose of having a middle tier. The idea behind the web
    deployment is that the bulk of the application is on a powerful
    server which makes the client as light weight as possible. If
    you add more functionality to the client (which is not UI
    specific) then you will increase the download to the client, you
    will impact the system requirements for the client and you will
    probably make the application less scalable (think about if yu
    have 1000 clients with database connections for the middle tier
    and now all 1000 want to connect from the client as well - yuo
    double the access of the database)
    SO the short answer is Yes yuo can in theory - in practice I
    would be very careful in deciding to move this way.
    Regards
    Grant Ronald
    Forms Product Management

  • Access to EM Database Control

    I can enter in EM Database Control with the following directions:
    http://192.168.0.5:1158/em http://localhost:1158/em http://127.0.0.1:1158/em
    But not with the http://nshcare_server:1158/em direction where to nshcare_server it is the name of host (machine_name).
    When introducing the user and the password, return to appear the screen again of login without showing no error. If, for example, an incorrect password is introduced, appears a message of error.
    Why does not work putting the name of host?
    Thanks.

    Hi,
    The output of the emctl status dbconsole:
    Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    http://NSHCARE_SERVER:1158/em/console/aboutApplication
    Oracle Enterprise Manager 10g is running.
    Logs are generated in directory C:\oracle\product\10.2.0\db_1/NSHCARE_SERVER_NS/sysman/log
    The content of the targets.xml:
    <Targets AGENT_SEED="126608752">
         <Target TYPE="oracle_emd" NAME="NSHCARE_SERVER:3938"/>
         <Target TYPE="host" NAME="NSHCARE_SERVER"/>
         <Target TYPE="oracle_database" NAME="NS">
              <Property NAME="MachineName" VALUE="NSHCARE_SERVER"/>
              <Property NAME="Port" VALUE="1521"/>
              <Property NAME="SID" VALUE="NS"/>
              <Property NAME="OracleHome" VALUE="C:\oracle\product\10.2.0\db_1"/>
              <Property NAME="UserName" VALUE="0fcf1c23c3b50242" ENCRYPTED="TRUE"/>
              <Property NAME="password" VALUE="0641b14c11a36641e79dfa23e63ecfce" ENCRYPTED="TRUE"/>
         </Target>
         <Target TYPE="oracle_listener" NAME="LISTENER_NSHCARE_SERVER">
              <Property NAME="Machine" VALUE="NSHCARE_SERVER"/>
              <Property NAME="LsnrName" VALUE="LISTENER"/>
              <Property NAME="Port" VALUE="1521"/>
              <Property NAME="OracleHome" VALUE="C:\oracle\product\10.2.0\db_1"/>
              <Property NAME="ListenerOraDir" VALUE="C:\oracle\product\10.2.0\db_1\network\admin"/>
         </Target>
    </Targets>
    The content of the emoms.properties:
    #Tue Dec 12 10:21:13 CET 2006
    oracle.sysman.emSDK.svlt.ConsoleServerName=NSHCARE_SERVER_Management_Service
    oracle.sysman.eml.mntr.emdRepPwd=2ff38e29ffcd1004f59701afe0985257
    emdrep.ping.pingCommand=ping <hostname>
    oracle.sysman.eml.mntr.emdRepPort=1521
    oracle.sysman.eml.mntr.emdRepDBName=NS
    oracle.sysman.eml.mntr.emdRepPwdSeed=5520390720547338740
    oracle.sysman.emSDK.svlt.ConsoleMode=standalone
    oracle.sysman.emRep.dbConn.statementCacheSize=30
    oracle.sysman.db.isqlplusUrl=http\://NSHCARE_SERVER\:5560/isqlplus/dynamic
    oracle.sysman.emSDK.svlt.ConsoleServerPort=1158
    oracle.sysman.eml.mntr.emdRepRAC=FALSE
    oracle.sysman.emSDK.emd.rt.useMonitoringCred=true
    oracle.sysman.eml.mntr.emdRepPwdEncrypted=TRUE
    oracle.sysman.db.isqlplusWebDBAUrl=http\://NSHCARE_SERVER\:5560/isqlplus/dba/dynamic
    oracle.sysman.emSDK.svlt.ConsoleServerHost=NSHCARE_SERVER
    oracle.sysman.eml.mntr.emdRepDBID=2760945814
    oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort=1158
    oracle.sysman.eml.mntr.emdRepServer=NSHCARE_SERVER
    oracle.sysman.eml.mntr.emdRepSID=NS
    oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=NSHCARE_SERVER)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=NS)))
    oracle.sysman.emSDK.sec.ReuseLogonPassword=true
    oracle.sysman.eml.mntr.emdRepUser=SYSMAN
    oracle.sysman.db.adm.conn.statementCacheSize=2
    oracle.sysman.db.perf.conn.statementCacheSize=30
    And the content (very big) of the emd.properties:
    # perl executable directory
    perlBin=C:\oracle\product\10.2.0\db_1\perl\5.8.3\bin\MSWin32-X64-multi-thread
    # script directory
    scriptsDir=C:\oracle\product\10.2.0\db_1/sysman/admin/scripts
    # emd Root directory(read-only location). Metrics should not create files
    # under this directory
    emdRoot=C:\oracle\product\10.2.0\db_1
    # agent Root directory(writeable).
    # Use this property to base any temporary file creation.
    agentStateDir=C:/oracle/product/10.2.0/db_1/NSHCARE_SERVER_NS
    # Chronos root directory
    chronosRoot=C:/oracle/product/10.2.0/db_1/NSHCARE_SERVER_NS/sysman/emd/chronos
    # OMS Upload URL
    # if there is no receiving OMS or if you wish to disable the UploadManager
    # please set this value to empty or comment out below line
    REPOSITORY_URL=http://NSHCARE_SERVER:1158/em/upload/
    # Proxy settings used for fetchlets. not applicable for uploader.
    #proxyHost=www-proxy.us.oracle.com
    #proxyPort=80
    #dontProxyFor=.us.oracle.com
    # If it is necessary to go through an http proxy server to get to the
    # repository, uncomment the following two lines
    #REPOSITORY_PROXYHOST=
    #REPOSITORY_PROXYPORT=
    #REPOSITORY_PROXYREALM=%EM_REPOS_PROXYREALM%
    #REPOSITORY_PROXYUSER=%EM_REPOS_PROXYUSER%
    #REPOSITORY_PROXYPWD=%EM_REPOS_PROXYPWD%
    # This string is used by the agent to connect to remote targets
    # ***IMPORTANT*** Do not change the contents of this setting. Only the
    # install should modify this value.
    agentSeed=126608752
    # This string is used by the agent to determine which algorithm to use for encrypted data
    # The string value will be same as the release version
    agentVersion=10.1.0.4.0
    # How long, in minutes, collector will wait until next load.
    UploadInterval=5
    # If an upload fails, we want to backoff by UploadFailBackoff
    # percentage more each time for each successive upload failure
    # e.g. if we start the retry at 1 minute. If we fail in our next
    # upload attempt, we try again 1minute 12 seconds later etc.
    UploadFailBackoffPct= 20
    # Maximum amount of time, in seconds, upload will wait for response from
    # repository before timing out.
    # 0 means infinite.
    UploadTimeout=1800
    # Timeout for upload a file, HealthMonitor will abort the EMD process if
    # UploadManager does not finish uploading one file within this time
    # Unit is minite, the default value is 1 hour ( 15 Min)
    #UploadMaxTime=15
    # How big the file the collector will upload (in KB)
    # the actual file size could be slightly bigger.
    # This is only a guidance.
    UploadFileSize=2048
    # The maximum number of megabytes(MB) the upload manager will support in the
    # upload directory before temporarily being disabled
    UploadMaxBytesXML=50
    # The maximum number of files the upload manager will support in the
    # upload directory before temporarily being disabled
    UploadMaxNumberXML=5000
    # The maximum amount (%) of disk space that can be used on the EMD filesystem
    # before the following is disabled:
    # - Collection of data (upload manager)
    # - Logging and tracing
    UploadMaxDiskUsedPct=98
    # The amount (%) of disk space that can be used on the EMD filesystem
    # before the following is re-enabled after being disabled previously:
    # - Collection of data (upload manager)
    # - Logging and tracing
    UploadMaxDiskUsedPctFloor=95
    # Time out for the Agent to think that the access to the database could be
    # hung. The Agent would not allow more threads to go and hang with a database
    # if any one access to the database does not return within DbHangTimeout
    # seconds.
    # The more the timeout more the possibility of allowing more threads
    # to be hung in the EMD with a bad database.it is specified in seconds.
    #DbHangTimeout=200
    # The script to run if disk space usage exceeds parameters or if certain other
    # error conditions occur.
    #emdFailureScript=emdfail.command
    # The location of the file that contains the root certificate.
    emdRootCertLoc=C:/oracle/product/10.2.0/db_1/NSHCARE_SERVER_NS/sysman/config/b64LocalCertificate.txt
    internetCertLoc=C:/oracle/product/10.2.0/db_1/NSHCARE_SERVER_NS/sysman/config/b64InternetCertificate.txt
    # The download URL for the EMD Oracle Wallet and its local file location.
    # Note: Ensure that this URL references a valid port number at which the
    # console is available on http
    emdWalletSrcUrl=http://NSHCARE_SERVER:1158/em/wallets/emd
    emdWalletDest=C:/oracle/product/10.2.0/db_1/NSHCARE_SERVER_NS/sysman/config/server
    # The email address for out-of-band notifications
    emd_email_address=
    emd_email_gateway=
    # The return email address for out-of-band notifications
    emd_from_email_address=
    # EMD main servlet URL
    EMD_URL=http://NSHCARE_SERVER:3938/emd/main
    # Whether the EMD should listen on all NICs on the current host (the default)
    # or just the NIC associated with the hostname in EMD_URL
    AgentListenOnAllNICs=TRUE
    # This parameter indicates the thread model to use. uncomment one of the
    # following ThreadPoolModel line to indicate the model, agent need to use.
    # SMALL if number of targets is less than 11.
    # MEDIUM if number of targets is from 11 to 50.
    # LARGE if number of targets is greater than 50.
    # This parameter can be overriden by 'MaxThreads' which indicates the maximum
    # number of threads that CEMD can have running at any point of time. User can
    # mostly use the other parameter ThreadPoolModel to indicate what model for the
    # agent to use.
    # ThreadPoolModel = SMALL
    # ThreadPoolModel = MEDIUM
    # ThreadPoolModel = LARGE
    # This parameter indicates the stack size, threads have to be created with.
    # we can set it to 0 to use the OS default value.
    # In some version of solaris(such as 2.9 ) specify a stack size may cause Java Hotspot warning
    # when JVM is used.
    NormalThreadStackSize=0
    #Signals that users want to ignore.
    #It can be one or combination of SIGTERM, SIGINT
    # The signals can listed with ',' as delimiter.
    #IgnoreSignals=
    # This property is NO LONGER USED for host config collection (instead, hostConfigClasspath is used).
    # If noone else uses it, it can be removed.
    ouiLoc=C:\oracle\product\10.2.0\db_1/oui
    # Classpath for host config collection
    # VERY IMPORTANT NOTE: If you change the host config classpath entries in this section, you HAVE
    # to change the HOST_CONFIG_TEST_CLASSPATH entry in the utl/emdwqaenv file too.
    # NOTE: if the location of emd_java.jar and/or log4j-core.jar is changed
    # make sure that appropriate changes are also made
    # to the CLASSPATH variable in this file if necessary
    # PORTING NOTE: Check OUI-required jar files for OUI APIs to work. They could be different on your platform.
    # Also, our version of xmlparserv2.jar must be compatible with the one OUI expects (both OUI and ECM use XML parser).
    hostConfigClasspath=C:\oracle\product\10.2.0\db_1/oui/jlib/xmlparserv2.jar;C:\oracle\product\10.2.0\db_1/oui/jlib/OraInstaller.jar;C:\oracle\product\10.2.0\db_1/oui/jlib/srvm.jar;C:\oracle\product\10.2.0\db_1/oui/jlib/share.jar;C:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;C:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar
    # JAVA HOME required for JavaExt metric calls
    JAVA_HOME=C:\oracle\product\10.2.0\db_1/jdk/jre
    # CLASSPATH required for JavaExt metric calls
    CLASSPATH=C:\oracle\product\10.2.0\db_1/sysman/jlib/emd_java.jar;C:\oracle\product\10.2.0\db_1/opmn/lib/ons.jar;C:\oracle\product\10.2.0\db_1/lib/xmlparserv2.jar;C:\oracle\product\10.2.0\db_1/sysman/jlib/log4j-core.jar;C:\oracle\product\10.2.0\db_1/oc4j/j2ee/home/lib/http_client.jar;C:\oracle\product\10.2.0\db_1/lib/dms.jar;C:\oracle\product\10.2.0\db_1/lib/dmsEmd.jar;C:\oracle\product\10.2.0\db_1/jlib/share.jar;C:\oracle\product\10.2.0\db_1/jdbc/lib/ojdbc14dms.jar;C:\oracle\product\10.2.0\db_1/jlib/jssl-1_1.jar;C:\oracle\product\10.2.0\db_1/jlib/javax-ssl-1_1.jar;C:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;C:\oracle\product\10.2.0\db_1/lib/em_test.jar;C:\oracle\product\10.2.0\db_1/jlib/ojmisc.jar;C:\oracle\product\10.2.0\db_1/jlib/repository.jar;C:\oracle\product\10.2.0\db_1/opmn/lib/optic.jar
    # this is the java option
    #JAVA_OPTIONS=-Xmx128m
    # These are the optional Java flags for the in-process Java
    # Native Interface (JNI)
    agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true
    # When set to true, the emd.log and emd.trc file will be appended by a pid
    # For example:
    # emd_15789.log
    # emd_15789.trc
    # By default, it is not set for regression test purpose.
    # After installed, please uncomment this line because when EMD is restarted,
    # previous log information will be lost if not set to true.
    #LogFileWithPID=true
    # Default log file maximum size before rolling in Kilobytes
    LogFileMaxSize=4096
    # Maximum number of log file roll files to maintain before deletion
    LogFileMaxRolls=4
    # Default trace file maximum size before rolling in Kilobytes
    TrcFileMaxSize=4096
    # Maximum number of trace file roll files to maintain before deletion
    TrcFileMaxRolls=4
    # To enable the metric browser, uncomment the following line
    # This is a reloadable parameter
    #enableMetricBrowser=true
    # To disable Remote operations (non-reachable agent) uncomment the following
    # line:
    #disableRemoteOperations=true
    # add an additional admin path from which the agent will read additional
    # target metadata. The specified path should have the mandatory 4 directories
    # under it. 1. metadata 2. scripts 3. default_collection 4. discover
    #altAdminPath=<additional admin path>
    # The health monitor executes callbacks in a separate thread. if for some
    # reason the threads spawned from health monitor to execute callbacks are
    # hung, the agent could run out of resource and freeze.
    # so when the current thread count spawned from the Health monitor reaches
    # this limit, the agent is bounced. the default is set to 5.
    #MaxHealthMonitorThreads=5
    # dynamicPropsComputeTimeout default to 30s
    dynamicPropsComputeTimeout=60
    # emagent perl tracing levels
    # supported levels: DEBUG, INFO, WARN, ERROR
    # default level is ERROR
    EMAGENT_PERL_TRACE_LEVEL=ERROR
    # other optional parameters for perl tracing
    # EMAGENT_PERL_TRACE_DIR default to $ORACLE_HOME/sysman/log
    #EMAGENT_PERL_TRACE_DIR=
    # EMAGENT_PERL_TRACE_FILESIZE default to 5M
    #EMAGENT_PERL_TRACE_FILESIZE=5
    # this section define the logging level for each component,
    # it is "reloadable", you can change the level at runtime to reset
    # the logging level, but if you remove the line, it will not be
    # changed.
    tracelevel.main=WARN
    tracelevel.emSDK.xml=WARN
    tracelevel.emSDK.utl=WARN
    tracelevel.ResMonitor=WARN
    tracelevel.Dispatcher=WARN
    tracelevel.ThreadPool=WARN
    tracelevel.pingManager=WARN
    tracelevel.collector=WARN
    tracelevel.http=WARN
    tracelevel.ssl=WARN
    tracelevel.ssl.io=WARN
    tracelevel.blackouts=WARN
    tracelevel.upload=WARN
    tracelevel.command=WARN
    tracelevel.reload=WARN
    tracelevel.scheduler=WARN
    tracelevel.Authentication=WARN
    tracelevel.metadata=WARN
    tracelevel.targets=WARN
    tracelevel.TargetManager=WARN
    tracelevel.engine=WARN
    tracelevel.javaproc=WARN
    tracelevel.vpxoci=WARN
    tracelevel.javavm=WARN
    tracelevel.fetchlets=WARN
    tracelevel.fetchlets.os=WARN
    tracelevel.fetchlets.osline=WARN
    tracelevel.fetchlets.oslinetok=WARN
    tracelevel.fetchlets.UDM=WARN
    tracelevel.fetchlets.sql=WARN
    tracelevel.fetchlets.url=WARN
    tracelevel.fetchlets.urllines=WARN
    tracelevel.fetchlets.urllinetoken=WARN
    tracelevel.fetchlets.URLTiming=WARN
    tracelevel.fetchlets.propEcho=WARN
    tracelevel.fetchlets.readFromFile=WARN
    tracelevel.fetchlets.readMultFromFile=WARN
    tracelevel.fetchlets.throwable=WARN
    tracelevel.fetchlets.resourceGrab=WARN
    tracelevel.fetchlets.emSDK=WARN
    # The following three properties are for HTTP timeout
    # Timeout value for reading Http primary header, default is 30 seconds.
    httpTimeoutPrimaryHeader=30
    # Timeout value for reading http secondary headers, default is 30 seconds
    httpTimeoutSecondaryHeaders=30
    # Timeout value for reading http body, default is 60 seconds.
    httpTimeoutBody=60
    omsRecvDir=C:\oracle\product\10.2.0\db_1\NSHCARE_SERVER_NS\sysman\recv
    agentTZRegion=Europe/Paris

  • How to find the database details from server audit specification with successfull login group?

    Hi,
    We have created a server audit for successfull logins.When we read the audit file using
    sys.fn_get_audit_file we find that all the fields related to the databases
    ie database_principal_id,database_principal_name,database_name are either 0 or null.
    Is there a method to find out to which database the login is accessing from the server
    audit specification of successfull login group.Although the logins are reading and writing
    data to the databases why there are no details of the databases?
    Thanking you in advance,
    Binny Mathew

    Hello Binny,
    The logins are used to connect to the instance and the access to the databases is performed via database users. So, once you connect to the instance via your login, the server level audit takes this action, records it, but without caring to which databases
    you want to connect after that. 
    Unfortunately there is no similar action group on the database audit specifications, that can track which user connected to the DB, except if you are using contained databases in SQL 2012.
    Probably you can share why you need such information and if there is something else specific that you wish to achieve, so we can propose a different solution/audit configuration.
    Regards,
    Ivan
    Ivan Donev MCT and MCSE Data Platform

  • Can not get exclusive lock on the shared drive of Azure file storage

    One of my application need exclusive access on the data folder where it writes the data.
    I have setup data folder in Z drive which is shared drive of Azure File system.
    The application is not able to get the exclusive access on the data folder and throws IO exception.
    Is that not possible with shared drive of azure file system

    Hi Subodh,
    You could refer the following link for details on how pessimistic concurrency (Exclusive lock) managed in Azure Storage:
    http://azure.microsoft.com/blog/2014/09/08/managing-concurrency-in-microsoft-azure-storage-2/
    Please be advised that an Exclusive lock on an Azure File Share is not possible using REST Protocol and need to be done using the SMB Protocol.
    You could refer the following link for details on how to manage SMB File locking:
    https://msdn.microsoft.com/en-us/library/azure/dn194265.aspx?f=255&MSPPError=-2147217396
    Hope this helps.
    Regards,
    Malar.

  • Access Oracle Lite database on CE

    Hi Eric,
    Thank you for your help, but I have already tried using SLQplus
    and Oracle Lite Navigator, and it works !
    I have no problem accessing the POLite demo database (on my
    windows CE) from my desktop. But the demo program REPSVR shipped
    with Oracle Lite on CE doesn't work at all...
    I've tried the 3 solutions : Disk File, HTTP, and OMA replication
    but the only problem is that the program cannot access to the
    database !
    I'm sure that :
    _HTTP, OMA and Disk File Replication work because I've tested it
    fom a remote location on my network.
    _the connection to the database server (an Oracle 8.0.5) works.
    _The ODBC.INI is also well configured (by default with the DSN
    POLite and the DSN CE pointing to the database POLite).
    So the only reason possible is the connection to the local
    database.
    I was also unable to use the ODBINFO to test POLite...
    I've carefully studied the doc, but no other procedure to test
    the database is described...
    It's very frustrating because I'm just one step before
    succesfully validate Oracle Lite for Windows CE for my company !
    If you have other ideas (other than going right into the code of
    the REPSRV demo !!!), I woul greatly appreciated...
    Thanks.
    Hi Olivier,
    There are a few things you can try. Connecting using ODBC is probably
    the easiest way. You can either use sqlplus or the Oracle Lite Navigator
    tool that comes with 8i Lite. Use a connect string of:
    ODBC:CE
    If you have more problems, you can try posting them on the Oracle 8i Lite
    discussion group, located at
    http://technet.oracle.com
    Hope this helps,
    Eric
    Olivier Davant wrote:
    I am not able to access my demonstration database (of Oracle
    Lite) on
    Windows CE.
    Can anyone tell me a procedure to check where is the bug ?
    Like : 1) check that all files are present
    2) use an ODBC test...
    Thank you.null

    If you are using OLite, you should use the OLite .NET provider:
    http://download-west.oracle.com/docs/cd/B14156_01/doc/B13788/html/toc.htm
    Look at Chapter 6 and 11, which cover ADO.NET data access.

Maybe you are looking for

  • Problem Installing Adobe Reader 9 on Windows XP

    I have Windows XP Home and have been trying to install Reader 9 I have tried on both I.E.8 and Firefox and keep getting this message: Error 1402. Could not open key. KKEY_LOCAL_MACHINE_SOFTWARE\MicrosoftWindows\ CurrentVersion\Run\OptionalComponents\

  • How to setup my blackberry torch to my mobile internet network will work

    My mobile network has an APN, Proxy #, and a Port #, however I do not know how to find the settings on my torch so the internet will work.  Does anyone know how to help me? thank you

  • Duplicate document in VF01

    Dear All, I'm looking for the way to duplicate document while creating an invoice in VF01 as well as FB70. normally VF01 create a document that I can consult in FB03, I want to create an other one each time I save the invoice in VF01. thanks, regards

  • Purchasing License for Taking more than 2 remote desktop

    Could you please tell me procedure i.e. which license we have to purchase, so that more than 2 users can take remote desktop of (Server 2008 R2, Server 2012 R2) at a time. We are planning to purchase the license but no idea of what needs to be purcha

  • Problem with the table control BDC in FV60 transaction

    Hi All, I got the problem with the table control in FV60 transaction. This is working for 900 line items.After 900 line items it is giving the problem like it is 1000th line item.You can post only 999 line items. I know we can post only 999 line item