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

Width must be non-negative in SSIS 2014 with VS 2013

$
0
0

TITLE: Microsoft Visual Studio
------------------------------

Width must be non-negative.

------------------------------
BUTTONS:

OK

SSIS 2014 with VS2013 is throing the below error message when executing the package ?

Is this due to long name for the execute sql task?

The ssis package only has execute sql task and dataflow task to create csv . The package runs but error pops up 





SSIS pakage takes long time to validate

$
0
0

Hello all,

I am running multiple SSIS packages from the command prompt. Each pakage loads 5000 rows in separate databases. However, while running the packages, some run withing 2 to 3 seconds, however some gets stuck while validating and takes more than a minute. As I run these packages very frequently, it's quite frustrating. 

Any help with this, will be greatly appreciated.

Thank you. 

Access database engine cannot open or write to the file

$
0
0

Dear All, 

I have created package in SSDT and I can execute package in SSDT -  load data in excel to sql database - it works. However after deployment to server it does not work, I have following error:

"An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "The Microsoft
Access database engine cannot open or write to the file '\\KKK001\TEST\Template.xlsx'. It is already opened exclusively by another user, or you need permission to view and
write its data."

In job there is a proxy user which have access to the excel file. 

Apart from job I have tried to execute the package from Integrated Service Catalog, so from my user (I have also access to excel file) and can see the same error. 

Can you help with the issue? 

No rows exposed in DataTable when parent package saves checkpoints!

$
0
0

We are experiencing strange behaviour when reading a DataTable in an SSIS script task.

Scenario:

My package contains two tasks.

  • A simple Data Flow Task which reads records from a SQL Server 2016 table into a Recordset Destination.
  • The recordset object is processed in the Script Task using a DataTable object.

The recordset exposes no records when the package uses checkpoints, but all records appear when it doesn't!

Environment:

OS Name Microsoft Windows Server 2016 Standard
Version 10.0.14393 Build 14393

Microsoft Visual Studio 2015 Shell (Integrated)
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.7.02053

Installed Version: IDE Standard

Microsoft Visual Studio Tools for Applications 2015   00322-10000-00000-AA323
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-10000-00000-AA323
Microsoft Visual Basic 2015

Visual C# 2015   00322-10000-00000-AA323
Microsoft Visual C# 2015

SQL Server Data Tools   14.0.61712.050
Microsoft SQL Server Data Tools

SQL Server Integration Services  
Microsoft SQL Server Integration Services Designer

SQL server In place Upgrade from 2014 to 2017 ( RTM-CU17) - SQL Assertion error

$
0
0

SQL Server In place upgrade from 2014 to 2017 RTM -CU17 failing with Assertion error.

'IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()'.

1. Database and SSIS is upgraded to 2017 and redeployed after in place upgrade from 2014 to 2017

2. we have a master package which runs around 120 child packages and failing continuously on a particular ETL package.This SSIS job calls a Stored procedure which contains  merge statement ( around 80K records).

3.Same error when we run the individual package or running the Stored procedure on SSMS.

Following workaround are done but no luck

1. Drop and recreate SP

2.DBCC check on table

 

VS 2019 for SSIS ?

$
0
0

Hi all,

We are planning to to use VS 2019 ( as It has replaced SSDT) for our SSIS project development.

For that I have following questions :

(1)  Can we deploy this packages to Integration Catalog SSISDB  in sql 2016 ?

(2) Earlier Packages which are developed earlier in SSDT 2017.In case future I require to make any changes then Do I need to upgrade original SSDT 2017 packages to VS 2019 by clicking NExt NExt or are there any further challenges ?



SSIS OData Source: Cannot access a disposed object. Object name: 'System.Net.HttpWebResponse'

$
0
0

Hello everyone,

I need advice. I am pulling data from an API service using SSIS ‘OData Source’ component. The background to this is, everything used to work well, but for some reason there are now failures on the job running this service. The error message is,

Cannot access a disposedobject.Objectname:'System.Net.HttpWebResponse'.

 My connection on OData component is as shown below. Up until now I used to get column list, and was able to pull data through the displayed configuration.

