Access Oracle from BSP

Hi all,
My requirement is to access some values from the oracle database table residing on a different server and display them in a BSP page.
I think the connection to oracle is possible from an ABAP class.I am not really sure of how do we connect to an external database from ABAP.
If anyone has done something like this before, it would be great if they help me out in this regard.
Thanks in advace.
Vivek

Hi Vivek,
I found this help in my SAP-GUI. Could not find the same information in help.sap.com
Hope it helps.
<b>Secondary Database Connections with Open SQL</b>
You can use the CONNECTION addition to execute Open SQL commands on databases other than the R/3 standard database. This gives you a number of possibilities, for example you can transfer and update data in other databases, irrespective of whether the other system is an R/3 System or not. However, it is a prerequisite that it is a database system supported by SAP, because only in such a system is the software needed for an Open SQL access available in form of a shared library.
<b>Note</b>
This statement is for internal use only.
Incompatible changes or further developments may occur at any time without warning or notice.
<b>Setting Up a Secondary Database Connection</b>
To a access another database you need an entry in the table DBCON that describes the access data of the database. If the secondary database is from a different manufacturer than the R/3 System database, you will need the SAP shared library as well as the client software provided by the manufacturer. How to create the DBCON entry and install the additional software is described in the standard SAP Notes for every for every supported database system.
<b>Standard Database Connection</b>
Every work process has a standard database connection to the R/3 standard database. It is communally used by all internal sessions. You can also explicitly access this database connection using the name DEFAULT. The DEFAULT connection can also be specified dynamically using CONNECTION (name), where the name field must have the value 'DEFAULT'.
<b>Accessing Other Database Tables</b>
If you use a database connection to access database tables that are not in the R/3 standard database, there must also be a database table with the same name and identical type in the ABAP Dictionary of the local R/3 System. Open SQL assumes that the type information of these remote database tables corresponds exactly with that of the local database table. This prerequisite is essential for the correct interpretation of the database contents, for example, and, if necessary, their conversion with regards to the ABAP type of the target fields (see INTO Clause). If this prerequisite is not met, this can lead to wrong data or runtime errors when reading or writing, depending on the database system. Because the ABAP runtime system cannot ensure the consistency of the type descriptions in the local and remote databases, the consistency must be guaranteed by the relevant application program.
<b>Database Connections and Transactions</b>
Every database connection forms its own transaction context. This means that database changes on one connection can be saved (using COMMIT) or discarded (using ROLLBACK) independently of changes on other database connections. You can, for example, commit and store protocol data on a secondary database connection without affecting the running transaction on the standard R/3 database connection.
Secondary database connections are not known outside the limits of an internal session. So, if a program opens a database connection and then calls another program - with SUBMIT for example - that opens a connection to the same database, you have two different connections and therefore two different database transactions.
For the first Open SQL commandthat requests a specific database connection, the system opens a corresponding connection. All subsequent commands (in the same internal session) for the same remote database use the same database connection and all form a database transaction. The transaction is ended by:
A COMMIT CONNECTION or ROLLBACK CONNECTION on this
connection
<b>A COMMIT WORK or ROLLBACK WORK</b>
A database commit or database rollback on this database connection in Native SQL,
An implicit commit by a screen change, specifically the statements CALL SCREEN, CALL DIALOG, CALL TRANSACTION, MESSAGE
A Remote Function Call (RFC), specifically the statements CALL FUNCTION ... DESTINATION, CALL FUNCTION ... STARTING NEW TASK, CALL FUNCTION ... IN BACKGROUND TASK, and WAIT.
In summary, a database transaction is completed at the latest, when the application program reaches a state in which a change of work process could occur.
<b>Note:</b>
Working with parallel database connections, that is parallel transactions, can lead to lock situations that only one work process is involved in: A program changes a database row on the first connection and tries to change the same row on a second connection. This will result in the program waiting for the lock of the first program, without this first transaction ever being able to continue. You can only resolve this situation by ending the work process. This is done automatically for dialog processes, but must be done manually for background jobs. You should therefore not change the same table in one program on multiple database connections.
<b>Interaction with Native SQL Connections.</b>
In addition to the above, you can also explicitly open a connection using a CONNECT with Native SQL. Native SQL also allows you to explicitly close and disconnect a database connection using DISCONNECT. In this case, the database transaction in question is closed and corresponding database changes are discarded. You can use the Native SQL command GET CONNECTION to ascertain the current Native SQL connection. With Native SQL you can also access a connection that was opened with Open SQL. In this case it is sufficient to convert the active Native SQL connection using SET CONNECTION. It is not necessary to open it using CONNECT TO.
<b>Managing Database Connections</b>
The database connections are automatically managed by the runtime system. If a transaction is saved on a database connection (COMMIT) or rolled back (ROLLBACK), it can be reused by the runtime system. You can open a maximum of 10 database connections for each work process. On certain databases, you may not be able to reach this number.
Regards,
Subramanian V.

