13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

670 DBLOAD Procedure Specifics <strong>for</strong> ODBC 4 Chapter 23connect to odbc (UID=ssuser PWD=sspwd DSN=SSPART2);execute (drop view MYEMPS) by odbc;execute (create view MYEMPS ASSELECT * FROM users.ssuser.MYEMPS2UNION ALLSELECT * FROM SERVER1.users.ssuser.MYEMPS1UNION ALLSELECT * FROM SERVER3.users.ssuser.MYEMPS3) by odbc;quit;/*SERVER3,SSPART3*/proc sql noerrorstop;connect to odbc (UID=ssuser PWD=sspwd DSN=SSPART3);execute (drop view MYEMPS) by odbc;execute (create view MYEMPS ASSELECT * FROM users.ssuser.MYEMPS3UNION ALLSELECT * FROM SERVER2.users.ssuser.MYEMPS2UNION ALLSELECT * FROM SERVER1.users.ssuser.MYEMPS1) by odbc;quit;4 Set up your <strong>SAS</strong> operation to per<strong>for</strong>m the threaded read. The DBSLICE= optioncontains the Microsoft SQL Server partitioning in<strong>for</strong>mation.proc print data=trlib.MYEMPS(DBLICE=(sspart1="EMPNUM BETWEEN 1 AND 33"sspart2="EMPNUM BETWEEN 34 AND 66"sspart3="EMPNUM BETWEEN 67 AND 100"));run;This configuration lets the ODBC interface access the data <strong>for</strong> the MYEMPS viewdirectly from each subtable on the corresponding Microsoft SQL Server instance. Thedata is inserted directly into each subtable, but this process can also be accomplishedby using the global view to divide up the data. For example, you can create emptytables and then create the view as seen in the example with the UNION ALL construct.You can then insert the data into the view MYEMPS. The CHECK constraints allow theMicrosoft SQL Server query processor to determine which subtables should receive thedata.Other tuning options are available when you configure Microsoft SQL Server to usepartitioned data. For more in<strong>for</strong>mation, see the "Creating a Partitioned View" and"Using Partitioned Views" sections in Creating and Maintaining <strong>Databases</strong> (SQL Server2000).DBLOAD Procedure Specifics <strong>for</strong> ODBCOverviewSee the section about the DBLOAD procedure in <strong>SAS</strong>/<strong>ACCESS</strong> <strong>for</strong> <strong>Relational</strong><strong>Databases</strong>: <strong>Reference</strong> <strong>for</strong> general in<strong>for</strong>mation about this feature.<strong>SAS</strong>/<strong>ACCESS</strong> Interface to ODBC supports all DBLOAD procedure statements (exceptACCDESC=) in batch mode. Here are the DBLOAD procedure specifics <strong>for</strong> ODBC:3 The DBLOAD step DBMS= value is ODBC.3 Here are the database description statements that PROC DBLOAD uses:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!