Component OLE DB source has no input - database

I am new at doing SQL server data tools on VS 2010. However what I try do is:
I have created a textfile and imported it as a flatfile
I try to connect the flat file (with the green arrow) with a OLE DB but get the error:
Component OLE DB source has no inputs, or all of its inputs are
already connected to other outputs. You may be able to edit the
component to add new inputs to it.
Why do I get this error?
When I open the flat file a have diffrent rows and data in it, so there actually exists data :/

you need to connect to an OLE DB Destination not source

Related

SSIS Package with Dynamically creating Excel destination is not working from SQL Server Jobs

I'm currently working on a requirement to get data from sql server into Excel destination. I used the exact method from this link " https://sqljunkieshare.com/2012/02/28/how-to-create-and-map-excel-destination-dynamically-in-ssis/ " Except the Dynamical excel sheet name (Doesn't work, so removed the dynamical sheet naming and using a static name for all excel workbook)
Condition is : To get a set of distinct ID's from a view and should create an excel sheet for each ID and load the data from the same view with the filter of respective ID from the result Set.
The package worked fine when executed from Visual Studio designer. But i'm facing an error on Excel connection when executing this package from SQL Server job.
Here is the error message :
OnError 1 - Create Excel Sheet:Error:Failed to acquire connection "ExcelDestination". Connection may not be configured correctly or you may not have the right permissions on this connection.
OnError 2 -
GenerateExcel:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLEDB error has occured. Error Code : 0x80004005.
An OLE DB record is available. Source:"Microsoft Access Database Engine." Hresult: 0x80004005 Description:"C:\Excel\ID_100.xlsx' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.".
on above GenerateExcel - package name
ExcelDestination - Excel connection manager name
ID_100 - first Excel workbook name (100 is the first ID).
I tried changing the DelayValidation property to True on everything, since the File path is on my local drive i don't think drive permission is an issue.

determine SQL server 2012 connection string

i need to connect to SQL server from node so i need connection string.
How to define connection strings in SQL server 2012 ? or what are the ones by default ?
I'm not sure whether I get your question right...
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
Is that what you are looking for?
The server/instance name syntax used in the server option is the same
for all SQL Server connection strings.
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;
You can create a new universal data link file (.udl) on your computer and double click the file in order to select provider and enter connection data. This way, you can test the connection and modify the settings accordingly.
Create a new file a.txt for instance, and rename this file to a.udl
Then follow the steps below to configure connection
Double-click the universal data link (.udl) file. The Data Link Properties dialog box opens, displaying the following tabs: Provider,
Connection, Advanced, and All. Choose Next to navigate from tab to
tab.
On the Provider tab, select a database provider.
On the Connection tab, either select the data source name (DSN) of an available Provider, or enter a custom connection string. Valid DSNs
for providers that are pre-defined on your system are displayed in the
Use Data Source drop-down list.
Use the Advanced tab to view and set other initialization properties for your data.
5.Use the All tab to review and edit all OLE DB initialization properties available for your OLE DB provider.
Choose OK to save the connection string to the Universal Data Link (.udl) file.
Then open up the file with a text editor to access the connection string stored.

Trying to Import FoxPro DBF File to SQL Server

As the title says, I'm trying to import a FoxPro dbf file into sql server using openrowset. At first I tried to export the DBF to an xls file and import using the Import/Export wizard. This works pretty well normally, but there is one field that sometimes holds a really long string, and this string is being truncated at 4096 characters during the export from the dbf to xls.
I found an old post with instructions on how to do this using openrowset.
When I try the first answer:
select *
from openrowset('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver;
SourceDB=\\path\;
SourceType=DBF',
'select * from TABLE.DBF')
I get the error:
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".
When I try the second answer:
select *
from openrowset('VFPOLEDB',
'\\Path\';'';'',
'select * from TABLE.DBF')
I get the error:
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "VFPOLEDB" has not been registered.
I tried to register the OLE*.dll files manually with regsvr32, but only some of them worked. On ole32, oleacc, oleaut32, and oleprn I got a success message. On oleacchooks, oleaccrc, oledlg, and oleres I got this error:
The module "oleacchooks" was loaded but the
entry-point DllRegisterServer was not found.
Make sure that "oleacchooks" is a valid DLL or OCX file
and then try again
After some investigation I tried to install the componet, but when I tried to install the msi file for FoxPro (found here), I got this error:
An error occurred while processing the last operation.
Error code 80110408 - Error occurred reading the application file
The event log may contain additional troubleshooting information.
So, I'm officially lost here. Does anybody have suggestions on how to get openrowset to work, or some other way of importing the dbf file?
Pat, you can use DBF Commander Pro for this task.
Download it, install, then click File -> Export to DBMS. In the window appears click Build button in order to build the connection string: select MS OLEDB Provider for SQL Server, then choose your server from the list, provide login and password, select a database, click OK:
In the Export to DBMS window select the destination table you want to import source DBF file to, then click Export.
More info on import and export DBF to a database you can find here.
P.S. The app has fully functional free trial 20-days period.
Try using VFPOLEDB.1 as the provider. You may be experiencing driver version issues.

Cannot connect to MS Access file from SQL Server 2008

I have been trying for the past week or so to import data programmatically to a SQL Server 2008 table from a Microsoft Access .mdb file. I have been getting nothing but errors, and solving one just reveals another. I made the file into a linked server, and now when I try to query it with:
Select * from OPENQUERY(Importdata, 'Select * from [IMBPieceBC]')
I get the error:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Importdata" returned message "Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Importdata".
I've read several suggestions to relink dlls in the registry, but I've done that, and I'm still getting the error. Is there anything else I can do to fix it, or at least figure out what is wrong?
Migrating the data to a SQL Server instance is not an option. The mdb files are generated by a third-party program, so there's nothing we can do about it.
I have a similar situation at my workplace - a third party application that maintains data in MDBs, but other applications needing access to it. How I've done it is that this 'intermediary' application has links to the SQL Server tables and the MDB tables. You could use either a query or a VBA written form event to transfer information from the MDB table(s) involved into your corresponding SQL Server tables using a INSERT INTO query, fitted with a SELECT FROM subquery providing the values being inserted.

SQL Server BIDS OLE DB inputs

I have a a script component and an OLE DB destination. My script has 3 columns to return. How do I map each of these 3 columns to the OLE DB destination?
Whenever I drag a connector from the script component to the OLE DB, it makes me select exactly 1 output column. When I try again with another output column, BIDS tells me that there are no available input columns to the OLE DB destination.
Is it possible to have more than one input to an OLE DB destination?
Thanks,
You need to create the output columns in Script transformation .In the input and Output tab expand Output0 and specify the columns which u want .

Resources