Similar Messages

  • Help needed to access Oracle from Applet.

    Please help. I have spent days reading info on the web and I simply cannot access to Oracle from an applet to work. Oracle is on a different IP than the Web Server. For my testing I am running the html directly from my local file system.
    Here are the steps I have taken:
    1. Create a key: "%JAVA_HOME%/bin/keytool" -genkey -alias MyAlias -keypass MyKPass -keystore C:\Keys.bin -storepass MySPass
    2. Sign my jar: "%JAVA_HOME%/bin/jarsigner" -keystore C:\Keys.bin -storepass MySPass -keypass MyKPass -signedjar myjar-signed.jar myjar.jar MyAlias
    3. Sign Oracle's Jar: "%JAVA_HOME%/bin/jarsigner" -keystore C:\Keys.bin -storepass MySPass -keypass MyKPass -signedjar ojdbc14-signed.jar ojdbc14.jar MyAlias
    4. Applet Tag (at this time I have the two jars in the same folder as the HTML and JS files):
        <applet id="MyApp"
      codebase=""
      archive="myjar-signed.jar,ojdbc14-signed.jar"
      code="com/company/applets/Test.class"
      mayscript
      width="50" height="50">
        </applet>5. Javascript:
      document.observe("dom:loaded", function() {
      alert("Applet: " + $('MyApp').getVersion());
      $('MyApp').getConnection(url, user, pswd);
      alert("Applet: " + $('MyApp').getVersion() + "Got Connection.");
      $('MyApp').testConnection();
      alert("Applet: " + $('MyApp').getVersion() + "Connection Tested.");
    });Execution:
    1. The applet loads, The browser asks if I want to trust it, I say yes.
    2. The '$('MyApp').getVersion()' works.
    3. The '$('MyApp').getConnection(url, user, pswd);' fails. Java Code:
      public void getConnection(String url, String user, String pswd)
          throws Exception {
        try {
          System.out.println("Driver...");
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
          System.out.println("Connection...");
          _conn = DriverManager.getConnection(url, user, pswd);
          ...The driver registers, but the getConnection fails with a security error.
    After much reading, I used policytool to update the policy file. It added:
    keystore "file:/C:/Keys.bin", "jks";
    grant signedBy "MyAlias" {
      permission java.security.AllPermission;
    };This did not make any difference. Both IE and FF get the same error.
    The JRE being used is 1.6.0_14.
    Any help solving this would be MUCH appreciated.
    Thanks.

    I have simplified the problem, and now it has nothing to do with Oracle. It is a certificate/signing problem.
    Here are the steps I took to set the test up:
    Certificate:
    "%JAVA_HOME%/bin/keytool" -genkey -storepass MyStorePswd -keyalg RSA -alias MyRsa -dname "CN=Company.com, OU=IT, O=Company Inc, L=Atlanta, ST=Georgia, C=US, DC=mailexpress, DC=com" -validity 999
    "%JAVA_HOME%/bin/keytool" -selfcert -storepass MyStorePswd -alias MyRsa -validity 999
    "%JAVA_HOME%/bin/keytool" -exportcert -storepass MyStorePswd -alias MyRsa -rfc -file MyRsa.cer
    "%JAVA_HOME%/bin/keytool" -importcert -keystore "C:\Program Files\Java\jre6\lib\security\cacerts." -storepass changeit -alias MyRsa -file MyRsa.cer
    Jar Signing:
    "%JAVA_HOME%/bin/jarsigner" -storepass MyStorePswd -keypass MyStorePswd -signedjar Text-Project-signed.jar Text-Project.jar MyRsa
    "%JAVA_HOME%/bin/jarsigner" -verify Text-Project-signed.jar
    Result: jar verified.
    HTML:
        <applet id="MyApp"
                codebase="file:/c:/projects/Text-Project/js/Memory"
                archive="Text-Project.jar"           <== unsigned test  OR
                archive="Text-Project-signed.jar"    <== signed   test
                code="com/company/applets/MemTest.class"
                mayscript
                width="50" height="50">
        </applet>
    JavaScript:
    document.observe("dom:loaded", function() {
      alert("Applet: " + $('MyApp').checkSecurity());
    Function in the Applet:
      public String checkSecurity() {
        System.out.println("Security Check...");
        try {
          AccessController.checkPermission(new FilePermission("MemTest.js", "read"));
          AccessController.checkPermission(new FilePermission("MemTest.js", "write"));
          AccessController.checkPermission(new java.net.SocketPermission("192.168.1.121", "resolve"));
        } catch (Exception e) {
          e.printStackTrace();
          return e.getMessage();
        return "Security Checked OK";
      }Results (Internet Explorer):
    1. Unsigned JAR, No policy:
    Result = java.security.AccessControlException: access denied (java.io.FilePermission MemTest.js read)
    (as expected)
    2. Unsigned JAR, Policy = permission java.security.AllPermission:
    Result = Security Checked OK
    (as expected)
    3. Signed JAR, No Policy: Popup states: signature verified; do you want to run the application.
    Result = java.security.AccessControlException: access denied (java.io.FilePermission MemTest.js read)
    (not expected)
    Something is wrong with the certificate or signing process. Any ideas ?
    Thanks.
    Edited by: javadude.101 on Jul 29, 2009 12:29 PM

  • Accessing Oracle from ASP

    I'm going to convert a SQL Server 7.0 database and its stored procedures to Oracle8i. No problem, I'll use the workbench. What I'm much less clear on are the issues of accessing Oracle stored procedures from Active Server Pages. Can you provide some links to any relevant technical papers?

    If you're using ASP's, I assume you'll be coding to the ADO API to do your actual database access. Assuming this is the case, the Oracle OLE DB or ODBC driver can be used to make the actual connections and to call the stored procedures. If you have a functional ASP now going against a SQL Server database, it should require minimal effort to modify that ASP to go against an Oracle database. You'll merely need to tell it to use one of our drivers, rather than the Microsoft drivers.
    Since there are a number of ASP/ADO books available, I'm not sure that Oracle produces a lot of documentation about how to use those interfaces to access our database. One of the major goals of Microsoft's various data access protocols is that you should be able to write a single app that accesses any database.
    Justin Cave
    ODBC Development

  • ACCESSING ORACLE FROM ACCESS

    I CANT ACCESS ORACLE TABLES FROM MY ACCESS PROGRAM,,IT GIVES ME ERROR MESSAGES TNS, ODBC CONNECTION FAILED

    you have to create a data source name for oracle before trying to connect to the Oracle database. For this you have to go to Control Panel and open 32ODBC and create a System DSN if Oracle is on other machine or if it is on the same machine create User DSN.
    After creating this check the connectivity by opening the ODBC Test from
    start | Programs | Oracle for windows | Network
    after testing this you can specify the DSN name in your Access application and work on the Oracle database.
    I think this will help you ......
    Regards,
    Imran Hakeem

  • Accessing Oracle from Linux

    Hi,
    Can anybody help out in this.....!i shall be very thanx ful..
    My problem is, i have an Oracle database running on WinNT 4.0..it's been
    there for a while,now i need to access this database from a linux
    machine,using an application developed for linux platform developed in C.
    My doubt is :
    (i) How do i connect to the oracle database on WinNT from linux using C ?.
    (ii)Are there any C libraries for oracle connectivity on linux ?
    Thanx in advance
    Shine V
    null

    Say that you will use perl's DBI interface and DBD::Oracle, then
    you will still need to install Oracle on your linux box for the
    seek of compiling and installing DBD::Oracle on linux.
    Once you have DBI and DBD::Oracle installed, you may access any
    other oracle installations whethere local or remote.
    I see this as the simplest way, but I may well be wrong.
    regards,
    shaoping
    R     mi Bastide (guest) wrote:
    : Hello,
    : I have a Netware Oracle server already running, so I do not
    : really need to install a full blown Oracle server on my Linux
    : box. All I want to do is access my Oracle DB from Linux (with
    a
    : Perl interface) to do some web stuff.
    : What are the minimum requirements on the Linux box ? what do I
    : need to install ?
    : Thanks to all
    null

  • Some questions about accessing Oracle from another machine with OEM

    I followed this great tutorial on how to get oracle8i installed and working on rh6.2. http://jordan.fortwayne.com/oracle/
    Great job to the writer)))
    Know I need a little more info on where to go after it is up and running...
    I downloaded the client for NT and I would like to access the Linux box using OEM from a Win2000 laptop however I really have no clue what I am doing and how to make this happen can someone please point me to a tutorial simular to the install tutorial I found?
    Thanks
    [email protected]

    You need to install OEM on your Windows box. From there go to your OEM configuration assistant in the start menu. Run it and point it to one of your instances on your DB server. You must provide a user name and password for the DB it will then connect and build a repository for OEM. After that run the OEM console application and connect to OEM using sysman for your login and oem_temp as your password. This should get you going.

  • Do I need additional Driver/Clients when accessing Oracle from CSharp ?

    I am trying to connect from within a CSharp program to Oracle database 10g Express.
    I coded in CSharp:
    using System.Data.OracleClient;
    but this line gives an unresolve error: Type or namespace missing ...?
    As far as I thought VisualStudio 2005 provides a standard client for Oracle database.
    How do I enable it ?
    Or do I need some additional files from Oracle to get it working ?

    You may find useful these links from the Oracle technology corner >
    http://www.oracle.com/technology/sample_code/tech/windows/ole_db/oledb92/index.html
    http://www.oracle.com/technology/sample_code/tech/windows/ole_db/oledb8/index.html
    Regards.

  • Access Oracle from SQL Server using Oracle Provider for OLE DB

    Using
    - SQL Server 2000 SP4
    - Oracle 10g
    - Oracle10g Provider for OLE DB Version 10.1.0.4.0
    - Oracle 10g client
    Able to create linked server in SQL server to Oracle 10g and display list of tables in Oracle. However, when execute query, it gives
    Server: Msg 7320, Level 16, State 2, Line 1
    Could not execute query against OLE DB provider 'OraOLEDB.Oracle'.
    OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' ICommandText::Execute returned 0x80040155].
    Any idea what is the problem ?

    I'm having the same error message...But I'm connecting to a Oracle 8i DB......
    I think this has to do with SP4 for SQL....I will test this tonight....

  • Error while accessing Oracle E-Business Suite 11i from Linux/firefox

    error while accessing Oracle E-Business Suite 11i from Linux/firefox
    OS: SUSE Linux Desktop 11(SLED11)
    Web browser: firefox 3.x
    Java versions:
    # rpm -qa |grep java
    java-1_6_0-sun-plugin-1.6.0.u18-0.1.1
    java-1_6_0-sun-1.6.0.u18-0.1.1
    # java -version
    java version "1.6.0_18"
    Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
    Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)
    when I access the url firefox says
    "Additional plugins are required to display all the media on this page"
    then I clicked on "Install Missing Plugin" button
    then I got the following message
    No Suitable Plugins were found
    Unknown Plugin (application/x-java-applet;jpi-version=1.4.1)
    please help/suggest
    Regards

    Hi user;
    Its not certified to login EBS from linux client
    Please check:
    Linux-cleint (ebs) certification
    pluggins
    Hope it helps
    Regard
    Helios

  • Accessing oracle apps from anywhere on the internet

    Hello,
    I have oracle apps R12.1.1 up and running on linux 6.3. I have disabled the firewall on linux.
    I am able to access apps from windows clients on the same network after updating the host files.
    I would however like to access the url form anywhere on the internet.
    How can I achieve this?
    Please advise.
    Thanks.

    1006947 wrote:
    Hello,
    I have oracle apps R12.1.1 up and running on linux 6.3. I have disabled the firewall on linux.
    I am able to access apps from windows clients on the same network after updating the host files.
    I would however like to access the url form anywhere on the internet.
    How can I achieve this?
    Please advise.
    Thanks.Problem & solution have nothing to do with Oracle,
    but involves only Networking Basics 101.
    Does DB Server have a hostname & IP# that can be resolved & accessed from anywhere on the Internet?
    If so, post those details here.

  • Accessing user_tables and user_tab_columns of oracle from java

    hi, i can not access "user_tables" and "user_tab_columns" from java code while i can access them from TOAD.I connect to the database "HR", which is a sample database of oracle, as "normal".When i write:
    @Entity
    @Table(name="user_tab_columns")
    public class USER_TAB_COLUMNS{
    }it gives an error that user_tab_columns could not be found on the database.What can i do to access these tables from code?

    I think you have posted your question in the wrong forum. Try the [JDBC forum|http://forums.sun.com/forum.jspa?forumID=48].

  • Can we access Oracle 10g R2 database from Oracle 11g Client

    Hi,
    Can any1 tell me can we access Oracle 10g R2 database from Oracle 11g Client ? I m unable to find a Oracle Client 10g R2 for Windows 7 32 bit.
    Below link is for Vista only
    http://www.oracle.com/technetwork/database/10203vista-087538.html

    832812 wrote:
    Hi,
    Can any1 tell me can we access Oracle 10g R2 database from Oracle 11g Client ? I m unable to find a Oracle Client 10g R2 for Windows 7 32 bit.
    Below link is for Vista only
    http://www.oracle.com/technetwork/database/10203vista-087538.html
    Check this note for client/server compatibility
    Client / Server / Interoperability Support Between Different Oracle Versions [ID 207303.1]

  • How to access ,Oracle 7.x,SQL server,MS access data from portal 3.0.7

    hi,
    i am sorry to repost it . but
    we r badly in need of accessing data from Oracle 7.x,SQL Server and access to Portal3.0.7 Applications.
    pl. help us.
    null

    Hi swati,
    1. for this u will also require help of basis team.
    2. these are the steps.
    a) make an entry in DBCON
    b) make connection string
    (on the physical application server,
    so that it can connect to secondary database)
    (this will be done by basis team,
    in which, they will specify the
    IP address of the secondary database server,
    the DATABASE ID, and the port number)
    c) then using open sql / native sql,
    we can use the secondary database connection,
    just like normal.
    d) if we use open sql,
    then there must be Y/Z table on
    sap as well as secondary database,
    and the field names , their type all should be identical.
    regards,
    amit m.

  • How to access oracle 11i from another node

    Hi,
    I have installed Oracle 11.5.5 on Windows NT4.0. I could access it on the same machine through the internet explorer by typing http://computername.domain name:8002/OA_HTML/US/ICXINDEX.htm
    Now i want to access application from another machine. How to do it?. Can i find any help documents on this & where?
    Please help me on this.
    Thanks & Regards,
    Arun
    [email protected]

    Hi,
    As i remembered,you do not have to do anything extra to access the URL from other machines.ya both the machine should have the some sort of connectivity and at the max you can make the entry of URL along with ip address of server into your local machine's host file.
    could you please share the error message you are getting ?
    -Yogi
    [email protected]

  • How to access Oracle 11.5.5 from another node

    Hi,
    I have installed Oracle 11.5.5 on Windows NT4.0. I could access it on the same machine through the internet explorer by typing http://computername.domain name:8002/OA_HTML/US/ICXINDEX.htm
    Now i want to access application from another machine. How to do it?. Can i find any help documents on this & where?
    Please help me on this.
    Thanks & Regards,
    Arun
    [email protected]

    Hi
    i installed 11.5.5 , but when I log in , it prompts me for again to Login,
    after that (ie, 2nd time), it allows to log in.
    when i click on any module option, the system exits totally from the APPS.
    PL. let me know if u have any solution
    also let me know about how to set up client as u r disscussing,
    my server configuration : NT SERVER , SP 6, 256 MB RAM, P4 40 GB
    TKS
    NR

