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

DataTools SSIS Package Sort By Name doesn't work

$
0
0

The sort by name option in DataTools/SSIS 2012 does not appear to work correctly any more.

For example:

Initially the sort by name option works:

But after doing a Save-All/Close Solution/Re-open - it's back at the state in the first screen shot.

I first noticed this in a very large solution and thought that TFS may have something to do with it, however this test package I have created and in the screenshots above is not included in any version control.

Even if I create the packages in the order I want, say creating A Package, then B Package, then C Package, and on and on, it'll be sorted in order when I save, but when I re-open the solution it's in the reverse order of what it was previously. So, it appears that the sort by name is NOT working, and that while the sort order used in the IDE is created datetime ascending, the sort order when you re-open a solution is created datetime descending.

All in all, it makes it rather difficult to have any sort order within an SSIS solution in 2012.


Text file search in SSIS

$
0
0

Hi,

I need to search the text file which is something like this,

*Error.txt

I am using the script from,

http://blogs.msdn.com/b/sqlblog/archive/2011/06/14/sending-several-files-to-several-individuals-using-ssis-send-email-task.aspx

I am getting the following error

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.

---> System.Runtime.InteropServices.COMException (0xC0010009): The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.

any one can help me please?

Thanks !


--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

Appending results to the same text files in SSIS

$
0
0

hi 

need to get the resultsets from various tasks within a package and need to present as in a letter format..

Please suggest me a way to achieve this !

i.e.

Tasks1 Result set:

StudentNo   | Student Name   | Stud.Place

1--------------| abc----------------|Place1

2--------------| bdy----------------|Place2

Tasks2 Result set:

StudentNo   | Student Name   | Stud.Mark.comments

1--------------| abc----------------|Mark1

2--------------| bdy----------------|Mark2

Joining those two result sets to present as following format:

--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Introduction of Institute:

<<bla bla bla.......................>>

The following are the results sets:

The students are from:

StudentNo   | Student Name   | Stud.Place

1--------------| abc----------------|Place1

2--------------| bdy----------------|Place2

The students marks comments:

StudentNo   | Student Name   | Stud.Mark.comments

1--------------| abc----------------|Mark1

2--------------| bdy----------------|Mark2

--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Have any one been with such work?? please help me if you know how to handle such scenario !

THanks !


--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

Passing Resultset from one "Execute SQL Task" to be used in another

$
0
0

Ok.  I've scoured the universe searching for an answer.  I've tried just about everything but can't get this to work right.  I apologize for the up & coming descriptive email but it will be necessary to show you my work.

I'm running both "Execute SQL Task" in OLE DB. Task #1 goes to Server-A (for example) and Task #2 goes to Server-B (for example).

I have a select statement that will ALWAYS return 1 record.  5 values.  This works fine in Task #1.  I've set my variables on the left to a SSIS Package scope.

Task #1:

Connection:  Server-A (for example)

ResultSet: Single Row (tried all options in here by the way)

ConnectionType:  OLE DB

SQLSourceType: Direct Input

BypassPrepare:  True

ResultSet:  

Task #1 completes successfully.

On Success go to Task #2:

Connection:  Server-B (for example)

ResultSet:  None

ConnectionType:  OLE DB

SQLSourceType: Direct Input

SQLStatement:  (this is a stored procedure) Exec AddScheduledInfo ?, ?, ?, ?,?

Parameter Mapping:  

(NOTE:  I started with 0, 1, 2, 3, 4 on the "Paramter Name" but even if I run a simple "Select ?, ?, ?, ?, ?" I got errors with the numbers.  When I changed it to the current values of @variablename, the "Select...." statement worked.)

Now here's the kicker.  If I hard-code values into my stored proc, it runs great.  No errors.  Green across the board!!  But when I replace the hard-coded values with the ? I get the following error:

