Accessing oracle data types of a different schema

I am having trouble accessing the Oracle data types in a stored procedure. The owner of the stored procedures and the oracle data types is "ODSCUST". I am trying to access this using "CUSTOM" ID from my java program. Recently our DBAs have made a change in schema owners so the ID loging into the Oracle instance is not the owner of the data types or the stored procedures. The "CUSTOM" user has the grants to access all the types and stored procedures. There are also public synonymns created for the oracle data types and stored procedure.
Here is a snipit of the code:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String user="custom";
String password="test";
String database="sbpair11";
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci:@" + database, user, password);
OracleCallableStatement stmt = (OracleCallableStatement)conn.prepareCall( "begin ods_cust.retrieveCustPrflData(?, ?, ?, ?, ?, ?, ?); end;" );
stmt.setString( 1, "5592556485");
stmt.registerOutParameter( 2, OracleTypes.STRUCT, "KSCOPEACCOUNT" );
stmt.registerOutParameter( 3, OracleTypes.ARRAY, "KSCOPERSUUSOCARRAY" );
stmt.registerOutParameter( 4, OracleTypes.ARRAY, "KSCOPECUTADDRARRAY" );
stmt.registerOutParameter( 5, OracleTypes.STRUCT, "KSCOPECONTACT" );
stmt.registerOutParameter( 6, OracleTypes.STRUCT, "KSCOPEPROFILE" );
stmt.registerOutParameter( 7, OracleTypes.ARRAY, "KSCOPEEMAILARRAY" );
stmt.executeUpdate();
Here is the response I get back when I run the program:
Exception in thread "main" java.sql.SQLException: ORA-04043: object "CUSTOM"."KSCOPEACCOUNT" does not exist
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
at oracle.jdbc.oci8.OCIDBAccess.getOracleTypeADT(OCIDBAccess.java:2516)
at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:460)
at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:407)
at oracle.sql.StructDescriptor.initPickler(StructDescriptor.java:249)
at oracle.sql.StructDescriptor.<init>(StructDescriptor.java:204)
at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:138)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:164)
at Array5.main(Array5.java:40)
Note:
When I do a "desc KSCOPEACCOUNT" or "desc CUSTOM.KSCOPEACCOUNT" in sqlplus as the "CUSTOM" id it works but not from Java. Initially I was using the JDBC thin driver but was recomended to switch to OCI which still didn't resolve this issue.

Way too little info here for a definite conclusion.
Some thoughts:
1.) Did you take down the database when you were moving the datafiles? If so, is this the first time the batch job is running since the move? If so, perhaps the cache is cold?
2.) How much physical I/O is the batch job doing? Has the volume of physical I/O changed significantly after the move? What are the characteristics of the lun on which the newly mounted filesystem is built? Is it a smaller number of spindles than before?
Ultimately, you need to profile the batch process, and determine where the most time is being consumed.
-Mark

