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

Running Powershell from SSIS

$
0
0

Hi

I am using an Execute Task in SSIS to run a Powershell script I have created.  The Powershell script runs fine when executed from the command line with no errors, but when I run it from the package the task fails.

The parameters I am using are in the screenshot below and its a simple execute.  How can I see what errors are causing the task to fail?

Thanks


Formula behind fuzzy lookup Overall Similarity value

$
0
0
Could someone help me in understanding how Fuzzy Lookup calculates the Overall Similarity value using the available fuzzy columns and how top n records are chosen? Is it based upon the similarity value ?

Sowjanya Addanki


SSIS - merge table and split transformation function

$
0
0

i would like to ask if i have to update the existing record or insert new record from SSIS.

here is my step in data flow control:

1. create a source table A and table B

2. merge two tables by left join A to B with ID,NAME,TEL column

3.add split transformation control and then set condition as belows:

   3a) output name: insert row   ; condition: isnull(ID)

   3b) output name: update row ; condition !isnull(ID)

4. route to different OLD DB destination  (one is update, another is insert row)

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

but i don't understand the step 2 and step 3. when i left join table A and B by ID,NAME,TEL and then check isnull(ID)/!isnull(ID) in step 4 from the result set of merge join.

for step 3, is it only check if the result set of merge table's "ID" column is null then route to the step to Insert row. not check the join key from step 2?

copy from http://itssmee.files.wordpress.com/2010/10/solution.jpg

 


SSIS 2012 Catalog environments version control

$
0
0

Hi Folks,

Looking at environments in SSIS 2012 catalog.  Just wondering on best practice/peoples opinions on what the best approach to versioning these bad boys is?

Missing steps in Job History

$
0
0

Hi,

I am having this strange issue where in the job some steps are missing. There are 20 steps out of which in the job history the first 4 steps are not showing up. The packages being called in these 4 steps are running successfully.


Also, in job history, I can see only the history for current run. All the previous entries are missing.

Any information would be very helpful.

Thanks

Jatin

SSIS 2008 r2 with TFS 2010

$
0
0
Hi All,

What is the best approach to use TFS 2010 with the ssis 2008 r2. I have 2 servers which are maintained by me but i login with an generic account. So how should i approach to use tfs. should i login as windows ad account or generic account. Through this i will be moving
integration from dev to prod.

ForEach Loop Container Mapping Variable From SSIS Package Not Working In SQL-Server StoredProcedure

$
0
0

I have an SSIS package that uses a ForEach Loop Container to enumerate Excel Files in a dir. I also have a Task Flow that inserts data from those Excel files into SQL-Server.

Im trying to insert the file names into a column into the same table in SQL-Server by using a mapping variable in my StoredProcedure.

Im having trouble with my MappingVariable at the end of the script with red squigglies. The following is my StoredProcedure script.

CREATE PROCEDURE [dbo].[Insert_F_STG_v2]
    -- Add the parameters for the stored procedure here


    @Hrs float,
    @Type nvarchar(100),
    @SN nvarchar(100),
    @Op nvarchar(100),
    @[USER::CurrentFileName]  


AS
BEGIN

SET NOCOUNT ON;




    INSERT INTO [CRM_RC].[dbo].[F_StgTbl]
           (
            [Hrs],
            [Type],
            [SN],
            [Op],
            [Report_Date]
            )
    VALUES
           (

            @Hrs ,
            @Type,
            @SN,
            @Op,
            @[USER::CurrentFileName]
           )

END

The last @[USER::CurrentFileName] in the Values block at the bottom of the script is the one giving me issues.

The following is the error:

Msg 102, Level 15, State 1, Procedure Insert_F_STG_v2, Line 95
Incorrect syntax near 'USER::CurrentFileName'.


How to capture full error message passed back from db engine?

$
0
0

If i have the following table in sql server

create dbo.null_test (id int not null, Code varchar(10) not null)

and I try to insert a null

INSERT INTO dbo.null_test values (1, null)

I get the following error

Msg 515, Level 16, State 2, Line 1

Cannot insert the value NULL into column 'Code', table 'dbo.null_test'; column does not allow nulls. INSERT fails.

The statement has been terminated.

But if i try the same in a data flow I only get the the following from the oledb destination

"The value violated the integrity constraints for the column."

Not quite to the same level of usefulness. Is this a bulk insert issue that we're stuck with? ie does the bulk insert command/sqlBulkCopy return these generic error messages and SSIS is just showing what it's given?


Jakub @ Adelaide, Australia


SSIS Fuzzy Lookup Issue

$
0
0

Hi All,

I am using fuzzy lookup transformation to find some record. My lookup column and reference tables are  in Korean language. One of my colleague runs the same process in his laptop as well and when we check our result we are getting slightly different number of records within same similarity range. For example when similarity is between 0.8 to 0.85 I am getting 120 records while he is getting 124. Is it because of using Korean characters or is there any different issue causing this result? 

