EJB and Poinbase database

can anybody knows how to connect the database (pointbase) with EJB(entity bean) ?????????

Simple, configure a datasource and lookup for it whenever you need to use a connection.
Regards,
$ Carol.

Similar Messages

  • How to work with EJBs and database for a simple login application

    Hi all :)
    I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.
    Can any one tell me me what is the best logic for doing so. :(
    Thanx in advance.

    Himanshu.Shekhar wrote:
    Hi all :)
    I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.No. Let the database do the search. It's far more efficient.
    %

  • Oracle Database Lite deploying EJBs and struts

    I need to deploy my enterprise application on Mobile server. My application uses EJBs and struts, are EJBs and Struts supported by Oracle Database Lite Mobile server? If yes do we need to do anything different for deploying EJBs on Mobile Server?
    Regards
    Roomap

    Already posted a response to this here today
    New Application

  • Database connection with EJB and  Sun Application Server

    I have tried some tutorials from sun in Savings account eg some errors were
    showing like primary key not found etc
    please help me to link EJB application with database application

    Debated: Primary Key requirement
    Does a GOOD database require a PK? Yes.
    Does EVERY database require a PK? Debated.
    Your db table needs a primary key. The PK is how a table identifies unique records.

  • Problem with EJB and JMS - Failed to obtain/create connection

    hello ejb and jms programmers,
    My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
    Given:
    - I purposedly turn off the pointbase database because im testing my error handling.
    - Im using SJSAS 8 as my application server.
    - My message Driven Bean of topic type.
    - Im using CMP for my entity bean
    Here is the scenario of whats happening - step by step:
    1. A separate application publishes a message to JMS queue server
    2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
    3. But my db is turned off or down
    4. My MDB sends a successful processing reply to the JMS queue server
    5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
    6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
    So my questions are:
    1. how do i handle insert database error?
    2. how can i stop my MDB from processing the same message?
    3. any better suggestions?
    Thank you in advance :)
    leigh
    *** more complete stack trace ***
    [#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
    javax.transaction.xa.XAException
         at com.pointbase.xa.xaException.getXAException(Unknown Source)
         at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
         at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
    [#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
    javax.transaction.SystemException
         at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
         at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
    [#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
    [#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
    [#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
    com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
    FailedObjectArray: [[email protected]5ac]
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)

    Hi annie,
    Wherever you are handling database transactions,
    you'd not be able to create a Connection if database
    is closed (I think you mentioned turning off the
    database) then at this condition, you should
    certainly throw a System level exception and stop all
    processing with some meaningful flow to indicate a
    failure (like display message on UI). Even
    network problems are handled by exceptions... so I
    don't see a reason why you didn't wrap it in the
    first place.
    Anyway, try handling specific exceptions rather than
    the general Exception... this will give you a better
    idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
    2. how can i stop my MDB from processing the same
    message?Guaranteed delivery is not supposed to stop
    processing. It will continue to process the message
    after certain intervals till the message is
    delivered. You shouldn't deliver it at all, if you
    are able to detect that the database is off
    The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
    My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
    thank you in advance.
    leigh

  • How to pull data from EJB and present them using Swing ?

    Hi all,
    I've written stateful session bean which connect to Oracle database, and now I must write stand alone client application using Swing.
    The client app must present the data and then let users add,delete and edit data and it must be flexible enough to iterate through the records.
    The swing components can be JTextField,JTable etc.
    How to pull the data from EJB and present them to users with the most efficient network trip ?
    Thanks in advance
    Setya

    Thanks,
    Since the whole app originally was client-server app and I want to make it more scalable, so I decide to separate business logic in the EJB but I also want to keep the performance and the userfriendliness of the original user interface, and I want to continue using Swing as the original user interface does.
    I've read about using Rowset and I need some opinions about this from you guys who already have some experience with it.
    Any suggestions would be greatly appreciated.
    Thanks
    Setya

  • EJB and Servlets

    Hi there,
    A frontend processing of HTTP request that pass thru WebLogic server that make
    API calls thru tuxedo to the application servers that eventually running C, C++
    that retrieve data from a backend database of Oracle.
    Being the services of EJB and Servlets, EJB is more kind of processes inside the
    server but Servlets can handle better in request and respond (talk to the client),
    whats your opinions in this kind of integration? Go for pure EJB or Servlets?
    Or shall mixed matched? and how should the architecture should looks like?
    Thanks
    Neo

    Sorry, wrong question, just ignore it.

  • EJB and Tools

    Hi there,
    3 questions here:
    First, does CMP can call stored procedure from a database? or BMP only? or both? Please show me some codes on whichever.
    Secondly, can a session bean call a stored procedure? Any codes?
    Last, does there any tools or IDE that have source codes control and works with WebLogic servers?
    Thanks a lot
    Neo

    Some further explanation please...
    1. What does these method doing inside my EJBean?
    - ejbPassivate()As the name suggest this method helps in passivation... i.e. persistence of ejb state.
    The container invokes this method on an instance when the container decides to disassociate
    the instance from an entity object identity, and to put the instance back into the pool of avail-able
    instances. The ejbPassivate() method gives the instance the chance to release any
    resources that should not be held while the instance is in the pool. (These resources typically
    had been allocated during the ejbActivate() method.)
    For session beans in advanced cases, a session object�s conversational state may contain open resources, such as open sockets and open database cursors. A container cannot retain such open resources when a session bean instance is passivated. A developer of such a session bean must close and open the resources in the ejbPassivate and ejbActivate notifications.
    - setSessionContext(SessionContext ctx), since my
    my codes in the Remote interface does not call this
    method which also passes a parameter ctx?setSessiontContext is invoked by container and the ctx required by it is supplied by container. Thus u dont require to pass ctx parameter.
    The bean�s container calls the setSessionContext method to associate a session bean instance
    with its context maintained by the container. Typically, a session bean instance retains its session context as part of its conversational state.
    The context supplied by the container helps you to identify the poperties in deployment descriptor...i.e. your next question..
    - Where does this referred in the EJBean ->
    -> cntx.lookup("java:comp/env/jdbc/mydatabase");
    where that i can see the reference to?
    You can refer these statements any where u need to access database. Suppose you need to fire a procedure after you have created a record. You can write these statments in ejbPostCreate method.
    2. Inside my ejb-jar.xml file, which is a deployment
    descriptor, what are these tags meant?
    - <env-entry>, <env-entry-name>, <env-entry-type>,
    e>, <env-entry-value>
    env-entry stands for environment entries. These are like env. variables which u need to access at runtime.
    Each env-entry element describes a single environment entry. The env-entry element consists of
    an optional description of the environment entry, the environment entry name relative to the
    java:comp/env context, the expected Java type of the environment entry value (i.e., the type of the
    object returned from the JNDI lookup method), and an optional environment entry value.
    An environment entry is scoped to the enterprise bean whose declaration contains the env-entry ele-ment.
    This means that the environment entry is inaccessible from other enterprise beans at runtime, and
    that other enterprise beans may define env-entry elements with the same env-entry-name with-out
    causing a name conflict.
    The environment entry values may be one of the following Java types: String, Character, Inte-ger,
    Boolean, Double, Byte, Short, Long, and Float.
    If the Bean Provider provides a value for an environment entry using the env-entry-value ele-ment,
    the value can be changed later by the Application Assembler or Deployer. The value must be a
    string that is valid for the constructor of the specified type that takes a single String parameter, or for
    java.lang.Character, a single character.
    For example:
    <env-entry>
    <description>Return the developer of the bean</description>
    <env-entry-name>author</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>Neo</env-entry-value>
    </env-entry>
    Here description tag is optional.
    <env-entry-name> specifies the property name, which in our case is author.
    <env-entry-type> specifiest the data type of property, i.e String
    <env-entry-value>The value for the property i.e Neo
    You can imagine this as a java statement like
    String author = Neo; //Return the developer of the bean.
    TQ
    NeoHope this explanation was helpful to u
    abhishek

  • Using JNDI to make EJB Find MySQL DataBase

    Hello, I'm new to EJB, and I'm trying to develop a Entity EJB which will retrieve data from a simple MySQL table. Though I'm getting this exception: javax.naming.NoInitialContextException
    scale is the name of my DB.
    try {
        initialContext = new InitialContext();
        Object homeObject = initialContext.lookup( "java:comp/env/jdbc/scale" );
        exemploHome = ( EntityExemploHome )PortableRemoteObject.narrow( homeObject, EntityExemploHome.class );
      }catch(NamingException namingException){
        namingException.printStackTrace( System.err );
      }I dont figure how this simple String should make the EJB find my database, i dont know if I deployed wrong (Used the deploytool). Further the code od the EJB Impl Class:
    import java.sql.*;
    import java.rmi.RemoteException;
    import javax.ejb.*;
    import javax.sql.*;
    import javax.naming.*;
    public class EntityExemploEJB implements EntityBean{
      private EntityContext entityCont;
      private Connection con;
      private Integer condCNPJ;
      private String condNome;
      public Integer getCondCNPJ(){
        return condCNPJ;
      public void setCondNome( String nome ){
        condNome = nome;
      public String getCondNome(){
        return condNome;
      public Integer ejbCreate( Integer primaryKey )throws CreateException{
        condCNPJ = primaryKey;
        // INSERT
        try {
          Statement statement = con.createStatement();
          String insert = "INSERT INTO Condominio (condCNPJ) VALUES ("+condCNPJ.intValue()+")";
          statement.executeUpdate(insert);
          return condCNPJ;
        }catch ( SQLException sqlException ) {
          throw new CreateException( sqlException.getMessage());
      }//FIM ejbCreate
      public void ejbPostCreate( Integer primaryKey ) {}
      public void ejbStore() throws EJBException{// UPDATE
        try {
          Integer primaryKey = (Integer)entityCont.getPrimaryKey();
          Statement statement = con.createStatement();
          // create UPDATE statement
          String update = "UPDATE Condominio SET condNome WHERE condCNPJ = "+primaryKey.intValue();
          statement.executeUpdate(update);
        }catch(SQLException sqlException){
          throw new EJBException( sqlException );
      }//FIM ejbStore
      public void ejbLoad() throws EJBException{
        try {
          Integer primaryKey = (Integer) entityCont.getPrimaryKey();
          Statement statement = con.createStatement();
          String select = "SELECT * FROM Condominio WHERE condCNPJ = "+primaryKey.intValue();
          ResultSet resultSet = statement.executeQuery(select);
          if (resultSet.next()) {
            condCNPJ = new Integer( resultSet.getInt( "condCNPJ" ));
            condNome = resultSet.getString("condNome");
          }else
            throw new EJBException( "No such employee." );
        }catch ( SQLException sqlException ) {
          throw new EJBException( sqlException );
    }//FIM ejbLoad
    public Integer ejbFindByPrimaryKey(Integer primaryKey)throws FinderException, EJBException {
      try {
        Statement statement = con.createStatement();
        String select = "SELECT condCNPJ FROM Condominio WHERE condCNPJ = "+primaryKey.intValue();
        ResultSet resultSet = statement.executeQuery(select);
        if(resultSet.next()){
           resultSet.close();
           statement.close();
            return primaryKey;
        }//throw ObjectNotFoundException if SELECT produces no records
        else
          throw new ObjectNotFoundException();
      }catch ( SQLException sqlException ) {
        throw new EJBException( sqlException );
    }//FIM ejbFindByPrimaryKey
    public void setEntityContext( EntityContext context )throws EJBException{
      // set entityContext
      entityCont = context;
      try {
        InitialContext initialContext = new InitialContext();
        // get DataSource reference from JNDI directory
        DataSource dataSource = ( DataSource ) initialContext.lookup( "java:comp/env/jdbc/escala" );
        // get Connection from DataSource
        con = dataSource.getConnection();
      }catch ( NamingException namingException ) {
        throw new EJBException( namingException );
      }catch ( SQLException sqlException ) {
        throw new EJBException( sqlException );
    }//FIM setEntityContext
    public void unsetEntityContext() throws EJBException{
        entityCont = null;
        // close DataSource Connection
        try {
          con.close();
        }catch( SQLException sqlException ) {
          throw new EJBException( sqlException );
        }finally {
          con = null;
    }//FIM unsetEntityContext
    public void ejbPassivate(){
      condCNPJ = null;
    // get primary key value when container activates EJB
    public void ejbActivate(){
      condCNPJ = ( Integer ) entityCont.getPrimaryKey();
    public void ejbRemove() throws RemoveException{}
    }//Fecha o EJB

    Hi,
    Which server r u using? I think u have not included the server jar file in u r classpath. for weblogic server, the look up should be like this.
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL,"t3://localhost:7001");
    InitialContext ctx = new InitialContext(p);
    Object obj = ctx.lookup("HelloBean");
    regards
    jogesh

  • EJB and access controll???

    Hi all,
    I have a question about access control via EJB,
    For example I have a client app�ication and on start I will prompt user for user name and password, and now what to do with this information how to pas it to the ejb server, or??? Or may be some of you have any link to tutorial as an answer? My EJB will access database and I want to use the access control from database.
    Thank you in advance.

    Hi Eshwa,
    thank you for your reply, I found a nice developer guide on the link that you give me, but I steal have a problem with undestanding of practical way to pas user information from client application to ejb server, may be you can give mi a pice of code or an small example, where is geted 2 String (user name and password) and sent to the ejb server to be autentificated, and then to have acces to the resources that is accessable for this user (discribed in the deployment description user - role).
    Anyway thank you again.
    Best regards Alexander Hincu .

  • EJB and ASP

     

    Think of XSL and JSP as the X and Y axis. They approach solving an HTML (or
    XML) rendering problem in two different ways. Each has its benefits. When
    the primary input is a known flavor of XML, then XSL is definitely a better
    way to go.
    Cameron Purdy
    Tangosol
    "Argyn Kuketayev" <[email protected]> wrote in message
    news:[email protected]...
    I think the best approach would be to use XML and XSL. I didn't work on itfor
    production, but I'm going to try.
    I would call EJB's from servlet, then put returns in one or more XMLfiles, then
    take XSL and convert to anything, say HTML on the fly and send it back to
    client's browser.
    In this model web designer won't need to care about Java, JavaBeans andJSP tags,
    he will get my XML definition and make a XSL.
    Jason Jonas wrote:
    The best way we have found is:
    /->Database
    Client->Servlet->EJBs-->Legacy Systems
    ^ | \->Etcetera
    \ |
    \---JSP
    All client requests are handled by servlets. Servlets perform the
    brunt of Java work that would otherwise be in your JSP or a bean. The
    servlets, of course, make calls to EJBs. The EJBs carry out all
    business logic (e.g. talking to databases, legacy systems...). The
    servlets then set attributes in the request and forward the request to
    a JSP. The only responsibility the JSP has is presentation. We have
    found this reduces the required Java in a JSP down to a manageable
    subset that, in some cases, the HTML folks can handle. For instance,
    enumerating through a Vector to populate a list box... It doesn't
    always work this way, but most of the time.
    If client requests first hit a JSP, I would certainly encourage you to
    use JavaBeans in an effort to reduce the amount of Java in a JSP to a
    manageable amount.
    Jason
    On Tue, 08 Aug 2000 18:23:13 -0400, Argyn Kuketayev
    <[email protected]> wrote:
    one more option:
    in your JSP call servlets, and they will call EJBs and return java
    beans
    (simple containers like struct in C/C++) with data.
    in this case JSP will be your presentation layer, servlet - controllerand
    EJBs - model. you may prefer to wrap all entity EJB calls in astateless
    session beans, which will implement your business workflow.
    example:
    displayItems.jsp has a form with one text field "name" and a button
    "search".
    when you click a button, it will post a request to ItemListServlet. the
    servlet takes "name" parameter, and calls a ItemHome.findByName(String
    ItemName) method of Item session EJB. then it processes the returning
    Collection, and puts an array with myItems[] into a session andredirects to
    another page ItemList.jsp. now, ItemJsp takes an array and populates atable
    on the screen. here myItems is a simple java class with public fields,like
    C struct.
    in this option, your servlets are kind of dispatchers between jsp andEJBs.
    >>>
    Arda Mirek wrote:
    What is the recommended/proven architecture for accessing
    EJB through JSP (speed / ease of development / maintainability)?
    Is accessing EJBs through JSP a bad idea and is it better to provide
    another layer between the two like JavaBeans (JSP -> JavaBeans ->
    EJB) ?
    >>>>
    Speed and scalibility is very important (as usual :)
    Thanks.
    Arda Mirek

  • Log on to remote server and start database -error while installing CI in HA

    Hello All,
    We are installing ECC 6.0 with High Availability using HP-UX. We have completed installation in ASCS and Database Instance. Now when were trying to install in Central Instance, we encountered an error at Start Instance which informed us to Log on to remote server and start database. However the database is already running in DB node.  Please find the log below.
    TRACE      2011-06-10 16:31:45.825 [syuxctask.cpp:1382]
               CSyTaskImpl::start(bool)
    A child process has been started. Pid = 25742
    INFO       2011-06-10 16:31:45.835
               CJSlibModule::writeInfo_impl()
    Output of /usr/sap/PE2/SYS/exe/run/startsap all DVEBMGS01 DBMCI001 is written to the logfile start_PE2_DVEBMGS01.log.
    WARNING    2011-06-10 16:31:46.345
               CJSlibModule::writeWarning_impl()
    Execution of the command "/usr/sap/PE2/SYS/exe/run/startsap all DVEBMGS01 DBMCI001" finished with return code 6. Output:
    Database PE2 must be started on remote server
    Log on to remote server and start database
    WARNING[E] 2011-06-10 16:31:46.355
               CJSlibModule::writeError_impl()
    CJS-20022  Could not start instance 'DVEBMGS01' of SAP system PE2.
    TRACE      2011-06-10 16:31:46.355 [iaxxejsbas.hpp:408]
               handleException<ESAPinstJSError>()
    Converting exception into JS Exception EJSException.
    TRACE      2011-06-10 16:31:46.355
    Function setMessageIdOfExceptionMessage: ind-rel.ind-os.ind-db.webas.startInstanceFailed
    WARNING[E] 2011-06-10 16:31:46.355
               CJSlibModule::writeError_impl()
    CJS-20022  Could not start instance 'DVEBMGS01' of SAP system PE2.
    TRACE      2011-06-10 16:31:46.355 [iaxxejsbas.hpp:483]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    TRACE      2011-06-10 16:31:46.405 [syuxctask.cpp:1382]
               CSyTaskImpl::start(bool)
    A child process has been started. Pid = 25793
    ERROR      2011-06-10 16:31:46.525 [sixxcstepexecute.cpp:950]
    FCO-00011  The step start with step key |NW_ABAP_CI|ind|ind|ind|ind|0|0|NW_CI_Instance|ind|ind|ind|ind|10|0|NW_CI_Instance_Start|ind|ind|ind|ind|2|0|start was executed with status ERROR .
    TRACE      2011-06-10 16:31:46.555 [iaxxgenimp.cpp:752]
                CGuiEngineImp::showMessageBox
    <html> <head> </head> <body> <p> An error occurred while processing option SAP ERP 6.0 EHP4 Ready - Support Release 1 > SAP Application Server ABAP > Oracle > High-Availability System > Central Instance . You can now: </p> <ul> <li> Choose <i>Retry</i> to repeat the current step. </li> <li> Choose <i>View Log</i> to get more information about the error. </li> <li> Stop the option and continue with it later. </li> </ul> <p> Log files are written to /tmp/sapinst_instdir/ERPEhP4/AS-ABAP/ORA/HA/CI. </p> </body></html>
    TRACE      2011-06-10 16:31:46.555 [iaxxgenimp.cpp:1255]
               CGuiEngineImp::acceptAnswerForBlockingRequest
    Waiting for an answer from GUI
    Kindly let us know how to rectify the error and prroceed further with the instalaltion.
    Thanks
    Rishi

    Dear Guys,
    we didnt change the date and time but i m very sure it is same trans.log file.
    for your kind information please note SID and Nodes details
    Sid (PE2)
    DB Node : DBMDB001
    CI Node :   DBMCI001
    also i am attaching starting part of the file.
    4 ETW000 R3trans version 6.14 (release 701 - 26.01.09 - 12:46:00).
    4 ETW000 unicode enabled version
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 07.11.2010 - 03:44:06
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: R3trans -d
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [dev trc     ,00000]  Sun Nov  7 03:44:06 2010                             295  0.000295
    4 ETW000  [dev trc     ,00000]  db_con_init called                                    22  0.000317
    4 ETW000  [dev trc     ,00000]  create_con (con_name=R/3)                            116  0.000433
    4 ETW000  [dev trc     ,00000]  Loading DB library '/usr/sap/PC1/SYS/exe/run/dboraslib.so' ...
    4 ETW000                                                                              64  0.000497
    4 ETW000  [dev trc     ,00000]  load shared library (/usr/sap/PC1/SYS/exe/run/dboraslib.so), hdl 0
    4 ETW000                                                                           32161  0.032658
    4 ETW000  [dev trc     ,00000]  Library '/usr/sap/PC1/SYS/exe/run/dboraslib.so' loaded
    4 ETW000                                                                              39  0.032697
    4 ETW000  [dev trc     ,00000]  function DbSlExpFuns loaded from library
    /usr/sap/PC1/SYS/exe/run/dboraslib.so
    4 ETW000                                                                             111  0.032808
    4 ETW000  [dev trc     ,00000]  Version of '/usr/sap/PC1/SYS/exe/run/dboraslib.so' is "700.08",
    patchlevel (0.25)
    4 ETW000                                                                             265  0.033073
    4 ETW000  [dev trc     ,00000]  function dsql_db_init loaded from library
    /usr/sap/PC1/SYS/exe/run/dboraslib.so
    4 ETW000                                                                              41  0.033114
    4 ETW000  [dev trc     ,00000]  function dbdd_exp_funs loaded from library
    /usr/sap/PC1/SYS/exe/run/dboraslib.so
    4 ETW000                                                                              82  0.033196
    4 ETW000  [dev trc     ,00000]  New connection 0 created                              52  0.033248
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES,
    reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              41  0.033289
    4 ETW000  [dev trc     ,00000]  db_con_connect (con_name=R/3)                         84  0.033373
    4 ETW000  [dev trc     ,00000]  find_con_by_name found the following connection for reuse:
    4 ETW000                                                                              31  0.033404
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES,
    reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              37  0.033441
    4 ETW000  [dev trc     ,00000]  Oracle Client Version: '10.2.0.4.0'                  601  0.034042
    4 ETW000  [dev trc     ,00000]  -->oci_initialize (con_hdl=0)                         25  0.034067
    4 ETW000  [dev trc     ,00000]  Client character set UTF16 -> UTF8                 35674  0.069741
    4 ETW000  [dev trc     ,00000]  Client NLS setting (OCINlsGetInfo): 'AMERICAN_AMERICA.UTF8'
    4 ETW000                                                                              57  0.069798
    4 ETW000  [dev trc     ,00000]  Logon as OPS$-user to get SAPSR3's password           55  0.069853
    4 ETW000  [dev trc     ,00000]  Connecting as /@PC1 on connection 0 (nls_hdl 0) ... (dbsl 700
    151208)
    4 ETW000                                                                              34  0.069887
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C     
    EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              52  0.069939
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      0
    0x6000000001052910 0x600000000105a3c0 0x600000000106ab38
    4 ETW000                                                                              58  0.069997
    4 ETW000  [dev trc     ,00000]  Allocating service context handle for con_hdl=0       40  0.070037
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      27  0.070064
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server PC1
    (con_hdl=0,svchp=0x600000000106aa68,srvhp=0x600000000106de78)
    4 ETW000                                                                              63  0.070127
    4 ETW000  [dev trc     ,00000]  Assigning server context 0x600000000106de78 to service context
    0x600000000106aa68
    4 ETW000                                                                           60612  0.130739
    4 ETW000  [dev trc     ,00000]  Allocating user session handle                        97  0.130836
    4 ETW000  [dev trc     ,00000]  Starting user session: OCISessionBegin(con_hdl=0,
    usr='/',svchp=0x600000000106aa68, srvhp=0x600000000106de78, usrhp=0x60000000010fc940)
    4 ETW000                                                                              64  0.130900
    4 ETW000  [dev trc     ,00000]  Assigning user session 0x60000000010fc940 to service context
    0x600000000106aa68
    4 ETW000                                                                            9302  0.140202
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=53, stmth_p=0x6000000001077608)
    4 ETW000                                                                             198  0.140400
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_MODULE(:A0,:A1); END;        
    4 ETW000                                                                              38  0.140438
    4 ETW000  [dev trc     ,00000]  CbApplInfoGet() failed! Ignore, but uninstall callback to avoid more
    erroneous calls
    4 ETW000                                                                             291  0.140729
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=54, stmth_p=0x6000000001078660)
    4 ETW000                                                                              33  0.140762
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO(:A0); END;       
    4 ETW000                                                                              35  0.140797
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001078660)
    4 ETW000                                                                             937  0.141734
    4 ETW000  [dev trc     ,00000]         SELECT SID FROM V$MYSTAT WHERE ROWNUM<2                                                                               
    4 ETW000                                                                              36  0.141770
    4 ETW000  [dev trc     ,00000]  Connected to session 297.                            639  0.142409
    4 ETW000  [dev trc     ,00000]  Now '/@PC1' is connected: con_hdl=0, nls_hdl=0, session_id=297.
    4 ETW000                                                                              38  0.142447
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001078660)
    4 ETW000                                                                              37  0.142484
    4 ETW000  [dev trc     ,00000]         ALTER SESSION SET NLS_SORT = BINARY                                                                               
    4 ETW000                                                                              36  0.142520
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001078660)
    4 ETW000                                                                             327  0.142847
    4 ETW000  [dev trc     ,00000]         SELECT USERID, PASSWD FROM SAPUSER WHERE USERID IN (:A0, :A1)
    4 ETW000                                                                              36  0.142883
    4 ETW000  [dev trc     ,00000]  Got SAPSR3's password from OPS$-user                 728  0.143611
    4 ETW000  [dev trc     ,00000]  Disconnecting from connection 0 ...                   38  0.143649
    4 ETW000  [dev trc     ,00000]  Rolling back transaction ...                          31  0.143680
    4 ETW000  [dev trc     ,00000]  Closing user session
    (con_hdl=0,svchp=0x600000000106aa68,usrhp=0x60000000010fc940)
    4 ETW000                                                                             210  0.143890
    4 ETW000  [dev trc     ,00000]  Now I'm disconnected from ORACLE                     721  0.144611
    4 ETW000  [dev trc     ,00000]  Connecting as SAPSR3/<pwd>@PC1 on connection 0 (nls_hdl 0) ... (dbsl
    700 151208)
    4 ETW000                                                                              40  0.144651
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C     
    EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              37  0.144688
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      0
    0x6000000001052910 0x600000000105a3c0 0x600000000106ab38
    4 ETW000                                                                              37  0.144725
    4 ETW000  [dev trc     ,00000]  Assigning username to user session: con_hdl=0,
    usrhp=0x60000000010fc940
    4 ETW000                                                                              35  0.144760
    4 ETW000  [dev trc     ,00000]  Assigning password to user session: con_hdl=0,
    usrhp=0x60000000010fc940
    4 ETW000                                                                              40  0.144800
    4 ETW000  [dev trc     ,00000]  Starting user session: OCISessionBegin(con_hdl=0, usr=SAPSR3/<pwd>,
    svchp=0x600000000106aa68, srvhp=0x600000000106de78, usrhp=0x60000000010fc940)
    4 ETW000                                                                             337  0.145137
    4 ETW000  [dev trc     ,00000]  Assigning user session 0x60000000010fc940 to service context
    0x600000000106aa68
    4 ETW000                                                                            4085  0.149222
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=54, stmth_p=0x6000000001077608)
    4 ETW000                                                                              63  0.149285
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO(:A0); END;       
    4 ETW000                                                                              37  0.149322
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001077608)
    4 ETW000                                                                             585  0.149907
    4 ETW000  [dev trc     ,00000]         SELECT SID FROM V$MYSTAT WHERE ROWNUM<2                                                                               
    4 ETW000                                                                              36  0.149943
    4 ETW000  [dev trc     ,00000]  Connected to session 297.                            350  0.150293
    4 ETW000  [dev trc     ,00000]  Now 'SAPSR3/<pwd>@PC1' is connected: con_hdl=0, nls_hdl=0,
    session_id=297.
    4 ETW000                                                                              38  0.150331
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001077608)
    4 ETW000                                                                              38  0.150369
    4 ETW000  [dev trc     ,00000]         ALTER SESSION SET NLS_SORT = BINARY                                                                               
    4 ETW000                                                                              34  0.150403
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001077608)
    4 ETW000                                                                             294  0.150697
    4 ETW000  [dev trc     ,00000]         SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER IN
    ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET') ORDER BY PARAM
    4 ETW000                                                                              66  0.150763
    4 ETW000  [dev trc     ,00000]         ETER                                                                               
    4 ETW000                                                                              34  0.150797
    4 ETW000  [dev trc     ,00000]  Database NLS settings: AMERICAN_AMERICA.UTF8         329  0.151126
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001077608)
    4 ETW000                                                                             856  0.151982
    4 ETW000  [dev trc     ,00000]         SELECT UPPER(INSTANCE_NAME),HOST_NAME,VERSION,TO_CHAR
    (STARTUP_TIME,'MON DD, YYYY, HH24:MI:SS') FROM V$INSTANCE           
    4 ETW000                                                                              36  0.152018
    4 ETW000  [dev trc     ,00000]  DB instance PC1 is running on scmdb001 with ORACLE version
    10.2.0.4.0 since NOV 07, 2010, 03:23:10
    4 ETW000                                                                             349  0.152367
    4 ETW000  [dev trc     ,00000]  -->oci_prepare_stmt(con_hdl=0, len=0, stmth_p=0x6000000001077608)
    4 ETW000                                                                              38  0.152405
    4 ETW000  [dev trc     ,00000]         SELECT SUBSTR(NAME,1,3), TO_CHAR(CREATED,'YYYYMMDDHHMMSS')
    FROM V$DATABASE

  • HELP! FOR LOOP TO SCROLL THROUGH TABLE AND CREATE DATABASE LINK

    Hi,
    Here's the scenario, not much of a PL programmer, just basic SQL so really need some help people!
    I have 2 tables. 1 contains list of DB's and the other contains rules to follow.
    I need to create a loop that goes through the table containing the DB's and on each row a DB link is created (Only 1 link allowed!)
    Once created, the schema currently logged in with also has an account on the linked DB in order to run scripts- The scripts are stored centrally hence the requirement for the link to the target DB.
    There are numerous scripts that need to be executed and can all be called from 1 script, once executed the loop exists and the database link needs to be dropped.
    Once dropped, the first loop continues, creating a DB link for the next DB listed in the table (and all the scripts are fired again)
    This continues against all the DB's listed in the table.

    Hi BlueShadow,
    Thanks again for the response, you've hit the nail on the head. SQL scripts on a unix server, a loop goes through a table 1 at a time. Each row gets a link created and then all the scripts stored on the server are executed against the db linked to. So I'm assuming this is a loop within a loop.
    1 loop to go through the table to create the link and then another loop within once connected to execute all the scripts against the connected DB. Once the scripts are run, the loop exits and moves onto the next server and so on until all the servers have the scripts are run.
    It's PL/SQL scripts we're after and not shell scripts as this would free us from the OS constraints.
    We have to drop the links due to security. Any idea on o

  • Remote and local databases

    let say that i access a oracle form through the web and that form access data from two distributed databases, then will there be a remote database and local database for the user or all the databases will be remote databases to the user

    In my opinion.
    using local databases -- access tables without DB_link
    using Remote databases -- access tables through DB_link

  • Can EJB and BC exist at the same time in one project?

    having to use ADF's BC and EJB to access data in both way due to the special requirements, but I am always getting the deployment failure.
    can Ejbs and BC components exist at the same time in one project?

    thanks for your reply.
    I considered to separate the BC and EJB as the separate project. I just use the EJB component to implement the dynamic tree menu, whether a little make a mountain out of a molehill if you as a separate project.

Maybe you are looking for