Creating a ssis package using sql server data tools - sql-server

I am new to ssis.I have a task where i need to import data from table to excel and table contains nearly 500K records.My problem is when opt for excel file destination and create a connection manager and use excel 2007 then i cannot see tables under name of excel sheet.when i tried to install access database engine
i struck with error saying you cannot install 32 bit because you have installed 64 bit of Microsoft products.Please suggest

Here is a link to your access database engine driver. You can choose 32bit and 64bit. Remember to reboot.
Microsoft Excel ACE Driver
You could also choose a flatfile destination as CSV instead, and then load that in Excel. That is easier imo.

Related

Import Excel into SQL Server

I'm trying to build an import utility for users to import Excel files into SQL Server 2017.
I've hit the 32bit/64bit roadblock with OLEDB providers.
I'm using a 32 bit Microsoft Access front end, and SQL Server is 64 bit. You can't install both 64bit and 32bit ACE OLEDB providers. Microsoft have even built two different import/export wizards for this problem (one for 32bit, one for 64bit).
Does anyone know a way around this problem, or an alternative method of getting Excel data into SQL Server from a Microsoft Access front end that doesn't rely on OLEDB providers? (saving as a text file is not an option, neither is installing 64bit Office)
Thanks
i think BULK INSERT will help you solve this. See here link
We supply an Excel Add-In which you can use to build solutions to let end users insert and update data in SQL Server directly from Excel.
You can download a fully functional trial here.
Disclaimer: I am the founder of the company.
You can use SSIS package to load EXCEL file into SQL Server. You can have data flow task and have Excel source and Sql server target.
UPDATE
If you are having 64 BIT, 32 BIT related issues, you can execute SSIS package in 32 bit runtime using dtexec.exe.Read more dtexec
You can execute SSIS package from C#
Generally, Servers and Desktop machines will have 32 BIT OFFICE drivers installed already. So, you should not have issues. If required, you would need to run dtexec.exe in 64 BIT. You can download dtexec.exe accordingly.
More information on using dtexec.exe

Is MS Office required to read Excel sheet and load into SQL Server table?

