Trying to pull SQL from Oracle via VBScript - Help required connecting

Hi,
I really need some help please as I’m new to vbscripting and TNS connections and all this complicated stuff.
I’m trying to make a connection from one of our Oracle servers and extract some basic data via SQL commands but after trying for a couple of days I’m stumped.
Here’s the details and I hope someone can advise me in a simple language on where I’m going wrong.
The server I am trying to connect from is an Essbase server which already has an ODBC connection to the Oracle server setup in the ODBC Datasource Administrator. The driver that I can see in the ODBC Datasource Administrator is ‘Oracle in OraClient10g_home1’ and a ‘SQL Sever’ driver along with some MEARNT OEM drivers.
The tnsnames.ora has the information for the Oracle server and I can tnsping to it successfully.
Browsing round the web I have tried a couple of methods to connect:
"Driver={Microsoft ODBC for Oracle};Dbq=ABCD;Uid=LOGIN;Pwd=PASSWORD;"
I get the error message:
'Provider is not specified and there is no designated default Provider.'
I understand that I don’t have the Microsoft ODBC for Oracle driver installed, not sure if we need it if we have the Oracle in OraClient10g_home1 driver and already have a connection set up. So I tried:
"Driver={ Oracle in OraClient10g_home1 };Dbq=ABCD;Uid=LOGIN;Pwd=PASSWORD;"
Again.. 'Provider is not specified and there is no designated default Provider.'
I also tried another method suggested:
Dim strCon
strCon = "Driver={Oracle in OraClient10g_home1}; " & _
         "CONNECTSTRING=(DESCRIPTION=" & _
         "(ADDRESS=(PROTOCOL=TCP)" & _
         "(HOST=EssbaseServer)(PORT=1592))" & _
         "(CONNECT_DATA=(SERVICE_NAME=ABCD))); uid=LOGIN;pwd=PASSWORD;"
Dim oCon: Set oCon = WScript.CreateObject("ADODB.Connection")
Dim oRs:  Set oRs  = WScript.CreateObject("ADODB.Recordset")
oCon.Open strCon
oCon.Close
Set oRs = Nothing
Set oCon = Nothing
Same error message again:
Provider is not specified and there is no designated default Provider.
This leads me to believe that maybe I need to have the Microsoft ODBC for Oracle drivers installed on the server. Maybe I need to set my script differently and am totally doing it wrong. Any help please? If you think I need the driver could you please explain why and how it works so I can put forward for my arguement to install it on the server.
Many thanks

I am not a vbscript expert, However a couple of times I have used ADODB to connect with Oracle successfully. Something like
'Database connection info
set Conn = CreateObject("ADODB.connection")
Conn.ConnectionTimeout = 30
Conn.CommandTimeout = 30
if dbType = "oracle" then
     conn.open("Provider=MSDAORA.1;User ID=" & dbUser & ";Password=" & dbPass & ";Data Source=" & dbName & ";Persist Security Info=False")
elseif dbType = "sqlserver" then
     conn.open("Driver={SQL Server};Server=" & dbHost & ";Database=" & dbName & ";Uid=" & dbUser & ";Pwd=" & dbPass & ";")
elseif dbType = "mysql" then
     conn.open("DRIVER={MySQL ODBC 3.51 Driver}; SERVER=" & dbHost & ";PORT=3306;DATABASE=" & dbName & "; UID=" & dbUser & "; PASSWORD=" & dbPass & "; OPTION=3")
end ifThe variables are defined as
dbType = "oracle"                 ' Valid values: "oracle", "sqlserver", "mysql"
dbHost = "mrs-db-00021.abc-xyz.com"                 ' Hostname of the database server
dbName = "LDBS_PRD"                 ' Name of the database/SID
dbUser = "myuser"               ' Name of the user
dbPass = "xxxx2212"               ' Password of the above-named user

