BookmarkSubscribeRSS Feed
turcay
Lapis Lazuli | Level 10

Hello everyone,

 

I try to move data sets from SAS server to MSQSql Database Server, however, it takes 5-6 hours. Those data sets are very large data sets, one of them approximately  60 GB. To decrease the time, I tried to use INSERTBUFF option as below,

 

LIBNAME SQL ODBC DATAsrc=proddb SCHEMA=sas USER=user PASSWORD="*******" INSERT_SQL=YES INSERTBUFF=32767;

But it decreased the time approximately 3 hours so I am looking for a method to decrease the time less than half an hour, I mean as fast as possible. Can somebody lead me about this process?

 

Thank you,

9 REPLIES 9
LinusH
Tourmaline | Level 20

There have ben several similar threads on forum with similar issues, first search here.

Short, there are more to this than simple libname options.

First you have any target DBMS behavior/DB design.

Also, network plays a role.

Form a processing perspective, I should start to investigate using bulk-load.

Data never sleeps
turcay
Lapis Lazuli | Level 10

Hello,

 

Is it possible to share some of the links which mentioned about forum as above.

 

And also I wonder, there is a limit(32767) for InsertBuff, is it possible to increase it?

 

You also mentioned about Bulkload, I found a similar link as below,So I need to type Bulkload=Yes, right?

 

http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a002105630.htm

 

Thank you,

Ksharp
Super User

Try some options.

 

 

options dbidirectexec bufno=100 bufsize=128k ;
LIBNAME SQL ODBC DATAsrc=proddb SCHEMA=sas U
SER=user PASSWORD="*******" INSERT_SQL=YES 
INSERTBUFF=32767
readbuff=10000
bulkload=yes
dbcommit=10000
;
turcay
Lapis Lazuli | Level 10

Your code really decreased the time, Thanks a lot. 

 

By the way, is it possible increase the limit of INSERTBUFF option? 

 

Thank you

ChrisHemedinger
Community Manager

According to the documentation, the limit for INSERTBUFF depends on the database.  You might need to get that from Microsoft doc.  You can certainly try a higher value, such as "max int" (2147483647) -- see what happens.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
turcay
Lapis Lazuli | Level 10

How can I write same options for Oracle connection?

 

I wrote the following libname statements;

 

Libname orc oracle path=ed schema=edb user=u1234 password="*****" but the other options gave errors;

 

Thank you

Ksharp
Super User

Sorry. I can't help you. Talk to sas technology support ?

If you get error, then some option is not suited for ORACLE connection.

LinusH
Tourmaline | Level 20

SAS/ACCESS to Oracle documentation lists available libname options.

Data never sleeps

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 1863 views
  • 2 likes
  • 4 in conversation