<?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: Assessing SQL server from host machine in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278337#M55991</link>
    <description>&lt;PRE&gt;
You also need specify SCHEMA and Try IP address if you are using Oracle Visual Box .
Copy my code and change SERVER='your IP address'


"Also the Library created by  "libname MyLib '/folders/myfolders/';" statement disappears."
Because you use the same library name MYLIB in libname, try other name Like Z .




&lt;/PRE&gt;</description>
    <pubDate>Sat, 18 Jun 2016 06:40:51 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-06-18T06:40:51Z</dc:date>
    <item>
      <title>Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277490#M55731</link>
      <description>&lt;P&gt;I am using SAS University edition and want to access the data from SQL server on my host machine(Windows 8.1 64 bit) in my SAS code. Virtual Machine(Oracle VM Virtualbox) OS is also Windows 8.1 64 bit. I am getting following error.&lt;/P&gt;&lt;DIV class="sasError"&gt;ERROR: The product with which the engine ODBC is associated is either not licensed for your system or the product license has&lt;/DIV&gt;&lt;DIV class="sasError"&gt;expired. Please contact your SAS installation representative.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jun 2016 06:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277490#M55731</guid>
      <dc:creator>chaitalip</dc:creator>
      <dc:date>2016-06-15T06:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277491#M55732</link>
      <description>&lt;P&gt;Generally, ODBC connections&amp;nbsp;are not supported in SAS UE - there are many posts that concludes that.&lt;/P&gt;
&lt;P&gt;But,&amp;nbsp;@Ksharp has put forward a hack for a work-around - see if that is applicable to your&amp;nbsp;situation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Analytics-U/Connect-to-SQL-Server-Oracle-Database-by-SAS-University-Edition/m-p/273857/highlight/true#M3724" target="_blank"&gt;https://communities.sas.com/t5/SAS-Analytics-U/Connect-to-SQL-Server-Oracle-Database-by-SAS-University-Edition/m-p/273857/highlight/true#M3724&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 06:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277491#M55732</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-06-15T06:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277493#M55733</link>
      <description>&lt;P&gt;HaHa.Yes. UE can talk to DB .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also try IP Address&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME z PCFILES SERVER='192.168.56.1' DSN=ksharp USER=xxxxxxx  PASSWORD=xxxxxxx SCHEMA=dbo readbuff=10000 access=readonly ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jun 2016 07:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/277493#M55733</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-15T07:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278148#M55940</link>
      <description>&lt;P&gt;Hi ksharp,&lt;/P&gt;&lt;P&gt;As per your guidelines I have installed PCFiles and configured the ODBC connection. But, when trying to execute following statements in SAS University Edition&lt;/P&gt;&lt;P&gt;libname MyLib '/folders/myfolders/';&lt;BR /&gt;LIBNAME MyLib PCFILES SERVER=SERVER DSN=SAS USER='sa' PASSWORD='database@1' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting following errors.&lt;/P&gt;&lt;P&gt;- Libref MyLib is not assigned.&lt;/P&gt;&lt;P&gt;- Error in LIBNAME Statement.&lt;/P&gt;&lt;P&gt;- Invalid Option Name.&lt;/P&gt;&lt;P&gt;Also the Library created by&amp;nbsp; "libname MyLib '/folders/myfolders/';" statement disappears.&lt;/P&gt;&lt;P&gt;Pl. help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, in advance&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 10:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278148#M55940</guid>
      <dc:creator>chaitalip</dc:creator>
      <dc:date>2016-06-17T10:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278337#M55991</link>
      <description>&lt;PRE&gt;
You also need specify SCHEMA and Try IP address if you are using Oracle Visual Box .
Copy my code and change SERVER='your IP address'


"Also the Library created by  "libname MyLib '/folders/myfolders/';" statement disappears."
Because you use the same library name MYLIB in libname, try other name Like Z .




&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Jun 2016 06:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278337#M55991</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-18T06:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278339#M55992</link>
      <description>&lt;PRE&gt;
Also when you configured the ODBC connection, make sure test it at the last step and it shows success! .

&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Jun 2016 06:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278339#M55992</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-18T06:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278583#M56055</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; As suggested by you i have followed the entire procedure as below,&lt;/P&gt;&lt;P&gt;LIBNAME z PCFILES SERVER='My IP Address' DSN=SAS USER='My System user' PASSWORD='MySystem password' SCHEMA=dbo readbuff=10000 access=readonly ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but, I am getting following error :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;ERROR: Server is unable to authenticate user credentials. (missing or invalid SERVERUSER=&amp;lt;username&amp;gt; SERVERPASS=&amp;lt;password&amp;gt; on &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;libname statement).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;ERROR: Error in the LIBNAME statement.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;When I searched for this error I was directed to "&lt;A href="http://support.sas.com/kb/45/460.html&amp;quot;" target="_blank"&gt;http://support.sas.com/kb/45/460.html"&lt;/A&gt; link. which suggested&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;- setting "Logon as a Batch Job" privilege in the local security policy on the Windows server.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;Still i am getting the above error.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;Pl. Help.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;Thanks in Advance.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Jun 2016 06:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278583#M56055</guid>
      <dc:creator>chaitalip</dc:creator>
      <dc:date>2016-06-20T06:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278591#M56058</link>
      <description>&lt;P&gt;1) Did you start PC FILES by hand ? Not as a system service to start ?&lt;/P&gt;