Similar Messages

  • Pulling data from oracle into sql server 2005

    hi,
    these days i am working on sql server 2005 on windows server 2008 64 bit.
    and oracle 10g on 32 bit unix.
    my problem is that when i am pulling data from oracle into sql server it shows me about *500-700 entries less*.
    why this is happening? is it because 32 bit to 64bit? or is it because of different os?

    Akki,
    are you using snapshot or replication from MSSQL? I am doing the same thing, hope to share your experience.
    I am using import/export from MGT studio and pull some data from Oracle database, I am working on how to update the changes on these tables pulled from Oracle.
    Thanks,
    -hank

  • How to pull data from oracle GL to planning

    Hi all
    Can one suggest me how to pull data from oracle GL in to hyperion planning(we are using hyperion planning 9.3 with limited licence for analytic services). i guess we can use HAL ..any thing else
    any help is appreciable
    regards
    M.V

    Hi
    I appreciate for your response. Yep you are exactly right it is data only, but I do have a problem these people have their licence of limited version of Essbase.
    Let me give you the information of their licence agreement.
    The licence for the hyperion planning- sytem9 programs includes a limited use license for both the hyperion Essbase- system 9 and hyperion Financial reporting - system 9 programs. Such limited use license means that the hyperion Essbase- system 9 and Hyperion financial reporting -system 9 programs may only be used to access data from the Hyperion planning -system 9 program.
    Specifically, the hyperion essbase- system 9 program cannot be used to create Essbase cubes that do not contain data used by the Hyperion planning- system 9 program and the Aggregate storage option component of the Hyperion Essbase - system 9 program may not be used.
    1) what it(licence agreement) really means - can you install Essbase, if not how can you create dimensions dynamically using planning.
    2) Is it possible without Essbase as far as I know its not possible
    3) are we going to face any issues with this licence.
    4) Is it possibe to pull data with planning
    I appreciate if any one resolve this issue
    regards
    M.V

  • I get error message "unknown error" When trying to log on to itunes via pc, help please!

    I get error message "unknown error" When trying to log on to itunes via pc, help please!

    Hello, trolle56.
    Thank you for the question.  You may find these articles helpful in troubleshooting the error received with the iTunes Store. 
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/ts3297
    Cheers,
    Jason H. 

  • I forgot my ipad lock code and when i tried to restore it from yhe itunes it keeps requiring to switch off my ipad finder, i need yo open it whatever is the way

    I forgot my ipad lock code and when i tried to restore it from yhe itunes it keeps requiring to switch off my ipad finder, i need yo open it whatever is the way

    You can turn Find My iPad 'off' by going to http://icloud.com and logging into your account, select the iPad from the device list in the 'Find My iPhone' section on that site, and 'remove from account'

  • How to get connected MS SQL from Oracle

    I need to connect MS SQL Server (MSDE exactly) to Oracle 8.1.7
    and operate it from Oracle side (some clever data imports from
    client's sql server machine to bigger Oracle server). I tried to
    use ODBC from client to oracle and works fine, but I need "the
    other way". Any Ideas?
    Please help,
    yours HG

    http://asktom.oracle.com/pls/ask/f?p=4950:8:442320::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1139834557335,%7Bodbc%7D

  • Trying to Pull data from ECC data loading but all garbag values

    Hi Experts,
    I am trying to pull the data from sap ECC. Standard extractor (2LIS_VA_ITM) & 2LIS_VA_HDR. I have imported 2LIS_11_VAITM in ODP objects.
    I have created the flow.
    I ran the job. It has been completed successfully. It loaded the records. But all the records are not readable format(Garbage values ???).
    This is data service 4.2 SP1. Can you please let me know how can I correct this.
    Please find the attached screen shot after loading for vbeln ??? are coming.
    Regards,
    Reddy.

    Hi Experts,
    I am trying to pull the data from sap ECC. Standard extractor (2LIS_VA_ITM) & 2LIS_VA_HDR. I have imported 2LIS_11_VAITM in ODP objects.
    I have created the flow.
    I ran the job. It has been completed successfully. It loaded the records. But all the records are not readable format(Garbage values ???).
    This is data service 4.2 SP1. Can you please let me know how can I correct this.
    Please find the attached screen shot after loading for vbeln ??? are coming.
    Regards,
    Reddy.

  • Trying to sync photos from iTunes (via iPhoto) to ipad and iPhone. The  Photo tab does not show up and no sync occurs

    Trying to sync photos from iphoto to ipad and iphone.  Photo tab does not show up in itunes under devices. 

    I had a similar problem (https://discussions.apple.com/message/24525903#24525903)
    The solution in my case was to start iPhoto and let it update the library, even thu itunes was set up to sync with Aperture.

  • Sending PGP encrypted e-mails from HCM via SAP PO Secure Connectivity Add-On

    Hi all,
    we are having a requirement to send PGP encrypted e-mails from HCM. As SAP Standard does not support PGP encryption, we are considering the possibility of using the Secure Connectivity Add-on of SAP PO, targeting a Scenario like the below.
    Has anyone dealt with similar scenario? I'm wondering on the Setup on HCM and the Receiver side in PO? Would such scenario work with a Proxy? What I mean is, is it possible to redirect the E-Mail message from HCM via Proxy to SAP PO?
    Every feedback is appreciated.
    Thanks
    Thomas

    Hi Thomas
    SAPConnect is tied to the email protocol, so AFAIK there is no other choice besides mail adapter.
    If you skip the SAPConnect part and use a proxy directly, you can generate an outbound proxy (client proxy) in your HCM system based on a service interface definition from PI's ESR.
    Below are some more information about proxy generation and development. You can find more on SCN by searching "outbound proxy".
    ABAP Proxy outbound program - purchase order send - Community Profiles - SCN Wiki
    ABAP Proxy (Complete Developments on SAP-PI & SAP-ABAP Systems)
    Rgds
    Eng Swee

  • Executing sql server procedure  from oracle via db link with out parameters

    HI
    we have successfully created the link between oracle and sql server via DB LINK also able to access table from the
    sqlserver via dblink
    Can any one tell me how to execute procedure with 1 input and 4 out parameters from pl\sql
    is it possible using
    dbms_hs_passthrough

    You should be able to call it like you would any other procedure:
    dbo.procedure_name@dblink(parameter_list);

  • Help needed with variable - trying to get data from Oracle using linked svr

    Sorry if I posted this in the wrong forum - I just didn't know where to post it.
    I'm trying to write a simple stored procedure to get data from an oracle database via a linked server in SQL Enterprise manager. I have no idea how to pass a variable to oracle.
    Here's how I would get the variable in SQL:
    declare @maxkey INTEGER
    select @maxkey= MAX(keyfield) from [server].Data_Warehouse.dbo.mytable
    select * from [server].Data_Warehouse.dbo.mydetailtable where keyfield=@maxkey
    the select statement I need to do in oracle would use that variable like this:
    select * from OPENQUERY(OracleLinkedServer,'select
    * from ORACLEDB.TABLE where keyfield > @maxkey')
    and I get this message: OLE DB provider "OraOLEDB.Oracle" for linked server "OracleLinkedServer" returned message "ORA-00936: missing expression".
    I realize that I can't pass the @maxkey variable to oracle - so how do I accomplish this?

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Need Help Pulling Data from Oracle Table (Newby)

    Let me start of by saying I'm very new to Java so the code may be messy/poorly coded (I'm trying!). However, I've come a long way already and the code is almost working (it compiles and returns what I expect in one case). What I'm trying to do is prompt the user to enter a type, then a key. I use that type to determine the SQL statement to use then I use the key as part of the SQL statement.
    If I enter 'custnum' as the type, then a string as my key, it finds the record fine.
    If I any of my other valid types (lname, address or phone) and then enter my key, the result set is empty. I've verified that there are matching records for the type/key I'm entering.
    I've tried stepping it through the debugger and looking at various variables along the way both with the working scenario and the not-working scenario, but I can't find anything. I'm sure it's a simple coding mistake, but I don't really know how to track it down.
    Any ideas on what's going wrong would be greatly appreciated. Thanks!
    //Start code
    import java.sql.*;
    import java.util.Scanner;
    public class AccessCustomerTable
    private static final String DEFAULT_DRIVER = "oracle.jdbc.driver.OracleDriver";
    private static final String DEFAULT_URL = "jdbc:oracle:thin:@hostname.com:1521:orap1";
    private static final String DEFAULT_USERNAME = "username";
    private static final String DEFAULT_PASSWORD = "password";
    //Set the SQL statements
    private static final String SQLCUSTOMER_CUSTNUM =
    "select CUSTNUM,CUST_LNAME,CUST_FNAME,CUST_PHONE,EMAIL,STAT_LVL,HH_NUM " +
    "from EME.CUSTOMER " +
    "where CUSTNUM=?";
    private static final String SQLCUSTOMER_CUST_LNAME =
    "select CUSTNUM,CUST_LNAME,CUST_FNAME,CUST_PHONE,EMAIL,STAT_LVL,HH_NUM " +
    "from EME.CUSTOMER " +
    "where CUST_LNAME=?";
    private static final String SQLCUSTOMER_CUST_PHONE =
    "select CUSTNUM,CUST_LNAME,CUST_FNAME,CUST_PHONE,EMAIL,STAT_LVL,HH_NUM " +
    "from EME.CUSTOMER " +
    "where CUST_PHONE=?";
    private static final String SQLCUSTOMER_EMAIL =
    "select CUSTNUM,CUST_LNAME,CUST_FNAME,CUST_PHONE,EMAIL,STAT_LVL,HH_NUM " +
    "from EME.CUSTOMER " +
    "where EMAIL=?";
    private static final String SQLDETAIL =
    "select TRANS_DATE,STORENUM,TERMINAL,TRANSID,OPERATOR,SALES_TOT," +
    "AMOUNT_SPENT,AUTO_CPNS,PTS_EARNED,PTS_REDEEMED,RDMT_CPNS,ADD_CPNS," +
    "USED_CPNS,OFFLINE_ALT_ID,RECON_IND " +
    "from EME.CUSTOMERDETAIL " +
    "where CUSTNUM=?";
    private static final String SQLHOUSEHOLD =
    "select PGM_PTS,PERIOD_PTS,PGM_RDM,PERIOD_RDM,SALES_TOT,AUTO_CPNS," +
    "CARD_UCNT,MESSAGE,DISC_GRP,PT_MULTP,USERFEAT1,USERFEAT2,USERFEAT3,TARG_CPNS " +
    "from EME.HOUSEHOLD " +
    "where HH_NUM=?";
    public static void main(String[] args)
    Connection conn = null;
    PreparedStatement stmt = null;
    ResultSet rset = null;
    //declare all variables
    String custNum = "";
    String custLNm = "";
    String transDt = "";
    String storeNum = "";
    String pgmPtsEarned = "";
    String periodPtsEarned = "";
    try {
    //********** Get Customer Data **********
    householdNum = "";
    Class.forName(DEFAULT_DRIVER);
    conn = DriverManager.getConnection(DEFAULT_URL,DEFAULT_USERNAME,DEFAULT_PASSWORD);
    String lookupType = getUserInput("Lookup Type");
    if (lookupType.toUpperCase().equals("CUSTNUM"))
    stmt=conn.prepareStatement(SQLCUSTOMER_CUSTNUM);
    else if (lookupType.toUpperCase().equals("LNAME"))
    stmt=conn.prepareStatement(SQLCUSTOMER_CUST_LNAME);
    else if (lookupType.toUpperCase().equals("PHONE"))
    stmt=conn.prepareStatement(SQLCUSTOMER_CUST_PHONE);
    else if (lookupType.toUpperCase().equals("ADDRESS"))
    stmt=conn.prepareStatement(SQLCUSTOMER_EMAIL);
    else
    //stop execution with message
    System.out.println("Invalid lookup type entered. Process stopping");
    System.exit(0);
    String lookupKey = getUserInput("Lookup Key");
    System.out.println("Lookup Key is " + lookupKey);
    stmt.setString(1,lookupKey);
    rset = stmt.executeQuery();
    //what if rset returns no records?
    boolean empty=true;
    while (rset.next())
    empty=false;
    custNum = rset.getString(1);
    custLNm = rset.getString(2);
    if (empty)
    System.out.println("No records found for " + lookupKey);
    System.exit(0);
    //********** Get Detail Data **********
    stmt=conn.prepareStatement(SQLDETAIL);
    //stmt.setString(1,customerId);
    stmt.setString(1,custNum);
    rset = stmt.executeQuery();
    empty = true;
    while (rset.next())
    empty = false;
    transDt = rset.getString(1);
    storeNum = rset.getString(2);
    if (empty)
    System.out.println("No detail records found for customer # " + custNum);
    System.exit(0);
    //********** Get Household Data **********
    stmt=conn.prepareStatement(SQLHOUSEHOLD);
    stmt.setString(1,householdNum);
    rset = stmt.executeQuery();
    empty = true;
    while (rset.next())
    empty = false;
    pgmPtsEarned = rset.getString(1);
    periodPtsEarned = rset.getString(2);
    if (empty)
    System.out.println("No household records found for " + householdNum);
    System.exit(0);
    catch(Exception x)
    System.out.println(x.getMessage());
    x.printStackTrace();
    finally
    close(rset);
    close(stmt);
    close(conn);
    private static void close(Connection conn)
    try
    if (conn != null)
    conn.close();
    catch (SQLException e)
    e.printStackTrace();
    private static void close(Statement stmt)
    try
    if (stmt != null)
    stmt.close();
    catch (SQLException e)
    e.printStackTrace();
    private static void close(ResultSet rset)
    try
    if (rset != null)
    rset.close();
    catch (SQLException e)
    e.printStackTrace();
    public static String getUserInput(String getVal)
    Scanner sc = new Scanner(System.in);
    //for now, I'll be expecting "CustNum", "LName", "Phone", "Address"
    System.out.println("Enter " + getVal + ": ");
    String returnStr = sc.nextLine();
    return (String) returnStr;
    }

    You're new to Java, so you can be forgiven. You actually tried to do some good things, like close resources. Good for you.
    Do yourself a favor and start trying to think in terms of objects.
    Let's call that class CustomerTableGateway.
    Let's write separate methods for each kind of SQL statement you have.
    Get the logic out of the main method. It's almost useless there.
    There's a computer science principle called DRY - Don't Repeat Yourself. When you see code being repeated, see if you can find a way to rewrite it so you only do it once.
    I'd recommend that you start with a Customer class. Figure out how to map a row from your CUST table into the Customer object. Have an interface that would look like this:
    public interface CustomerDao
        Customer findById(String id);
        List<Customer> findByLastName(String lastName);
        List<Customer> findByName(String firstName, String lastName);
        List<Customer> findByEmail(String email);
        List<Customer> findByPhone(String phone);
    }Have another interface called RowMapper:
    public interface RowMapper
        Object map(ResultSet rs);
    }An implementation for one of those methods might look like this:
    public Customer findById(String id)
         Customer customer = null;
         PreparedStatement stmt = null;
         ResultSet rs = null;
         try
             stmt = this.connection.prepareStatement(FIND_CUSTOMER_BY_ID);
             stmt.setString(1, id);
             rs = stmt.executeQuery();
             while (rs.next())
                 customer = (Customer)this.customerMapper.map(rs);
        catch (SQLException e)
            e.printStackTrace();
        finally
            DatabaseUtils.close(rs);      // move those nice close methods into a utility class so you can reuse them.
            DatabaseUtils.close(stmt);
        return customer;
    }You did a pretty good job. Just go further.
    %

  • Can't get struct from Oracle via Weblogic DB connection?

    There are two ways to connect oracle, within Weblogic or without Weblogic.
    Without Weblogic way works. Code here:
    import java.sql.Connection;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    dbConn = DriverManager.getConnection("Connection");
    StructDescriptor st = new StructDescriptor("Name of Object in Oracle ",dbConn);
    Within Weblogic way doesn’t work. Code here:
    import javax.naming.InitialContext;
    import javax.sql.DataSource
    import java.sql.Connection;
    Connection conn = null;
    javax.sql.DataSource ds = null;
    ds = (javax.sql.DataSource) _cntx.lookup(poolName);
    conn = ds.getConnection();
    StructDescriptor st = new StructDescriptor("Name of Object in Oracle ",dbConn); // Error java.rmi.MarshalException: error marshalling return; nested exception is: java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection
    Reference:
    http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1090291
    I don’t know what the exact reason is. And my work is hanging by this thread. Could anyone help me pls? Thank you.

    Man, what problem?
    About how to use array,
    CREATE TYPE department_type AS OBJECT (
    DNO NUMBER (10),
    NAME VARCHAR2 (50),
    LOCATION VARCHAR2 (50)
    CREATE TYPE dept_array AS TABLE OF department_type;
    CREATE OR REPLACE PACKAGE objecttype AS
    PROCEDURE insert_object (d dept_array);
    END objecttype;
    CREATE OR REPLACE PACKAGE BODY objecttype
    AS
    PROCEDURE insert_object (d dept_array)
    AS
    BEGIN
    FOR i IN d.FIRST..d.LAST
    LOOP
    INSERT INTO department_teststruct
    VALUES (d(i).dno,d(i).name,d(i).location);
    END LOOP;
    END insert_object;
    END objecttype;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import oracle.jdbc.OracleCallableStatement;
    import oracle.sql.ARRAY;
    import oracle.sql.ArrayDescriptor;
    import oracle.sql.STRUCT;
    import oracle.sql.StructDescriptor;
    public class TestStruct ...{
    public static void main(String[] args)
    sendStruct();
    public static void sendStruct()
    Connection dbConn = null;
    try...{   
    Object[] so1 = ...{"10","Accounts","LHR"};
    Object[] so2 = ...{"20","HR","ISB"};
    OracleCallableStatement callStatement = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    dbConn = DriverManager.getConnection("jdbc:oracle:thin:@ServerName:Port:ORa", "UserName", "Password");
    StructDescriptor st = new StructDescriptor("DEPARTMENT_TYPE",dbConn);
    STRUCT s1 = new STRUCT(st,dbConn,so1);
    STRUCT s2 = new STRUCT(st,dbConn,so2);
    STRUCT[] deptArray = ...{s1,s2};
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", dbConn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, dbConn, deptArray);
    callStatement = (OracleCallableStatement)dbConn.prepareCall("{call insert_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    dbConn.commit();
    callStatement.close();
    catch(Exception e)...{
    System.out.println(e.toString());
    About how to do explain plan
    EXPLAIN PLAN FOR
    SELECT * FROM TABLE(DEPT_ARRAY(DEPARTMENT_TYPE(
    1, --DNO NUMBER (10),
    'NAME', --NAME VARCHAR2 (50),
    'LOCATION' --LOCATION VARCHAR2 (50)
    ))) T
    JOIN TABLE2 T2 ON T.DNO = T2.DNO;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    But if u want let Oracle know how many rows in that array, one way follows can help.
    Usually way:
    EXPLAIN PLAN FOR
    SELECT * FROM TABLE(DEPT_ARRAY(DEPARTMENT_TYPE(
    1, --DNO NUMBER (10),
    'NAME', --NAME VARCHAR2 (50),
    'LOCATION' --LOCATION VARCHAR2 (50)
    ))) T
    JOIN TABLE2 T2 ON T.DNO = T2.DNO;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    1 Plan hash value: 1748000095
    2
    3 ----------------------------------------------------------------------------------------------
    4 | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    5 ----------------------------------------------------------------------------------------------
    6 | 0 | SELECT STATEMENT | | *8168* | 16336 | 24 (0)| 00:00:01 |
    7 | 1 | COLLECTION ITERATOR CONSTRUCTOR FETCH| | | | | |
    8 ----------------------------------------------------------------------------------------------
    When add cardinality parameter there, the result will be correct.
    EXPLAIN PLAN FOR
    SELECT /*+ cardinality(t 10 ) */ * FROM TABLE(DEPT_ARRAY(DEPARTMENT_TYPE(
    1, --DNO NUMBER (10),
    'NAME', --NAME VARCHAR2 (50),
    'LOCATION' --LOCATION VARCHAR2 (50)
    ))) T
    JOIN TABLE2 T2 ON T.DNO = T2.DNO;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    1 Plan hash value: 1748000095
    2
    3 ----------------------------------------------------------------------------------------------
    4 | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    5 ----------------------------------------------------------------------------------------------
    6 | 0 | SELECT STATEMENT | | 10 | 20 | 24 (0)| 00:00:01 |
    7 | 1 | COLLECTION ITERATOR CONSTRUCTOR FETCH| | | | | |
    8 ----------------------------------------------------------------------------------------------

  • Calling EJB from Oracle via IIOP

    I've spent the last two days trying to figure out how I can call an
    EJB from an Oracle Stored Procedure. I first looked into WLS JNDI
    (Using WLInitialContextFactory ), but my collegue recommended I look
    into IIOP because it is "less proprietary". I was able to get a WL
    example working that does a lookup on an EJB and "narrows" the IIOP
    object...so it looked promissing, but then I tried to load the JAR
    into Oracle and it said:
    "referenced name javax/rmi/PortableRemoteObject could not be found"
    So I did a quick check and it looks like this didn't come into
    existance until JDK 1.3. By all accounts, Oracle 8.1.6 supports JDK 2
    (1.2). So now I'm stuck. I've got a few examples about connecting to
    the Oracle ORB using session-iiop, but I don't know if Weblogic will
    be able to work with this. I don't know how I'd even call it because
    the URL requires an Oracle SID...so now what? I see three options.
    Please let me know which would be best (or another option that I'm
    missing)
    1. Try connecting with Weblogic "T3"
    2. Try to get the right combination of classes loaded so 1.2 can work
    like 1.3
    3. Use the Oracle IIOP (I have no examples for connecting to other
    ORBs so I have no idea how to lookup objects).
    Chris

    [email protected] (Chris Snyder) writes:
    Andy Piper <[email protected]> wrote in message news:<[email protected]>...
    [email protected] (Chris Snyder) writes:
    1. Try connecting with Weblogic "T3"It depends on what version of WLS you are using. If you are using 6.1
    then you are out-of-luck because this only support JDK 1.3.1.We are using WLS 6.1 and Oracle 8.1.6. There's got to be a way to
    connect what is essentially a 1.2 JVM to a 1.3.1 JVM. On my way home
    yesterday I was wondering if just straight RMI would work...although
    we need to encrypt the connection. I've seen several people talk
    about calling EJB's from stored procedures so it seems like there is a
    way. Any other ideas?The really gross way is HTTP. In a previous life I had a customer use
    oracle's HTTP plug-in to do this. You could probably invert the
    problem also. I.e. write CORBA objects that sit inside an Orb hosted
    in WLS and invoke on those using oracle's CORBA support. But HTTP is
    probably the way most likely to work. You probably couldn't use RMI
    over HTTP either - you would have to write a servlet that delegated to
    your beans.
    andy

  • How do you extract SQL from Oracle Forms and Reports files?

    I am developing an "as is" data model for a government client for a 14 year old system that has three databases, 20 schemas, over 1500 tables, and over 23,000 columns. Needless to say, I do not plan to perform a manual mapping of data to screens and reports.
    Most of the system has been developed in Oracle Forms and Reports. I am trying to map the live tables and columns to forms and reports.
    The process here has been to save the forms and reports files as .fmb and .rdf files. The client does not have an available copy of Oracle Designer, which I understand could be used to extract the SQL.
    Is there a utility somewhere that can parse the .fmb and .rdf files to extract the SQL?
    Thanks,
    Jim Gearing

    Jim,
    I don't know of any utility that will do this. You can convert and save each fmb as a fmt so you can view/search the contents , but I don't recommend that approach.
    On the other hand, you download a copy of Oracle Designer:
    http://www.oracle.com/technology/software/index.html
    It usually is included with Oracle Forms and Reports.

Maybe you are looking for

  • Planned order to purchase requisition conversion

    Hi, I have one query ref. to planned order to purchase requisition conversion for raw material. Is system convert planned order to purchase requisition automatically or to be converted manually by md14/md15 ? If system convert it automaticallly what

  • Export/Import subpartition stats

    I hope someone can give me a workaround for this, because it's causing our reports to take longer than they should! Background: We have some sub-partitioned tables on a 10.2.0.3 database, partitioned daily on the date column, with the subpartitions b

  • Use Mozilla Fire Fox

    I don't know if having the IE version 7 is the reason for the conflict. However, until Adobe fixes what ever the problem is, go to http://www.mozilla.com/en-US/firefox/ Download that browser for now... Good luck. It helped me out!

  • After upgrading to APEX 4.1 the database management GUI has been removed

    I've succesfully upgrated to APEX 4.1 on my database 10gXE The only problem is that now the database management GUI (Usage Monitor section) has been removed from APEX and I'd like to keep on dealing with DBA activities as before. How is it possibile?

  • Here's a tease from a RIM PM on the status of BB10 for the PlayBook

    This is a table scrap of positive news from a RIM Project Manager that something is in the pipes for the PlayBook for sure...when it will arrive is the unknown factor though. The question was: "So hows BB 10 for the PlayBook coming?" The reply says: