<?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: Select @@SERVERNAME in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247523#M620771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can do that in the script, for example. If the driver supports that, that will return a field with the servername.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Feb 2017 16:51:46 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2017-02-22T16:51:46Z</dc:date>
    <item>
      <title>Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247522#M620770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our DBAs are suspicious of a connection string that we are using in our scripts. They asked if I could run &lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue;"&gt;Select&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas;"&gt; &lt;SPAN style="color: fuchsia;"&gt;@@SERVERNAME&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp; to verify the connection, but I'm not sure how to make it work or if it's possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&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;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247522#M620770</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2017-02-22T16:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247523#M620771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can do that in the script, for example. If the driver supports that, that will return a field with the servername.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247523#M620771</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-02-22T16:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247524#M620772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Miguel. But I guess I'm doing something wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I simply have the connection string, then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@SERVERNAME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But get an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB read failed&lt;/P&gt;&lt;P&gt;Select @@SERVERNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The driver is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Provider=SQLOLEDB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see anything there that would make it fail?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:55:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247524#M620772</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2017-02-22T16:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247525#M620773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do any SELECT * FROM table does it work? (A simple one just to test that the connection is OK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has the user permissions to check that variable (i.e.: logging in as that user in SQL and selecting, does it return anything)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:03:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247525#M620773</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-02-22T17:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247526#M620774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SELECT * FROM table does work. I used the command from SQL Management Studio and it worked.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The database that we think we're hitting is a replicated reporting DB, but the DBAs seem to think it's hitting production. So they asked me to do this to prove it one way or the other... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Would it need some LOAD statement before the @@SERVERNAME ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247526#M620774</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2017-02-22T17:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247527#M620775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If SELECT * FROM table does not work, there is definitely an issue with the permissions in the user that QlikView has n the connection string or the one defined in the DSN. If you cannot run queries with that user, then I don't know how else you can provide any useful data. They can see which IP is connecting the server, if that matches with Production server you are hitting then Production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While LOAD is always a good idea, for this test there is no need to use it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247527#M620775</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2017-02-22T17:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select @@SERVERNAME</title>
      <link>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247528#M620776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-SERVERNAME/m-p/1247528#M620776</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2017-02-22T17:22:34Z</dc:date>
    </item>
  </channel>
</rss>

