How do I correct this error?
SSIS package execution failed
permanent solution for default codepage
I use quite a few slowly changing dimension in my packages. the default codepage is always 1252 and whenever I touch the object the code page is reset to 1252. I would like the default to be 1255 in all cases unless I change it manually
how do I set the default codepage?
thanx
david
???
which provider will be the best for ssis 2019
Custom Connection Manager is null during runtime, but exists during design time.
Hi
I've written a custom connection manager for connecting to a NoSQL DB, with an associated Task that uses the connection to execute against the DB - and on my machine, and several others it's working fine. Recently I had someone say they couldn't get it to work
- and after a lot of logging / back and forth I've reached a point where I'm not sure what else to do.
My Task accesses the Connection Manager via the `connections` parameter of the `Execute` method:
public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log, object transaction) { MyConnectionManager cm = null; foreach (var connection in connections) { logInfo($"Found connection manager: '{connection.Name}'."); if (connection.InnerObject is MyConnectionManager manager) { if (string.Equals(connection.Name, name, StringComparison.InvariantCultureIgnoreCase)) cm = manager; } } if(cm == null) throw new NullReferenceException($"No connection manager with the name '{SelectedConnection}' could be found."); /*...*/ }
When I attempt to run my Task - I get the error message saying:
> No connection manager with the name 'My Connection' could be found.
I also have some code in the 'Validate' method that also attempts to get the Connection Manager -
public override DTSExecResult Validate(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log) { var response = DTSExecResult.Success; if (string.IsNullOrWhiteSpace(SelectedConnection)) { componentEvents.LogError(component, "No connection has been selected."); response = DTSExecResult.Failure; } MyConnectionManager cm = null; foreach (var connection in connections) { if (connection.InnerObject is MyConnectionManager manager) { if (string.Equals(connection.Name, name, StringComparison.InvariantCultureIgnoreCase)) cm = manager; } } if (cm == null) { componentEvents.LogError(component, $"Connection '{SelectedConnection}' could not be found in Connections collection."); response = DTSExecResult.Failure; } return response; }
If I set the `SelectedConnection` property to a non-sensical name (such as 'Not There'), then the designer shows the validation error - as I would expect. If I change the name back to the one that *does* exist - the validation error disappears. Now - to me
- that implies that it's able to get the connection manager out of the `Connections` collection during design time (and indeed I know the Connection Manager works - as I've got Pipeline Component that can utilise it in it's UI (but again - not in runtime)).
I've run FusionVW to see if there are any dependencies that are not being loaded, but they all seem to be fine. I've tried to put a break point to debug what is happening, but it seems the Validation is occurring before 'preExecute' is hit - so I can't see.
My only guess at the moment is that there is something that is preventing it from running during runtime.
In the Event Log - I get an error associated with running it - with this cryptic message:
------------------
>The description for Event ID 12291 from source SQLISPackage140 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
>
>If the event originated on another computer, the display information had to be saved with the event.
>
>The following information was included with the event:
>
>Package
------------------
I'm basically at a loss for what to do now.
SQL Server Integration Services Projects fails to install or uninstall
I had installed VS 2019 Community on Windows 10 with the SQL Server Data Tools option. It worked for a month and then I got a trial period expired message (That I don't think I should have but anyway). I Tried to uninstall and now I get the error :
Setup Failed
Unknown error (0xe0434352)(0xE0434352)
If I attempt to install Microsoft.DataTools.IntegrationServices.exe I get the same error. If I install VS 2019 again, it shows the SQA Server Data Tools as installed but Integration Services project tis not available when trying to create a new SSIS package.
What do I need to do to get the SSIS 2016 component working again?
Thanks
Jeff
is there a cross reference capability in ssis 2019 from pkg to sources and destinations?
Hi we will be migrating to 2019 enterprise in the not to distant future. One tool i really like is one that xref's pkg to source (tables etc) to destination and perhaps more.
i understand how difficult this would be to automate with parameters, embedded queries, procs etc but wonder if ms or another company has taken a stab at this anyway especially now that the catalog is so popular.
i understand redgate has something that does something similar excluding ssis. it would probably be nice to include ssrs in the picture.
any thoughts? one thing i used to do was run a scan on tfs whose c# code i stole off the internet. cumbersome but at least i got what i needed.
SSIS Import Excel File with Dynamic Columns
Good day,
I have been battling to import an excel file where i have an itemcode in columnA and from columnB Customers per column
my dft keeps failing as every month we receive the file from external vendor whee customer columns moved and additional.
please is there anyway to import with failing, therefater i apply a unpivot
Example: Import > ItemCode, Cust1,Cust9,Cust7,Cust2....
SSIS Unpivot> ItemCode,Customer,Qty
But my import fails everytime and i can build the exception but i have to manually change the package
Please help
SSIS Task to get file information...File Size
Ugh.
So we have been tasked to pass a "Control File" to our client with the following information:
- File Name
- Record Count
- Size
Our SSIS cut currently gets the File Name and the Record Count. But how do I go about getting the Size?
Is there any way to get a file size from a File System Task or do I have to go down the dreadedScript Task road?
Any good step-by-step web sites or YouTube to help accomplish this task?
Thanks for your review and am hopeful for a reply.
SSIS Script task - c#
Hi .
I using script task to check if a excel row is a valid date and then split the date into MM ,DD, YYYY.
I have an existing vbscript code , which is of the below:
if DATE_FORMAT_YYYYMMDD = SniffDateFormat( f6 ) Then f6 = Mid( f6, 5, 2 ) & "/" & Right( f6, 2 ) & "/" & Left( f6 , 4 ) else f6 = Month(f6) & "/" & Day(f6) & "/" & Year(f6) end if
Function FixDate( szDate ) FixDate = szDate End Function 'Date Formats CONST DATE_FORMAT_YYYYMMDD = 1 CONST DATE_FORMAT_UK = 2 CONST DATE_FORMAT_UNKOWN = 99 Function SniffDateFormat( szDate ) ' 20/12/2006 - UK ' 20061220 - YYYYMMDD If IsYYYYMMDD( szDate ) Then SniffDateFormat = DATE_FORMAT_YYYYMMDD Exit Function End If SniffDateFormat = DATE_FORMAT_UK End Function Function IsYYYYMMDD( szDate ) If 8 <> Len ( szDate ) Then IsYYYYMMDD = False Exit Function End If dim yr, mn, dy yr = left( szDate, 4 ) mn = mid( szDate, 5, 2 ) dy = Right(szDate, 2 ) if (yr < 1900 OR yr > 3000) then IsYYYYMMDD = False Exit Function end if if (mn < 0 OR mn > 12) then IsYYYYMMDD = False Exit Function End if if (dy < 0 OR dy > 31) then IsYYYYMMDD = False Exit Function End If IsYYYYMMDD = True End Function
I need help to convert this VBScript code to C#?
Thanks
Retrieve files from folder + script task : Error: Second path fragment must not be a drive or UNC name
Hi.
I am trying to retrieve files from a folder using the script task functionality in SSIS.
I have created a variable called ExcelFolder which contains the path of the files. In the script task, I have used the code as below
// ExcelFolder contains value as D:\test\folder1\ excelFolder = Dts.Variables["ExcelFolder"].Value.ToString(); var directory = new DirectoryInfo(excelFolder); FileInfo[] files = directory.GetFiles(excelFolder);
I am getting error in the files line as - Second path fragment must not be a drive or UNC name.\r\nParameter name: path2
How to fix this?
Thanks
SSIS Project Connection Manager - Connection string format incorrect
We have an SSIS project that uses a Project Connection Manager for the destination tables.
It's feeded from a project parameter that contains the connection string:
Data Source=XXX;Initial Catalog=XXX;Provider=MSOLEDBSQL;Integrated Security=SSPI;Auto Translate=False;
When we run the SSIS project on SQL Server 2019 we sometimes, randomly, receive the following error:
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E73. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E73 Description: "Format of the initialization string does not conform to the OLE DB specification.".
In the SSIS event messages context (catalog.event_message_context) we see that the connection string is sometimes cut off after the provider:
Data Source=XXX;Initial Catalog=XXX;Provider=
This error occurs randomly; sometimes the SSIS project runs succesful, sometimes we receive this error.
Any idea on the root cause? Is this a bug?
Thank you,
Natalie
Power query source, change folder path
For a data flow, I use the power query source for getting json data in a table format.
That works like a charm if i don't change the folder path on the connection manager. If I change the folder in the connection manager to another folder, I getting always an error with "Credentials are required to connect to the Folder source: 'old path to folder'".
That's probably because in the power query is still the old path. e.g. the query looks like this:
let
Source = Folder.Files("D:\StageTransfer\MedicationBilling\Data")
....
If I change the path also in the Power Query Source, it will work again without an error.
But I want to have a Project Connection Manager, where I only have to change the project connection manager. So I have always to change the path also in the corresponding SSIS Package.
Probably I could do a workaround, if I change the query mode from "single query" to "single query from variable", but then, I have to escape every quotation mark in the query, making the query unmaintainable.
Does anybody have the same problem and has another solution for that?
Error Installing SSDT v17.4 for Visual Studio 15
I'm getting an error when trying to install data tools for visual studio 15 update 3
The errors in the log are:
[1604:2ED0][2020-03-27T14:41:10]: Error 0x80070002: Failed to send request to URL: https://go.microsoft.com/fwlink/?LinkId=817280&clcid=0x409
[1604:2ED0][2020-03-27T14:41:10]: Error 0x80070002: Failed to connect to URL: https://go.microsoft.com/fwlink/?LinkId=817280&clcid=0x409
[1604:2ED0][2020-03-27T14:41:10]: Error 0x80070002: Failed to get size and time for URL: https://go.microsoft.com/fwlink/?LinkId=817280&clcid=0x409
[1604:2ED0][2020-03-27T14:41:10]: Error 0x80070002: Failed attempt to download URL: 'https://go.microsoft.com/fwlink/?LinkId=817280&clcid=0x409' to: xxx'
[1604:2ED0][2020-03-27T14:41:10]: Error 0x80070002: Failed to acquire payload from: 'https://go.microsoft.com/fwlink/?LinkId=817280&clcid=0x409' to working path: 'xxx'
[1604:2ED0][2020-03-27T14:41:10]: Failed to acquire payload: VSTASetup2015 to working path: xxx\{f3809ec7-e8e2-4989-98a4-0f68d25f7568}\VSTASetup2015, error: 0x80070002.
If I try to navigate to the URL I get a 404 error
Variable Not Evaluating as an Expression in Script Task
I have an SSIS package that has several variables and project parameters. I'm trying to return the evaluated value of the variable. The variable is a combination of three project level parameters.
I've created a script task which shouldreturn the value, but when I view the results, it's actually returning the expression, and not what it is evaluating to. Here's the script task code:
public void Main()
{
ConnectionManager cm = Dts.Connections["File.tmp"];
var path = cm.ConnectionString;
var textToWrite = (string)Dts.Variables["User::StringVariable"].Value;
System.IO.File.WriteAllText(path, textToWrite);
Dts.TaskResult = (int)ScriptResults.Success;
}
But the contents of the file are the actual expression, and not what it evaluates to.
I've made sure the property of the variable EvaluateAsExpression is set to TRUE.
Is there something missing or another way to yield the results I'm looking for?
Thank you!
A. M. Robinson
Is BULK INSERT faster than SSIS?
Quote from a recent forum thread: "On the processes i use now, im using SSIS (With the max tunning i can), but, even that way, bulk load by TSQL was extremely fast!...we load, every day, about 5~6 files with 10GB+- each, and SSIS is not fast enough (Remember: With max tunning, all options correctly...)..."
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/b322376d-7cbb-4e98-b7f8-c178505d4ede
Is BULK INSERT really faster than SSIS Data Flow? Sometimes? Always?
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012
Not able to connect Integration Services through SSMS in SQL Server 2016
Hi Team,
Please help on bellow issue
------------------------------
ADDITIONAL INFORMATION:
For help, click: http://go.microsoft.com/fwlink/?LinkId=506689
For your reference am added error screenshot.
Already I have provided all access to user.
Thanks Bala Narasimha
Read JSON file with SSDT VS 2013 VB Script using Newtonsoft dll
Hi All,
I am using SSDT VS 2013 with a script task in VB to download some data in JSON format. I have added a reference to NewtonSoft.dll as displayed below and assume this is correctly added to the GAC. In the "Imports" of the script code I use the Imports NewtonSoft.JSON.LINQ, the code seems to work with intellisense displaying the correct bits as I write the code and appears to build without any errors.
However when I run the SSIS package I get an error box that says "Exception has been thrown by the target of an invocation." If I comment out the JSON code and the "Imports NewtonsSoft.Json.Linq" the code runs without the error. So I am assuming the Newtonsoft dll is not correct for SSDT vs 2013 or it has not been added to the GAC correctly. Although there are other Visual Studio Projects in C# that are not SSDT that are using the Newtonsoft dll located in a different directory - I have tried this one as well in SSDT for no luck. Is there some other way to reference the newtonsoft dll in the vb script?
Thanks
Binway
Binway
Output 10,5 mln rows into flat file (CSV)
Hi everybody,
I want to output result of the query (10,5 mln rows) into CSV file on my local D drive.
I used Tasks/Export from right click on DB, then saved the package and tried to run it, but it produced an error (not much info about it, though).
Should I re-try it again using that interface or there is another option I should try?
Thanks in advance.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles
Read excel file using oledb in Script task
Hi.
I am trying to read data from Excel using the oledb command in the script task of SSIS. The excel does not have sheet names. I am getting error as the sheet name is empty. Below is the code used
excelConnection = new OleDbConnection(excelConnectionString); excelConnection.Open(); DataTable excelDataTable = excelConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); string excelSheetName = string.Empty; foreach (DataRow row in excelDataTable.Rows) { excelSheetName = row[0].ToString().Trim("'".ToCharArray()); //Console.writeLine(excelSheetName); } OleDbDataAdapter excelAdapter = new OleDbDataAdapter(); OleDbCommand excelCommand = new OleDbCommand(); DataSet excelDataSet = new DataSet(); excelCommand.Connection = excelConnection; excelCommand.CommandText = "Select * from [" + excelSheetName + "]"; excelAdapter.SelectCommand = excelCommand; excelAdapter.Fill(excelDataSet); // error here
How to fix this?
Thanks
simple file movement pkg
Hello,
I have to create a simple pkg to load one table from .txt/.csv file and once loaded archive the file to diff archive folder.
the .csv file will be coming every hour or so, with file containing time stamp (e.g. FileName20200317.1830.csv, FileName20200317.1930.csv... )
I need to update a table in a db by copying the file name and flag as completed once ingested and archived.
eg. Control_table (Id, FileName, Status) values (1,FileName20200317.1830.csv, completed)... I need to add this pkg to job which runs every hour to check if any file has arrived.
If there is any link to such the sample pkg, I will be using 2015 SSDT and 2016SqlServer for this. I can store the config info in xml file and pkg will be stored on file system.
Thanks,
Neil
Neil