Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Creating Table in MS SQL Server is slow using ODB connection

kirk_kenery
7 - Meteor

I am developing a tool to upload text files from a folder to MS SQL Server. It needs to be dynamic so that the user can pick the SQL Server and Database name, so I chose to use an output tool with an ODB connection. Unfortunately it takes about 4 minutes for about 40,000 records with only 2 columns. Here is my connection string:

 

odb:Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=YeeOldDatabase;Data Source=YeeOldSqlServer;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=FizzleWizzle;Use Encryption for Data=False;Tag with column collation when possible=False|||tblTemp

 

I tried different transaction sizes from 1 to a 20,000 and I don't see a difference in runtime.

 

I tried switching to ODBC and it takes 15 seconds but the user needs to create a DSN on their machine manually. I need a quick way for the user to pick the sql server name and database. Any ideas?

1 REPLY 1
kirk_kenery
7 - Meteor

Resolved: I changed my connection string to this and its much faster, and I'm still able to change the database and server name within a macro.

 

odbc:DRIVER={ODBC Driver 17 for SQL Server};DATABASE=YeeOldDatabase;SERVER=YeeOldSqlServer;Trusted_Connection=yes

Labels
Top Solution Authors