My objective is to read an Excel sheet and load the data into a SQL Server table. I don't have Microsoft Office installed on the machine where I am trying to import the data. Is it required in order to read Excel data and import the data into SQL Server?
(I've used SAP Business Objects where I never installed MS Office but was able to load Excel data into that.)
Finally I found the answer to my question.
Yes it is mandatory either to install MS Office or install Office drivers:Data Connectivity Components in the server we are trying to read Excel data. These drivers can be downloaded from the link http://blog.danbrust.net/2013/10/10/installing-microsoft-office-data-connectivity-components/#.WQnD_hOGPRZ
You can import Excel data into SQL Server from the SQL Server Management Studio. Expand the server you want to bring data into in the Object Browser, right click your database, go to Tasks then select Import Data. Find the Microsoft Excel option under the data-source property.
Here's a quick guide on using the Import data wizard: http://searchsqlserver.techtarget.com/feature/The-SQL-Server-Import-and-Export-Wizard-how-to-guide
You can also import delimited text files like a .CSV directly into SQL using a BULK INSERT command. https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql
Let me know if this is helpful.
EDIT: A potentially useful SO thread: Import Excel spreadsheet columns into SQL Server database

SSIS project error: could not retrieve the table information for the connection manager 'excel connection manager'

I'm new to SSIS. For my practice, I want to transfer data from excel to SQL Server.
I have created a connection manager for MS SQL Server (by selecting Connection manager for OLE DB Connections)
Another connection manager for EXCEL file
I have added an excel source to the Data Flow.
Now, I'm trying to edit the Excel source so that I can view the data inside the Excel file which throws following error.
"could not retrieve the table information for the connection manager 'excel connection manager' Failed to connect to the source using the connection manager ..."
After searching a lot including in StackOverflow posts, I found several causes and fixes for this error.
SQL Data Tools is only available in 32bitversoin. So, install "Microsoft Access Database Engine 2010"
Change DataMigration Property page configurations. Change Run64BitRuntime to False.
Change Excel Connection manager options "Excel Version" to "Microsoft Excel 97-2003" and to other options as well.
Make sure that excel file that I am trying to pull data from is not open while doing all these.
Set DelayValidation property to true
Tried every option found on the Internet but nothing worked. Now, I just want to get this fixed no matter what. Any suggestions to fix this issue would be greatly appreciated.
Problem is Excel data source was Office 2007, a lower version than the Office 2010. In this case, separate drivers are required: 2007 Office System Driver: Data Connectivity Components.
Download and install this:
http://www.microsoft.com/download/en/confirmation.aspx?id=23734
If you have 32-bit version of Office, then please download 32-bit drivers, else download 64-bit drivers.
It worked for me, I just installed this file, {32 bit} (https://www.microsoft.com/en-za/download/confirmation.aspx?id=13255)
Hope this helps you resolve the issue
After trying all of the below possible solutions as mentioned in the question, frustratingly I decided to uninstall SSDT and installed it again and it worked for me though still had to follow the first 2 recommendations below.
SQL Data Tools is only available in 32bitversoin. So, install "Microsoft Access Database Engine 2010"
Change DataMigration Property page configurations. Change Run64BitRuntime to False.
Change Excel Connection manager options "Excel Version" to "Microsoft Excel 97-2003" and to other options as well.
Make sure that excel file that I am trying to pull data from is not open while doing all these.
Set DelayValidation property to true
After researching everywhere finally i have found out temporary solution. Because i have try all the solution installing access drivers but still i am facing same issues.
For excel source,
Before this step you need to change the setting. Save excel file as 2010 format.xlsx
Also set Project Configuration Properties for Debugging Run64BitRuntime = False
Drag and drop the excel source
Double click on the excel source and connect excel. Any way you will get an same error no table or view cannot load....
Click ok
Right click on excel source, click on show advanced edit.
In that click on component properties.
You can see openrowset. In that right side you need to enter you excel sheet name example: if in excel sheet1 then you need to enter sheet1$. I.e end with dollar symbol. And click ok.
Now you can do other works connecting to destination.
I am using visual studio 2017, sql server 2017, office 2016, and Microsoft access database 2010 engine 32bit. Os windows 10 64 bit.
This is temporary solution. Because many peoples are searching for this type of question. Finally I figured out and this solution is not available in any of the website.
For me, it worked by uninstalling Microsoft Access Database Engine 2010 64Bit and installing 32 bit. FYI, I have VS2019 32bit running on Win10 and Excel 64bit.
I was using Excel version 2019 in my PC and in SSIS: Excel Source editor was not showing 2019 version to choose. Hence I selected 2016 as highest version.
This is the mistake I did.
I saved my excel file in MS EXCEL 97-2003 Worksheet in PC and selected same version i.e., MS EXCEL 97-2003 in EXCEL SOURCE EDITOR in Visual Studio.
Solution: we must choose exact version of Excel version which is used in our PC and select the same in excel source editor in visual studio.
Since visual studio is 32 bit install Microsoft Access Database Engine 2010 Redistributable 32 bit version to enable excel driver from below link
https://www.microsoft.com/en-us/download/details.aspx?id=13255
Now, I have a Solution of this problem.
I am using visual studio 2015, MS Excel 2016, OS Window 11 64bit and I didn't even change my DelayValidation property.
Install the Microsoft Access Database 2010 Engine 32bit.
Drag and Drop the Excel Component.
Double click on Component and choose the path with Extension of .xlsx.
Select the Excel version 2007-2010.
Finally I figured out, I hope you can understand.
Just install Microsoft Access Database 2010 Engine 32bit go with the same process it works for me, FYI i have VS2019, Excel 64 bit
I have MS Office 2019 but the version of Excel I believe is 2016. In order for me to use Excel as my destination in SSIS, I have to use Microsoft Excel 97-2003 when configuring the Excel Connection Manager. And it worked. But you have to set the Run64BitRuntime to False if your machine is 64-bit. You can access Run64BitRuntime by right-clicking on your project --> Properties -> Configuration Properties -> Debugging -> Debug Options.
Simple workaround. Open up the Excel data source save as Excel 97-2003 Workbook and in the SSIS Excel connection manager specify the Excel version as Excel 97-2003.

Loading data into teradata using SSIS

I want to load data from SQL to Teradata using SSIS. As per my R&D I got to know that we can use third party tool which is provided in the link, http://www.attunity.com/products/attunity-connect/ssis-connectors-for-oracle-and-teradata
IS there any other way to load the data into Teradata using SSIS??
Thanks
Venky
You can use the Teradata OLE DB Provider. With this driver you can connect as you'd do with SQL Server or any other DB, and load the data as usual.
Be aware that there's only a 32 bit version for this driver. So, you'll rather install a 32 bit version of SSIS, or you'll have to take this into account:
Quick Reference: SSIS in 32- and 64-bits

Using Excel source on a machine without excel installed in SSIS

I have made an SSIS package that uses the Excel source to extract data from an Excel 2003 file and inserts it into SQL Server. When executed on production machine it gives and error of 'productleveltoolow'. Excel is not installed on the server. Can this error be due to this reason?
'productleveltoolow' means the server does not have SSIS installed.
http://blogs.msdn.com/michen/archive/2006/11/11/ssis-product-level-is-insufficient.aspx
Do you use a 64 bit operating system? In that case you have to use the 32bit version of SSIS due to the fact that there is no 64bit driver for Excel (Jet engine), and there never will be.
I do not think this is the answer to your question, but you need to keep this in mind.
/HÃ¥kan Winther

Resources