"[Execute SQL Task] Error: Executing the query "Exec AddScheduledInfo ?, ?, ?, ?, ?" failed with the following error: "The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

Connection is good because it works fine with hard-coded values, so I eliminate that "problem".

"ResultSet property..." issue, I don't buy.  I don't want a result set.  But for troubleshooting purposes I tried them all.  I get a different type of error (still) when I try any of them.

This leads me to the "parameters not set correctly" problem.  

I'm at a loss of what to do at this point.  I've been off 'n on this issue for 2 days now & feel I'm just forgetting 1 simple thing.  I don't know what that 1 thing is though.  So finally reaching out for some ideas.

Thanks ahead of time & hope to get this resolved.

Get Filename for use in flat file connection manager based on part of the filename which is constant

$
0
0

Hi,

I receive source flat files every day in the format area_ddmmyy_hhmmss.txt example : product_102412_123000.txt

The area of interest remains constant and the date can be constructed but the time is not constant every day i.e. tomorrow's file can product_102512_083010.txt

My question is I need to pass the full filename dynamically to the flat file source or the connection mgr daily for the load into SQL Server.

What is the best approach to do this?

THanks,

Samir

Expiry Date column in SCD Type 2 Dimension

$
0
0
The Effective Date and Expiry Date in our SCD type 2 dimension is date only (no time component),i want to set the Expiry Date = Effective Date -1 of the new row,

(Means a daybefore)

From The Source

EmpID EmpName      Salary  RowEffectiveDt
1          Venkat              2000   10/1/2009
  1          Venkat 3000            21/1/2010
  1          VenkatNaidu 3000            24/1/2010

 Target would be in scd type 2

EmployeeKey    EmpID   EmpName Salary RowEffectiveDt RowExpirationDt  CurrentFlg
1           1         Venkat              2000       10/1/2009 20/1/2010            N
2           1         Venkat 3000       21/1/2010 23/1/2010 N
3           1         VenkatNaidu 3000       24/1/2010 12/31/9999 Y

So How can i handle this type of SCD and it cludes delete flow also

where we will write RowExpiration logic in,i need detail level explanation. 

can any one pls help me

Thanks in advance


gvgnaidu

Want to use In derived column

$
0
0

i have one table i.e Fact

col 1 

col 2 ---> ISNULL((SELECT DISTINCT PT2 FROM dbo.Class as CL WHERE P.PNo = CL.PNo AND P.CNo = CL.CNo AND CL.C = P.C AND CL.D = PTP.D), 'ABC') AS P_T_D

col 3

i am so confuse that how to set this select condition for on column in derived column 

let me know if anyone have any idea how to set 

thanks

How do I set up SSIS to send data to a NetTCP WCF service?

$
0
0

I am new to SSIS and am currently working with SQL Server Data Tools for SQL Server 2012.   I have a legacy application that has data that needs to be sent to the new database structure via NetTcp WCF service.    I have three views in the legacy database that will contain the data that I need to send to the WCF service.    The  WCF service expects the data to be sent as an order object that contains 1 header, 1-to-many line items and 1-to-many details.  So far I have created the workflow objects to connect to the database and retrieve the data into datareaders.  I created a Script Component based on David Browne's blog, but realized it was using the WCF as a source.   The questions I have are:

1. Can I create a Script Component that uses WCF as the destination?  If so, how?

2. Using SSIS, how do I create the order object that contains 1 header, 1-to-many line items and 1-to-many details using the Order_ID?

Basically what I need to do is for each Order_ID in vw_HeaderInfo I need to create an order object that has 1 record from vw_HeaderInfo, 1 or more records from vw_LineItemInfo and 1 or more records from vw_DataDetails and pass each order object to the WCF service.


Randall


CR and LF characters at end of records using Flat File data destinations (missing the CR)

$
0
0

Hi all -

I'm exporting a single column table to a Flat text File with the following attributes:

  • Ragged right
  • ColumnDelimiter = {CR}{LF}