Now, when I try to view the columns, this is what I get, as shown below.

I’m not sure what exactly the issue might be. I have asked the data vendor if there is any change that they have made to their configuration on the tables or API settings from their side, and they insist that nothing has changed. One possible reason that I have come across in my long search of the internet is about the computed columns on the source, which may generate the same error message. The vendor insists that they haven’t changed anything on the source side. If they haven’t changed anything and we haven’t changed anything, what could the problem be? Any suggestions and ideas will be greatly welcome.

Kind regards,


Mpumelelo

SSIS SQL Agent job - Error: for each sub folder : The get enumerator method of the for each enumerator

$
0
0

Hi.

I have a SSIS Package , which runs fine in Visual studio. The package uses a for each file loop and the variable points to a folder like this:

\\server\d$\foldername\subfolder\

When I deploy the package on SSMS, when I execute the package I get the following error:

Error 1: FLC - for each sub folder: Error: The GetEnumerator method of the ForEach enumerator has failed with error 0x80131509 "null" . This occurs when the for each enumerator cannot enumerate

Error 2: FLC - For each sub folder: Error The object in the variable "User: ProductFolderList" does not contain an enumerator.

Below is the code used:

string folder = Dts.Variables["User::varProcessingFolderLocation"].Value.ToString(); 

Dts.Variables["User::ProductFolderList"].Value = System.IO.Directory.GetDirectories(folder);   

Dts.TaskResult = (int)ScriptResults.Success; 

SSMS version is 2017, visual studio solution is built in 2016 and project configuration is VNext.

I have verified the permissions of the folder and the ID with which I am running it has full control.

How to fix this? Thanks


Data source not getting updated when xml config changed in SQL Agent

$
0
0

Hi All

I have created a SSIS package for import flat file to sql table. Crated 2 variables File_Path and DB_Conn and package configuration xml file under c:\folder1 where the solution file and project were created

To do the deployment I intended to use xml file to change the file_path and db connection for TEST and PROD.

When I change the configured value in xml under c:\folder1, it reflect and works fine on data tools and sql agent. But when I copy and save the dtsx package and xml file and save it in c:\folder2 for deployment and then make changes in xml with other path and instance it's not getting affected in sql agent as a job.

Could you please advise where am I missing

Data Tools SQL Server 2012

SQL Instance 2014

Thanks

Dave

SQL Agent - Zipfile.ExtractToDirectory not working

$
0
0

Hi.

I have a SSIS package in which I have a script task.

I have the below code, which is trying to unzip the file

string subPath = Dts.Variables["User::ProcessingFolder"].Value.ToString();

bool exists = System.IO.Directory.Exists(subPath);

 if (!exists)
 System.IO.Directory.CreateDirectory(subPath);

 string zipFilename = Dts.Variables["User::varProcessingFile"].Value.ToString();

 string targetDirectory = subPath;
 ZipFile.ExtractToDirectory(zipFilename, subPath);


 Dts.TaskResult = (int)ScriptResults.Success;

The above code works in Visual studio, but when run through the SQL Agent, the unzip is not happening.

How to fix this ?

Thanks

Fixed width/Ragged Right help

$
0
0

Good day, i have a problem where a couple of my columns that are numeric with decimal places, are adjusted left. These columns should be adjusted right with 6 decimal places being filled in with 0's in some cases.  i.e. |     31.000000|  vs  |31.000    |

The other issue is the amount of 0's it adds. If i set the scale to 6 i only get 4, 0's or actual digits added. 

Should i be using and tinkering with fixed width option instead? 

Thanks!

   

Execute SQL Task Editor

$
0
0

It seems there is a big,big bug inside the newest version of SSIS:

When I try to create a "execute sql-task" in Visual Studio 2019, I get only very small dialogbox without any tabs, there I can enter a sql statement, but I can't choose an existing connection. The option "read sql statements from file" is not available too. Somebody knows, if there is any work aound or what is wrong?

best regards
Olaf


olaf870

Password protected SSIS package

$
0
0

We are running SQL Server 2012; We have few password protected SSIS packages; But unfortunately, currently no one knows the password.  We are unable to open SSIS package in visual studio. We have admin permission on the SQL Instance. How to retrieve the password or is there any way we can change the p/w? 

