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

Selectively Execute Dataflow tasks in SSIS based on a If else condition.

$
0
0

I want to create a SSIS package which will have two data flow tasks. If today's date is startdate of the Month it should execute one dataflow task(which actually has a month end report), else then it should execute another dataflow task(which is a weekly report). Can anyone please let me know how to attain this one.

Thanks,


ssis hell issue

$
0
0

Good day:

SSIS is probably one of the most frustrating ETL tool I've used and the documentation really is bad. I've configured a environmental variable to point to a debug.dtsConfig file whenever running the package through BDIS. However, I'm trying to run it through command line using dtexec with a different dtsConfig file however, it doesn't seem to run to my target database and for some reason I think it's still using my environmental variable configured to debug.dtsConfig instead of:

dtexec /f Package.dtsx /ConfigFile dev.dtsConfig

the target database isn't being populated with data. This is extremely frustrating!!


Is it possible/practical to reproduce TSQL Merge Into into SSIS objects?

$
0
0

Hi,

This "merge into" for a historical table is rather simple. Can it be done using SSIS objects other than SQL Task?  I don't see how the Merge or Merge Join objects could do this. The slowly changing dimension object (SCDO) sort of does this but requires date fields which are very slow and does not seem to have the option to have the end date be set to a fixed value to make easy current active row view.  Not sure if it is the date column causing all of it but the SCDO is slow to not usable above 10K rows.

Rick

declare @dtEffectiveToday date, @dtEffectiveYesterday date
set @dtEffectiveToday = dateadd(day, -1, getdate()) -- getdate()
set @dtEffectiveYesterday = dateadd(day, -2, getdate())

MERGE INTO Exceptions AS CurrentExceptions
USING (
 select  Employeeid, Name, GroupTypeId from ExceptionsImport where EmployeeId is not null
) as Import
ON (CurrentExceptions.EmployeeId= Import.Employeeid AND CurrentExceptions.EffectiveEndDate = 29990101
and CurrentExceptions.GroupTypeId= Import.GroupTypeId
)
WHEN NOT MATCHED BY SOURCE and CurrentExceptions.EffectiveEndDate = 29990101  THEN 
 UPDATE SET CurrentExceptions.EffectiveEndDate = convert(int,convert(char(8),@dtEffectiveYesterday,112))
WHEN NOT MATCHED BY TARGET  THEN
      INSERT (EmployeeId, Name, GroupTypeId, EffectiveStartDate, EffectiveEndDate)
   VALUES (EmployeeId, Name, GroupTypeId, convert(int,convert(char(8),@dtEffectiveToday,112)) , 29990101); 
;

The runtime connection manager with the ID "GUID" cannot be found. Verify that the connection manager

$
0
0

Hi All,

Currently I'm trying to execute SSIS package which pulls data from SQL Server 2008 Adventure Works DB in to SQL Server 2012 Database. 

When ever I execute the package through SQL Server Data Tools for Visual Studio 2012, Package execute without errors and pulls 18,000+ records from SQL 2008 


I created a proxy and used as described in "http://msdn.microsoft.com/en-us/library/dd440761.aspx"

if I try to execute package manually or as SQL Server Job (SQL Server Agent) I get following Error 

Executed as user: "AD\ProxyUser". Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  11:15:43 PM  Error: 2014-10-08 23:15:43.92     Code: 0xC020801B     Source: Export IndividualCustomer OLE DB Destination [2]     Description: The runtime connection manager with the ID "{3AFDAFE8-0325-403E-8152-5DD95C56AE83}" cannot be found. Verify that the connection manager collection has a connection manager with that ID.  End Error  Error: 2014-10-08 23:15:43.92     Code: 0xC0047017     Source: Export IndividualCustomer SSIS.Pipeline     Description: OLE DB Destination failed validation and returned error code 0xC020801B.  End Error  Error: 2014-10-08 23:15:43.92     Code: 0xC004700C     Source: Export IndividualCustomer SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2014-10-08 23:15:43.92     Code: 0xC0024107     Source: Export IndividualCustomer      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  11:15:43 PM  Finished: 11:15:43 PM  Elapsed:  0.219 seconds.  The package execution failed.  The step failed.

Please note : GUID :3AFDAFE8-0325-403E-8152-5DD95C56AE83 is belongs to Destination Data Connection 

XML for Destination Data connection as follows

