1 2 Previous Next 19 Replies Latest reply on May 22, 2018 8:10 AM by Exequiel Carballeda

    Actor SQL Adapter for Oracle Service Name

    Exequiel Carballeda

      Hi! I need to do Oracle querys using BMC BAO. I use BMC BAO 7.9.01.003. When i use this sintax

      jdbc:oracle:thin://host:1521/service_name

      the error is

       

          <error>error occured parsing request:

      Message[summary=Exception occured in ORACLESQL SQL URL string generation exception

      Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection), detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)],

      detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection),

      detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)]],

      detail=Exception occured in ORACLESQL SQL URL string generation exception Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string

      jdbc:oracle:thin://host:1521/service_name?null.

      Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection),

      detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)],

      detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection),

      detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin://host:1521/service_name?null.

      Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin://host:1521/service_name; user: null -

      Error: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)]]]</error>

       

       

      The Host is a scan because the database is into clusters. I check connection with telnet from bmc bao server to all scan servers through port 1521 and this connection is success

      The user and password is correct. I test connection to database using SQL Developer and I could connect.

      I edit ad hoc query adapter to use service_name sintax form but i couldn connect.

      Please help and sorry for my horrible english.

        • 1. Re: Actor SQL Adapter for Oracle Service Name
          Ranganath Samudrala

          Please post your adapter configuration - screen shot (minus host name, user name) and XML

          • 2. Re: Actor SQL Adapter for Oracle Service Name
            Exequiel Carballeda
            <request-data> <sqlAdapterRequest> <targets> <target name=""> <user-name>USER</user-name> <password>****MASKED****</password> <driver>oracle.jdbc.driver.OracleDriver</driver> <url>jdbc:oracle:thin://host:1521/CLOUDLAB</url> </target> </targets> <action>select sysdate from dual</action> </sqlAdapterRequest> </request-data>


            • 3. Re: Actor SQL Adapter for Oracle Service Name
              Deepak Bhola

              Try this format

               

              jdbc:oracle:thin:@<host>:<PORT>:<DATABASENAME>

              • 4. Re: Actor SQL Adapter for Oracle Service Name
                Exequiel Carballeda

                also use it but the error is the same

                <request-data> <sqlAdapterRequest> <targets> <target name=""> <user-name>C##USR_ORQUESTACION</user-name> <password>****MASKED****</password> <driver>oracle.jdbc.driver.OracleDriver</driver> <url>jdbc:oracle:thin:@SCAN-CLOUD-LAB.redlink.com.ar:1521:CLOUDLAB</url> </target> </targets> <action>select sysdate from dual;</action> </sqlAdapterRequest> </request-data>

                and i need use service name to connect to database, and in Oracle community the sintax is jdbc: oracle: thin: // <host>: <port> / <SERVICE_NAME>

                this sintax jdbc:oracle:thin:@<host>:<PORT>:<DATABASENAME> is to use SID

                • 5. Re: Actor SQL Adapter for Oracle Service Name
                  Ranganath Samudrala

                  Use

                  jdbc:oracle:thin:@<host>:<PORT>:<DATABASENAME>

                   

                  OR

                   

                  jdbc:oracle:thin:@<host>:<PORT>/<SERVICENAME>

                  • 6. Re: Actor SQL Adapter for Oracle Service Name
                    Exequiel Carballeda

                    I configure the adapter with the second form but the error is the same.

                    Config

                    <request-data>

                      <sqlAdapterRequest>

                        <targets>

                          <target name="">

                            <user-name>user</user-name>

                            <password>****MASKED****</password>

                            <driver>oracle.jdbc.driver.OracleDriver</driver>

                            <url>jdbc:oracle:thin:@host:1521/service_name</url>

                          </target>

                        </targets>

                        <action>select sysdate from dual</action>

                      </sqlAdapterRequest>

                    </request-data>

                     

                    error

                        <error>error occured parsing request: Message[summary=Exception occured in ORACLESQL SQL URL string generation exception Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" ), detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" )], detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" ), detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" )]], detail=Exception occured in ORACLESQL SQL URL string generation exception Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" ), detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" )], detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Message[summary=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" ), detail=Exception occured in ORACLESQL SQL connection initialization exception for connection string jdbc:oracle:thin:host:1521/service_name?null. Adapter: ORACLESQL Unable to get connection to the database with connect string: jdbc:oracle:thin:host:1521/service_name; user: null - Error: Cannot create PoolableConnectionFactory (Io exception: Invalid connection string format, a valid format is: "host:port:sid" )]]]</error>

                    • 7. Re: Actor SQL Adapter for Oracle Service Name
                      Ranganath Samudrala

                      I just tested it and I do not see the same issue:

                      <request-data>

                        <sqlAdapterRequest>

                          <targets>

                            <target name="">

                              <user-name>USER</user-name>

                              <password>****MASKED****</password>

                              <driver>oracle.jdbc.driver.OracleDriver</driver>

                              <url>jdbc:oracle:thin:@HOST:1521/ora112db</url>

                            </target>

                          </targets>

                          <action>select sysdate from dual</action>

                        </sqlAdapterRequest>

                      </request-data>

                       

                      <sqlAdapterResponse>

                        <metadata>

                          <status>success</status>

                        </metadata>

                        <targets-output>

                          <target-output name="HOST">

                            <target-metadata>

                              <database-vendor>Oracle</database-vendor>

                              <status>success</status>

                            </target-metadata>

                            <action-response>

                              <row>

                                <column name="SYSDATE" label="SYSDATE">1526083129000</column>

                              </row>

                              <metadata>

                                <queryExecuted>select sysdate from dual</queryExecuted>

                                <execution-milliseconds>53</execution-milliseconds>

                                <responseRowCount>1</responseRowCount>

                                <responseColumnCount>1</responseColumnCount>

                                <status>success</status>

                              </metadata>

                            </action-response>

                          </target-output>

                        </targets-output>

                      </sqlAdapterResponse>

                      • 8. Re: Actor SQL Adapter for Oracle Service Name
                        Ranganath Samudrala

                        So what is the version of the adapter in use?

                        • 9. Re: Actor SQL Adapter for Oracle Service Name
                          Exequiel Carballeda

                          i use ro-adapter-sql-actor 20.16.03.00 rev 2

                          • 10. Re: Actor SQL Adapter for Oracle Service Name
                            Deepak Bhola

                            Try the below format

                             

                             

                            1. jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = <hostName>)(PORT = <port>))(CONNECT_DATA =  (SERVICE_NAME = <service_Name>)))

                             

                             

                            2. jdbc:oracle:thin:@//<hostname>:<port>/<service_Name>

                             

                             

                            please verify the service name in tnsnames.ora file

                            • 11. Re: Actor SQL Adapter for Oracle Service Name
                              Exequiel Carballeda

                              I try both formats but the error is the same. I download sql developer into BAO server and try to connect to the database with service name and the connection was successful. so with this information i think the problem is bao

                              • 12. Re: Actor SQL Adapter for Oracle Service Name
                                Ranganath Samudrala

                                What is the OJDBC jar file version that is being used?

                                • 14. Re: Actor SQL Adapter for Oracle Service Name
                                  Ranganath Samudrala

                                  Why are we using spring-jdbc JAR file? Do you have a version of ojdbc.jar file in the environment? Like in AO_HOME/lib/shared, AO_HOME/tomcat/lib or AO_HOME/tomcat/webapps/baocdp/WEB-INF/lib folder?

                                  1 2 Previous Next