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

Loop through Data Flow Components (with .NET)

$
0
0

Hi,

I want to validate/examine my Data Flow Task components (Flat File Source, Derived Column, Row Count, OleDB Destination, etc.). When looping through my components, I can find properties like Name and Id, but it seems hard to get the actual component type. So far I only get a type that indicates whether it is a source, transformation or destination.

MainPipe pipeline = taskHost.InnerObject as MainPipe;
foreach (IDTSComponentMetaData100 DataFlowComponent in pipeline.ComponentMetaDataCollection)
{
	Console.WriteLine("Name: " + DataFlowComponent.Name);	// Name of transformation
	Console.WriteLine("Type: " + DataFlowComponent.ObjectType.ToString()); // int 9=source, 10=destination, 12=transformation
}

Any suggestions (other than parsing the package XML code)?


Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter




SSIS Installation issue / Access issue

$
0
0

Hello, I recently installed SSIS to an existing SQL Server 2014 Instance since it was not installed all at once.

I did change the instance name in the configuration file and added the two developers to permissions.

I can connect to SSIS through the server or my client via object explorer fine, but the other two developers cannot. They can't even see it as an option to connect to from their client and given the access denied through the server object explorer?

The developer can connect by way of server if right click and run as administrator though?

Did I maybe miss something in the installation? Is there an extra permission issue?

Just to clarify I don't know SSIS that well, but need to have it working for the developers.

Thank you for any suggestions!

Sending file attachments in SSIS only if rows returned

$
0
0

I use this expression to send 8 email attachments from my DFT's.

@[User::CranReport1] +  "|" + @[User::ElizReport1]   +  "|" +  @[User::PlfdReport1] + "|" + @[User::CranReport2] +  "|" + @[User::ElizReport2]  +  "|"+  @[User::PlfdReport2]  +  "|" +   @[User::CranReportWinter] + " |"+  @[User::CranReportWinter2]

I have row counters in all my DFT's and would only like to send certain attachments if rows were returned. Has anyone done this?

Calling All Wise Men! SSIS Gurus Needed! Apply Within! No One Turned Away!

$
0
0

Calling all wise men!

Join us and rejoice!

The time for giving is upon us again!

A time for family (community) and gifts of knowledge!

Why not wrap up a little something extra special this year.

After all, tis the season to be generous!

Remember the reason for the season!

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!

ADO Error in SSIS

$
0
0

Can somebody help me with my syntax?

Where to find execution logs for the task within a package that are also a package

$
0
0

We have a package which has tons of packages within it . I am asked to look into how much time its taking to run a package. To set the context, there is a master package in which we have 68 package task. I know there are tables in SSISDB where I can find these info.

Master Package

  ChildPackage1

  ChildPackage2

  ChildPackage3

  ChildPackage4

Desire Result

Execution ID , Package Name, Execution Start Date, Execution End Date , Duration in hh:mm:ss , Environment ID

1                  , Master Package, d1                    , D2, 01:00:00 , 1

1                   , ChildPackage1    d3                    , D4, 00:20:00 , 1     

1                   , ChildPackage2    d5                    , D6, 00:20:00 , 1   

1                   , ChildPackage3    d7                   , D8, 00:20:00 , 1   

1                   , ChildPackage4    d9                    , D10, 00:20:00 , 1   

2                  , Master Package, d1                    , D2, 01:00:00 , 2

2                   , ChildPackage1    d3                    , D4, 00:20:00 , 2    

2                   , ChildPackage2    d5                    , D6, 00:20:00 , 2   

2                   , ChildPackage3    d7                   , D8, 00:20:00 , 2   

2                   , ChildPackage4    d9                    , D10, 00:20:00 , 2 

     

    


Moyz Khan

Problem with ReadWriteVariables in Data Flow Task Script Component

$
0
0

Hi to all

I have a problem with the ReadWriteVariables variables in Script Component of the data flow task.

In particular if I insert only one user variable in the ReadWriteVariables field of the Script page in Script Component all work fine!

But if I insert two or more user variables in the ReadWriteVariables field I get the following error when I press on the "Edit Script" button:

The variable  cannot be found. This error occurs when an attempt to retrieve a variable from a variables collection on a container during execution of the package occurs, and the variable is not there. A variable name may have changed or the variable is not being created.

I have googling on internet but i have not found nothing.

Is there anyone which know why I get that error (when I insert two or more user variables in the ReadWriteVariables field)?

