<?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: how to sepcify databse in proc sql pass through in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180920#M46087</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the documentation? &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0s22ssp2k37nfn1oezlko77b5cs.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0s22ssp2k37nfn1oezlko77b5cs.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2014 06:27:08 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2014-09-01T06:27:08Z</dc:date>
    <item>
      <title>how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180917#M46084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following statement runs successfully which will connect to the&lt;SPAN style="color: #ff0000;"&gt; default database&lt;/SPAN&gt; on My_DB2_Server_Name:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONNECT TO db2 as myDB2 (datasrc=My_DB2_Server_Name user = 'MyUserName' password = 'MyPassWord');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to connect to another&amp;nbsp; database; I tried following 2 methods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONNECT TO db2 as myDB2 (datasrc=My_DB2_Server_Name user = 'MyUserName' password = 'MyPassWord' &lt;SPAN style="color: #ff0000;"&gt;database='AnotherDataBase'&lt;/SPAN&gt;);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONNECT TO db2 as myDB2 (datasrc=My_DB2_Server_Name user = 'MyUserName' password = 'MyPassWord' &lt;SPAN style="color: #ff0000;"&gt;schema="AnotherDataBase"&lt;/SPAN&gt;);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, neither works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how to do change database connection using LIBNAME; however, is there a way we can specify the databse in the pass through? Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Aug 2014 21:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180917#M46084</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2014-08-30T21:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180918#M46085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to make a DB2 catalog by DB2 client for each database . You can't use it in that way .&lt;/P&gt;&lt;P&gt;Every datasrc= corresponds to a database which you can edit in the DB2 catalog .&lt;/P&gt;&lt;P&gt;if you need to connect to two database and you have to make two DB2 catalog( datasrc= ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Aug 2014 11:07:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180918#M46085</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-08-31T11:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180919#M46086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question is: if I want to run a sql stored procedure, I have to use pass through (i.e., libname statement cannot run stored procedure), is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 02:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180919#M46086</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2014-09-01T02:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180920#M46087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the documentation? &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0s22ssp2k37nfn1oezlko77b5cs.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#n0s22ssp2k37nfn1oezlko77b5cs.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 06:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180920#M46087</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-01T06:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180921#M46088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry. I am not familiar with stored procedure. You should post it at &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="2007" data-containertype="14" data-objectid="8" data-objecttype="14" href="https://communities.sas.com/community/support-communities/sas_stored_processes" style="color: #0e66ba; background-color: #f0f8fb;"&gt;SAS Stored Processes&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 11:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180921#M46088</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-09-01T11:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180922#M46089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xia, your first reply was in the correct direction. DB2 is somewhat different as RDBMS as other RDBMS, they are all different in details.&amp;nbsp; As abcd123 can run a libname with an other connection the same goes for explicit pass through.&lt;/P&gt;&lt;P&gt;Strange is the schema-name as userid, that is different with oracle.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Your last reply is confusing. abcd123's Question is about DB2 stored processes not about SAS stored processes. Same name "stored processed" and totally different environments. &lt;BR /&gt;That is why I give the link how SAS/Access is going to access the DB2 stored process. Whether he could call a DB/2 SP in a libname is not really sure.&lt;/P&gt;&lt;P&gt;I think on DBCONINIT DBCONTERM DBLIBINIT DBLIBTERM as they are meant to execute commands in DB2. example 2 with DBCONINIT is mentioning a DB2 SP. &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#p1agt4p0hj4fyun103no9xpgskdv.htm" title="http://support.sas.com/documentation/cdl/en/acreldb/67473/HTML/default/viewer.htm#p1agt4p0hj4fyun103no9xpgskdv.htm"&gt;SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Fifth Edition&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 12:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180922#M46089</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-01T12:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180923#M46090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I think it's called Stored Proc&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;edur&lt;/STRONG&gt;&lt;/SPAN&gt;es, but still it's confusingly similar both in name, and in what they do.&lt;/P&gt;&lt;P&gt;You can't call Stored Procedures via a libname, you must use explicit SQL pass-thru. (EXECUTE BY...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 12:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180923#M46090</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-09-01T12:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180924#M46091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LinusH&amp;nbsp; Copied from the link in the manual. Those mentioned options are statements executed similar as of SQL pass through. Could set some personal favors to a RDBMS not part of SQL.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Your are right, it are Stored procedures abbreviated as SP's. It is confusing always troublesome with the communication with DBA's.&amp;nbsp; &lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;H3 class="xis-title"&gt;Example 2: Pass a Stored Procedure&lt;/H3&gt;&lt;P class="xis-paragraph"&gt;&lt;A id="p0kd88cq7zqvrbn1h6rarnnu4n6g"&gt;&lt;/A&gt;In this example, a stored&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; procedure is passed to DBCONINIT=.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="xis-codeFragment"&gt;libname mydblib oracle user=myusr1 pass=mypwd1 dbconinit="begin dept_test(1001,25)"; end;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 12:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180924#M46091</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-01T12:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180925#M46092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I think you are expert about this sort of field . I just used DB2 ORACLE SQLSever ODBC and SAS before, and know how to make a DB2 catalog to connect to SAS . I totally have no idea about stored procedure either SAS or DB2 ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 12:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180925#M46092</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-09-01T12:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180926#M46093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all so much for helpful discussion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/180926#M46093</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2014-09-01T14:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to sepcify databse in proc sql pass through</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/324012#M62150</link>
      <description>&lt;P&gt;Hi Jakarman,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running with similar issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I have set up SAS library(abc) in SAS SMC for oracle schema. This schema name called ‘ABC’ in Oracle&amp;nbsp;server database(port opened and updated tnsnames.ora with path name details).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Created user group with ‘OraAuth_ABC’ domain added old schema &lt;STRONG&gt;user name&lt;/STRONG&gt; and PW then added users.&lt;/P&gt;