Thanks in Advance 

The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009

$
0
0

I have deployed my packages into Sql Server and I am using Configuration File. As my Data Source is Excel, I have changed the connection string during deployment with Server Path. But I am getting the following errors. Actually the File Exist in Path. May I know What is cause of the issue? Do I need to give any permission to execute the package.

 

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed. 

 

component "Excel Source Service Contract Upload" (1) failed validation and returned error code 0xC020801C. 

One or more component failed validation. 

 

There were errors during task validation. 

DTS_E_OLEDBERROR, Error Code: 0x80004005 Source: "MS JET DB Engine" Description : Path is not valid


 

SSIS SQL Execute SQL Task

$
0
0

Hi There,

i am loading large data set  from flat file into DB and i have sql proc which process the data and generate final output under db table. 

is it better approach to execute sql proc from ssis using execute sql task  or execute using sql agent job?

the reason to execute from ssis is that there are some dependency which i can handle in ssis. 

Regards,

Manish


How to create ASCII file from SQL server table using SSIS 2014 ?

$
0
0
How to create ASCII file from SQL server table using SSIS 2014 ?



to generate a xml file from csv ussing c# in ssis script component

$
0
0
I have a csv file data of automobile insurance records which i need to convert into a xml file using ssis. 
Now , when I have unique insurance numbers in csv then i can generate the xml file in the required format but there are multiple occurrences of a insurance number.
**For ex. A family have got their automobiles insured having 4 drivers and 4 vehicles so there are 4 entries of that insurance number in csv file which should be 1 block in xml having insurance number occurring 1 time and all driver and vehicle entries 4 time under 1 insurance number tag.**


I have generated a xml file when there is no repetition of driver or vehicle or insurance number. I am very new to SSIS and never done coding in c# so if someone can help me with the code. How to loop over columns if they are repeating and make child nodes entry for it.


This is the code i have used in ssis script component to generate the structure of xml i require but it works only in case when there is no repitition.


string[] lines = File.ReadAllLines(@"H:\SSIS\Source\Intermediate.csv");




        XElement xml = new XElement("Submissions",
        from str in lines
        let columns = str.Split(',')


        select new XElement("SubmissionEntry",
         new XElement("SubmissionID", columns[0]),
         new XElement("PolicyNumber", columns[1]),
         new XElement("OfferingCodeIdentifier", columns[2]),
         new XElement("BaseState", columns[3]),
         new XElement("EffectiveDate", columns[4]),
         new XElement("PeriodStart", columns[5]),
         new XElement("RateASOfDate", columns[6]),
         new XElement("RenewalNumber", columns[7]),
         new XElement("RatingCapFactor", columns[8]),
         new XElement("ConversionFactor", columns[9]),
         new XElement("ClaimsFreeCount", columns[10]),
         new XElement("PaidInFull", columns[11]),
         new XElement("IsHomeOwner", columns[12]),
         new XElement("IsNewBusinessTransfer", columns[13]),
         new XElement("IsNamedNonOwnerPolicy ", columns[14]),
         new XElement("LVTTier", columns[15]),
         new XElement("PNIBirthDate", columns[16]),
         new XElement("PNIPostalCode", columns[17]),
         new XElement("CreditStatus", columns[18]),
         new XElement("EquivalentCreditScore ", columns[19]),
         new XElement("CreditScore", columns[20]),
         new XElement("DeliverySource", columns[21]),
         new XElement("ChannelGroup", columns[22]),
         new XElement("LineCoverages",
             new XElement("LineCovEntry",
                 new XElement("PatternCode", columns[23]),
                 new XElement("CoverageTerms",
                     new XElement("CovTermCodeIdentifier", columns[24]),
                     new XElement("CovTermValue", columns[25])))),
         new XElement("PolicyDrivers",
             new XElement("DriverEntry",
                 new XElement("DriverID", columns[26]),
                 new XElement("DriverType", columns[27]),
                 new XElement("Excluded", columns[28]),
                 new XElement("RelationToApplicant", columns[29]),
                 new XElement("DateOfBirth", columns[30]),
                 new XElement("Gender", columns[31]),
                 new XElement("MaritalStatus", columns[32]),
                 new XElement("AgeLicensed", columns[33]),
                 new XElement("LicenseStatus", columns[34]),
                 new XElement("LicenseCountry", columns[35]),
                 new XElement("UnverifiedDriver", columns[36]),
                 new XElement("EmploymentStatus", columns[37]),
                 new XElement("DriverImprovementCourse", columns[38]),
                 new XElement("DriverImprovementCourse", columns[39]),
                     new XElement("IncidentEntry",
                         new XElement("IncidentID", columns[40]),
                         new XElement("IncidentDate", columns[41]),
                         new XElement("ViolationCode", columns[42]),
                         new XElement("OverrideCategory", columns[43]),
                         new XElement("LossAmount", columns[44])))),
         new XElement("PersonalVehicles",
             new XElement("VehicleEntry",
                 new XElement("VehicleID", columns[45]),
                 new XElement("VehicleYear", columns[46]),
                 new XElement("GaragePostalCode", columns[47]),
                 new XElement("PrimaryUse", columns[48]),
                 new XElement("GaragedOutOfState3MonthsPerYear", columns[49]),
                 new XElement("SecurityTypeCode", columns[50])),
                 new XElement("RAPA",
                     new XElement("Rapa_Bi", columns[51]),
                     new XElement("Rapa_Coll", columns[52]),
                     new XElement("Rapa_Comp", columns[53]),
                     new XElement("Rapa_Med", columns[54]),
                     new XElement("Rapa_Pd", columns[55]),
                     new XElement("Rapa_Pip", columns[56])),
                     new XElement("VehicleCovEntry",
                         new XElement("PatternCode", columns[57]),
                         new XElement("CoverageTerm",
                             new XElement("CovTermCodeIdentifier", columns[58]),
                             new XElement("CovTermValue", columns[59]))))));








        xml.Save(@"H:\SSIS\Destination\demo xml.xml");