When I open the file in a text editor and show markup I see the Line Feed but no Carriage Return.  Example:

T 00000 00009153.62{LF}

What I expect to see is:

T 00000 00009153.62{CR}{LF}

If I manually add the CHAR(13) + CHAR(10) to my Stored Procedure that selects the data, run that in SSMS and copy and paste the results into my editor, I get the second result which is what I'm after. I need both characters at the end of each line.  But for some reason the SSIS data flow task isn't creating it.  AND if I leave the CHAR(13) in the source procedure, SSIS still seems to strip it out and not save to the final exported file.  

Any suggestions?


Row disposition for CSV files SSIS

$
0
0

Hi Experts,

I have an issue with importing data from CSV files. Some of the files does have 14 columns and some of the does have 15 columns

when I importing all of them into the table . sitting some rows in the 14th column itself(around 50 rows)...

what is the problem any idea please

merger join error

$
0
0

hi

i am getting this error:

TITLE: Package Validation Error
------------------------------

Package Validation Error

------------------------------
ADDITIONAL INFORMATION:

Error at Data Flow Task [Merge Join [524]]: The "Merge Join.Outputs[Merge Join Output].Columns[PACKAGEDESCRIPTION]" metadata does not match the metadata of the input column.

Error at Data Flow Task [SSIS.Pipeline]: "Merge Join" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.

Error at Data Flow Task: There were errors during task validation.

 (Microsoft.DataTransformationServices.VsIntegration)

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

OK
------------------------------

Oracle oledb SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER error code 0xC0209303

$
0
0

Hello There...

I faced one issue while I was working on the project to migrate data from Oracle to SQL Sever and I thought I should share it here.

I had created a SSIS package in VS2008 and had installed Oracle10g (32 bit) and SQL Server 2008 (32 bit). It was working fine until I changed my machine. I upgraded my laptop to 64 bit (I7) so I had to reinstall everything and there came the main problem. I couldn't run SSIS package at all after I installed Oracle 10g (64 bit) and SQL Server 2008 (64 bit)

It was tough to establish all connections successfully but I was able to do that with proper TNS entries (for Oracle) and SQL Server settings.

If you ever face issue in running SSIS package having Oracle and SQL connections, here is the checklist I would suggest:

  1. Make sure Oracle listener service is started (in order to start oracle listener run "lsnrctl start" without double quotes in command window) and system is listening Oracle (to do it run in command window: tnsping <ListenerName> e.g. tnsping XE or tnsping orcl). If it fails, please refer sample TNS files and correct yours.
  2. To check listener status of Oracle command to run in command window is "lsnrctl status" (without double quotes)
  3. Make sure you are getting connected to the SQL Server and Server name is correct
  4. You may need to update your Oracle oledb drivers which are available on Oracle site (I downloaded ODAC112030Xcopy_x64.zip)
  5. Open SSIS package and test your connections in connection manager. If they succeeds then great if not check above steps again.
  6. After you have successfull connections, make sure that property value of "AlwaysUseDefaultCodePage" is True in OLE DB Source (in data flow task). You can see this flag in Data Flow Component in Properties window
  7. In Visual studion, go to your Package properties (right click on Package in Solution explorer) and select False as the value for "Run64BitRuntime" Debug Options

These were the changes/checks which I did in order to run my SSIS package successfully.

FYI, version of softwares in my machine is:

Oracle: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
SQL Server: SQL Server 2008 Enterpise Edition (patch SP1 applied)
Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE
Microsoft .NET Framework Version 3.5 SP1
SQL Server Integration Services Microsoft SQL Server Integration Services Designer Version 10.0.2531.0 ((Katmai_PCU_Main).090329-1015 )

I hope this information would help someone....Happy Coding, cheers!!!


Insert as "Null" Value to Destination Column Table When Flat File source having "Blank" value in SSIS 2005

$
0
0

Hi Team,