<?xml version="1.0"?>
<DTS:ConnectionManager xmlns:DTS="www.microsoft.com/SqlServer/Dts"
  DTS:ObjectName="[ServerName].[DBName]"
  DTS:DTSID="{3AFDAFE8-0325-403E-8152-5DD95C56AE83}"
  DTS:CreationName="OLEDB">
  <DTS:ObjectData>
    <DTS:ConnectionManager
      DTS:ConnectionString="Data Source=[ServerName];Initial Catalog=[DBName];Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />
  </DTS:ObjectData>
</DTS:ConnectionManager>

Appreciate if any one can give an Idea

Thanks in Advance

Tharindu 

Does anyone know solve the connection issue with connection manager

$
0
0

Only if some one knows to solve quick reply please. 

I find it absurd that the connection manager is not working even thou it is rightly setup. not a straight forward SSIS one. not userfriendly. Just loosing time and money on investing in ssis

The process exit code was "1" while the expected was "0"

$
0
0

I have an ssis package that calls an "execute process task" which connects to an sftp site and pulls files. The package works fine when I run it manually; however, it errors (the process exit code was"1" while the expected was "0") when executed from a SQL job.


Francis, MCTS: BI 2008, MCITP: BI 2008 Stay Thirsty My Friends

execute oracle procedure from SSIS

$
0
0

 

is it possible to execute Oracle procedure from within SSIS?

thanks

Calling all SQL BI Gurus. November readers need feeding!

$
0
0

An influential teacher, or popular expert

Oh mighty reader, we need your enlightenment! Only YOU can show us… the TRUE WAY to code!

Win the dedication and adoration of generations to come, by giving something back to those less awesome.

Show your technical prowess, and divine knowledge of your craft.

Teach us good code from bad. Show us the way (or the work-around)

We can offer you the very best platform that you need to preach these good words.

Join us and lead this technical community in a whole new way, into a brighter future!

Become a TechNet Guru and you may find your own life also significantly enriched!

Win awards, interviews, invites, reviews, medals, friends, recognition points, high fives, hugs, smiles, and so much more!

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 to TechNet 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!

Kamlesh and...


Ed Price, Azure Development Customer Program Manager (Blog,Small Basic, Wiki Ninjas, Wiki)

Answer an interesting question? Create a wiki article about it!


Parallel Update in multiple tables in multiple database in SSIS 2008

$
0
0

How to update the data of multiple table of multiple database parallel 

Prepared a mapping Table ..

SSIS will pick the data from the mapping table and update the required table in parallel .. please suggest

DECLARE @MappingTable AS TABLE
(RowId SMALLINT, DbName VARCHAR(10), TableName VARCHAR(10), ColumnName VARCHAR(10) , Value VARCHAR(10))
INSERT INTO @MappingTable 
SELECT 1 RowId , 'Db1'  DatabaseName , 'Tbl1' TableName ,'C1' ColumnName , '10' Value
UNION ALL
SELECT 2 RowId , 'Db1'  DatabaseName , 'Tbl1' TableName ,'C2' ColumnName , '11' Value
UNION ALL
SELECT 3 RowId , 'Db1'  DatabaseName , 'Tbl1' TableName ,'C3' ColumnName , '12' Value
UNION ALL
SELECT 4 RowId , 'Db2'  DatabaseName , 'Tbl2' TableName ,'C1' ColumnName , '14' Value

SELECT * FROM @MappingTable

How to automate SSIS 2012 package creation ?

$
0
0

Hi,

I have SSIS 2012 package on development server, I need to deploy my package to a production server . my question is :  is there anyway to
automate package creation without copying .ispac file or package.dtsx file to the production server ?
can I generate a batch file for package creation ? any suggestions please ?

Thanks

Object reference not set to an instance of an objec using 2012 data tools

$
0
0

Hello,

I have a SSIS package works fine on my coworker's machine.

It is very simple, just for testing purpose.

Pic 1



Pic 2

Pic 3

Pic 4 (View Data)

Pic 5 

Pic 6

As my coworker told that the reason to cause the null is because of installingdata tools for vs 2015, even uninstalling it would not work. Did someone has the same problem? How to fix it? 

Personally, I don't believe that Microsoft did not fix this kind of problem, since it is so high priority.

Urgent, Thanks lots!

Shenyi 


Shenyi

Populating user variable from sql server table

$
0
0

Hi there,

I have a table with one column called StartDate date tine one row only. Value = '01/01/2016'

In SSIS I created a package with variable called StartDate datetime which show the current date '11/06/2016'

Now how do I read from SQL server table (ReportingPeriod) my column value and populate my variable?

I created Execute SQL task with  

General: ResultSet = Single row, SourceType = DirectInput, SQL Statement = Select StartDate from ReportingPeriod

ResultSet: Name = 0, Variable Name = User::StartDate

