Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

Failed to start project (Microsoft Visual Studio)

$
0
0

After going through uninstallation and re-installation of SQL Server 2016 and Visual Studio 2017, as a newbie, I am getting now a message in Visual Studio when a run a sis package with the following details, any guidance would be of great support in going through this steep learning curve.

Failed to start project (Microsoft Visual Studio)

===================================

The directory name is invalid (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
Program Location:

   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)


Problem when run package from command line with dtexec

$
0
0

My Company has a old SSIS Package Solution (2005)  and we need transfer this on a new (SQL SERVER 2016 SP2).

I Make one way upgrade to package

I fixed connections

And the package works perfect from VS2017

But when I try to run package From command line with dtexec throws me : Failed to decrypt protected XML node “DTS:Password with error 0x8009000B 

How I can pass that ?

Import excel files with different sheet name

$
0
0

Hi,

I have a loop on many excel files that I import in a sql table.

My customers always send us the file with the wrong sheet name.

So I was thinking to create a script task that insert in a user variabile (@sheetname) the name of the first sheet of the file excel.

If you think is the correct method, can you please help me to write the script? (I am not a developer and so I am not able)

The full qualified file is in a variable @Filename.

Tks,

SimonaP


find duplicate excel filenames(extensions are different like xls and xlsx) in a folder using c#

$
0
0

I have a folder and 10 files. In those files, two files are like wilson.xls and wilson.xlsx. these are duplicate files.

now duplicate filename wilson should be assisgned to a variable. this should be done in script task. could any body give C# code.

if multiple duplicate files like wilson and jacky, then output will be wilson,jacky will be assigned to variable

Passing multiple values in SSIS variable

$
0
0

Hi everyone,

I am creating an SSIS package and I want to be able to run a SELECT query in Execute SQL Task. I am wondering if it is possible to pass multiple values in the variable and use it in my WHERE Clause.

For instance, 

                 SELECT a, b, c, d

                 FROM table

                 WHERE b IN (SSIS_Variable)

SSIS_Variable can be ('Car', 'Bike', 'Aeroplane') as the value


me

Unable to connect to Integration services

$
0
0

Recently rebuilt my Windows 10 machine and I am no longer able to connect to Integration Services from SSMS when I was able to before. The error message I'm getting is the specified service does not exist as an installed service. From my searching, I'd have to use a different version of SSMS but it works on another machine with the same version I have.

I've attached the SQL Server info from both servers and they are identical for SSMS. Only the MDAC is different. I've attached two screenshots, the No version is my machine and the Yes version is the machine that works.

Is there something that I could be missing here?

XML and SSIS

$
0
0



how to extract data to an XML file using SSIS? Please

Xml Ssis Data Flow Component?

$
0
0

There is a table with a column that contains Xml documents. For each record from my Data Flow Source, I want to pass in the Xml document and the node to interrogate, and return the value contained in the node.  Like the Crm component, this is probably one I will have to write from scratch in C#, but I would like to avoid having to create the custom component if it already exists in the public arena. 

 

Does anyone know of any Xml Ssis Data Flow Components that are downloadable for free?


Best method to import JSON files to SQL Server with SSIS?

Excel source is reading the first couple rows then everything else is reading it as NULL

$
0
0

Hello, I have an excel sheet that has around 50 rows and the excel source is able to read the first 40 rows correctly but everything below it is NULL in all the columns. not sure why its happening all the columns contains either text or number (no mixed entities)

I looked around and found that adding IMEX=1 helped some people but it didn't work in my case, I changed the connection to excel 2007 and still the same problem.

screenshot below 

What should I do?

Is it possible to set PostGres Isolation level for SSIS pipeline?

$
0
0

My source db is PostGres, and I use SSIS connecting via ODBC to pump data across.

I have a current scenario where I need everything in this pipeline to be a snapshot.

I was told if I could SET TRANSACTION READABLE READ on the transaction, I will achieve the desired outcome.

Looking at the ODBC driver settings, I dont think anything there will do it.

Does anybody have ideas how I can grab the data without it changing in the meantime.

Thanks

data flow cannot see project level connection manager

$
0
0

I have created some project level connection managers to be shared by the ssis packages in the same project.  When I create a data flow task and move the correct type of data source onto the flow and go into the data source and dropdown to select a connection manager I cannot see all of the connection managers for that type of data source even though they are in the connection manager folder for the project.

Can someone kindly tell me what I might be doing wrong?  Thanks tonnes for any help, Roscoe

For Each Loop Container Missing "Browser" button under Collection Tab

$
0
0
Trying to use For Each Loop Container to loop through directory. However, I cannot link it to the directory that hold the flat files the "Browser" button is m?issing under "Collection" tab. I restarted several times to see if this isse would correct itself with no success. Does anyone know how to resolve this?

C# script to verify excel file is giving an error

$
0
0

'm not familiar with C# and I have a script component in SSIS that reads an excel file which is provided by a variable [Excel_File_Path] I can build the script fine but whenever I run the package I get this error

DTS Script Task has encountered an exception in user code: An exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

The script that I have is as follows:

using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;

