<?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>Question Re: Having trouble with using multiple local database query in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815019#M4845862</link>
    <description>&lt;P&gt;thx, I tried but failed even explicitly adding the parameter
  ;DatabaseKey=theRquiredKey
also tried using the users dataset
 'dsn=d:\\db2.dsn'&lt;/P&gt;
&lt;P&gt;The user dataset content is:&lt;/P&gt;
&lt;P&gt;[ODBC]
DRIVER=SQL Anywhere 11&lt;/P&gt;
&lt;P&gt;DatabaseKey=theRquiredKey&lt;/P&gt;
&lt;P&gt;Integrated=YES&lt;/P&gt;
&lt;P&gt;AutoStop=YES&lt;/P&gt;
&lt;P&gt;DatabaseFile=d:\\db2.db&lt;/P&gt;
&lt;P&gt;I added extra blank line to the above so the content does not appear as a long line in the resulting comment&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2015 17:06:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-04-20T17:06:41Z</dc:date>
    <item>
      <title>Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaq-p/13815014</link>
      <description>&lt;LI-CODE lang="sql"&gt;drop server remote_db2;

CREATE SERVER remote_db2
CLASS 'saodbc'
USING 'db2'; // so far so good, no error

CREATE EXISTING TABLE zProxy_pf_DailyValuation_Summary_by_Grp
/* AT 'remote_db2.dba.pf_DailyValuation_Summary_by_Grp'; // not found, so try next */
at 'remote_db2.dba.pf_DailyValuation_Summary_by_Grp';   / also not found&lt;/LI-CODE&gt;


&lt;P&gt;the error message was:
Could not execute statement.
Remote server '' could not be found
SQLCODE=-659, ODBC 3 State="HY000"
Line 9, column 1&lt;/P&gt;
&lt;P&gt;what did I do wrong?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2015 02:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaq-p/13815014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-19T02:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815016#M4845859</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;CREATE SERVER remote_db2 CLASS 'saodbc' USING 'db2'; // so far so good, no error&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Note: The "so far so good" does not really tell that much, AFAIK SQL Anywhere does not try to connect to the remote server when applying the CREATE SERVER statement, so it's quite possible the connection information stored in the DSN "db2" might not be fitting. In that case it would be the common behaviour that CREATE SERVER is successful and the following CREATE EXISTING TABLE statements will fail.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 03:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815016#M4845859</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2015-04-20T03:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815017#M4845860</link>
      <description>&lt;P&gt;db2 is not exactly a dsn but rather one of the server names that shows up in the connection popup database tab after clicking find servers
I had previously tried also the actual connection string in place of db2;I got the same error in exec the stmt for proxy table
what else can do?
background: the local databases were prestarted with dbeng11&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815017#M4845860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-20T12:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815018#M4845861</link>
      <description>&lt;P&gt;This assumes that db2 is the engine and database name....&lt;/P&gt;
&lt;PRE&gt;CREATE SERVER remote_db2 CLASS 'SAODBC' 
   USING 'DRIVER=SQL Anywhere 11;ENG=db2;DBN=db2';

CREATE EXISTING TABLE zProxy_pf_DailyValuation_Summary_by_Grp
   AT 'db2_server..dba.pf_DailyValuation_Summary_by_Grp';
&lt;/PRE&gt;

&lt;P&gt;If you don't have a DSN you must provide a connection string with DRIVER.&lt;/P&gt;
&lt;P&gt;Also, the AT string has four positional components, not three, with the second component (database) being ommitted for SQL Anywhere.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:48:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815018#M4845861</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2015-04-20T13:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815019#M4845862</link>
      <description>&lt;P&gt;thx, I tried but failed even explicitly adding the parameter
  ;DatabaseKey=theRquiredKey
also tried using the users dataset
 'dsn=d:\\db2.dsn'&lt;/P&gt;
&lt;P&gt;The user dataset content is:&lt;/P&gt;
&lt;P&gt;[ODBC]
DRIVER=SQL Anywhere 11&lt;/P&gt;
&lt;P&gt;DatabaseKey=theRquiredKey&lt;/P&gt;
&lt;P&gt;Integrated=YES&lt;/P&gt;
&lt;P&gt;AutoStop=YES&lt;/P&gt;
&lt;P&gt;DatabaseFile=d:\\db2.db&lt;/P&gt;
&lt;P&gt;I added extra blank line to the above so the content does not appear as a long line in the resulting comment&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 17:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815019#M4845862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-20T17:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815020#M4845863</link>
      <description>&lt;P&gt;Note: In Breck's sample, the first part of the AT clause should match the server name from the CREATE SERVER statement, i.e.&lt;/P&gt;
&lt;P&gt;... AT 'remote_db2..dba.pf_DailyValuation_Summary_by_Grp';&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 03:18:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815020#M4845863</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2015-04-21T03:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815021#M4845864</link>
      <description>&lt;P&gt;What is the "The user dataset content"?&lt;/P&gt;
&lt;P&gt;The current server (on machine 1) should be able to connect to the remote server with the same connection string information you would use when making, say, an DBISQL connection from machine 1 to the remote server.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 03:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815021#M4845864</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2015-04-21T03:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815022#M4845865</link>
      <description>&lt;P&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/26/volker-barth"&gt;@Volker&lt;/A&gt;: Thanks, I fixed that.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 13:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815022#M4845865</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2015-04-21T13:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815023#M4845866</link>
      <description>&lt;P&gt;I should clarify. user dataset content is what is in d:\\db2.dsn file - is actually the user defined  obdc definition of the local database connection parameters&lt;/P&gt;
&lt;P&gt;And I forgot to put an extra blank line after [ODBC] so the illustration got run into non sensical single line&lt;/P&gt;
&lt;P&gt;so I tried with error:&lt;/P&gt;
&lt;PRE&gt;CREATE SERVER remote_db2 CLASS 'saodbc' USING 'DBN=db2;DSN=d:\\db2.dsn';
CREATE EXISTING TABLE zProxy_pf_DailyValuation_Summary_by_Grp
at 'remote_db2.dba.pf_DailyValuation_Summary_by_Fin_Grp';
&lt;/PRE&gt;

&lt;P&gt;ended up the same old error&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 00:35:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815023#M4845866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-22T00:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815024#M4845867</link>
      <description>&lt;P&gt;As Breck has stated above:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Also, the AT string has four positional components, not three, with the second component (database) being ommitted for SQL Anywhere.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So I guess your statement is still missing a second dot before the "dba", which makes "pf_DailyValuation_Summary_by_Fin_Grp" the owner name...&lt;/P&gt;
&lt;P&gt;Besides that, IMHO, it's ambiguous (or at least not that clear) to put both "DSN=..." and "DBN=..." in the USING clause - the "DBN=..." entry should instead be part of the ODBC DSN entry itself.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 03:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815024#M4845867</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2015-04-22T03:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with using multiple local database query</title>
      <link>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815015#M4845858</link>
      <description>&lt;P&gt;thx.&lt;/P&gt;
&lt;P&gt;I just failed to use dsn as part of using parameter.
I ended explicitly specify all required values including dbkey value surrounded by double quotes to valid trouble with the single in the dbkey value. &lt;/P&gt;
&lt;P&gt;that got me pass the create server statement. Finally executed the query per suggestion without trouble.&lt;/P&gt;
&lt;P&gt;thx again&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 13:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/having-trouble-with-using-multiple-local-database-query/qaa-p/13815015#M4845858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-04-23T13:00:27Z</dc:date>
    </item>
  </channel>
</rss>

