sql server - Importing Large Excel Sheet into SQL -


monthly i'm given spreadsheets need import sql. use sql server import , export wizard , import temp table call stored procedures complete import process. working fine on production server , working fine on development machine until last week when did clean install of windows 10. now, i'm still able import smaller spreadsheets few thousand rows, however, if attempt import data spreadsheets have 500,000+ rows of data takes couple minutes on both "setting source connection" , "setting destination connection" seems hang on "copying". i've checked logs , run sql profiler , see nothing regarding failures. i've let process run upward of hour , killed out, viewed temp table , shows no records imported. data format i'm able import on production server without issue.

now here's kicker... i'm able import these large sheets on development server if have spreadsheet open in excel @ same time, (note smaller spreadsheets don't need have spreadsheet open import). spreadsheet open, import process works slow , not effective way of doing things.

any thoughts on why import works on small spreadsheets unless spreadsheet opened in excel?

i'm using sql server 2008 r2 on windows 10 pro , office 2016. have accessdatabaseengine - 2007 installed.

edit: created ssis package , ran suggested , worked expected. make things more strange, went through import/export wizard , chose run , create ssis , again worked expected. went through wizard again chose run (did not create ssis) , hangs copying still. attempted run 4 more times , each time works if choosing "run immediately" , "create ssis" each time fails when choosing "run immediately" (without creating ssis). i'm confused how can happen , open more suggestions.

finally found solution problem!

since able import sheets when open, made me think issues due slow connection between sql , excel, started looking in direction. found few posts on other sites talking slow odbc connections windows 8 & 10. 1 site mentioned switching driver "sql native client". choosing destination "sql server native client 10.0", switched "sql native client" suggested , working expected.

i see these 2 drivers listed as:

driver                          version ------------------------------------------------ sql native client               2005.90.3042.00 sql server native client 10.0   2009.100.6000.34 

i'm guessing older (2005) sql native client works because import/export utilizes accessdatabaseengine - 2007.

note: when using windows 7 or 2008 server, had no issues importing large spreadsheets (2009) sql server native client 10.0. seems issue later versions of windows. see several other sites mentioned there performance issues using tcp odbc connections on windows 10 , saw noticeable improvement using named pipes instead. production server uses tcp, didn't make change named pipes on development machine can't confirm that, wanted mention in event comes across post having issue.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -