Hi,
I see the insertbuff= option for libname statements for relational databases but don't see a corresponding option for arguments available for the pass-through facility. Read buffers are available but not write buffers? I must not be looking at it correctly.
FWIW, this is using Oracle with SAS 9.4 M5.
Thanks!
--Ben
INSERTBUFF is only relevant when inserting rows into a database table from a SAS table. You don't do that in SQL passthru but usually via a LIBNAME like so:
libname sqlsrvr ODBC noprompt = "<sql connection string>" insertbuff = 10000;
proc datasets library = sqlsrvr;
append base = MyDatabaseTable data = WORK.MySASTable;
run;
quit;
Having said that you can do this which will apply relevant LIBNAME options:
libname sqlsrvr ODBC noprompt = "<sql connection string>" insertbuff = 10000;
proc sql;
connect using sqlsrvr;
<put your passthru query here>
quit;
INSERTBUFF is only relevant when inserting rows into a database table from a SAS table. You don't do that in SQL passthru but usually via a LIBNAME like so:
libname sqlsrvr ODBC noprompt = "<sql connection string>" insertbuff = 10000;
proc datasets library = sqlsrvr;
append base = MyDatabaseTable data = WORK.MySASTable;
run;
quit;
Having said that you can do this which will apply relevant LIBNAME options:
libname sqlsrvr ODBC noprompt = "<sql connection string>" insertbuff = 10000;
proc sql;
connect using sqlsrvr;
<put your passthru query here>
quit;
On top of @SASKiwi 's perfect explanations, don't forget to consider the DBCOMMIT option when inserting data.
When retrieving data, the READBUFF option can be used.
Other options exist too, depending on the database and the connection method, such as FASTLOAD.
@BenConner - What SAS/ACCESS products are installed / licensed? The suggestions I've posted will work equally as well with SAS/ACCESS to Oracle.
> They do have Access for Oracle
Look at option FASTLOAD then.
Thanks to all for your help. This will alleviate the remaining problem the client has been having with failures through the pass-through facility.
Using a pass-through via a libname is not something I would have thought possible. Nice!
--Ben
According to this link, PRESERVE_COMMENTS works on LIBNAMEs: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=acreldb&docsetTarget=p1qf...
And yes you need to use this when including Oracle hints.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.