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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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