<?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: Libname issue when connecting to SQL Server in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518564#M3579</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89343"&gt;@RJ2016&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was this working and then stopped?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you test, are you positive that the ODBC DSNs connecting to the same data source?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 20:29:37 GMT</pubDate>
    <dc:creator>JBailey</dc:creator>
    <dc:date>2018-12-04T20:29:37Z</dc:date>
    <item>
      <title>Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/516963#M3258</link>
      <description>&lt;P&gt;I am using SAS Enterprise guide 7.1 (SAS 9.04) I am trying to connect using my user details for example i have to stipulate domain name when connecting to Sql server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(replaced my real username with example)&lt;/P&gt;&lt;P&gt;libname testc sqlsvr dsn=Customer_details user=asd\E99999 password=12345678. schema='dbo'; &amp;lt;-- this does not work as it sas doesnt like the \ however i need to include the domain name asd otherwise i cant connect to sql server, is there a way to get around this issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;error message&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR: CLI error trying to establish connection: [SAS][ODBC SQL Server Wire Protocol driver][SQL Server]Login failed for user&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'asd\E99999'.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 08:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/516963#M3258</guid>
      <dc:creator>RJ2016</dc:creator>
      <dc:date>2018-11-29T08:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518131#M3494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89343"&gt;@RJ2016&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this something that has worked in the past and is now failing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There should be no problem with the '\' in the username. Perhaps, it could be that the account that you are using does not have permissions in the dbo schema or that there is another permissions problem with your account. One way to test this is to connect to the database using a non-SAS query tool - preferably one that ships with SQL Server (your DBA may be able to help with this). At a minimum try to connect via the ODBC Admin tool.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to try something via SAS remove the SCHEMA= option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 15:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518131#M3494</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-12-03T15:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518354#M3528</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The connection works&amp;nbsp;fine outside of SAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however when we upgraded, im not sure if we still have generic SAS/ACCESS to ODBC driver. that maybe the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can work around issue when testing a service account credentials for SQL Server so I might just have to get&amp;nbsp;the company create a service account so I don't have to use a domain\ user login.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 11:31:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518354#M3528</guid>
      <dc:creator>RJ2016</dc:creator>
      <dc:date>2018-12-04T11:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518564#M3579</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89343"&gt;@RJ2016&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was this working and then stopped?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you test, are you positive that the ODBC DSNs connecting to the same data source?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 20:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518564#M3579</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-12-04T20:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518682#M3605</link>
      <description>&lt;P&gt;Hi, yes the dns are connecting to same connection source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before the sas upgrade we used to connect using ODBC in the libname statement however when upgrading we use SQLsvr instead in the statement as ODBC no longer works (which was advised would happen after upgrade)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;if I libname&lt;/P&gt;&lt;P&gt;libname testc sqlsvr dsn=Customer_details user=Area_test password=12345678. schema='dbo'; &amp;lt; then this works as its a service account (using SQL Server Authentication within SQL Server)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname testc sqlsvr dsn=Customer_details user=dsaz\my_user_name&amp;nbsp; password=12345678. schema='dbo'; &amp;lt; then this does not work&amp;nbsp; (using Windows Authentication within SQL Server)&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 07:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/518682#M3605</guid>
      <dc:creator>RJ2016</dc:creator>
      <dc:date>2018-12-05T07:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519485#M3813</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/89343"&gt;@RJ2016&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I have your answer...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to reproduce your error. I fixed it by setting AuthenticationMethod=4 (Kerberos) in the ODBC configuration. Here is what it looks like in ODBC Manager.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SQL_Server_Win_Auto_ODBC_Config.png" style="width: 418px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25460iB7013E23BDD073DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="SQL_Server_Win_Auto_ODBC_Config.png" alt="SQL_Server_Win_Auto_ODBC_Config.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My LIBNAME statement looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname lib1 sqlsvr dsn=MS_SQL_WIN_AUTH user=mydom\myuserid password="MyPassword1" database=mydb;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;It is important to note that the above LIBNAME statement worked with both quoted, and unquoted, strings for USER=.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also do this with a DSN-less LIBNAME statement. I like these because I am lazy and don't like going through the ODBC Administrator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssql sqlsvr complete="DRIVER={SAS ACCESS to SQL Server};
HOST='sqlserverdb.mycompany.com';DB=mydb;PORT=1433;
AuthenticationMethod=4;
EncryptionMethod=0;" 
user=mydom\myuserid password='MyPassword1!';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hopefully this will help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 19:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519485#M3813</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-12-10T19:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519497#M3815</link>
      <description>&lt;P&gt;Normally if the username or password value contains special characters you need enclose them in quotes so that SAS can parse the code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;user='asd\E99999' password='12345678'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 17:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519497#M3815</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-12-07T17:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Libname issue when connecting to SQL Server</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519514#M3823</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All I can say is that my LIBNAME statement worked with, and without, quoting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 19:00:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Libname-issue-when-connecting-to-SQL-Server/m-p/519514#M3823</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2018-12-07T19:00:56Z</dc:date>
    </item>
  </channel>
</rss>

