Data dictionary for jdbc

hi guyz
I need some help!!
I have created a table in a data dictionary project.
Please let me know how to deploy it. Do you have to deploy it through an ear file or so?
Next, since its on the portal database i heard that we need to use the default datasource.
What is the name of the datasource? Has any setting to be done to use it and please show me 2-3 lines of code on how to use it in order to establish a JDBC connection.
Thanks.

Created on 3-nov-2006
To change the template for this generated file go to
Window>Preferences>Java>Code Generation>Code and Comments
package tmp.userslist.comp.model.userslist;
import java.sql.Connection;
import java.util.Properties;
import javax.naming.InitialContext;
import javax.sql.DataSource;
@author rtagliento
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
public class MyJDBC {
     private boolean hasConnection;
     private Connection con;
     private DataSource ds;
     private InitialContext ctx;
     private Properties properties;
     public MyJDBC(){
          hasConnection = false;
          con = null;
          ds = null;
          ctx = null;
     public boolean startDBCon(){
          hasConnection = true;
          try {
                 String datasource_name =
                                "jdbc/SAP" +
                                (String) System.getProperties().get("SAPSYSTEMNAME")
                                          + "DB";
                    hasConnection = this.startDBCon(datasource_name);
            } catch (Exception e) {
          //            e.printStackTrace();
                 hasConnection = false;
       return hasConnection;
     public boolean startDBCon(String datasource_name){
          hasConnection = true;
       try {
            datasource_name = "jdbc/" + datasource_name; // + "DB";
            String contextUrl = "";
            String contextFactory = "com.sap.engine.services.jndi.InitialContextFactoryImpl";
            properties = new Properties();
            properties.put("java.naming.factory.initial", contextFactory);
            ctx = new InitialContext(properties);
            ds = (DataSource)ctx.lookup(datasource_name);
            con = ds.getConnection();
       } catch (Exception e) {
//            e.printStackTrace();
            hasConnection = false;
       return hasConnection;
     public Connection getConnection (){
          if (hasConnection)
               return con;
          else
               return null;

Similar Messages

  • What is the data dictionary for direcoty objects?

    Dear All,
    I would like to know the data dictionary for directory objects. Or where i can get more details of directory objects.
    Thanks in advance
    Balaji

    Hi,
    YOu can use dba_directories view to get info about directory.
    For other views
    1.select * from tab where tname like '%DIRECT%';
    2.select * from dictionary where table_name like '%DIRECT%';
    Regards
    Jafar

  • Data Dictionary for Flatfiles?

    Hi everyone,
    Is there a document out there for the data dictionary of the flat files?
    I found "BIAPPSDMRV796_RevA.pdf", which is the data model/data dictionary for the OBAW tables. But it doesn't contain the info for the flat files (at least I haven't found the flat files in there yet).
    thanks for the help!
    -Joe

    Based on what has been said so far, you understanding is correct.
    But I've been talking with some colleagues and I believe i am not actually going to modify the existing Universal Connectors.
    The reason being are the following:
    1) The existing connectors already have metadata created in the DAC that will run them. If I copy and paste them into my "custom" universal connectors, then I will need to find a way to hook up these new ETLs into the DAC.
    2) If there were ever updated versions of the Universal Connectors, then I would have to first, import the new version. Then make a copy. Then apply my custom changes to the copy.
    3) If I ever wanted to pick this solution up and hand it to someone else, having based upon the standard BI Apps ETLs will make this more portable.
    What I do plan on doing is making a custom ETL folder for ETLs that populate the flat-files. This method makes sure that if the logic in the Universal connectors ever changes, my code is virtually unaffected (barring changes to the flat-file structure). On top of that, I could hand someone the Informatica XML in a completely different BI Apps environment and they could import it and get up and running very fast without having to impact the out of the box code from Oracle.
    -Joe

  • Data Types for JDBC Sender/Receiver Adapter

    HI experts,
                    I am very much confused how the data types shoudl be for the Sender/receiver for JDBC.
    And is there any standard format where it should be used, or what is the strucutre to be used,.
    Please let me know in clear and help me out in this regard,
    Edited by: Amruth on Dec 4, 2008 6:11 AM

    HI Nagarjuna,
    If my understanding is correct, When you trigger the Idoc from R/3 it thrown the error in XI.
    If  you want to send the same Idoc then go to WE19 in R/3 system enter the same Idoc number and execute the scenaio. It send the Idoc to XI system, but the message number will change.
    Regards
    Goli Sridhar

  • How to search data dictionary for interval partitions?

    Oracle 11.2.0.3
    When I query DBA_PART_TABLES.PARTITIONING_TYPE it says 'range'. I want to be able to differential an interval from other range based partitions in the data dictionary?
    used this example. shows 'range'
    http://www.rittmanmead.com/2008/09/investigating-oracle-11g-interval-partitioning/
    Oracle Docs list 'SYSTEM' as a partitioning_type which I thought would be intervals.
    ALL_PART_TABLES
    [code]
      1   CREATE TABLE interval_sales
      2          ( prod_id        NUMBER(6)
      3          , cust_id        NUMBER
      4          , time_id        DATE
      5          , channel_id     CHAR(1)
      6          , promo_id       NUMBER(6)
      7          , quantity_sold  NUMBER(3)
      8          , amount_sold    NUMBER(10,2)
      9          )
    10       PARTITION BY RANGE (time_id)
    11       INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    12         ( PARTITION p0 VALUES LESS THAN (TO_DATE('1-1-2005', 'DD-MM-YYYY')),
    13           PARTITION p1 VALUES LESS THAN (TO_DATE('1-1-2006', 'DD-MM-YYYY')),
    14           PARTITION p2 VALUES LESS THAN (TO_DATE('1-7-2006', 'DD-MM-YYYY')),
    15*          PARTITION p3 VALUES LESS THAN (TO_DATE('1-1-2007', 'DD-MM-YYYY')) )
    SQL>/
    Table created.
    Elapsed: 00:00:00.01
    SQL> select partitioning_type from user_part_tables where table_name = 'INTERVAL_SALES';
    PARTITION
    RANGE
    [/code]

    CREATE TABLE junk1
       ( id         NUMBER )
       PARTITION BY RANGE (id)
       INTERVAL(5)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    CREATE TABLE junk2
       ( id         NUMBER )
       PARTITION BY RANGE (id)
         ( PARTITION p0 VALUES LESS THAN (5),
           PARTITION p1 VALUES LESS THAN (10),
           PARTITION p2 VALUES LESS THAN (15),
           PARTITION p3 VALUES LESS THAN (20) )
    select owner, table_name, partitioning_type, interval
      from dba_part_tables
    where table_name in ('JUNK1', 'JUNK2')
    OWNER                          TABLE_NAME                     PARTITIONING_TYPE INTERVAL           
    GREGS                          JUNK1                          RANGE             5                  
    GREGS                          JUNK2                          RANGE                 
    2 rows selected.

  • Date  format for JDBC

    Hi, can anyone tell be what format a date should be in when querying a database. I have some old code that was transfered to a new app server which follows Java standards very strictly. Now it gives me problems when comparing dates, for example a query that finds records for a date BETWEEN two other dates. The old format was dd-mon-yyyy, but this doesn't work anymore and neither does dd-mon-yy OR yyyy-mon-dd. When I do the query in the text editor(SQL Plus) it works, but not within the Java code.
    Any ideas?
    Thanks

    Of course you're right, thor_b. My point is that Oracle's "to_date" can convert a string to a date, but that's not how Access or SQL Server or any other RDBMS do it. They're all different. If you hardwire "to_date" into your SQL you'll have to rewrite the whole thing if you move from Oracle to SQL Server.
    I like the PreparedStatement because it takes care of all that for me.
    Performance penalty? Over Statement? I've read some stuff about that, but I find it hard to believe.
    Whenever you send SQL to a relational database it has to parse the SQL, determine if the tables and columns exist and have the right types, optimize the query, and then execute it. You have to do that whether you're using Statement or PreparedStatement. If PreparedStatement allows the RDBMS to do all that work once and then store it, I can't see how you'll do worse. - MOD

  • Data dictionary for table updates

    Hi,
    I want to know which audit tables are to be looked into to see a particular transaction done on a db table.
    For ex:- I've updated a table(say Tab1) and I want to know when,by whom and what changes they have done Tab1.
    Thanks in advance

    For information on Oracle Auditing refer to :
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76956/audit.htm#1108

  • Supported data type for JDBC storeproc mapping ?

    Hi,
    I have scenario to call oracle procedure from XI. Could you help me what kind of the supported type that i can use in my message mapping ? because in message mapping i have to define all the procedure input type. but then i can't use type like VARCHAR2, NUMBER ? but type like INTEGER, CHAR is working.
    anybody know where i can find the document or link on this ?
    Thank you and Best Regards
    Fernand

    This link answer all my question, http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

  • Data Dictionary for PP

    Can someone provide me with all the tables with the Production Planning environment?
    Or at least all the ones in direct regard to RBOM's and Routes?

    Dear,
    Please refer this link you will get all table here,
    [PP Table|http://www.sap-img.com/sap-pp.htm]
    Routing
    PLPO          Routing Operation Details
    PLKO         Routing Header Details
    MAPL         Routing Link to Material
    PLAB          Relationships - Standard Network
    PLAS          Task List - Selection of Operations
    PLMZ         Component Allocation
    PLPH          CAPP Sub-operations
    PLFH          PRT Allocation
    PLWP         Maintenance Package Allocation
    PLMK         Inspection Characteristics
    Bill of Material
    STPO          BOM Item Details
    STPU          BOM Sub Items (designators)
    STKO         BOM Header Details
    MAST         BOM Group to Material
    STZU          BOM History Records
    STAS          BOM Item Selection
    STPF           BOM Explosion Structure
    Regards,
    R.Brahmankar

  • Slow response  on data dictionary queries with optimizer_mode=rule in  10g

    I have two dataabse: DB1 (9i) and DB2 (10g) on windows 2000
    They are two development databases with the same schemas and same tables. The application executes the same commands but with different results and execution plans.
    In DB2 the queries with the most slow response tima are the queries on the data dictionary (for example: all_synonyms).
    These query are very fast with the optimizer_mode=cost and very slow with the optimizer_mode=rule.
    And the the problem is this:
    in DB1 and DB2 the application executes after the connection this command:
    ALTER SESSION SET OPTIMIZER_MODE = 'RULE';
    These are the traces of the session in db1 and db2:
    The queries are created dynamically by the application.
    Is there a solution for this?
    thanks
    Message was edited by:
    user596611

    Here is a simple example of what can happen,
    @>alter session set optimizer_mode=all_rows;
    @>SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
    PLAN_TABLE_OUTPUT
    | Id  | Operation        | Name | Rows  | Cost (%CPU)|
    |   0 | SELECT STATEMENT |      |     1 |     2   (0)|
    |   1 |  FAST DUAL       |      |     1 |     2   (0)|
    @>alter session set optimizer_mode=rule;
    @>SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
    PLAN_TABLE_OUTPUT
    | Id  | Operation        | Name |
    |   0 | SELECT STATEMENT |      |
    |   1 |  FAST DUAL       |      |
    Note
          - rule based optimizer used (consider using cbo)As you can see incomplete explain plans. Therefore it is not advised.
    Adith

  • OIM 9.1.0.2 - Weblogic JDBC Multi Data Sources for Oracle RAC

    Does OIM OIM 9.1.0.2 BP07 support Weblogic JDBC Multi Data Sources (Services>JDBC>Multi Data Sources) for Oracle RAC instead of inserting the "Oracle RAC JDBC URL" on JDBC Data Sources for xlDS and xlXADS (Services>JDBC>Data Sources> xlDS|xlXADS > Connection Poll> URL) ?
    If yes, is there are any other modifications that need to be made on OIM, or just changing the data sources?

    Yes, it's supported. You install against one instance directly of the Rac Server. Then you update the config.xml file and the jdbc resource in your weblogic server with the full rac address. It is documented for installation against RAC. http://docs.oracle.com/cd/E14049_01/doc.9101/e14047/database.htm#insertedID2
    -Kevin

  • How to find out the aligning Data dictionary table for a structure.

    Hi
    As the table controls are associated with strucures, the data input goes to the data dictionary table aligned to that structure. Is there any way we can find out the table related to that particular structure ?
    Thanks,
    Dhareppa

    Hi,
    The structure and its fields may be associated with multiple database tables.
    You can try by where-used list of the structure/field and then you can look and determine the table by hit and try method.
    Also as suggested above you can try get the SQL trace and then ypu can look for table associated behind the structure/fields I believe this is the best way to find the DB table.
    Thanks,
    Ravi

  • Data types for Sender/receiver JDBC

    HI experts,
    I am very much confused how the data types shoudl be for the Sender/receiver for JDBC.
    And is there any standard format where it should be used, or what is the strucutre to be used,.
    Please let me know in clear and help me out in this regard,

    refer these blogs for better informations on jdbc data types
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/file%252bto%252bjdbc
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/jdbc%252b2%252bjdbc (for reciever JDBC)
    JDBC Receiver Adapter -- Synchronous Select – Step by Step

  • How to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Regarding data integrity for XI file/jdbc adapter

    I have several questions about XI data integrity for file/jdbc adapter.
    Question 1 is: if the destinate file or DB is not reachable or other technical problems occur, do I have to send the message again or not?
    Usually we design  an bpm to comfirm whether the database or file is completed according to a response message. But it's a little complicated.
    Question 2:when I use jdbc send adapter and configure select and update SQL clauses. Does XI only update the records which it select automatically? or Select and Update don;t have any relationship?
    Very appreciated if you have any experience to share me.
    Regards
    Shen Peng

    Hi
    Question 1 is: if the destinate file or DB is not reachable or other technical problems occur, do I have to send the message again or not?
    If the DB is not reachable then message will be found in the inbound side. you can found them in the adapter. Goto RWB -> Message monitoring -> select status System error and search . there you will find your messages. select you message and resend them
    Question 2:when I use jdbc send adapter and configure select and update SQL clauses. Does XI only update the records which it select automatically? or Select and Update don;t have any relationship?
    XI never does updation automatically, Update is done only based on the SQL update query which you have written in the  sender channel.
    SELECT statement is used just to pick the values from the table and based upon the query which you want to UPDATE in SQL . data is updated
    Regards,
    sandeep

Maybe you are looking for

  • Problem with Application server

    Hi All, I'm facing problem with Application Server. When I installed the appserver and started it.. It started with the message " server has been started and some services will run at back". But when I tried stopping it using the stop default server

  • Short Dump while including custom text

    Hi Guru's             I am new to workflow and i have a requirement to include a custom text by replacing the standard one.             I selected the user decision and navigated to control tab there i got the task number, i just copied the task     

  • OS 10.6.4 compatibility with HP OfficeJet 6500 & Epson Artisan 700

    Just purchased MacBook Pro and upgraded iMAC and Mac Pro on my local network to OS 10.6.4. iMAC is connected to local network via Ethernet, other computers and printers HP OfficeJet 6500 and Epson Artisan 700 connected via wireless. All went pretty g

  • APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT

    My system is Apex 4.0.1+oc4j+Apex Listener+BI publisher. I need generate user-defined report layout with custom padding-left,*padding-top* values for each printing element (it is like Edit Print Attributes page in the application builder, but more co

  • Do i need wire less connection to verify my itunes account and to use my itouch?

    do i need wire less connection to verify my itunes account and to use my itouch?