Importing from Mainframe with Host Integration Server

$
0
0

Hi team,

 I am trying to import from mainframe  to SQL Server using SSIS as something similar mentioned in below article

https://www.mssqltips.com/sqlservertip/3497/importing-mainframe-data-with-sql-server-integration-services-and-host-integration-server/

Please let me know if i want to import  directly from mainframe systems instead of local folder, what connection property need to set?

 I am using  HIS 2013 and SSMS 16.5.3 for SSIS.

Thank you

SSIS: how capture failed DB connection error?

$
0
0

Occasionally a SSIS package fails to connect to a remote server because, we suspect, the remote server is experiencing high CPU (e.g. during backup process).  How can we recognize this type of failure from inside our SSIS package?

TIA,

edm2

P.S.  You may be able to ping the remote server at the time but that doesn't mean that an external app canaccess data in a database on that server.

Exception handling in SSIS Package Dynamic Connections and When It failed to connect to DB

$
0
0

Exception handling in SSIS Package Dynamic Connection

Hello All,

I have a SSIS Package where one of the connection is Dynamic as it has to connect to 250 Point Of Sale Database. Each connection getting called using SSIS ForEach Loop. During each run, randomly few of the database connections, out of 250 are getting timed out. From SSIS log, It can't tell out of 250, which one failed to connect.

So I thought of Capturing the Server and DB name failed to connect using Event Handler. I just put a event handler at DFT and used query 

UPDATE [dbo].[ServerandDBName]
SET [Is_Failed_Connect] = 1
WHERE [DBName] = ?  (This is coming from a variable which is filled by Foreach Loop)

Also I changed the connection Manager connection timeout from 30 seconds to 180 seconds.

Note: Foreach loop properties "ForceExecitionValue" is Set to True so that If one connection failed to connect then pacakge should not fail and continue to connect to next one. 

https://stackoverflow.com/questions/18038750/exception-handling-in-ssis-package-dynamic-connection

Is there any other way to capture this..?


Thanks Shiven:) If Answer is Helpful, Please Vote

Viewing all 24688 articles
Browse latest View live


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