namespace ST_fcd56ec20b8646dfb3261487b129ff89.csproj
{
    [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    {

        #region VSTA generated code
        enum ScriptResults
        {
            Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
            Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
        };
        #endregion

        public void Main()
        {
            // TODO: Add your code here
            int error_count = 0;
            string error_detail = "";
            string excelFilePath = Dts.Variables["User::Excel_File_Path"].Value.ToString();
            string strCn = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + excelFilePath + ";Excel 12.0;HDR=YES";
            DataTable dtTables = new DataTable(); ;
            System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection(strCn);
            cn.Open();
            System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand
            {
                Connection = cn,
                CommandText = "SELECT * FROM [Sheet1$]"
            };
            System.Data.OleDb.OleDbDataAdapter adapter = new System.Data.OleDb.OleDbDataAdapter();
            adapter.SelectCommand = command;
            adapter.Fill(dtTables);
            string str = string.Empty;
            if (dtTables.Columns.Count != 45)
            {
                error_count += 1;
                error_detail = "Mis-match in the columns count" + "\r\n";
                MessageBox.Show("Column Count is Not Equal To 45, Please Check!");
            }

            Dts.Variables["User::ErrorsInSource"].Value = error_count;
            Dts.Variables["User::Body"].Value = error_detail;



            cn.Close();
        }

        //Dts.TaskResult = (int)ScriptResults.Success;


    }
}

What am am I missing in here?


SQL Agent job throws error Microsoft.ScriptTask. The parameter is incorrect

$
0
0
Hi,

I get error while running the SQL Agent job which executes SSIS package. The SSIS package job runs well when we run in VS manually, but throws error from SQL agent. Below are the details of config.
SQL Server 2019, VS 2019
SSMS v18.6
SSIS project TargetServerVersion is Sql Server 2019
SSDT for VS 2017 v15.9.25

Error - Description: Cannot create a task from XML for task "Get PackageRun Stats", type "Microsoft.ScriptTask" due to error 0x80070057 "The parameter is incorrect."
Below steps are performed
1. I have installed Microsoft.DataTools.IntegrationServices
2. Repair the VS

Please help

SSIS to handle more than 4000 characters

$
0
0
My source flat file has a column with characters greater than 4000 and i need this column to be processed further and output to another flat file. But SSIS has limitation of 4000 characters. How to handle this.

[Announcement] SQL server related Forums will be migrated to a new home on Microsoft Q&A!

$
0
0

This SQL Server related Forum will be migrated to a new home on Microsoft Q&A!

We’ve listened to your feedback on how we can enhance the forum experience. Microsoft Q&A  allows us to add new functionality and enables easier access to all the technical resources most useful to you, like Microsoft Docs and Microsoft Learn. 

Now until Aug 23, 2020:

From Aug 24, 2020 until Sep 7, 2020:

  • New posts – We invite you to post new questions in the “SQL Server” forum’s new home on Microsoft Q&A. The current forum will not allow any new questions.
  • Existing posts – Interact here with existing content, answer questions, provide comments, etc.

Sep 7, 2020 onward:

  • This forum will be closed to all new and existing posts and all interactions will be in Microsoft Q&A.

We are excited about moving to Microsoft Q&A and seeing you there.  


""SQL Server related"" forum will be migrated to a new home onMicrosoft Q&A!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A!
For more information, please refer to the sticky post.

To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.

$
0
0

Hi 

I have migrated the SSIS package from 2012 to SQL Server 2017 and when i am running the package from visual studio 2017 the package is executing successfully.

I created a bat file that targets: C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\DTEXEC.exe. But when i am excuting from the batch file am getting below error.

ERROR:

START EXECUTING PURGING FOR NON PROD WM DB LOGS. 
Microsoft (R) SQL Server Execute Package Utility
Version 14.0.1000.169 for 32-bit
Copyright (C) 2017 Microsoft. All rights reserved.

Started:  9:17:27 AM
Error: 2017-11-27 09:17:28.00
   Code: 0xC000F427
   Source: Get Table Names 
   Description: To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.
End Error
Warning: 2017-11-27 09:17:28.00
   Code: 0x80019002
   Source: Purge_WMLogs-DVEK 
   Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  9:17:27 AM
Finished: 9:17:28 AM
Elapsed:  0.499 seconds
FINISHED EXECUTING PURGING FOR NON PROD WM DB LOGS. 

Please can anyone help me on this.

Thanks

Ashwin

ado.net task using an oledb driver, is that ok?

$
0
0
Hi,  In my company a central body sets our software at vs 2017 enterprise with ssdt 15.x .   we are not allowed to download our own drivers and just get what they give us for oracle and db2.   when we went to vs 2017 I noticed that for oracle and db2 the only drivers that would work for an ado.net task were oledb drivers.   the ado.net driver for oracle would not work with with the ado.net task in a new ssis package.   When you "test connection" it gave an error.   But if I pointed the ado.net task for oracle at the oledb driver, it worked.   Just for various reasons we don't use an oledb task with an oledb driver, although I could argue for that going forward.   Is there anything wrong with using an oledb driver with an ado.net task?   Like could I have a data type problem in a 1 in 1000 situation or some other compatibility problem?  It seems like they are two completely different protocols.

Handling commas ( , ) in values in CSV file in ssis ( Text qualifier )

$
0
0

Hi Everyone, Hope you are safe.

I am working on some replication project and need to create a csv file in the same format as existing process ( OOzie)

Problem : I have a table in which few values are comma separated. To handle this scenario in ssis, i used text qualifier property  but my problem is i am getting double quotes  ( " ) in all the values in output csv files. The format i am looking for is below :

Sample Target File

Name,Age,Id,Salary
"zozo,Hiren",20,143445,NULL
Mike,30,323433," "
"Zack,Neilson",40,656565, " "

If you see above, double quotes (") are only with values where we have comma (,) in values (like columnName ) or with blank values but not with other values ( age,id) . when i try to create the same file in ssis, i am getting " with every value. Do we have any solution where " can come only with the values where we have , in between? we need this so that we dont change the downstream processes and i am not sure how downstream processes use this file as it is taken care by another team.

P.S : There are 40+ columns in my file so i need something dynamic

File i created with SSIS 

Name,Age,Id,Salary
"zozo,Hiren","20","143445","NULL"
"Mike","30","323433"," "
"Zack,Neilson","40","656565", " "

Thanks, Shaky


Shakky

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>