&lt;P&gt;2)Did you set up a password for your PC FILES Server?&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3683iC835571776459AAA/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="x.png" title="x.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3)My PCFILES Server and UE are on the same PC(laptop), &amp;nbsp;OS is Windows 7 Professional , UE is download before two weeks .&lt;/P&gt;
&lt;P&gt;Can you change your OS or PC . Just a normal computer , not Server Configure .&lt;/P&gt;
&lt;P&gt;Here is my LOG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 51         
 52         LIBNAME z PCFILES SERVER='192.168.56.1' DSN=ksharp USER=cbcuser001  PASSWORD=XXXXXXXX SCHEMA=dbo readbuff=10000
 52       ! access=readonly ;
 NOTE: 已成功分配逻辑库引用名“Z”，如下所示: 
        引擎:        PCFILES 
        物理名: ksharp
 53         
 54         
 55         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 65         &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2016 07:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278591#M56058</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-20T07:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278592#M56059</link>
      <description>&lt;P&gt;Is that IP is your real IP of PC FILES Server?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start-&amp;gt;type &amp;nbsp;&lt;STRONG&gt;CMD &amp;nbsp;&lt;/STRONG&gt;at run line -&amp;gt; type &amp;nbsp;&lt;STRONG&gt; ipconfig /all&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp;to your IPv4 Address.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 07:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278592#M56059</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-20T07:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278594#M56060</link>
      <description>&lt;P&gt;&lt;SPAN&gt;USER and PASSWORD &amp;nbsp;is for DSN when you set up a connection to DB. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;NOT 'My System user'&amp;nbsp;'&lt;SPAN&gt;My System PW'.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 07:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278594#M56060</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-20T07:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278629#M56065</link>
      <description>&lt;P&gt;Hi KSharp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply. It helped. Now, I am able to access the SQL Server but, have one more query.&lt;/P&gt;&lt;P&gt;How do i&amp;nbsp; get the data from specific table of my sql database which i have selected as default database in my DSN.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #353535; font-family: 'Source Sans Pro', sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #c7e3f2;"&gt;libname MyLib '/folders/myfolders/';&lt;BR /&gt;LIBNAME z PCFILES SERVER='MyIP' DSN=SAS USER=sa PASSWORD=database@1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;SCHEMA=dbo readbuff=10000 access=readonly;&lt;BR /&gt;%let path = /folders/myfolders/;&lt;BR /&gt;libname strat "&amp;amp;path";&lt;BR /&gt;&lt;BR /&gt;proc sql ;&lt;BR /&gt;connect to PCFILES(SERVER='my IP' DSN=SAS USER=sa PASSWORD=database@1);&lt;BR /&gt;create table work.stud as select* from connection to PCFILES&lt;BR /&gt;(PCFILES:: SQLTables "", "", "", "");&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;proc print data=work.stud;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #353535; font-family: 'Source Sans Pro', sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: nowrap; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #c7e3f2;"&gt;OUTPUT: Attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12672i1985318D0CA133F0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="OP.png" title="OP.png" /&gt;</description>
      <pubDate>Mon, 20 Jun 2016 10:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278629#M56065</guid>
      <dc:creator>chaitalip</dc:creator>
      <dc:date>2016-06-20T10:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278884#M56147</link>
      <description>&lt;PRE&gt;
Once you successfully  connect to DB , that is going to be easy to pull data out from them.
You can do the same thing as I post :


%let path = /folders/myfolders/;
libname strat "&amp;amp;path";

data strat.MarksDtls;
 set MyLib.MarksDtls;
run;



Or if you need pull out many tables. Try this:

data _null_;
 set  work.stud (where=(table_schem='dbo'));
 call execute(cats('data strat.',table_name,'; set MyLib.',table_name,';run;'));
run;



&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jun 2016 01:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278884#M56147</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-21T01:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing SQL server from host machine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278885#M56148</link>
      <description>&lt;PRE&gt;
Should be :

data strat.MarksDtls;
 set  Z.MarksDtls;
run;


It seems that I can't edit my post.
&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jun 2016 01:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assessing-SQL-server-from-host-machine/m-p/278885#M56148</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-21T01:08:10Z</dc:date>
    </item>
  </channel>
</rss>