thanks in advance.


how to communicate sql server with NOSQL plateform

$
0
0

I want to know how will communication and data synchronization would be done if my application team will think of implementing NOSQL along with SQL Server.

Also how will manipulation would be faster, is there anything why which I can setup some replication kind of functionality with nosql and sql server?

how will nosql data can be transferred into sql server or vice versa?

what is the possibilities, I don't knw basics abt the nosql so some question might be childish for you.

thanks,


How to get the latest file from folder and file name is like that File_YYYYMMDD

$
0
0

Hi,

i have import the data from excel to sql server table .

i know this process

source file is like that - File_YYYYMMDD, File1_YYYYMMDD,etc..

1. i need to get the latest file from source file and load it to sql server table 

how to get the latest file.

2. filename is splitted into datepart and filename separately- this is done using script task.

3. i need to check whether source file is coming in this format-Filename_withdatepart (File_YYYYMMDD - how to checking date format in script task )

once i have splitted the filename and date part separately after that file is loaded to table using filename

Regards,

Abdul

SSIS Server Failover

$
0
0

Hi All,

We have two servers Server A and Server B. Both the servers SSIS installed.

If one server A down , then it should pick up from the same point by Secondary server where SSIS is installed .

Please let me know, is it possible in SSIS 2012 ? 

Thanks.....


The project or operation records do not exist or you have not been granted the appropriate permissions to view them.

$
0
0

Environment :SQL Sever 2012 with Service Pack 2(11.0.5058) Standard Edition with SSIS and Reporting Services  with 16GB of Memory two SQL Server instances each with 3GB Max one instances using Integration Services Catalogs with 1day retention and 5 versions per project. The package runs about 1300 times in one day.

The problem is that sometimes when we execute a package with a stored procedure it fails with the following error messages "The project or operation records do not exist or you have not been granted the appropriate permissions to view them." and I have not been able to work out the reason and how to resolve it and most people are talking about it when they do deployments

Cannot acquire a managed connection

$
0
0

Dear All,

I am very new to the SSIS package development so please point out my stupidity If I have done any. I am trying to ETL data from excel spreadsheet to SQL server using Excel data connections and OLE DB and ADO.Net data connection. I am using CDC task to monitor any changes done in the source excel file. I am doing it in a way same package extract information from the spreadsheet and import in to Server 1 (CDC enabled) and compared it to the same table hosted on another server 2 which is a production server.

When I run this package on DTS it runs fine and I am able to generate Deployment Manifest file. When I try to run the same Manifest file I am getting below error

Error: Failed to Decrypt an encrypt XML node because the password was not specified or not correct. Package load will attempt to continue without the encrypted information.

Error: Cannot acquire a managed Connection from the run-time connection Manager

I have change the package encryption level from "EncryptSensitivewithUserkey" to "EncryptsensitivewithPassword" and have added password to the PackagePassword it the package property and saved this project.

when i add this package to the SQL agent job I am still getting below error message

Message
Executed as user: administrator. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  11:44:49  Error: 2014-12-04 11:44:52.10    Code: 0xC020801F     Source: CDC Control Task CDC Control Task     Description: Cannot acquire a managed connection from the run-time connection manager.  End Error  Error: 2014-12-04 11:44:52.10     Code: 0xC0024107     Source: CDC Control Task      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  11:44:49  Finished: 11:44:52 Elapsed:  2.215 seconds.  The package execution failed.  The step failed.

Please help I am stuck on this issue from last 2 days now. If you need more info please let me know.

regards

JK



Importing data from an .mht file

$
0
0
I would like to import data from a *.mht file. I can open the file in excel and save it as excel but I want to automate this in SSIS. I found a command line tool but it's not doing it correctly but excel does.
Can I do this in VB script in a VB task?
OR is there an odbc provider for the .mht file so I don't need to convert it at all?

Thanks,
Linda

load data from Excel file

$
0
0
is there a way that we can import data from top 3 sheets of a excel in ssis?

Passing parameter in OLE DB Source ( for multiple queries using union all)

$
0
0

I'm getting following error when trying to pass the parameter (by clicking on Parameter button) in OLE DB Source .

Here is the error.

I'm using union all statement to merge three statements and each has to be passed two parameters.

Here is the query.

SELECT 
       L.Store As Store, 
       SUM(Sales) AS Sales
