<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ABAP(unix) connection to sql server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909890#M1329566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggestion is like this:&lt;/P&gt;&lt;P&gt;1. Have your basis team create a connection to the sql server. They do it with transaction DBCO.&lt;/P&gt;&lt;P&gt;2. In your ABAP program you need to use native SQL to connect to the database and select data. For example the code below works for an external Oracle database.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: conn like dbcon-con_name.
conn = 'SRV001'.
    EXEC SQL.
      connect to :conn
    ENDEXEC.
    EXEC SQL.
      set connection :conn
    ENDEXEC.

  EXEC SQL.
    OPEN C FOR
      SELECT * from TBLA
      WHERE ....
  ENDEXEC.

  DO.
    EXEC SQL.
      FETCH NEXT C INTO :wa
    ENDEXEC.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    APPEND wa TO itbl.
  ENDDO.
  EXEC SQL.
    CLOSE C
  ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheers, Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2009 16:45:15 GMT</pubDate>
    <dc:creator>gabriel_pill-kahan</dc:creator>
    <dc:date>2009-07-29T16:45:15Z</dc:date>
    <item>
      <title>ABAP(unix) connection to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909887#M1329563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert, &lt;/P&gt;&lt;P&gt;i'm trying to connect my sap system(in UNIX platform) to a sql server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do this by ODBC connection with dbmssslib.dll in a sap system on windows and it works.&lt;/P&gt;&lt;P&gt;The customer have a sap system on UNIX, so the connection by ODBC doesn't work, i would like to connect it using abap statement(JDBC getconnection).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ciao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 12:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909887#M1329563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP(unix) connection to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909888#M1329564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Put your Query on &lt;STRONG&gt;Database and OS Platform&lt;/STRONG&gt;  instead of &lt;STRONG&gt;ABAP Development&lt;/STRONG&gt;, I think you get some positive reply by that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sarbajit Majumdar on Jul 29, 2009 6:50 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sarbajit Majumdar on Jul 29, 2009 6:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 13:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909888#M1329564</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-07-29T13:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP(unix) connection to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909889#M1329565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;i need to get the query data in SAP system, for example in a Function Module.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Claudio.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 13:28:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909889#M1329565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T13:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP(unix) connection to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909890#M1329566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My suggestion is like this:&lt;/P&gt;&lt;P&gt;1. Have your basis team create a connection to the sql server. They do it with transaction DBCO.&lt;/P&gt;&lt;P&gt;2. In your ABAP program you need to use native SQL to connect to the database and select data. For example the code below works for an external Oracle database.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: conn like dbcon-con_name.
conn = 'SRV001'.
    EXEC SQL.
      connect to :conn
    ENDEXEC.
    EXEC SQL.
      set connection :conn
    ENDEXEC.

  EXEC SQL.
    OPEN C FOR
      SELECT * from TBLA
      WHERE ....
  ENDEXEC.

  DO.
    EXEC SQL.
      FETCH NEXT C INTO :wa
    ENDEXEC.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    APPEND wa TO itbl.
  ENDDO.
  EXEC SQL.
    CLOSE C
  ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheers, Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 16:45:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909890#M1329566</guid>
      <dc:creator>gabriel_pill-kahan</dc:creator>
      <dc:date>2009-07-29T16:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP(unix) connection to sql server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909891#M1329567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel,&lt;/P&gt;&lt;P&gt;i have a system on Unix so i think to miss any libraries for use a DBCO connection.&lt;/P&gt;&lt;P&gt;this is the errore if i try your suggestion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As well as the standard connection, an attempt was made to set up      &lt;/P&gt;&lt;P&gt;another database connection, under the specified ID. The Shared Library&lt;/P&gt;&lt;P&gt;for this second database could not be found.                           &lt;/P&gt;&lt;P&gt;The Shared Library is usually found in the the Executable              &lt;/P&gt;&lt;P&gt;directory (profile parameter DIR_LIBRARY) under the name dbs           &lt;/P&gt;&lt;P&gt;&amp;lt;dbs&amp;gt;slib&amp;lt;os_ext&amp;gt;. &amp;lt;dbs&amp;gt; stands for the database type and &amp;lt;os_ext&amp;gt;     &lt;/P&gt;&lt;P&gt;stands for the operating system-specific extension of the Shared       &lt;/P&gt;&lt;P&gt;Libraries.                                                             &lt;/P&gt;&lt;P&gt;The database type is determined from the entry that corresponds to the &lt;/P&gt;&lt;P&gt;specified DB ID in the table DBDCON. Check whether the data in this    &lt;/P&gt;&lt;P&gt;entry is correct.                                                      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have an idea how can i connect by JDBC ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 18:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-unix-connection-to-sql-server/m-p/5909891#M1329567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T18:21:38Z</dc:date>
    </item>
  </channel>
</rss>