Similar Messages

  • Microsoft OLE DB Provider for Oracle: Data type is not supported.

    I got the error:
    Microsoft OLE DB Provider for Oracle: Data type is not supported.
    Shortly after upgrading from Oracle 8 to Oracle 9. I was advised to download more up to date oracle drivers, but I was wondering if there was a way to tell what version of the 'OLE DB Provider for Oracle' is already at. Is there a command I can use via SQL Plus or something?

    I have found Microsoft ODBC for Oracle to be more stable than the Microsoft OLEDB for Oracle driver. I have also found both Microsoft ODBC and OLEDB drivers to be more stable than the drivers from Oracle.
    You could always get the latest MDAC (Microsoft Data Access Components) from Microsoft's MSDN Download site and then get the ODAC (Oracle Data Access Components) from Oracle's OTN Download site. ODAC requires MDAC. And ODAC has the latest drivers.
    I suppose it would help to have the latest patches for your Oracle client software too. Maybe Oracle MetaLink would have these?
    It may even help to have the latest service pack for Visual Studio 6 (Visual C++ 6 and Visual Basic 6) too.

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

  • Mapping between oracle data types and ms sql server data types

    hello
    i need mapping between oracle data types and ms sql server data types
    where can i find them ?

    read this
    http://download.oracle.com/docs/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm

  • How to access  complex data type from a soap web services?

    hello
    can u please tell me how can i access complex data type from a soap web service from jdeveloper 10g
    Jdeveloper generates 3 classes
    serviceStub
    getproperties
    response
    i have to retreview the data which is a complex data type it gives some
    unknown type. and the return value is a key-value pair data type .
    regards
    vs

    After you create the partner link and the invoke (to create the variables), change the element type of the response message to the complex type definition of your collection that appears in the XSD. You can do the same thing if you want to change the element type of the payload of the request message as well.

  • Which oracle data type store Maximum data?

    Hi All
    could any one suggest me that i store maximum data in oracle data type for that which data type i have to use?
    i m working on Oracle 10g
    Thanks

    Refer
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330
    and choose the data type that you need to (except for LONG - it has too many limitations and is only provided for backward compatibility).

  • ASP VS Oracle data types

    Hi, someone know why when allocate a numeric value in an ASP variable with a recordset of oracle 10, return as text ? in database are numeric and is confirmed
    Thanks a lot

    This is not an ASP support forum - so you need to focus your question on the Oracle side of your problem and describe that accurately and in detail. Adding an example or sample code will assist forum members even more in trying to diagnose the issue and provide solutions.
    As for Oracle client-server - Oracle (server/db side) never sees and never deals with client-side (e.g. ASP) data types.
    The client uses an Oracle driver (OCI or JDBC) to communicate with the server. The client language provides an interface to this driver - and this interface typically deals with converting client data types into compatible Oracle server data types when making the call to Oracle. When the Oracle server receives the call from the driver, it sees Oracle data types (as passed by the driver). Thus the server will never see client data types or convert client data types to server data types.
    So the data type conversion happens in the client layer - not in the server layer.

  • OSB JCA Adapter - Enqueue - BLOB Oracle data type

    Hi,
    I am tring to enqueue a message into oracle advacned queue using JCA AQ adapter of OSB. The message in the Q has BLOB data type.
    I used AQ Adapter enqueue operation for this, and an opaqueue schema in the adapter wsdl. I created a business service out of the adapter service and tested it using
    OSB. I am able to enqueue, but then if i go and see in the data base payload the value of the BLOB column is JUNK... some funky values..
    Any help on this. Appreciate your suggestions.

    This has been resolved

  • Generating a Web Service and Oracle DATE type

    Hi,
    I need to generate a Web Service from an EJB model based upon entities generated from the Oracle 11g database that contain DATE types.
    I realize that java.sql.Date may not be a supported JAX-RPC type but I would be VERY grateful for some instructions about the easiest way to solve this problem when generating the web service in JDeveloper 11g.
    The integrated WLS server log looks like this:
    <2009-apr-26 kl 23:13 CEST> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/SessionFacadeBean".
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
         at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:158)
         at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:87)
         at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:264)
         at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
         at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
         Truncated. see log file for complete stacktrace
    java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.sql.Timestamp does not have a no-arg default constructor.
         this problem is related to the following location:
              at java.sql.Timestamp
              at public java.sql.Timestamp oracle.Lan.getAterlamnadDatum()
              at oracle.Lan
              at public java.util.List ejbmodel.jaxws.QueryLanFindByNrResponse._return
              at ejbmodel.jaxws.QueryLanFindByNrResponse
    ..... and so on
    The entity bean i question looks like this:
    package oracle;
    import java.io.Serializable;
    import java.sql.Timestamp;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    @Entity
    @NamedQueries({
    @NamedQuery(name = "Lan.findAll", query = "select o from Lan o"),
    @NamedQuery(name = "Lan.FindByNr", query = "select o from Lan o where o.lanNr = :p_lanNr")
    public class Lan implements Serializable {
    @Column(name="ATERLAMNAD_DATUM")
    private Timestamp aterlamnadDatum;
    @Column(nullable = false)
    private Long demandcount;
    private Timestamp demanddate;
    @Column(name="EXEMPLAR_NR", nullable = false)
    private Long exemplarNr;
    @Column(nullable = false)
    private String isbn;
    @Id
    @Column(name="LAN_NR", nullable = false)
    private Long lanNr;
    @Column(nullable = false)
    private Long remindercount;
    private Timestamp reminderdate;
    @Column(name="TILLBAKA_DATUM")
    private Timestamp tillbakaDatum;
    @Column(name="UTLANAD_DATUM")
    private Timestamp utlanadDatum;
    @ManyToOne
    @JoinColumn(name = "PERSON_NR")
    private Lantagare lantagare;

    Hi All,
    When i'm developing EJB Webservice i am getting following error .. i think it doesn't support java.sql.Date; and java.sql.timestamp; types
    the error are as show in below please suggest me.
    [Running application oil on Server Instance IntegratedWebLogicServer...]
    [05:04:09 AM] ---- Deployment started. ----
    [05:04:09 AM] Target platform is (Weblogic 10.3).
    [05:04:09 AM] Retrieving existing application information
    [05:04:09 AM] Running dependency analysis...
    [05:04:09 AM] Deploying 2 profiles...
    [05:04:10 AM] Wrote EJB Module to C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil\oil_webservicesEJB.jar
    [05:04:10 AM] Wrote Enterprise Application Module to C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil
    [05:04:10 AM] Redeploying Application...
    <Jun 30, 2011 5:04:10 AM EDT> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application oil is not versioned.>
    <Jun 30, 2011 5:04:10 AM EDT> <Warning> <Munger> <BEA-2156203> <A version attribute was not found in element webservices in the deployment descriptor in C:\Documents and Settings\Administrator\Application Data\JDeveloper\system11.1.1.4.37.59.23\o.j2ee\drs\oil\oil_webservicesEJB.jar/META-INF/webservices.xml. A version attribute is required, but this version of the Weblogic Server will assume that the JEE5 is used. Future versions of the Weblogic Server will reject descriptors that do not specify the JEE version.>
    <Jun 30, 2011 5:04:10 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/oil-oil_webservices-webapp".
    javax.xml.ws.WebServiceException: Unable to create JAXBContext
         at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:164)
         at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94)
         at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:281)
         at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363)
         at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202)
         Truncated. see log file for complete stacktrace
    Caused By: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
    java.sql.Timestamp does not have a no-arg default constructor.
         this problem is related to the following location:
              at java.sql.Timestamp
    >
    [05:04:11 AM] #### Deployment incomplete. ####
    #### Cannot run application oil due to error deploying to IntegratedWebLogicServer.
    [05:04:11 AM] Remote deployment failed
    [Application oil stopped and undeployed from Server Instance IntegratedWebLogicServer]
    Thanks in advance..
    Siva
    Edited by: Shankar on Jun 30, 2011 7:02 AM

  • How to access complex data type objects in webdynpro

    Hi
    Need help on the detailed procedure to access the complex data type objects.
    I am importing an external wsdl file, its request and response have complex data type objects , how do i access the same as the values are nested in them.
    The structure of request and response at my end is as below:
    request(I level)
    --complextypeobject(II level)
    requestheader(III level)
    field1
    field2
    request
    --response
    messages
    resp1
    resp2
    Any help would be highly appreciated.
    Thanks and Regards,
    Amar Bhagat Challa.

    here you go
    WS Structure
    Request_MI_PortWellOB_MI_PortWellOB
    |-- MT_PortWellOut
       |--agency ( attr)
       |--user (attr)
       |-- well ( node)
         |-- borehole
         |-- downhole
         |-- interval
         |-- surface
    // code to set complex type
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(new Request_MI_PortWellOB_MI_PortWellOB());
              //        port well object
              Request_MI_PortWellOB_MI_PortWellOB oPWRequest = new Request_MI_PortWellOB_MI_PortWellOB();
              ComplexType_DT_PortWell oPWParameters = new ComplexType_DT_PortWell();
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              DT_PortWell oPWInputbean =
                   this.wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().nodeMT_PortWellOut().currentMT_PortWellOutElement().modelObject().getOriginalBean();
              //       oPWInputbean.setTEST("test");
              //          well object
              DT_CWR_Well oWParameters = new DT_CWR_Well();
              //          all object
              //        surface
              DT_CWR_Surface oSParameters = new DT_CWR_Surface();
              ComplexType_DT_CWR_Surface s = new ComplexType_DT_CWR_Surface();
              //          Borehole
              DT_CWR_BoreHole[] oBParameters = new DT_CWR_BoreHole[wdContext.nodeBoreholedetail().size()];
              //          Downhole
              DT_CWR_DownHole[] oDParameters = new DT_CWR_DownHole[wdContext.nodeDownholedetail().size()];
              //          Interval
              DT_CWR_Interval[] oIParameters = new DT_CWR_Interval[wdContext.nodeIntervaldetail().size()];
              //        add all into well object       
              oWParameters.setSURFACE(oSParameters);
              oWParameters.setBOREHOLE(oBParameters);
              oWParameters.setDOWNHOLE(oDParameters);
              oWParameters.setINTERVAL(oIParameters);
              //       oPWParameters.setWELL(oWParameters );      
              oPWInputbean.setWELL(oWParameters);
              oPWRequest.setMT_PortWellOut(oPWParameters);
              wdContext.nodeRequest_MI_PortWellOB_MI_PortWellOB().bind(oPWRequest);
              wdContext.currentMT_PortWellOutElement().setUSERID("user");
              wdContext.currentMT_PortWellOutElement().setAGENCY("agency");
    Rahul

  • How to access Oracle Data Base on Unix using Visual Basic ?

    Hi !
    I want to use visual basic and access the Oracle Data Base on Unix server. How can i do that ? Do i need any software?
    .Prashant

    You need an oracle client installation and setup your TNS names.

  • Access compound data type using OleDB

    Is there a way to access a compound data type using OleDb? The compound data type is a record and it has the direction "OUT".

    Hi Kathy,
    I already posted a reply to a similar post you made here. Please let me know if this does not answer your question.
    Regards,

  • Regarding Native SQL to access Oracle Data from SAP

    Dear Gurus,
    This query is regarding Native SQL.
    Our database is Oracle and the client's database is also Oracle.
    To access the data directly from the client's database(Oracle), can I use Native SQL commands?
    Is there any disadvantage to use Native SQL?
    If Native SQL can be used, can any one send me the code to access the data from Oracle?
    Points will be rewarded.
    Thanks & Regards,
    Neeraj K.

    The problem is always data integrity. Doing things this way you are bypassing any business logic. So for example if you are connecting to a SAP Oracle database. SAP will not support your SAP system as you are doing direct updates to the database. I would suppose that this would be the same for any other product using the Oracle database. If you are only reading data from the database then it should be fine. I would however always using API's to access/update data.
    Regards

  • ORACLE Data Types within Datasets

    Hi,
    While creating a typed dataset by draging an ORACLE table
    from the Server explorer
    All Oracle number Columns are using the data type Decimal
    inside the dataset.
    Is it better to use (change to) the real data type like Int32 etc ?
    Have anybody experience ?
    Kind Regards
    Martin

    Martin,
    OleDb.NET defaults to System.Decimal for Oracle NUMBER columns. The only was is to manually change it after the typed dataset is generated.
    If you are working with an untyped dataset ODP.NET will set the DataColumn depending on the precision and scale of the Oracle NUMBER column.
    -Naveen

  • Problem accessing basic data types

    Hi,
    I am a newbie at using JNI so please don't mind if I am asking something trivial.
    I have a JNI wrapper for a native C code. The C code is a Gtk+ application using GLib library. This library has it's own basic data types. For example, "gchar" corresponding to "char". I have generated the JNI Wrappers using the tool named "Swig" which is an interface between the C and other programming languages such as Java. What Swig has come up with is since "gchar" is not understood by it as "char" so it has taken the "gchar" as come Reference Type and generated another class for it. And instead of accepting simple char it is expecting a long.
    Even if I pass a numerical value like 11111 after instantiating this newly generated gchar class while running the program the JVM is crashing complaining SIGSEGV recieved from the underlying libraries.
    I am confused first of all since the error is not understood and secondly how can I tell the JNI that gchar is similar to char.
    What approach should I follow to solve the problem that I am facing? Any feedback on this will be appreciated.
    Thanks & Regards

    At run time you can see all the data........ like what i have shown...
    but if you clearly see, DATE will be in the internal format..but if you print it, it will be in dd:mm:yyyy
    can you suggest me if i have a dynamic field symbol (table data) ,,,, How can i convert data types dynamically..
    if it is a static internal table i am achieving with WRITE TO statement.....but i have huge data in field symbols...
    Instead of all these , please specify the exact problem your are facing . What is it with date field ? . In SAP while printing the internal format will be converted to external. What is your requirement with this date field?
    My output looks some thing like this:
    04 36876 15.09.2011 39600 1999
    06 36960 15.09.2011 39600 2632
    07 36874 15.09.2011 39541 9232
    My expected output
    04 36.876 15.09.2011 39.600 1.999
    06 36.960 15.09.2011 39.600 2.632
    07 36.874 15.09.2011 39.541 9.232
    I dont see any problems mentioned in your date field. Both your actual and expected outputs reflects the same in date field.
    In SCN you will only get solutions if your question is precise.
    Kesav