FROM Sales S
       INNER JOIN Weeks W ON S.WeekDate = W.MaxFullDate
       INNER JOIN Locations L ON S.StoreID = L.Store          
WHERE S.WeekDate BETWEEN ? AND ?
GROUP BY L.Store

Union All

SELECT 
      L.Region As Store,
      SUM(Sales) As Sales
FROM Sales S
       INNER JOIN Weeks W ON S.WeekDate = W.MaxFullDate
       INNER JOIN Locations L ON S.StoreID = L.Store         
WHERE S.WeekDate BETWEEN ? AND ?
GROUP BY  L.Region
 
Union All

SELECT 
        L.Division + '0' As Store, 
       Sum(Sales)AS Sales
FROM SalesActuals_Stage S
       INNER JOIN  Weeks W ON S.WeekDate = W.MaxFullDate
       INNER JOIN  Locations L ON S.StoreID = L.Store         
WHERE S.WeekDate BETWEEN ? AND ?
GROUP BY L.Division

I would appreciate that if someone can help me..

Thanks in advance!


ZK


bubbling exceptions up from sub packages

$
0
0

Hi.  We run 2012 std.  We r trying 2 get our heads around the options we would have customizing capture of exceptions that bubble up (if that is possible) to our master pkg from sub pkgs.  This question is independent of ssis's sys logging.

My recollection is that ssis tells us a lot (maybe too much repetition) about exceptions.  Our goal is to customize how we deal with exceptions at lower levels in the master pkg itself (perhaps in the .net service that calls the mstr if that can be bubbled up) so that we aren't incorporating the same custom logging at every level of the ssis call "tree/structure".

We capture some exceptions already in vars by incorporating try catch blocks in our c# scripts.  But haven't addressed yet how those might be bubbled up.  It is hoped that whatever we do with these can mimic what we do with exceptions thrown by other ssis components where there is no c# code to catch the exception.

Can the community get us started?


SSIS package in SSISDB project deployment model very slow

$
0
0

I have deployed a SSIS package to SQL Server 2014 Project Deployment model ( SSISDB). And running it as an agent job.

The total package start and end time took almost 3 min.. But if you look at the execution report ( SSISDB ).. The actual execution step took only 15 sec…and if I run the package locally, it took also only 15 sec

I am trying to figure out why the total package execution time took total 3 min after deploy to SSISDB whereas the individual execution step took only 15 sec.. it looks like the package is doing some validation?? W Is the new project deployment model trying to do some validations before actually executing the package? How can I solve this issue?

data not transfering to excel

$
0
0

i am trying to transfer a file from ole db engine to excel file , but its not going through, i have changed the properties of the run time to false, i also used data conversion and i chose unicode text strem, and i also tried unicode string

some of the columns has characters like 

 beck@acturing.com [mailto:beck@acturing.com] 

and some columns has no value


How to avoid primary key insert error and pipe those would-be error rows to a separate table?

$
0
0

Hi All,

Question: How can I ID duplicate values in a particular column before generating a "Violation of PRIMARY KEY constraint" error?

Background: this SSIS package pulls rows from a remote server table for an insert to a local table.  The local table is truncated in step 1 of this package.  One of the source columns, "ProductName," is a varchar(50) NOT NULL, with no constraints at all.  In the destination table, that column has a primary key constraint.  Even so, we don't expect duplicate primary key inserts due to the source data query.  Nevertheless, I've been tasked with identifying any duplicate ProductName values that may try to get inserted, piping them all to a "DuplicateInsertAttempt_ProductName" table, and sending an email to the interested parties.  Since I have no way of knowing which row should be imported and which should not, I assume the best method is to pipe all rows with a duplicate ProductName out so somebody else can determine which is right and which is wrong, at which point we'll need to improve the query of the source table.

What's the proper way to do this?  I assume the "DuplicateInsertAttempt_ProductName" table needs identical schema to the import target table, but without any constraints.  I also assume I must ID the duplicate values before attempting the import so that no error is generated, but I'm not sure how to do this.

Any help would be greatly appreciated.

Thanks,
Eric

Expression -puzzling(help needed)

$
0
0

Hi All,

Is there a possibility that my expression fails on the first run trying to load into a column in the table having truncation error,but ultimately runs at the second time(having that column alone empty while populating other columns?).

Help needed...ANy help on this topic wil be much helpful!!


Viewing all 24688 articles
Browse latest View live


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