I am using ssis 2005,

i am porting data from text file to sql server Table (oledb destination), i have to insert Null Value to destination table Column, when Source having Blank Value.

if so doing in Derived Column, then what is the expression i have to Mention

i have a text file of data say

-------------------------------------

No,Name,Place

1,supreeth,tumkur

,Prashanth,Mandya

3,,Kollar

This should be inserted in my table like

No                  Name                       Place

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

1                   Supreeth                 Tumkur

Null              Prashanth                Mandya

3                 Null                           kollar

Please reply to this Above Question.

Thanks

------

Supreeth

SSIS Derived Column

$
0
0

Hi

i am moving data from flatfile to oledb table

in flat file Name(column) is there (in that column if it is space( ) then it should insert as null to destination table

otherwise it will insert that name

How to insert null instead of space()

Thanks

Ram

SSIS 2012, SSISDB Catalog and ServerStorage protection level errors.

$
0
0

I'm using SQL Server 2012 Enterprise Build 11.0.2100. I have about 200 packages that move data between servers...typical ETL. Sometimes a package will  fail to execute and throw the following error:

"Error 0xC0014061 while executing package from project reference package "xxxxx.dtsx". The protection level, ServerStorage, cannot be used when saving to this destination. The system could not verify that the destination supports secure storage capability.

The protection level, ServerStorage, cannot be used when saving to this destination. The system could not verify that the destination supports secure storage capability."

  • This error is intermittent. It is not related to a single package and does not always error on the same package.
  • My packages are deployed using the package deployment model.
  • It seems that I have no control over the Protection Level set for the packages because when I import the package back into SSDT, all the package configurations are set to EncryptSensiveDataWithUserKey instead of ServerStorage.
  • I've tried to set all 200+ packages to server storage and deploy but that didn't help.

There is a step in the deployment process that changes the ProtectionLevel of the packages...does this set it to EncryptSensitiveDataWithUserKey because the catalog is encrypted? Has anyone ever ran into this before and how do I fix it?



SSIS Memory

$
0
0

We have a server that has ssis and ssas running, since we use ssis only for nightly loads and need all the memory available for ssas during business hous, how should we handlememory here?

when we setup main and max memory in sql server properties, am assuming that applies to only the database engine? if we have 16 GB memory and we setup max memory as 14 GB in management studio, deoes that mean ssis and ssas wil starve for memory? please advise.

How to download .dat file from FTP when file names varies everytime

$
0
0

HI all,

 

I need to download .dat file from FTP site into local shared drive and then process it. Now i have a file name like " FIleName_20121102_456794.dat"  that 456794 varies every time and prefix is constant. So can any one please let me know how to download files if they vary randomly everyday.

 

Thanks,

Jyo

Convert Date to MMM YY Format

$
0
0

Hi,

Need to load the date in Sql server table using SSIS 2005

But constriant is that, to load the data in the format "MMM YY" format

Example : '01/01/2008 00:00:00' should be load as 'Jan 08'

Please advise

Regards

SqlStud

isnull in conditional split

$
0
0

I got a simple suitivation but which I can not make it, here it is, I have two columns, if any of those were null then I have to move those row to error table if not then move to data table.I am trying to write a condition in conditional split transformation which is not doing what I want, can any one suggest me how to write a condition in condition split transformation so that I can do what I want ( not in t-sql). thanks in advance.

Reorder columns in Flat File Destination

$
0
0

Hi Friend's

Although, I did some google in order to find the solution for reording the columns before exporting to a text file using FLAT FILE DESTINATION, one of the work around which i found is editing the final package xml file and moving the DTS:FlatFileColumn fields as required.

Is there any other solution in order to avoid this approach as I have some 40 fields to be displayed in text file and manually reordring these fields in xml would be cumbersome.

I need to create  text file using FLAT FILE DESTINATION.

Viewing all 24688 articles
Browse latest View live


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