Maybe you are looking for

  • Trying to us an old VGA power Mac monitor on my 2006 imac

    I Thought I had a fix for my quickly dying imac.  It's guts are fine but the LCD monitor has developed a form of computer tourets.   I've just lost 1/3 of the screen.  Tested it out to determine that my graphics card is fine but the monitor is not, I

  • Final Cut Studio 2 and Logic Studio on MacBook

    I have a white MacBook bought in late 2008. It has a 2.1 GHz Intel Core 2 Duo processor w/ 1 GB 667 MHz DDR2 SDRAM. My question is: has anyone run Final Cut Studio 2 and/or Logic Pro with these specs? And how was it? I was told performance would be w

  • Adobe Reader Not Working after OS 2 UPGRADE

    Hope someone can help with this issue.  Updated to OS 2, but now the Adobe Reader does not work.  Since this was a new device and the upgrade started automatically, I have no idea if Adobe Reader worked in the previous OS version - from the forums, i

  • Garageband missing loops like Island long

    Hi there. Last year I took music in school. We used the schools macs on apps like garageband and Logic Pro. I decided to buy myself a mac this year and, after installing the addon loops in garageband, I still only have 2000 loops. I am unable to find

  • Emac completely restore help

    how do i completely restore my emac to its factory settings? help please!