Thanks in advance

Using foreach loop container with file system task to rename and move files

$
0
0

the foreach loop container will not rename and move files for me


sukai

How to Import a DTS Package, while keeping version History in Destination Intact

$
0
0

Hi Guys,

Not sure if this is the right forum for my question. But I couldn't find any other DTS forum to post my query.

Basically, I have my Production Environment in SQL 2008R2 and it contains few DTS [NOT SSIS!!!!] packages in Management > Legacy. One of those packages, Let's say is, 'PackageA.dts'.

Now for the PackageA, we have versions of last couple of years (almost 11 versions we have for this package), recently in Test Environment (again, SQL 2008R2) we made Lot of changes to that Package and now we want bring that package from Test Env. to Production. But a) we prefer not to 'open it in Prod then make all individual changes one by one' rather we just need to kind of overwrite/replace our existing Production Package   b) also, we don't want to loose version  history for the Existing PackageA.dts in Production, so anytime we can rollback when required.

Any Idea if I can? [Please don't post non relevant answer like, convert DTS to SSIS. Sorry if I sound rude, really will appreciate if some one can try helping me.]  






Regards, Avik M.

Excel error 64-bit version of SSIS

$
0
0
I have a 64bit system and installed ssis on my system.
How do I changed the ssis project to 32 bit. I have this error:

Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.

Error: 0xC00F9304 at Package, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDB_EXCEL_NOT_SUPPORTED: The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider is available.

Error: 0xC020801C at Data Flow Task, Excel Source [1]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC00F9304. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: component "Excel Source" (1) failed validation and returned error code 0xC020801C.


Joe

fetch data from prod servers

$
0
0

Hi all,

can anyone help me in developing package with below requirement:

requirement

 Excel sheet contains all the  emp_ids ..these emp_ids should be searched in Emp DB and return the output to an new excel sheet.

Excel sheet

Emp _ID

111

  222

33

 ------à         SQL Server-------------à    Output(another excel sheet)

Emp _ID

NAme

111

aaa

  222

bbb

33

cccc


Whenever package runs output of excel sheet should be with current date.

Input values (ie. Emp_id ) keeps on changing).  So It has to be generalised.

Webservice not able to connect for first time.

$
0
0
I am calling web service from script component using SSIS 2008, for the first time it encounters timeout. If I break the task and start executing the package again it will execute smoothly within 2 secs. I set the timeout period to 100 then also not able to connect. Any anybody encountered such problem, please help me to resolve this issue.

How to Use Row Count Transformation [Audit Information]

$
0
0

Environment: SQL Server 2008 R2
Purpose: Track number of records, which were loaded into each destination, entity tables or affected by data transaction. Record each table name and the number of records for each  table. 

Code:

CREATE TABLE dbo.PkgAudit
  (
     PkgAuditID      INT IDENTITY(1, 1),
     PackageName     VARCHAR(100),
     LoadTime        DATETIME DEFAULT Getdate(),
     Status1          Varchar(50), 
     Status2          varchar(20),
     Status3          Varchar(20)  
  ) 

ETL process: See the following pictures. I have two DFT. Reference to the code in details. Click here

The first one as below

The second DFT

Logic: Load the data from the staging table/ If matched with SSN then status is record exists in the pkgAudit table. If not matched, records the number of records and the status is inserted table in the DFT#1 (Step#1)
In DFT#2, record the name of the tables and number of records for each table

Expected Results:

1, Pakage, 20140304 10:24:12:17, 4 loaded, 3 inserted in individual and SSN table, 1  exists in SSN

Problem: In DFT #1, I placed RowCount Transformation. It generated a couple errors. I also dont know how to concatenate the name of the table and the number of records and the status of the affected table (inserted or exists or loaded).


I am here to learn as my level of competency is novice. I appreciate the support to ease my learning process. Screen shots is highly appreciated. 



~ I tried to load more than picture but the editor allows only 2 pic per post. hope MSDN peeps improve it



improve performance to insert data from SQL SERVER to AS400

$
0
0

how can i improve the performance  to insert data from sql server to AS400.

now i have added a OLE DB source as a source from sql server

and then added OLD Destination as destination to AS400.

but i have around 1240000 data need to insert to AS400. it run for a long time to finish the job.

how to improve the performance?

search function visual studio

$
0
0

how can i find out which object contains specific variable in visual studio 2008? becasue i have defined variable, but i can't find out which module use this variable? can i use search function in visual studio?

How Can I Kill Excel.exe Process After finish my Execution of SSIS Package in Sqlserver2008r2

$
0
0

Hi !,

      am new for c# and SSIS Package Creation , I am Trying to Read Excel file, and load the value into Sqlserver using SSIS package . My Problem is , After Execution of SSIS package Still Running EXCEL.exe Process in my server. i need to kill that process . I post my Code Exactly where am release my excel file object , please guide me where am going to wrong?

