How to discover the database vendor Name of the default connection

Im getting a db connection via context.lookup() to the default schema (SAPDB) and I want to discover the J2EE database vendor Name.
can anyone help me?
Regards
Armando

Hi Prakash:
I tried that code and I get "SAP DB", but if I change the method using JDBC (not JNDI) with SQL server JDBC driver, I get null for getDatabaseProductName() method, I don´t now if using JNDI would be different since i don´t have any Web AS Java installed for SQL Server.
I have this Code:
Properties prop = System.getProperties();
Context context = new InitialContext();
DataSource ds;
Connection con;
String sysname = prop.getProperty("SAPSYSTEMNAME");
String DataSourceName = "jdbc/SAP" + sysname + "DB";
String dummyNull = "";
try {
     ds = (DataSource) context.lookup(DataSourceName);
catch (Exception e) {
     throw new HibernateException( "Could not find datasource", e );
con = ds.getConnection();
And When I inspect in debug Mode the con object
I get this:
"con"= CommonConnectionHandle  (id=279)
___mc= CommonManagedConnectionImpl  (id=295)
______con= CommonConnectionImpl  (id=286)
_________connectionContext= CommonContextFactory$CommonConnectionContextImpl  (id=333)
____________dataSourceContext= ContextFactory$DataSourceContextImpl  (id=356)
_______________databaseName= "C14"
_______________dataSourceName= "SAPC14DB"
_______________serverName= "ARMANDOALONSO.neoris.cxnetworks."
_______________sqlType= 1
_______________userName= null
_______________vendorID= 6
_______________vendorName= "SAPDB"
____________userName= "SAPC14DB"
the data that I want to access is (vendorName= "SAPDB")
and I dont know how to do that.

Similar Messages

  • How to change the default connection

    I've to change programmatically the default connection of the report (6i).
    I thought to use somenthing like LOGOUT/LOGIN (FORMS6i) in the BeforeReport trigger, but I don't find any valid solution yet.
    Thanks in advance,
    Raffaele

    The reports are developed with Report Builder 6.0.8.8.3.
    The server is configurated: Oracle HTTP Server/1.3.22 (Win32)
    mod_plsql/9.0.2.0.0 DAV/1.0.2 (OraDAV enabled)
    mod_oc4j/3.0 mod_ossl/9.0.2.0.0 mod_fastcgi/2.2.10 mod_perl/1.26
    From my application I call iexplore and set the url like:
    http://<myserver>/dev60cgi/rwcgi60.exe?MY_REPORT+<jobid>
    In cgicmd.dat I defined:
    MY_REPORT: report=D:\report_path\theREPORT.rep
    userid=def_user/pwd@the_db
    server=my_repserver...
    In the report, in the BEFORE_REPORT or in BEFORE_PARAMETER_FORM trigger I would like to make a query to a table of def_user with the job_id filter and get the job specific connection info.
    Then, I've to re-connect to the new user where the tables of the report's data model a re defined.
    Our database is structured with a single user for general data, included the info to address the other schema, and more specific users (~100) for job data.
    I've used the tecnique in Forms, but I can't replicate it in Reports.
    Thank you for any suggestions.
    Raffaele

  • How to change the default password file's name and path when the database created?

    how to change the default password file's name and path when the database created?
    null

    Usage: orapwd file=<fname> password=<password> entries=<users>
    where
    file - name of password file (mand),
    password - password for SYS and INTERNAL (mand),
    entries - maximum number of distinct DBA and OPERs (opt),
    There are no spaces around the equal-to (=) character.

  • How to use the default database service name on creating procedure for data

    how to use the default database service name on creating procedure for datagaurd client failover ??? all oracle doc says create a new service as below and enable at DB startup. but our client is using/wanted database default service to connect from application on the datagaurd environment (rac to non rac setup).please help.
    Db name is = prod.
    exec DBMS_SERVICE.CREATE_SERVICE (service_name => 'prod',network_name =>'prod',failover_method => 'BASIC',failover_type => 'SELECT',failover_retries => 180,failover_delay => 1);
    says already the service available.
    CREATE OR REPLACE TRIGGER manage_dgservice after startup on database DECLARE role
    VARCHAR(30);BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
    IF role = 'NO' THEN DBMS_SERVICE.START_SERVICE('prod');
    END IF;
    END;
    says trigger created, but during a swithover still the service is listeneing on listener.
    tns entry.
    prod =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (LOAD_BALANCE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod2)(PORT = 1521)) ---> primary db entry
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = proddr)(PORT = 1521)) --> DR DB entry
    (CONNECT_DATA =
    (SERVICE_NAME = prod)
    thanks in advance.
    Edited by: 854393 on Dec 29, 2012 11:52 AM

    Hello;
    So in the example below replace "ernie" with the alias you want the client to use.
    I can show you how I do it :
    First an entry need to be added to the client tnsnames.ora that uses a SERVICE_NAME instead of a SID.
    ernie =
    (DESCRIPTION =
        (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = Primary.host)(PORT = 1521))
           (ADDRESS = (PROTOCOL = TCP)(HOST = Standby.host)(PORT = 1521))
           (CONNECT_DATA =
           (SERVICE_NAME = ernie)
    )Next the service 'ernie' needs to be created manually on the primary database.
    BEGIN
       DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
    END;
    /After creating the service needs to be manually started.
    BEGIN
       DBMS_SERVICE.START_SERVICE('ernie');
    END;
    /Several of the default parameters can now be set for 'ernie'.
    BEGIN
       DBMS_SERVICE.MODIFY_SERVICE
       ('ernie',
       FAILOVER_METHOD => 'BASIC',
       FAILOVER_TYPE => 'SELECT',
       FAILOVER_RETRIES => 200,
       FAILOVER_DELAY => 1);
    END;
    /Finally a database STARTUP trigger should be created to ensures that this service is only offered if the database is primary.
    CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
    DECLARE
    V_ROLE VARCHAR(30);
    BEGIN
    SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
    IF V_ROLE = 'PRIMARY' THEN
    DBMS_SERVICE.START_SERVICE('ernie');
    ELSE
    DBMS_SERVICE.STOP_SERVICE('ernie');
    END IF;
    END;
    /lsnrctl status - should show the new service.
    When I do this the Database will still register with the listener. I don't give that to the clients. That one will still be available but nobody knows about it. Meanwhile "ernie" moves with the database role.
    So in my example the default just hangs out in the background.
    Best Regards
    mseberg
    Edited by: mseberg on Dec 29, 2012 3:51 PM

  • In ME2N  report for PO- How to get or add Vendor name in ALV grid output

    Hl Everyone
    How to get  or add Vendor Name and payment terms in the ALV grid output for the follwing reports like ME2N and ME2V.
    cuurently i am in 4.7 E version.
    Kindly suggest..........
    thanks in advance
    Regards
    Prashanth

    Hi Pankaj
    I knew that vendor name field is avaiable in ECC versions, but how to get the same field(vendor name) in 4.7 E vesion.
    Kindly suggest
    Regards
    Prashanth

  • How to make the wifi connection with Ipad in china since it requires user's name and password.

    How to make the wifi connection with Ipad in china since it requires user's name and password just like the dialed-up?

    The same way you would connect to a secure wifi network in any other country. Supply the username and password when prompted.

  • How to change the default database charset to ISO8859-1?

    Hi all,
    I have created a table with a nvarchar field to store string, may i now how to change the default NLS charset to ISO88591 charset?
    Thanks in advance.
    chin.

    Thank you!
    I will try later!
    But,who can tell me more detail !
    thx

  • How to change the default IDOC basic type from CREMAS05 to CREMAS04.

    Hi All,
    How to change the default IDOC basic type from CREMAS05 to CREMAS04 when sending Vendor Master Data.
    When I generate partner profile, the system will add the latest version of IDOC type which is CREMAS05 to the Outbound message. In my project, I'm asked to use CREMAS04.
    I want to use BD14 to send master data directly, but the program will generate IDOC using CREMAS05. Is there a way that I can change it to CREMAS04? And also for using Change Pointers, I want to use the report RBDMIDOC, but i have the same problem.
    Thanks
    Sai Krishna

    execute WE20 and edit the outbound parameters
    here is a pretty good example: http://documentation.softwareag.com/webmethods/sapr3_gateway/sap231/pages/sapdist.htm
    Edited by: Jürgen L. on Sep 7, 2011 9:49 PM

  • How to change the default hint box color?

    How to change the default hint box color on the default Metal LookAF?
    I'm trying looking for something with javax.swing.UIManager, but i just find ways to translate the UI.
    Any idea?

    [UIManager Defaults|http://www.camick.com/java/blog.html?name=uimanager-defaults] shows all the properties of the UIManager.
    Although there is no "hint box" component, so I don't know if it will help.

  • How to change the default admin password for IAS/UDDI

    Using "OracleAS UDDI Registry" 10g Release 2 (10.1.2)
    http://docs.oracle.com/cd/B15904_01/web.1012/b14027/regwsuddi.htm
    How to change the default password
    ias_admin/ias_admin123
    http://xxx.xx.xxx.xx/uddi/publishing

    Hello NJ,
    I tried your solution and its a very good workaround for the workbooks stored in the Database, but when i open workbooks from file system then Discoverer defaults the export path to the Directory from where we have opened the workbook.
    My clients are having most of their workbooks stored in File system & stored at different locations. So i wonder if there is just one common solution if possible?
    Thanks

  • How to change the default element tag using dbms_xmlgen

    here is my code that generate output for purchase order data. I followed the syntax shown in xml db developer guide.
    I am getting the results but element tags are CAPS letters( As the coloumn names in the type defenitions are stored in CAPS in Oracle). but I need to show in small letters as per my requirement.
    can anyone help me how to change the default tag names for elements.
    ==================================HERE IS THE CODE==================
    DECLARE
    qryCtx DBMS_XMLGEN.ctxHandle;
    result CLOB;
    BEGIN
    qryCtx := DBMS_XMLGEN.newContext
    ('SELECT PODL_H_T
    ( CLOSEDDATETIME ,
    COMPANY ,
    CAST(MULTISET
    (SELECT LINENUMBER ,
    COMPANY ,
    PURCHASEORDERID ,
    ITEM ,
    QUANTITYUM ,
    TOTALQUANTITY
    FROM cpo_wms_podl_LINES
    WHERE PURCHASEORDERID = PH.PURCHASEORDERID) as PurchaseOrderDetailList
    FROM cpo_wms_podl_HEADERS PH ');
    -- now get the result
    DBMS_XMLGEN.setRowSetTag(qryCtx, 'Receipts' );
    DBMS_XMLGEN.setRowTag(qryCtx, 'PurchaseOrder' );
    result := DBMS_XMLGEN.getXML(qryCtx);
    INSERT INTO temp_clob_tab VALUES (result);
    DBMS_XMLGEN.closeContext(qryCtx);
    END;
    -- select * from temp_clob_tab
    ===========create type script=====================
    cpo_wms_podl_HEADERS
    CREATE or replace TYPE PurchaseOrderDetail AS OBJECT(
    LINENUMBER VARCHAR2(400 BYTE),
    COMPANY VARCHAR2(400 BYTE),
    PURCHASEORDERID VARCHAR2(400 BYTE),
    ITEM VARCHAR2(400 BYTE),
    QUANTITYUM VARCHAR2(400 BYTE),
    TOTALQUANTITY NUMBER
    create type PurchaseOrderDetailList as table of PurchaseOrderDetail
    create table temp_clob_tab(result CLOB)
    create type podl_HEADERS_list_t as table of podl_HEADERS_t
    CREATE or replace TYPE PODL_H_T AS OBJECT
    CLOSEDDATETIME DATE,
    COMPANY VARCHAR2(400 BYTE),
    CREATEDDATETIME DATE,
    PURCHASEORDERID VARCHAR2(400 BYTE),
    SHIP_TO VARCHAR2(400 BYTE),
    linelist PurchaseOrderDetailList
    )

    but I need to show in small letters as per my requirement.add alias column names in double quotes as in
    SQL> select dbms_xmlgen.getxmltype('select dname "DeptName", loc "Location" from dept') dept_xml from dual
    DEPT_XML                                                                       
    <ROWSET>                                                                       
      <ROW>                                                                        
        <DeptName>ACCOUNTING</DeptName>                                            
        <Location>NEW YORK</Location>                                              
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>RESEARCH</DeptName>                                              
        <Location>DALLAS</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>CHICAGO</Location>                                               
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>OPERATIONS</DeptName>                                            
        <Location>BOSTON</Location>                                                
      </ROW>                                                                       
      <ROW>                                                                        
        <DeptName>SALES</DeptName>                                                 
        <Location>MUNICH</Location>                                                
      </ROW>                                                                       
    </ROWSET>                                                                      
    1 row selected.

  • I got a new wireless connection for my mac and cannot figure out how to delete the last connection service I had. Everytime I shut the computer, the network goes back to the other one. I cannot find the file ANYWHERE

    got a new wireless connection for my mac and cannot figure out how to delete the last connection service I had. Everytime I shut the computer, the network goes back to the other one. I cannot find the file ANYWHERE

    Under Network Preferences, select the WiFi
    click on "Advanced..." button
    Select the network you want to delete from the list and click on "-"
    Click "Ok"
    Click "Apply"
    Well done ;-)
    You may also want to delete the wireless key from Keychain.
    Open Keychain, seach for the old wifi network name, slect it and click delete

  • How to obtain the default serie for a document

    Hi,
        Anybody know how can obtain the default serie for a document throw a query??
    I can`t see the relation between the ONNM and the NNM1 tables because the 'dfltseries' field of the ONNM not corresponding with the 'Series' field of the NNM1.
    For example for an A/P Invoice
    Thanks!!

    Hi Mariano,
    According to the SDK Help file, you need to query the NNM2 table
    Series Default
    Table name: NNM2
    ObjectCode     UserSign     Series     DocSubType
    So, the query to retrieve the A/P default series for the manager user would be:
    SELECT T0.Series FROM [dbo].[nnm2] T0 WHERE T0.ObjectCode='13' AND T0.UserSign = 1
    From the SDK you can replace the T0.UserSign = 1 for T0.UserSign = oCompany.UserSignature to retrieve the default series for the current user...
    Regards,
    Vítor Vieira

  • How to change the default apex port

    hi,
    i am installed apex4.0 in EBS R12 DB with HTTP Server method. my apex is running from application server 10g and default port is 7777.
    URl: http://hostname:7777/pls/apex
    My EBS R12 running on http://hostname:8007.
    is it possible to change the apex port to EBS Apache port(8007) in R12 and finally i want to change above URL like this
    Before change : http://hostname:7777/pls/apex
    After Change : http://hostname:8007/pls/apex
    Thanks in advanace....

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to change the default Path of Prompt Played by MicroApp

    Hi
    I need to store all the Self Service application prompts in dedicated Media Server. I can modify location of all the Media files by passing the related URL form CVP application, however I need to know how to change the default location of Prompt file played by Play Media Microapplication in ICM Scripting.
    Currently the default location taken by Play Media Micro App is the Media _Server.variable path set for VXML Server location while I have a separate Media Server.
    Please advice how we can customize the MicroApp Media path.
    regards
    Kapil Kumar

    Hi Kapil,
    Try this in your ICM script, define set variables i.e.
    set Media Server= ip address of media server
    set Locale = en-us
    set input Type = DTMF only
    set App Media Lib = " you new location i.e. test "
    So, the application path will be
    http://media server ip address/en-us/test
    hope this helps.
    Cheers

Maybe you are looking for

  • Error in sap crm - List  Price not found

    Hi all, I am creating an order for free of charge products that has an item category " free premium item" but when i am trying to create these orders, I get the msg " List Price not found ". however when i create a standard order that has the same it

  • ORG UNIT TEXT Datasource (Long Text)

    Hi All ! In RSA6, for the datasource 0ORGUNIT_TEXT, I can see short & medium text. But when checked the extractor structure ROTEXTSTR1, there I can see all the three text short, medium & long text. Requirement is to bring long text from the ECC. How

  • Streaming slow on my mac

    When streaming videos and audio on my new macbook pro retina, I experience very long buffering times, especially when viewing HD video on sites like Vimeo or YouTube. Flash Player stops, then more buffering occurs. Is there anything I can do to fix t

  • Decimal Result from Select Statement

    I have the following select: select (sum(state_months)/count(state_key)) from state_tab;. If I do a select on it I get, *1*: +(state_months summed to 3 and the count for state_key is 2)+, but if I do the following select: select 3/2 from dual, the re

  • Cannot Import Back into LR4 from PS

    I've been working on my macbook pro for years now exporting files from LR into PS, doing my edits, then saving and having the file automatically import back into LR. I just upgraded to an iMac and have everything set up, but, now, when I do the EXACT