import data from dynamic excel to sql server 2008 r2 using SSIS without script task - excel

I have to import data from excel(number of columns will change every time)to sql server 2008.
I have done script task for dynamically pulling the data. but the server has ace oledb and jet oledb registry errors. So is there any other way to import data from dynamic excel using SSIS
without script task?

Depending on the version of Excel being used to generate the spreadsheets, you may be able to use the Open XML SDK 2.5 for Office libraries. You will still need a Script Task or Component (or a full-blown custom SSIS component), but you may be able to avoid the ACE and Jet engine errors.
Fixing the registry errors does seem like the easier approach, though.

Related

Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine

I am trying to import an Excel file (*.xlsx) into a SQL Server table using both SSIS and the "Import Data" feature inside SSMS.  However, in both instances, I am getting "The Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine (System.Data)."  
However, when I go into my Programs, I see "Microsoft Access Database Engine 2016 (English) 16.0.4519.1000" is installed, as well as "Microsoft Access Database Engine 2010 (English) 14.0.7015.1000" , or at least shows up in the Apps and Features.  What am I missing to allow me to work with *.xlsx files as as the datasource to import into SQL Server either through SSIS or SSMS? 
Please note, I understand Excel as a datasource is not ideal and there are better methods, but unfortunately, I am not in a position to make demands that they use other file formats.  The best I can do right now is ask for them to convert to *.xls format.  
One thing I need to note as well, I do not have the ability to install anything on my own due to company security policies. Everything must be done through their automated system.

import Excel into SQL Server using SSIS

I want to import the excel sheet data present in my local machines into SQL Server 2012 (installed in the server).
I have seen some examples using SSIS but the excel & Server installed in the same machine.
how to do import from different machines?
Please help
There is no requirement to have the data you wish to load on the same logical machine as the SQL Server installation. You just need SQL Server Management Studio (SSMS) installed on a machine which has file access to the Excel file you wish to import and which can connect to the target SQL Server instance.
You might want to re-write your question to ask a specific question or describe the actual problem you're having (or at least tell us what you've already tried) if you want more helpful answers.

Query excel based database from SQLDeveloper

I am on a Windows 7 machine and have configured a ODBC connection by name of 'MyExcelDb' to an excel file. I am able to programatically connect to 'MyExcelDb' using type-1 jdbc driver and everything is working fine.
I now want to use Oracle SQLDveloper to query the DSN 'MyExcelDb' but I am not able to make this connection as I do not find any option for ODBC Connection. I have tried using the 'advanced' option in Oracle section and tried putting custom jdbc URL as 'jdbc:odbc:excelDB' bugt to no avail.
I have tried adding entries in SQLDeveloper for third party drivers like:
- sourceforge.net/projects/xlsql/
- code.google.com/p/sqlsheet/
- hxtt.com/excel.html
Despite this but no new connection option would appear and I am still struggling to make connection between the two.
I have searched around and found that I could install Oracle and add a TNS for the excel and that way I may be able to connect using the Oracle TNS in SQLDeveloper. Installing Oracle database but would be like killing a mosquito using a canon.
I wonder if there is a simple solution to my problem.
Have you tried following Oracle's guidelines for connecting to Excel files? Did you set up a system DSN as described in step three of the Oracle guide. Importing files into the database is routine and simple but using SQL Developer in the manner you describe, without the client installed. Here is an example of reading an Excel file via PL/SQL.
My question is why use SQL Developer to manipulate a datastore in Excel when Excel is designed to manipulate the data?

LocalDB Export to Excel

I have collected a bunch of data using my locally developed website. Now I need to analyze the data, but it seems like I cannot locate the .mdf file for the LocalDB database my website uses.
Looking at the data connection, it says myusername\localdb#abunchofnonsense.mydomainname.Models.UserDBContext.dbo. And the the connection string is data source=(localdb)\v11.0; initial catalog=mydomain.models.userdbcontext; integrated security=true.
Also, I'm using ASP.NET MVC, Visual Studio 2013, and Entity Framework if it helps.
It's probably quite confusing what I'm trying to do here. I collected some data and need to run logistic regression with it. Now the question is how can I connect Excel to this LocalDB so I can export the data I have collected?
You can import your LocalDB tables and data directly into Excel by the option Get External Data > From Other Sources under the Data tab in Microsoft Excel (2013 to be precise) - as the following screenshot shows:
A bit late, but perhaps someone can use the answer as I found this thread when running into a similar problem:
The problem is, that the localdb uses a different provider than the "normal" SQL-Connection. You need to use the "SQL Server Native Client" (in your case version 11) to connect. The provider should be installed with the localdb - if not you can find it here
To use in Excel, just choose
"From Other Sources"
- "From Data Connection Wizard"
- "Other Advanced"
- Choose your provider
- Enter the rest of your connection details
(not tested, but I see no reason why it shouldn't work): For existing connections you can edit the connection string and add/change "Provider=SQLNCLI11.1" (of course considering your installed version)
Source: I had the same problem in Installshield where you have to change the provider manually, so I just tried in Excel.

Visual Studio 2012 SQL Database Project with SSDT

I'm starting to use Visual Studio 2012 with integrated SQL Server Data Tools and although I watched 2 of microsoft's video's on getting started with SQL Database Projects I'm still having trouble understanding how to work with them especially since I'm new to db development.
Some questions:
What is the difference between Importing a database or adding a reference to the database?
What is the difference between Server Explorer and SQL Server Object Explorer tabs? In one I can browse the database through localhost\SQLEXPRESS.dbname and the other goes through localdb\Projects. At what point are these synchronized?
How do I change the Target Database Name under the Project's properties?
1) Importing a data base creates a project that includes all of the databases artifacts. Adding a database as a reference allows a project to access the database. So if you have a SSDT project and a c# project that uses the db, the c# project gets the reference. You could choose to create the SSDT project by importing an existing db.
2) SQL Server Object Explorer is part of SSDT and allows you do perform online SQL development including creating new artifacts, adding data to tables, and executing scripts.
3) To change the target database name for debugging purposed (where the database goes when you build/debug) change the target connection string in the debug tab of the properties menu of the project.
I've found this link to be quite helpful.
There are many differences between SQL Server Object Explorer (SSOX) and Server Explorer. Here's a couple:
SSOX allows you to launch refactoring operations
SSOX provides a logical view of your source code in Solution Explorer
In short, SSOX targets database development whereas Server Explorer is (I think) a generic hierarchical viewer for many server types.
Regards
Jamiet

Resources