Maybe you are looking for

  • Corrupted data after updating from Palm 4.1 to 6.2.2

    I am about to go from a Treo 680 to a palm pre and decided to download the 6.2.2 version of the palm software.  This is the version I need to use the 3rd party software to sinc my new palm pre and my lap top. my data is corrupted,,any suggestions,,,

  • Guest variable 'guest info.return_code' not configured correctly.

    Hi, I'm converting a SQL Server 2012 from Base DBVM to Base DB Template. After a while working on the conversion I get this error: "Guest variable 'guest info.return_code' not configured correctly." If I double-click the error I get the following mes

  • H.264 1080p encoding

    Hi, I'm trying to export a Video from Adobe Premiere Pro CS5.5. The Footage is a combination of 720p and 1080p mp4 files (PAL). When I export it with H.264 and the option "HDTV 720p 25 - High Quality" there's no problem to watch the result in VLC Pla

  • Drop Shadow On Application Itself

    Hi all, I am aware that you can do drop shadows on container components within an air application but is it possible to put a drop shadow on the air application itself, i.e. on the WindowApplication? If so, how do I go about doing this. I have tried

  • Cluster Storage

    We have three hyper-v host server (windows 2012) in cluster environment. We have SAN which is mounted as cluster-storage on all three server. Hyper-V1 has ownership of the disk. Recently we increase the disk space on SAN volume and it reflect in the