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

Duplicate Key row with unique index issue

$
0
0

Hi All,

I have a look up table with old data, which i need to truncate and load with the new set of data, however when loading i'm getting the following error

[OLE DB Destination [32]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Cannot insert duplicate key row in object 'dbo.CaseType' with unique index 'idx_CaseType'. The duplicate key value is (49, AH).".

I know , what it means that since CaseType column has a unique index we cannot insert duplicate key, but in real world the scenarios are different , the record in question is as follows: so what is the workaround in this kind of scenario other than making it Non-unique Index?

Thanks

CaseTypeIDCountyIDCaseCategoryCaseTypeCodeCaseTypeName
2149ProbateAHProbate
4849CivilAHAdoption History


SV


Dynamic Excel connection manager

$
0
0

I have a for each loop which loops thru excel files.

The for each loop sets a local variable InputFile to the value of the file (full path).

I have a connection manager (excel file) that has the expression

"Data Source=" + @[User::InputFile]  + ";Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=\"Excel 12.0 XML;HDR=YES\";"

But I have a script task that uses this file connection to grab the sheet names.

The issue I have is the file connection manager connection's string property is not changing  after the for each loop changes the InputFile variable.

So if the InputFile variable is C:\ABC.xlsx at design time or start-up then after the first iteration of the loop gets updated to C:\XYZ the connection manager has the connection string set to c:\ABC even thought the data flow will load the data from c:\xyz. The property is not reflecting what really is the value. Does it change it in memory or something?

I need to have the ability to use the conneciton manager in the script task and get to the correct file or the current file that we are loading in the loop.

script task code

oleDbConnectionmyExcelConnection = newOleDbConnection(Dts.Connections["Excel File"].ConnectionString);

Cannot Execute Package from Local / Remote Integration Services Catalog

$
0
0

I have an SSIS package deployed to the Integration Services Catalog under Server A-> ISC -> Project folder ->package name Test.dtsx.  If we right-click the package on the Integration Services Catalog (ISC) through SSMS on the server and select execute it fails with the “Cannot open the data file/ Can't open the file in the shared location “\\NASLocationFullyqurifiedName\Folder\source”' error.  However, when I try to call the package from SQL Server agent job, It works perfectly fine using proxy account, if I execute the package within SQL Server using my credentials from the server, the package runs fine without any issues too. But it fails when I execute from any local /remote machine.

Note

SSIS service runs under a domain account 


Steps Taken to resolve it 

1. Added SQL servers account to the NAS path - Failed 

2. I had added SSIS service account to the COM and granted permission - Failed.

3. I had checked the double hop scenario with Kerberos delegation, I had tried SPN -  Failed


Can anyone help me with this issues?

Thank You,

MAK


Cheers, MAK

Handling Data Profiling is SSIS

$
0
0
I would like to do data profiling tasks like referential integrity etc in SSIS, what is the way forward. Please help me.

Identify Slow Running SSIS Packages in Production Server

$
0
0

Sir,

I would like to identify the slow running SSIS packages in production, can you please tell me the steps involved in doing the same.

Thanks

Loganathan

Pass Variables into Execute Process Task For Batch File

$
0
0

I'm trying to execute a certain line command in an Execute Process task and could use a little guidance!

I have the following line command:

C:\Program Files (x86)\GNU\GnuPG>gpg --recipient blahblahblah @concursolutions.com --
trust-model always --output "G:\Outgoing\testfile.txt.gpg" --encrypt "G:\Outgoing\testinputfile.txt

The output and encrypt options are going to be parameters for the batch file. Currently in the SSIS package, those two are defined by the following variables: @Destname (output) and @SourceName (encrypt).

So my first question would be how does the batch file need to be formatted to take in two parameters?

Secondly, how would the Execute Process task need to be configured?

I rarely if ever have to work with batch files so I apologize if this is pretty simple stuff for most of you.

Thanks!


A. M. Robinson


SSIS interview questions

$
0
0
i am searching job on ms bi with 2 years experience please send me ssis interview questions with real time scenarios

"How" and using "which SSIS component" to change an empty string value to 0

$
0
0

Hello

Firstly allow me to say that I am just starting to learn SSIS so please excuse me if my questions are very basic.

I have my SSIS package that reads elements from a Sharepoint list to a SQL table. The data type of my source is string and the destination is integer. The source column can sometimes be an empty string "" (not a required column)

Can someone please help me out on the expression to use and "where" or "what" SSIS component can I add this expression to? Like I know that I can use the "Conditional Split" to filter the data so for my expression which component can I use?

Thank you all in advance for your assistance


Import a ssis environment in SSDT-bi?

$
0
0

Hallo,

I am missing detailed documentation on ssdt-bi, therefore the following questions.

I have created a SSIS environment in a catalog on a server(a).  This is my test server.

This environment contains 35 variable’s. I can run this against a project deployed to this server(A).

I also have a second server. This is my development server. This has SSDT-BI installed. Here i create the packages.

If i test my project i would like to run the project (on server b) against the environment on server a. (or at least one of multiple environments on server b)

I have some questions:

- How do i create (or replicate) ssis environments and all the variable values, in ssdt-bi? 

- How can i export all the environment variable’s form server a to server b? (i can only generate incremental update scripts of changes in a environment variable, not a full export script like in ssms)

- How should i use the "Solutions configurations" in ssdt-bi? I noticed i can setup multiple configurations. Can i specify this to be used when a package is executed in ssdt-bi?.

- How do i assign variable values to a configuration in ssdt-bi?

- Is there documentation available on ssdt-bi (the ssis part of ssdt) explaining what the purpose is of functions in the tool (I found some notes on the msdn site. These were quite minimal instructions what to do, not explaining the purpose). I found some articles on sqlservercentral,

http://www.sqlservercentral.com/search/?q=ssdt-bi&t=afbs&sort=relevance ,

but this is limited and was mainly created for previous versions of the tool.

Did i miss something? Do you know?

 Juriaan8


Juriaan van oosterom


Best way to connect Database across 2 domains using LInked Server?

$
0
0

We have an Enterprise setup with multiple domains.

We a Domain A with SQL server 2008R2 say SQL-A and Domain B with SQL server 2008R2 ( SQL-B). It will be like SQL-A will always access SQL-B. Reverse is not required.

In Domain A we have a .Net Application which accesses SQL-A to perform CRUD operations which ultimately come to SQL- B since all SQL tables exist in SQL- B only.

Need you help you know the right way to implement Linked Server from SQL-A to SQL-B, so that Domain issues as well as DML execution work smooth.

I need not worry about DDL in SQL-A And SQL-B as it will taken care of by network and H/W team. I just need to focus on as developer.

Best way to connect Database across 2 domains using LInked Server?

$
0
0

We have an Enterprise setup with multiple domains.

We a Domain A with SQL server 2008R2 say SQL-A and Domain B with SQL server 2008R2 ( SQL-B). It will be like SQL-A will always access SQL-B. Reverse is not required.

In Domain A we have a .Net Application which accesses SQL-A to perform CRUD operations which ultimately come to SQL- B since all SQL tables exist in SQL- B only.

Need you help you know the right way to implement Linked Server from SQL-A to SQL-B, so that Domain issues as well as DML execution work smooth.

I need not worry about DDL in SQL-A And SQL-B as it will taken care of by network and H/W team. I just need to focus on as developer.

SSIS 2008 r2 Set values does not work as intended

$
0
0

Hi All,

At one of my accounts I'm using SQL 2008r2 and SSIS in an DWH solution. Today I wanted to created a dynamic sql statement in one of the packages. The dynamic part is in the where-clause a sql query I use. I want to set the values for this clause dynamically. Therefor I created a user variable (named 'Filter') which should get it´s value at run-time.

/DTS "\MSDB\Prod\My Package" /SERVER "My-Server" /CHECKPOINTING OFF /REPORTING EW

/SET "\Package.Variables[User::Filter].Properties[Expression]";

" where [Starting Date] < '2008-09-01 00:00:00.000' "

 

However when I execute this package with dtexecui it doesn not use the value specified after the /SET parameter, but instead uses the value specifiied at design time. I get the same when I add the execution of ths pacakage as a sql server job step (type SSIS).  I would expect that value specified after the /SET parameter would overwrite the valus specified at design time, but I don't see that happening.

Does anyone have any ideas about the cause of this and how it can be solved ?

Appreciate your help, regards

Cees


Please remember to mark replies as answers or at least vote helpfull if they help and unmark them if they provide no help.

loading PGP file into sql table is SSIS

$
0
0

I have a load a zipped folder which is PGP encrypted into SQL table, can someone help me how to unzip and load it into sql table using SSIS.

Thanks,


sree

SSIS package hangs on validation in Visual Studio

$
0
0
When I push my SSIS packages up to my production server (which has a different data source than my developement environment) and I try to open the package on the production server, it takes forever for to validate all the steps of the SSIS package because it's trying to validate against a datasource that isnt there, so it just waits for each element it's validating to time out. This is exceptionally annoying.

Is there a way to turn off this validation 'feature'?

SSIS and trapping "duplicate primary key" import error

$
0
0

I want to import a data file into a sql table. The table has a primary key but the data could have a duplicate value in the PK column (error in the source data). How can I "trap" for this type of error in SSIS?

TIA,

edm2


Bulk Reports generation via SSIS Script Component

$
0
0

Hello,

while within SQL Server 2008R2/Visual Studio 2008, I created SSIS project that involves, among the rest, Script Components....Nowadays, we  moved towards SQL Server 2014 and Visual Studio 2013...Our further development of SSIS project is stacked at Script Component errors....like depicted in attachment. As synopsis of steps that we used to undertook,  was drag/drop Script Component, Transformation, Add Web Service as http://computername/ReportServer/ReportExecution2005.asmx, Resolve in order to set up correct Using statement....But, if we try to BUILD, it pop ups errors beneath...

How to escape i.e., how to build it now in SQL Server 2014 and Visual Studio 2013?

Thanks for any suggestion...


Parent-Child Architecture

$
0
0

Which option is better. Multiple data flow task in 1 package or 1 package for 1 table and call all these package in a master package and run?


Experience a deadlock condition when multiple SSIS packages are run in SQL Server 2012 with CU7

$
0
0

Consider the following scenario:

  • You install Microsoft SQL Server 2012 SP2 with CU7 (11.0.5623)
  • You schedule a Microsoft SQL Server Integration Services (SSIS) package to start by using the SSIS.catalog.create_execution stored procedure.
  • You call the SSIS package again or schedule a second SSIS package to start at the same time by using the SSIS.catalog.create_execution stored procedure.

In this scenario, you may experience a deadlock condition. An error that resembles the following is logged in the SQL Server Agent Job History:


Executed as user: xxx\xxx. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.5623.0 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started: 3:36:00 AM  Failed to execute IS server package because of error 0x80131904. Server: .\SSIS, Package path: \SSISDB\SSIS2012\xyz\xyz.dtsx, Environment reference Id: NULL.  Description: Transaction (Process ID 63) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.  Source: .Net SqlClient Data Provider  Started:  3:36:00 AM  Finished: 3:36:01 AM  Elapsed:  1.781 seconds.  The package execution failed. The step failed.


I can reproduce the problem with some test packages in v11.0.5058, a version that would have included a fix for: https://support.microsoft.com/en-us/kb/2699720




Send an email when Execute SQL Task stops, but doesn't error.

$
0
0

Hello,

I'm trying to put together an SSIS package that will look in one directory for 2 distinctly named .csv files.  The files will then be loaded into 2 tables. 

The first task I execute is a SQL Task that checks to see if the tables I'm loading the data into are empty.  If the tables have data, the package stops executing.  If they are empty, the package continues to execute.

What is the best way to send an email out from SSIS if the package stops on the first step? 

Thanks!

SSIS Extension or WinSCP or something else for SFTP From SSIS

$
0
0

Hi All,

Recently I received a Task of implementing SFTP in SSIS and as I went through, found couple of different solutions. Like, using WinSCP (Url:WinSCP) ; Using PuTTy/psftp.exe (Url: psftp) or even using, SSIS Extension from CodePlex (url: SSISExtension). I'm sure there are many more.

I'm looking for some expert comment on advantages and or disadvantages of these per your experience so, it can guide me to choose the best. As of now I'm inclined to SSIS Extension, so specially if someone can highlight if there is any drawback of that component, that'd be really helpful. Thanks all

Viewing all 24688 articles
Browse latest View live




Latest Images