SSIS package validation error - flat file destination has no ID - sql-server

i have a OLE DB SQL Command with a flat file destination and have added to column headers to the flat file but when executing package I get the below issue. is this because I have 2 extra columns in flat file?

Sounds like your package got corrupted. Your best bet is to drop and re-create the flat-file Destination Connection Manager, and then re-add the connection to the Destination.

Related

SSMS - Running SSIS package via batch file - resulting table empty

Currently I am building a database in SQL Server Management Studio (SSMS). Several data sources are imported in this database, via the import/export wizard. Upon completion of the import, not only am I running the import, I also save an SSIS package. This SSIS package is to schedule a weekly refresh of the data source.
On my Windows Server 2012 R2 the Express edition is installed, therefore I have manually created several batch files that run every week (as scheduled via Task Scheduler). This works fine for most tables, however for some tables I encounter some strange (?) behaviour.
This is as follows: when creating the SSIS package via import/export wizard, and directly running the import, the table shows up correctly in the database. That is, with all column names and the thousands of rows it contains.
The strange thing is that, when executing the SSIS package (via the batch file), the table is empty (column names are correct though). For some tables, I do not encounter this behaviour. For others, this behaviour is encountered all the time.
The batch script is as follows (quite straightforward):
"C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\DTExec.exe" /F "C:\Users\username\ssispackage.dtsx"
The batch file seems to run correctly at all times, as the table 'creation_date' changes when I run the batch file. Moreover, for all the tables that do correctly 'refresh', these same batch files do the job.
Some settings of the SSIS package:
Data source: Oracle OLE DB provider
Destination: SQL Server Native Client / MS OLE DB Provider for SQL Server (tried both)
Data via query (as I am querying several tables from Oracle); query is parsing correctly
Mappings: Create destination table & Drop and re-create destination table
Dropping and re-creating is done, because the data source is rather small, and has some changes weekly/monthly (to some rows).
For most data sources imported (and refreshed weekly) via this method, the tables are correctly showing each week (simply dropping the previous table, and re-creating the source).
I hope someone can explain to me why this issue occurs. If some more information is needed from my side, please ask.
Thanks in advance!
UPDATE:
When looking at the log of the batch file, this is (part) of the output:
Source: ..... "SourceConnectionOLEDB"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: **"ORA-01005: null password given; logon denied".**
End Error
.....next error.... "SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
Thus, it seems that the password is not remembered/saved correctly in the SSIS package?
This is strange though, as for most tables it does correctly store the password (as those do refresh correctly).
When setting the properties of the data source, namely Oracle Provider for OLE DB, I select the option "Allow saving password". So it should store the password correctly?
Found the answer after all.. The .dtsx file that is saved (the SSIS package) contains the variables for the connection string, it shows that the Password (Sensitive="1") is there. But in the wizard, I did not select 'Save sensitive data with user key'. When selecting this option, an encryption string was added. Now the SSIS packages run well!

Getting error on creating a package in SSIS VS2017

I am using VS2017 and SSMS 2017 and imported a CSV file in FLAT FILE option in Data Flow tab in SSIS and also created anADO NET SOURCE database connection through my local server that stores the data in my database. But when am trying to create a connection between FLAT FILE and ADO NET SOURCE, by dragging the blue arrow from file option to ADO NET option, am getting this error. Can anybody provide some input on how to get rid of this error?
enter image description here
You are attempting to route the flat file source into another source component, which cannot be done. Did you mean to route the data into a destination?
Error is that you have connected Source to Source.
Fix it by connecting Source to Destination, so that the package can build successfully.
Replace your ADO.NET SOURCE with ADO.NET DESTINATION and this error will be corrected.

SSIS dBASE IV OLEDB source error

The package that I am working on moves data from a .DBF file onto a table on SQL server.
I used provider for the source as Microsoft Jet 4.0 OLE DB Provider and set extended properties in the all tab of the connection manager to "dBASE IV".
(which is required for .DBF files - pulled this information while building package)
I have given environments - DEV, QA and PROD and have created project parameters to access respective paths.
For the source, went into properties and gave an expression to pick up filepath for respective servers (DEV, QA and PROD) and ran into below error while running the package.
The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager.
Any help is much appreciated.
Based on this article, the DBF connection string is like the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password=;
You have to specify the folder that contains the database not the .DBF file
Additional Information
SSIS Connect to a dBASE or Other DBF File
Importing dBF files to SQL Server using SSIS

SSIS package is executing while modification done on source table

i created a SSIS package using simple DFT and transferring files from OLEDB source to OLEDB destination. When i am adding new column in my source table package is still getting executed successfully but i want my package to get failed. Could anyone suggest how to fix it.
In the Control Flow area, add an Execute SQL Task before your DFT.
Set up the connection to your database and for your SQLStatement use the following:
CREATE TABLE #temp (<define all columns currently in your OLEDB Source Table>)
INSERT INTO #temp
SELECT TOP 1 *
FROM <your OLEDB Source Table>
By using this "worst practice" insert syntax, you can cause a failure if your OLEDB Source Table has any columns added or removed.
When selecting a Table in OLEDB Source, the metadata of the table is mapped to the OLEDB Source component.
Each time you will run the package it will sends a SELECT * From Table command to the SQL server, and retrieve the data and it will map every column from the SQL table to the OLEDB Source column.
If a column is found in SQL and it is not defined in OLEDB Source it will be ignored. In the other hand, if a column is not found in SQL and it is defined in OLEDB Source it will throw an exception.
The only way to validate metadata before running the package is to add an Execute SQL Task or Script Task to check the metadata before the DFT is executed.
References
SSIS OLE DB Source Editor Data Access Mode: “SQL command” vs “Table or view”
OLEDB Source

redirect the records to different folder if the format is incorrect using SSIS

i have created the SSIS package to load the comma delimited flat file data into the Sql server destination table.To Achieve this i have used Data flow task, flat file source and ole db destination.I have configured the flat file connection manager with comma separator as a column delimiter and row delimiter as a "CRLF".
in this case, package is successfully imported comma separated flat file data into the SQL server destination table.
Now question is, Do we have any option to send any records with Pipe Delimited to an different folder containing only error records.

Resources