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

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 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

  • 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.

  • 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.

  • Open an Access database from ASP on the Windows 2008 32-bit server

    We are upgrading to a Windows 2008 server.  The ASP application opens an Access database with this code:
      Set oConn=Server.CreateObject("ADODB.connection")
      oConn.Open  "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\webdata\applications\po\sfisnet\sfisnet.mdb;"
    The open statement causes this error:
           Number: -2147217887
           Description: Multiple-step OLE DB operation generated errors. Check each OLE DB
           status value, if available. No work was done.
           Source: Microsoft JET Database Engine
           SQL State:
           Native Error: 0
    Research includes: 
     - ODBC drivers  
     - verified that the ms jet dll is present: msjet40.dll, msjet35.dll
     - IIS settings reviewed
     - permission and sharing on the directory and "sfisnet.mdb" database
     - verifies thet OLEDB_SERVICES is in the registry

    They'll help you over here.
    Microsoft ASP.Net forums
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • 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....

  • Problem in Accessing Response from ASP using HTTPS

    hi all,
    I am developing an Application in which in the server side i am using the ASP with HTTPS usage.I am getting the fallowing Exception
    javax.microedition.pki.CertificateException: Certificate was issued by an unrecognized entity
    When i am working with Tomcat i faced the same problem but with the help of MEKeyTool i am able to register the keystore.But can anybody please tell me the way i can register the certificate That was generated by the IIS 6.0 with the MEKeytool.
    Please tell me the way to do that.
    Thanks in advance
    lakshman

    hi all,
    I have added the certificate into the keystore and now also i am getting the same Exception.
    The modification i did was Exported the certificate to Base-64 Encoded format and the certificate was stored and the location was specified in the fallowing command
    keytool -import -alias my -file "C:\Documents and Settings\lakshmana\your.cer"
    the certificate was imported into the keystore and and it was displayed the content and asked for the confirmation once we given yes it was added into the keystore.
    Then after the keytool -list it was the number of certificates will be displayed.
    Even then after importing the certificate i am getting the same Exception in the MIDlet.
    can anybody please tell me the way resolve that
    thanks in advance
    lakshman

  • Connecting to remote oracle server from asp

    Hi All
    How can I access remote oracle server from asp?. I'm using the following connection string.
    " Provider=MS Remote;Remote Provider=MSDAORA;Data Source=XYZ;Remote Server=http://DBServersIP;User Id=id;Password=pw"
    Both the web server and DB server has oracle client. I can tnsping, connect using sql * plus from the webserver.
    But when I try to do simple connection & query , I get the following error.
    " Microsoft ADO/RDS(0x80072EFD)
    Internet Client Error: Cannot Connect to Server.
    All the permission settings are given correctly (after referring Microsoft & Oracle websites)
    Can someone throw some links or help.?
    Your replies much appreciated.
    Thank you
    Arum

    why do you have http://DBServersIP as the remote server?
    Your connection string should look like:
    "Driver={Microsoft ODBC for Oracle};Server=MY_SID;Uid=my_user;Pwd=my_pwd;"
    There are other variations, but none of them should include HTTP anywhere.

  • Connecting to Oracle database from ASP = please help!

    i have tried every kind of combination of connection string to connect to a 9i database from ASP but it does not work!
    I am using XP Professional and have 9i Developer and ODP.NET installed but I want to use OLE DB (Oracle or Microsoft) to access the database. I have a feeling the web page is not seeing the driver. here is my code:
    <% Option Explicit %>
    <HTML>
    <HEAD><TITLE>Oracle Data Access</TITLE></HEAD>
    <BODY>
    <%
    Dim objConnection
    Dim objRecordset
    Set objConnection = Server.CreateObject("ADODB.Connection")
    With objConnection
    .ConnectionString = "Provider=MSDAORA;Data Source=obiwan;" & _
    "User ID=user; Password=pass;"
    .Open
    Response.Write "ADO Provider=" & .Provider & "<BR>"
    Set objRecordset = .Execute("SELECT sysdate, user FROM dual")
    End With
    </body>
    </html>

    Try using this connect string:
    Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=ORA92;Persist Security Info=True
    substitute your username/password and Data Source here.
    This works on Windows2000 with Microsoft OLEDB provider
    for Oracle.

  • 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].

Maybe you are looking for

  • Help ! Saving a sales order manually in VA01

    Hi All, I have a requirement to let the user's save the return sales order manually in VA01, by making some additional changes in the order like change in qty and so on..etc.. As of now the return sales order is created with reference to the sales or

  • Corrupt Chart Scale

    G'Day Everyone, Occasionally, when I run an application with a few charts on the front panel, the X scales become corrupt. I write values to the charts, and some of them remain at their set scales (Xmin and Xmax don't change), but others change consi

  • I can't get my brand new iMac to find my Time Capsule

    Hi there, I wonder if anyone can help me because I am pulling my hair out. My old iMac recently died. It had been working merrily, connecting to my old Airport Extreme happily, but then had a major problem and needed to go. So after five years I boug

  • How to add an extra row at the end of the Grid?

    Hi gurus, I am getting result from the select query which has 4 columns. I got the requirement to display the sum of those columns as the last row. How can i add the another row at the end of the iGrid ? Data would look like Sno  Col1   Col2  Col3  C

  • Remote Application with multiple computers multiple rooms

    I am planing a whole-house music system and have played around with the Remote application. Seems to work fine in my setup with a MacBook Pro. Have several AiportExpress that I can see through REMOTE but they are not linked to speakers. Here what I w