Also I created Script task with ReadWrite Variable = User::StartDate

Script =   MessageBox.Show("StartDate: " + Dts.Variables["User::StartDate"].Value);

When I execute the package it show Start Date '01/01/2016' but when I look at the variable it not changed?

It still show today's date

Is there a way to populate the variable?

Thanks,

Oded Dror


Thanks, Oded Dror

Deploy SSIS packages from one file location to another in SQL Server 2016.

$
0
0

Hi , 

I upgraded a package in SSIS using SSISUpgrade.exe Wizard to SSIS 2016 version. I have all my SSIS packages in C: of a machine. 

I will need to deploy the same to another location ( say D: ) . I do not have any manifest file and packages are not in a solution. 

how can I deploy these packages to D: as file system . 

Thanks,

Vishal. 

When writing a plain files codepages is missing

$
0
0

Hi there,

primary platform is 2014.

I am creating a plain file based on a temporary table where I have posted "LCRUS-ООО "СТК"

Nevertheless, once my data flow ends I see in my file "LCRUS-??? "???"

Why SSIS don't take directly the value from my temp table?

How can I work out?

Thanks a lot,

Ordering a plain file from ssis?

$
0
0

hi guys, it is highly probably I'm asking a stupid thing and it does not make any sense at all...

How can I order a plain file by using a SSIS package?

I’ve created this file using three separated data flows.

For different reasons (120 fields) I created the file and populated, and then, add data from other data sources (Oracle)

ideally I would like to load this plain file into a SQL table but I would need to create all the columns by hand...

is it so? If not, what am I missing here?

Thanks for sharing your comments,


SSIS Package to put results into separate folders

$
0
0

Hi all,

I have an SQL script that selects images taken by specific users. I want to create a package that will extract all these images and place them in appropriate folders, based on the user names.

For example, my data is as follows:

I want the package to create folders based on the user names (the user name is part of the image name). So , in this example, the folders created would beuser1 (3 images), user4  (2 images), user5  (1 image), user6  (4 images).

Please assist

Regards

SSIS Package and CheckPoints when Moving Large DataSets

$
0
0

We are using SSIS Package (SQL Server 2012) to move data from Source Oracle DB to a Destination Oracle DB using OleDBSource and OleDBDestination Components. We are planning to set the batch size at 10,000 per batch.

The expected volume is about 500,000 (max). In this scenario when SSIS is moving the data in batches of 10,000 - if we enable checkpoints - would SSIS resume from the batch that failed and not have to start over from scratch? Please clarify?  

How to avoid 'number stored as text' error when exporting data from SQL server to excel using SSIS DatFlowTask

$
0
0

I am using SSIS Data Flow Task to export data from Sql Server to Excel Destination, but while exporting it Convers int value to Numbers Stored As Text Excel Cell Error,every cell gets this error with a green tag.Can you please guide me how can I export my int value to number in Excel.

Thanks

filename to table

$
0
0

Hi

I load datas from excel to a table, but I need load the filename to a column too. How can I?

This full load is in a Foreach Loop Container, where I give value for @[User::Filename] with Foreach file enumerator

I have an Excel Source with Excel connection manager, where the Expressions:ExcelFilePath value is a variable:

@[User::Filename]

The Excel read these files and load datas, so the variable is working, but when the second task Derivable Column add the @[User::Filename] to flow, the value is null

Update table column with value from select containing row_number

$
0
0

I have a table...

CREATE TABLE [dbo].[APAYsource] (
    [APAY_SRC_CD]    NVARCHAR (100) NULL,
    [TENDER_TYPE_CD] NVARCHAR (100) NULL,
    [EXT_SOURCE_ID]  NVARCHAR (100) NULL,
    [APAY_SRC_NAME]  NVARCHAR (100) NULL,
    [DESCR]          NVARCHAR (100) NULL,
    [BRANCHCOUNTER]  INT            NULL
);

...in which I want to  update the value of column BRANCHCOUNTER with the value from branchenumerator for the corresponding row in the select...

select *, row_number() over (PARTITION by descr order by descr) as branchenumerator from [APAYsource]

I tried to use the row_number() in an update but couldn't get it to work.  I also tried

update [APAYsource for banks] set BRANCHCOUNTER = (select row_number() over (PARTITION by descr order by descr) as branchcounter  from [APAYsource] as T1 where T1.EXT_SOURCE_ID = EXT_SOURCE_ID)

but doesn't work (syntax).

Could someone kindly show me how to do this?  Thanks tonnes for any help, Roscoe

Viewing all 24688 articles
Browse latest View live