<?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: SAS iHistorian stored procedure in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240656#M6254</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, this isn't an SQL Server forum. &amp;nbsp;Does the code you pass through:&lt;/P&gt;
&lt;PRE&gt;    execute Technical.dbo.LL_ZD_iHist_one_coil
    @coil_id = '10805800',
    @track_no = '300',
    @taglist = 'LLZPALSV.ROLL_FORCE.F_CV',
    @interval = '10'
&lt;/PRE&gt;
&lt;P&gt;Actually work if you use the SQL Server SQL interface, i.e. does that run on the database without problems. &amp;nbsp;If so then you would need to loko at your permissions. &amp;nbsp;You give no logon information in the connect statement:&lt;/P&gt;
&lt;PRE&gt;connect to odbc(noprompt = "server=1.130.17.85 ;DRIVER=SQL Server;  Trusted Connection=Yes; DATABASE=Technical;");&lt;/PRE&gt;
&lt;P&gt;And the log is telling you that anonymous doesn't have access rights to the db.&lt;/P&gt;
&lt;PRE&gt;Login failed for user
       'NT AUTHORITY\ANONYMOUS LOGON'&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Dec 2015 13:10:47 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-12-23T13:10:47Z</dc:date>
    <item>
      <title>SAS iHistorian stored procedure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240654#M6253</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I never post anything on this site, but I'm pretty stuck at a problem right now, so any help would be very much appreciated:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to connect to a procedure called LL_ZD_iHist_one_coil and I don't know why I'm not getting the data from the server. I suspected it was just not having the rights to access it. I already called the server guys who added me to all usergroups available, but still not luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The procedure I'm trying to run looks like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    connect to odbc(noprompt = "server=1.130.17.85 ;DRIVER=SQL Server;  Trusted Connection=Yes; DATABASE=Technical;");
    create table work.temp_historian as
    select *
    from connection to odbc
    (
    execute Technical.dbo.LL_ZD_iHist_one_coil
    @coil_id = '10805800',
    @track_no = '300',
    @taglist = 'LLZPALSV.ROLL_FORCE.F_CV',
    @interval = '10'
    );
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The result is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: CLI prepare error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
       'NT AUTHORITY\ANONYMOUS LOGON'.
SQL statement: execute Technical.dbo.LL_ZD_iHist_one_coil @coil_id = '10805800', @track_no =
       '300', @taglist = 'LLZPALSV.ROLL_FORCE.F_CV', @interval = '10'.
1349  quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The weird thing is, if I unquote one of the parameters from the SQL statement, I get the following response:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: CLI prepare error: [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure or function
       'LL_ZD_iHist_one_coil' expects parameter '@interval', which was not supplied.
SQL statement: execute Technical.dbo.LL_ZD_iHist_one_coil @coil_id = '10805800', @track_no =
       '300', @taglist = 'LLZPALSV.ROLL_FORCE.F_CV'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So SAS is able to at least communicate with the server. Combine that with the fact that I'm added to nearly any usergroup on this server and the fact that I can run other stored procedures from my SAS system leaves me out of options to try... Please let me know how to solve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Just&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 12:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240654#M6253</guid>
      <dc:creator>just1986_2</dc:creator>
      <dc:date>2015-12-23T12:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS iHistorian stored procedure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240656#M6254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, this isn't an SQL Server forum. &amp;nbsp;Does the code you pass through:&lt;/P&gt;
&lt;PRE&gt;    execute Technical.dbo.LL_ZD_iHist_one_coil
    @coil_id = '10805800',
    @track_no = '300',
    @taglist = 'LLZPALSV.ROLL_FORCE.F_CV',
    @interval = '10'
&lt;/PRE&gt;
&lt;P&gt;Actually work if you use the SQL Server SQL interface, i.e. does that run on the database without problems. &amp;nbsp;If so then you would need to loko at your permissions. &amp;nbsp;You give no logon information in the connect statement:&lt;/P&gt;
&lt;PRE&gt;connect to odbc(noprompt = "server=1.130.17.85 ;DRIVER=SQL Server;  Trusted Connection=Yes; DATABASE=Technical;");&lt;/PRE&gt;
&lt;P&gt;And the log is telling you that anonymous doesn't have access rights to the db.&lt;/P&gt;
&lt;PRE&gt;Login failed for user
       'NT AUTHORITY\ANONYMOUS LOGON'&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Dec 2015 13:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240656#M6254</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-23T13:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS iHistorian stored procedure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240814#M6255</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply RW9. I just asked IT for SQL Server, due to holidays it might take them a while to get it installed.&lt;/P&gt;&lt;P&gt;It is correct that I haven't given any logon information, but I don't think that is necessary if I'm added to the rigth user-groups. But I'll check with the SQL Server Mgmt program.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2015 16:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-iHistorian-stored-procedure/m-p/240814#M6255</guid>
      <dc:creator>just1986_2</dc:creator>
      <dc:date>2015-12-24T16:13:58Z</dc:date>
    </item>
  </channel>
</rss>