&lt;P&gt;Path&amp;nbsp;name been defined in server connection and selected OraAuth_ABC domain for authentication field.&lt;/P&gt;
&lt;P&gt;Library created : schema name added, &amp;nbsp;selected the oracle connection and selected the username(OraAuth_ABC) for authentication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Last week I have create another SAS library(xyz) &amp;nbsp;for different schema called ‘XYZ’ (same tables for more data) which exist in same DB server same as above and domain:‘OraAuth_XYZ’ and different user id and PW for XYZ schema.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Users are able to access data from both abc and xyz libraries using SAS data and proc steps when users explicitly referred abc.table or xyz.table library names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Issue: when users run pass through code to read from XYZ schema, the data is pulling from ABC schema.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If users access table from SAS Data step and Prod step by referring libref xyz.table then the data is coming for 201611 and 201612.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When user run pass through code for &amp;nbsp;201611, 201612 and 201701 data, as below code &amp;nbsp;result is 0 records which means its pointing to old abc schema.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pass through code for Last week set up library:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;connect to oracle as edw(AuthDomain=OraAuth_XYZ&amp;nbsp;&amp;nbsp; path=Path);&lt;/P&gt;
&lt;P&gt;create table test as &amp;nbsp;&amp;nbsp; Select * from connection to xyz&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select&amp;nbsp; distinct(ID) &amp;nbsp;from table&lt;/P&gt;
&lt;P&gt;Where date=201611);&lt;/P&gt;
&lt;P&gt;disconnect from xyz;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;is this default behavior? why the above code is point to old schema table? am i mssing anything? shoudl i need to mention schema name?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 17:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-sepcify-databse-in-proc-sql-pass-through/m-p/324012#M62150</guid>
      <dc:creator>Ram4sas</dc:creator>
      <dc:date>2017-01-11T17:49:39Z</dc:date>
    </item>
  </channel>
</rss>

