<?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: Connection to an external database. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578053#M260982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is true that all connection to external databases are maintained in table DBCON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you paste your code? You must be using a Connection to connect to the external database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2006 12:20:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-18T12:20:22Z</dc:date>
    <item>
      <title>Connection to an external database.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578051#M260980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi we r using native sql commands and are connecting to external database. As far as I know from the discussions here i thought that these sort of connections are maintained in the table dbcon. But i don't see any entries in that table.&lt;/P&gt;&lt;P&gt;WHere as i could connect to that database succesfully and getting the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table name for the external system is NOVARTIS.TABLE_ADDRESS@ANK like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where could be that settings made.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 12:12:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578051#M260980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T12:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Connection to an external database.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578052#M260981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Forum Thread:-&lt;/P&gt;&lt;P&gt;1. In developer server you have to configure the tnsnames.ora. For doing this you should talk with a person who knows how to configure this file. In the register you should especify: protocol, host and port to connect to the other database system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then, you enter a register in the DBCON table. In this entrie you especify user, password, database id (in my case I wrote ORA because i am connecting to an oracle database), and in the enviroment field you write the name or alias of the register in the tnsnames.ora&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In the abap program you use native sql sentences for connecting to the external database. This is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;CONNECT TO :p_conexion AS 'C1'&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;SET CONNECTION 'C1'&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL PERFORMING save_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COD_CGE, COD_SAX, TO_CHAR(FECHA,'YYYYMMDD'), &lt;/P&gt;&lt;P&gt;VALOR, HORA, TIPO, PAIS, SOCIEDAD&lt;/P&gt;&lt;P&gt;INTO :wa_serv_aux&lt;/P&gt;&lt;P&gt;FROM TEST_TABLE&lt;/P&gt;&lt;P&gt;WHERE FECHA &amp;gt;= TO_DATE( :W_FEC1 , 'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;AND FECHA &amp;lt;= TO_DATE( :W_FEC2 , 'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;ROLLBACK&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;DISCONNECT 'C1'&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the form save_data i insert the work area into the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that`s all. The most important thing is to configurate the tnsnames.ora file on the server side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;Note:- One small suggestion, Before Posting Thread in SDN, search for the related topics in SDN forums and then post your thread, it would be helpfull for everybody.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards:-&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Santosh&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Santosh (INDIA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 12:20:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578052#M260981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T12:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Connection to an external database.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578053#M260982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is true that all connection to external databases are maintained in table DBCON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you paste your code? You must be using a Connection to connect to the external database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 12:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578053#M260982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T12:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Connection to an external database.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578054#M260983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything depends on the database platforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if your SAP is based on Oracle database, and the external is based on an Oracle database, you can set up a "database-link" between the two systems. In this case you don't have to fill the DBCON table, just call the native SQL within ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to reach from SAP an external MSSQL server, you have to specify the DBCON table like this:&lt;/P&gt;&lt;P&gt;CON_NAME: logical name, can be anything&lt;/P&gt;&lt;P&gt;DBMS: MSS&lt;/P&gt;&lt;P&gt;USERNAME: MSSQL_USER (must be defined in the MSSQL)&lt;/P&gt;&lt;P&gt;PASSWORD: password of MSSQL_USER&lt;/P&gt;&lt;P&gt;CONENV: MSSQL_SERVER=1.2.3.4 MSSQL_DBNAME=MSSQL_SERVER&lt;/P&gt;&lt;P&gt;After setting up the correct settings you can use the native SQL to reach the tables within the database defined in the CON_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer the following SAP notes in this task: 323151 (Multi-connect), and 178949 (MSSQL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 12:23:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578054#M260983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T12:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Connection to an external database.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578055#M260984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamás,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u pls tell how is that database link maintained? As you have said SAP database and the external database are on oracle platform only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 04:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/connection-to-an-external-database/m-p/1578055#M260984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T04:07:34Z</dc:date>
    </item>
  </channel>
</rss>

