<?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: Run native SQL from DBACockPit using a DBCON to external SQL Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035913#M1899009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great links thks. Yes sorry if my initial description wasn't clear but the challenge was to try and find a method to build native cross database queries quickly and easily from within the DBACockpit for testing data structures before building into a program.&amp;nbsp; In this case I wanted to join SAP transparent tables with legacy data stored in external SQL database on another machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Linked server&lt;/STRONG&gt; proved a good solution and easy to set up from DBACockpit! In case it helps anyone :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Execute&lt;/STRONG&gt; the following commands from within SQL Command Prompt of &lt;STRONG&gt;DBACockpit&lt;/STRONG&gt; to set up the linked server for external SQL DB (note use &lt;STRONG&gt;dbo&lt;/STRONG&gt; schema not the SAP schema) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EXEC HCD.dbo.sp_addlinkedserver @server = N'myLinkedServerName', @srvproduct=N'SQLSERVER', @provider=N'SQLNCLI', @datasrc=N'mySQLServer', @catalog=N'myDB'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set up the &lt;STRONG&gt;security&lt;/STRONG&gt; for linked server :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EXEC HCD.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'&lt;EM style="font-size: 13.3333330154419px;"&gt;myLinkedServerName&lt;/EM&gt;',@useself=N'False',@locallogin=NULL,@rmtuser=N'&lt;EM style="font-size: 13.3333330154419px;"&gt;myUserName&lt;/EM&gt;',@rmtpassword='########'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then &lt;STRONG&gt;execute&lt;/STRONG&gt; some native SQL to access the linked server :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SELECT * FROM [myLinkedServerName].myDB.dbo.myTable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and join against local SAP tables if required ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 14:46:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-05-13T14:46:48Z</dc:date>
    <item>
      <title>Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035904#M1899000</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;I have set up a connection to an external MS SQL Server using to DBCO and tested the connection works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to be able to execute native SQL statements against this external DBCON connection from the SQL Command Editor within DBACockPit for testing purposes.&amp;nbsp; However not sure if this is possible as I am the guessing the DBCON mechanism may need the ABAP stack to work ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is possible I would greatly appreciate help with the syntax. ie select * from MYDBCON.MYTABLE etc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for any assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 15:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035904#M1899000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-06T15:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035905#M1899001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You need an ABAP stack to use DBACockpit.&lt;BR /&gt;Are you able to run transaction DBACockpit?&lt;BR /&gt; &lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Eduardo Rezende&lt;BR /&gt;SAP Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 16:57:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035905#M1899001</guid>
      <dc:creator>former_member184473</dc:creator>
      <dc:date>2015-05-06T16:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035906#M1899002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I can run the DBACockpit without problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I can run native SQL commands and functions from the SQL Command Dialogue within DBACockpit no problem. ie simple example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select top 100 M.MATNR from MARA M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I want to be able to do is run native SQL commands over a DBCON I set up in DBCO transaction to an external SQL DB on another machine.&amp;nbsp; Is this possible ?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks for any help &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 17:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035906#M1899002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-06T17:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035907#M1899003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;BR /&gt; &lt;BR /&gt;Have you create the DBCON, you can setup a 'System' in DBACockpit and then use 'SQL Command Editor' under 'Diagnostics'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 18:02:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035907#M1899003</guid>
      <dc:creator>former_member184473</dc:creator>
      <dc:date>2015-05-06T18:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035908#M1899004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you refer the SAP KBA &lt;/P&gt;&lt;P&gt;&lt;A href="http://service.sap.com/sap/support/notes/1601608" style="font-family: Arial, Helvetica, sans-serif; background-color: #f0ab00;" title="1601608  - How to access an external Microsoft SQL Server database"&gt;&lt;SPAN class="title" style="color: #000000; font-weight: bold;"&gt;1601608 - How to access an external Microsoft SQL Server database&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2015 20:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035908#M1899004</guid>
      <dc:creator>S_Sriram</dc:creator>
      <dc:date>2015-05-06T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035909#M1899005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SS, Thank you for the link. Unfortunately that post doesn't cover my specific issue of executing linked DBCON queries from within the DBACockpit command editor. I am concluding it's not possible.&amp;nbsp; The same link can also be found at &lt;A __default_attr="78746" __jive_macro_name="blogpost" class="jive_macro jive_macro_blogpost" data-orig-content="How to access an external Microsoft SQL Server database" href="https://community.sap.com/"&gt;&lt;/A&gt; but not behind the MarketPlace walled garden for future reference. Thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 14:48:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035909#M1899005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-11T14:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035910#M1899006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; On the same SAP note have you check the point number 4 ? refer the snapshot&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/702429" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;SS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 19:01:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035910#M1899006</guid>
      <dc:creator>S_Sriram</dc:creator>
      <dc:date>2015-05-11T19:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035911#M1899007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes thank you SS this SAP note in point number 4 does actually include a link to another useful SAP note &lt;A href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3133313637343026"&gt;(Set up remote monitoring for MS SQL server DB)&lt;/A&gt; which describes in detail the steps necessary steps to set up a new 'System' in DBACockPit using the DBCON previously created in DBCO, as mentioned by &lt;A __default_attr="18266" __jive_macro_name="user" class="jive_macro_user jive_macro" data-objecttype="3" data-orig-content="Eduardo Rezende" href="https://community.sap.com/"&gt;&lt;/A&gt; above.&amp;nbsp; I missed this initially, so thank you for pointing it out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe these steps would allow me to execute native SQL commands against the remote MS SQL server using the DBACockpit SQL Command editor, provided I have selected the necessary system. See below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/702984" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I don't think its possible to write native SQL which will cross join across the two systems. I think you can only execute native SQL against the current system you have selected. Probably a better way to go for my purposes is to create a link server on the SAP SQL server to link to the remote SQL server using sp_addlinkedserver.&amp;nbsp; Thks for all the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 10:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035911#M1899007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-12T10:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035912#M1899008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex,&lt;BR /&gt; &lt;BR /&gt;From your description, I thought you need to join two different tables in the same database.&lt;BR /&gt;If you need access two different instances a linked server would be a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you could create a view with this join an access this view in your SAP system.&lt;BR /&gt;Remember to create the view accordingly the kernel limitations (uppercase, up to 26 characters in the name, ...). Check note &lt;A href="http://service.sap.com/sap/support/notes/512739"&gt;512739&lt;/A&gt; and document&amp;nbsp; &lt;A __default_attr="11704" __jive_macro_name="document" class="jive_macro_document jive_macro" data-orig-content="Transferring Data with DB Connect" href="https://community.sap.com/" modifiedtitle="true" title="Transferring Data with DB Connect"&gt;&lt;/A&gt;&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 17:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035912#M1899008</guid>
      <dc:creator>former_member184473</dc:creator>
      <dc:date>2015-05-12T17:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Run native SQL from DBACockPit using a DBCON to external SQL Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035913#M1899009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great links thks. Yes sorry if my initial description wasn't clear but the challenge was to try and find a method to build native cross database queries quickly and easily from within the DBACockpit for testing data structures before building into a program.&amp;nbsp; In this case I wanted to join SAP transparent tables with legacy data stored in external SQL database on another machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Linked server&lt;/STRONG&gt; proved a good solution and easy to set up from DBACockpit! In case it helps anyone :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Execute&lt;/STRONG&gt; the following commands from within SQL Command Prompt of &lt;STRONG&gt;DBACockpit&lt;/STRONG&gt; to set up the linked server for external SQL DB (note use &lt;STRONG&gt;dbo&lt;/STRONG&gt; schema not the SAP schema) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EXEC HCD.dbo.sp_addlinkedserver @server = N'myLinkedServerName', @srvproduct=N'SQLSERVER', @provider=N'SQLNCLI', @datasrc=N'mySQLServer', @catalog=N'myDB'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set up the &lt;STRONG&gt;security&lt;/STRONG&gt; for linked server :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EXEC HCD.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'&lt;EM style="font-size: 13.3333330154419px;"&gt;myLinkedServerName&lt;/EM&gt;',@useself=N'False',@locallogin=NULL,@rmtuser=N'&lt;EM style="font-size: 13.3333330154419px;"&gt;myUserName&lt;/EM&gt;',@rmtpassword='########'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then &lt;STRONG&gt;execute&lt;/STRONG&gt; some native SQL to access the linked server :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SELECT * FROM [myLinkedServerName].myDB.dbo.myTable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and join against local SAP tables if required ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/run-native-sql-from-dbacockpit-using-a-dbcon-to-external-sql-server/m-p/11035913#M1899009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-13T14:46:48Z</dc:date>
    </item>
  </channel>
</rss>