Server Configuration

OS:windows7

SqlServer :2008r2

Framework:3.5

please give me some suggestion to correct my error .

Here is My Code:

            Microsoft.Office.Interop.Excel.Application xlApp;
            Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
            Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
            var missing = System.Reflection.Missing.Value;

            xlApp = new Microsoft.Office.Interop.Excel.Application();
            xlWorkBook = xlApp.Workbooks.Open(filename, false, true, missing, missing, missing, true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, '\t', false, false, 0, false, true, 0);
            xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
            Microsoft.Office.Interop.Excel.Range xlRange = xlWorkSheet.UsedRange;

            Array myValues = (Array)xlRange.Cells.Value2;

int vertical = myValues.GetLength(0);
            int horizontal = myValues.GetLength(1);
            System.Data.DataTable dt = new System.Data.DataTable();
            bool isNameRead = false;
            // get header information
            for (int i = 1; i <= horizontal; i++)
            {
                string cellValue1 = "";
                object cellObj = myValues.GetValue(1, i);
                if (cellObj != null)
                {
                    cellValue1 = myValues.GetValue(1, i).ToString();
                    if (cellValue1 == "Name")
                    {
                        if (!isNameRead)
                        {
                            dt.Columns.Add(new DataColumn(cellValue1));
                            isNameRead = true;
                        }
                        else
                        {
                            dt.Columns.Add(new DataColumn(cellValue1 + 1));
                            isNameRead = false;
                        }
                    }
                    else
                    {
                        dt.Columns.Add(new DataColumn(cellValue1));
                    }
                }
                
            }

            // Get the row information
            for (int a = 2; a <= vertical; a++)
            {
                //string cellrowvalue = "";
                string isemt = "";
                object[] poop = new object[horizontal];
                for (int b = 1; b <= horizontal; b++)
                {
                    isemt =(string) myValues.GetValue(a, b);
                    if (isemt != null)
                    {
                        poop[b - 1] = myValues.GetValue(a, b);
                    }
                }
                DataRow row = dt.NewRow();
                row.ItemArray = poop;
                dt.Rows.Add(row);
            }

       
xlWorkBook.Close(true, missing, missing);
            xlApp.Quit();

            releaseObject(xlWorkSheet);
            releaseObject(xlWorkBook);
            releaseObject(xlApp);

            return dt;

releaseObject

private void releaseObject(object obj)
        {
            try
            {
                System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                obj = null;
            }
            catch (Exception ex)
            {
                obj = null;
                MessageBox.Show("Unable to release the Object " + ex.ToString());
            }
            finally
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
                GC.WaitForPendingFinalizers();
            }
        }

Thanks

Parthasarathi Purushothaman

Data flow fails on packed decimal field moving iSeries DB2 data from one iSeries DB to another

$
0
0

I' trying to use SSIS to move table content from one iSeries DB2 database to another.  I'm using the .Net providers for OleDb\IBM DB2 for i5/OS IBMDA400 OLE DB Provider in the connection managers for the source and destination and the test connection works fine.  When I try to run the data flow task however it fails on the first packed decimal field it encounters with the exceptions ...

[select from hydro520 hydroweb2 blpmstr [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "select from hydro520 hydroweb2 blpmstr" (16)" failed because error code 0x80004002 occurred, and the error row disposition on "output column "MSPRIB" (55)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.


[select from hydro520 hydroweb2 blpmstr [16]] Error: The component "select from hydro520 hydroweb2 blpmstr" (16) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "select from hydro520 hydroweb2 blpmstr" (16) returned error code 0xC02090F5.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

...in the progress tab.  Can someone kindly tell me what I need to do to get the connection manager to work with DB2 packed decimal fields?  Or is it a different issue all together?  Thanks tonnes for any help, Roscoe

Custom DLL Reference in SSIS Script Task

$
0
0

Hi All,

I'm having one Custom DLL called, myFTP.dll

When I'm keeping this .dll in C:\Windows\Microsoft.NET\Framework\v2.0.50727\

and Adding Reference to it in my SSIS Script task, then Task is working Perfectly.

But

When I'm keeping this .dll in Z:\Data\MyCustomPackages\Reference\

and adding Reference to it in my SSIS Script Task, then Task is failing and it's saying::

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'myFTP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ec0efqwek57a8065' or one of its dependencies. The system cannot find the file specified.
File name: 'myFTP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ec0efqwek57a8065'
   at ST_879e4054bc0a497083220c92c7a4f9b7.csproj.ScriptMain.Main()

--- Here My Z:\ drive is just a mapped network drive. Is there any restriction about referring DLL from such location?

Any Clue?


Regards, Avik M.

Viewing all 24688 articles
Browse latest View live


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