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

SSIS: Sequence Container fails, but each task within container executes OK

$
0
0

Hello,

I have an SSIS package that loads data to DW database, transforms data and processes cubes. The package is running fine when the source and DW databases are on the same SQL 2008R2 server.

I moved DW database and cube to SQL 2012, however the source data remains on SQL 2008R2.

When I changed SSIS data destination connections to the new server (SQL 2012), I cannot execute containers anymore (containers have multiple tasks with OLE DB Source / OLE DB Destination components).

I can run each separate task (transferring data from SQL 2008R2 tables to SQL 2012) within BIDS – no problem. But when I try to execute the whole Sequence container with collection of the above-mentioned tasks, it fails with the following error messages:

[Source - … [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "..." failed with error code 0xC001A004. 

There may be error messages posted before this with more information on why the AcquireConnection method call failed.

[SSIS.Pipeline] Error: component "Source - ..." (1) failed the pre-execute phase and returned error code 0xC020801C.

Any ideas why?

Thank you for your help in advance!

Lana


SSIS Flatfile Float value mising decimal value .

$
0
0

Hi All

i am using Script component source to extract data from Flatfile . we have the column values in falt file like Key=value.

for one the value we have  Rate=3.10    we need to split this string and place the 3.10 into Rate column of database  which is float column . Problem here is the value is storing as 310 .

The datatype given in Script component output column in Float[DT_R4].

ElseIf (ColumnSplitValuearray(ColumnIndex, 0).ToString = "Rate") Then
                    OutputAverageLatencyBuffer.Rate = ColumnSplitValuearray(ColumnIndex, 1)

Above is the code how we are assigning the splited value to the buffer column . when i tried the Msgbox(ColumnSplitValuearray(ColumnIndex, 1))  it is givening corrcet value 3.10  but once it assigned it is giving 310 .

How to solve this issue .


Surendra Thota

Need help with Importing These Kinds of Excel Data Sheets

$
0
0

hy there, Can someone Assist me with this.

I got a package in SSIS. where I need to import Excel data sheets.

Those sheets are coming from Cube.

And So their format is bit different

Kindly help me how to import those With DATA FLOW TASK.

And ,

As you can see Excel sheets got Filter on their Columns.

So I am Getting much often Errors in importing those sheets Via DATA FLOW TASK.

Thanks In Advance.

# Note.

I can not Edit each Excel File Before running packages.

Packages are automated.

And also the sheets are automated, they get store in the FTP on a cyclic job.

So Have to Do it on PAckage level

NoSQL (MongoDB) import/export/datadump

$
0
0

hi folks,

a newbie in the NoSQL world, was wondering if folks have experience and can point me in the right direction as far as SSIS components/drivers or methodology to move data in and out of NoSQL databases such as MongoDB.... basically an environment where both coexist...

thx much,

Cos

Output Error When Debugging the Package

$
0
0

Hi,

I just created my first SSIS Package, with OLE DB Connection pointing to our Oracle server and using SQL SERVER Destination. When I Debug, I get the following error:

SSIS package "C:\Users\Documents\SQL Server Management Studio\Packageload.dtsx" starting.
Information: 0x4004300A at Load Season, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC0209303 at Packageload, Connection manager "ABCDEF": The requested OLE DB provider MSDAORA.1 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.
An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".
Error: 0xC020801C at Load Season, OLE DB Source [46]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "ABCDEF" failed with error code 0xC0209303.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Load Season, SSIS.Pipeline: OLE DB Source failed validation and returned error code 0xC020801C.
Error: 0xC004700C at Load Season, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Load Season: There were errors during task validation.
Warning: 0x80019002 at Packageload: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\Documents\SQL Server Management Studio\Packageload.dtsx" finished: Failure.

I tried setting the  DelayValidation property to True, but still getting same error.

Thanks

Parul

CozyRoc SFTP task Send files

$
0
0

A a Customer of the very nice CozyRoc components, I am trying to use the SFTP task in a new project. It seems that the Get Files task is fine with a wildcard in Remote  (i.e ./*TEST_*.xls)  parameter, but I cannot create a Send File task in the same way. It looks like the 'Local' property does not allow the usage of any wildcard.

My problem is that I have a lot of files to transfer and not only one. I would love to use the SFTP tasks to make a multiple file transfer (upload) base on all the *.xls files I have in my local folder.
Anyone can help me please ?

Calling a SSIS 2012 pkg from an Excel 2010-2013 workbook

$
0
0

Hi,

I need to call inside an Excel 2010-2013 workbook a SSIS 2012 pkg, also save in a SSIS catalog. I'd like to avoid to call a stored procedure that calls a job envoking the SSIS pkg.

Any suggests to me, please?

Thanks

ssis- failure constraint

$
0
0

i add a "execute sql task" to ssis package, and command property i add a stored procedure like below code:

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

declare @rc varchar(2)

exec sp_call_testing , out @rc

select @rc as rc

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

then i set rc to local variable User::rc_out,

after that, i add failure constraint if rc_out !=0

even i already added a failure constraint, , it can't  go with failure task , it stop at the stage.

how can i add a failure constraint when output variable NOT equal to 0 from above command?




Validating CSV File BEFORE importing and moving using an SSIS package

$
0
0

I'm trying to come up with a process (I'm used to doing this kind of stuff in T-SQL) in SSIS to grab a collection of .csv files from a folder, validate them, then depending on if they pass validation, import them into my database and move them into an archive folder. If the .csv does not pass validation, then it does not get imported, and instead gets placed into an error folder. The validation requirements is that the Column2 of my .csv contains a WKT text field and the file is considered valid if every record can be successfully converted into a Geometry/Geography type field. 

Column0   Column1   Column2
 abcd      efgh      LINESTRING (-71.4555487 41.6079686, -71.4550113 41.6088851) 
 ijkl      mnop      LINESTRING (-70.0748669 48.6634506, -70.0499 48.6548479)
 qrst      uvwx      LINESTRING (-70.3159285 48.4199802, -70.3168512 48.4187551)

how to set from and to date correctly on an incremental ETL for grouping granuality

$
0
0

Hi,

I have a principle design question that is relevant for any ETL tool.

I have a three field record with Id,groupId, timeKey

For example records can be:

1,1,01012014

2,1,01012014

3,1,01022014

I need to group the records to on groupId according to increment timekey.

Select groupId

where timekey = 010102014

The groupId needs to be a primary Key

The issue is - That there will always be records that will be split by the timekey in the increment load, and then the situation can be that the groupId will get duplicate.

In this example - groupId 1 will be selected twice for two different timekeys.

So the question is - What can be a best practice for avoiding the above situation in the increment load ?

     

There is an invalid number of result bindings returned for the ResultSetType

$
0
0

SSIS SQL Task:  Single Row Result Set

Code was updated to test for data in target:  If Exists Do Merge  ELSE Do Insert

Previously was just a merge that Output $Action to @ChangeSum and then @ChangeSum queried for updates and inserts

That all worked but after injecting new code I receive the error There is an invalid number of result bindings returned for the ResultSetType that I don't know what it means or how to troubleshoot.

Inject New Code:

IF OBJECT_ID('tempdb..##TblTemp', 'U') IS NOT NULL
DROP TABLE ##TblTemp

Declare @sql nvarchar(max);
set @sql = @TestForData
exec (@sql);

IF EXISTS  (select top 1 * from ##TblTemp)
       Begin

--Beginning of existing code

           begin transaction;

            begin try

            declare @MergeQuery varchar(max)

            set @MergeQuery = convert(varchar(max), @MergeQuery1) +  convert(varchar(max), @MergeQuery2)
            + ' ' + convert(varchar(max), @MergeQuery3)
            + ' ' + convert(varchar(max), @MergeQuery4)
            + ' ' + convert(varchar(max), @MergeQuery5);

            exec(@MergeQuery);

            end try

            begin catch

                declare
                @Message VARCHAR(4000)
                ,@Severity INT
                ,@State  INT;

                select
                @Message = ERROR_MESSAGE()
                ,@Severity = ERROR_SEVERITY()
                ,@State = ERROR_STATE();

                if @@TRANCOUNT > 0
                rollback transaction;

                raiserror(@Message, @Severity, @State);

            end catch;

            if @@trancount > 0
            begin

                commit transaction;
 

            end

--End of existing code

      End
else
       Begin
    declare @InsertQuery nvarchar(max)
    set @InsertQuery = convert(varchar(max),@InsertQuery1)

    exec (@InsertQuery);
      end
Drop Table ##TblTemp
=================================

SSIS Variable @InsertQuery1:

This variable is executed in SQL Task and the last 3 lines I expect a single row of Insert & Update counts to be returned.

   declare @ChangeSum table(change varchar(25));
   declare @Inserted int = 0;
   declare @Updated int = 0;

While 1 = 1  
    Begin  
        INSERT INTO [R_Paid].[BusCodeF454x93]
        OUTPUT Inserted.Sta3n INTO @ChangeSum
        SELECT TOP 1000 s.*
        FROM [R_Stage].[BusCodeF454x93] s
        
        WHERE NOT EXISTS
        (
          SELECT 1
            FROM [R_Paid].[BusCodeF454x93]
            WHERE STA3N=S.STA3N and [BusCodeF454x93IEN] = s.[BusCodeF454x93IEN]

        )
       IF @@ROWCOUNT  = 0 BREAK       
END

   set @Inserted = (select count(*) from @ChangeSum );
   set @Updated = 0;

 select @Inserted as Inserted, @Updated as Updated;

How to transform node name in XML data source for SSIS

$
0
0

I have the following xml file; I want to change the node name of Emp.location to Emp_location, Edu.location to Edu_location, Addr.location to Addr_location as it was not supported by SSIS. I have multiple files like that. I  am thinking to use SSIS XML task with  XLST file to transform it. Can anybody help it?

Thank you

<?xml version="1.0" encoding="utf-8"?>
<Resumes>
<Resume>
  <Name>
    <Name.Prefix />
    <Name.First>Shai</Name.First>
    <Name.Middle />
    <Name.Last>Bassli</Name.Last>
    <Name.Suffix />
  </Name>
  <Skills>
    I am an experienced and versatile machinist who can operate a range of machinery personally as well as supervise the work of other machinists. I specialize in diagnostics and precision inspection, have expertise in reading blueprints, and am able to call on strong interpersonal and communication skills to guide the work of other production machinists whose work I am called upon to inspect.
    My degree in mechanical engineering affords me a better theoretical understanding and mathematical background than many other candidates in the machinist trade.
  </Skills>
  <Employment>
    <Emp.StartDate>2000-06-01Z</Emp.StartDate>
    <Emp.EndDate>2002-09-30Z</Emp.EndDate>
    <Emp.OrgName>Wingtip Toys</Emp.OrgName>
    <Emp.JobTitle>Lead Machinist</Emp.JobTitle>
    <Emp.Responsibility>
      Supervised work of staff of four machinists. Coordinated all complex assembly and tooling activities, including production of tricycles and wagons.
      Developed parts fabrication from sample parts, drawings and verbal orders.Worked with ISO9000 implementation.
    </Emp.Responsibility>
    <Emp.FunctionCategory>Production</Emp.FunctionCategory>
    <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
    <Emp.Location>
      <Location>
        <Loc.CountryRegion>US </Loc.CountryRegion>
        <Loc.State>MI </Loc.State>
        <Loc.City>Saginaw</Loc.City>
      </Location>
    </Emp.Location>
  </Employment>
  <Employment>
    <Emp.StartDate>1996-11-15Z</Emp.StartDate>
    <Emp.EndDate>2000-05-01Z</Emp.EndDate>
    <Emp.OrgName>Blue Yonder Airlines</Emp.OrgName>
    <Emp.JobTitle>Machinist</Emp.JobTitle>
    <Emp.Responsibility>
      Repaired and maintained a variety of production and fabrication machine tools.
      Set up and operated machines to close tolerances. Used and wrote CNC machine programs. Trained extensively in computer-aided manufacturing.
    </Emp.Responsibility>
    <Emp.FunctionCategory>Production</Emp.FunctionCategory>
    <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
    <Emp.Location>
      <Location>
        <Loc.CountryRegion>US </Loc.CountryRegion>
        <Loc.State>IL </Loc.State>
        <Loc.City>Chicago</Loc.City>
      </Location>
    </Emp.Location>
  </Employment>
  <Employment>
    <Emp.StartDate>1994-06-10Z</Emp.StartDate>
    <Emp.EndDate>1996-07-22Z</Emp.EndDate>
    <Emp.OrgName>City Power and Light</Emp.OrgName>
    <Emp.JobTitle>Assistant Machinist</Emp.JobTitle>
    <Emp.Responsibility>
      Performed centerless grinding. Received training in manual mill and lathe machines, as well as micrometers and calipers.
      Owned complete toolset.Worked extensive overtime on request.
    </Emp.Responsibility>
    <Emp.FunctionCategory>Production</Emp.FunctionCategory>
    <Emp.IndustryCategory>Manufacturing</Emp.IndustryCategory>
    <Emp.Location>
      <Location>
        <Loc.CountryRegion>US </Loc.CountryRegion>
        <Loc.State>IA </Loc.State>
        <Loc.City>Des Moines</Loc.City>
      </Location>
    </Emp.Location>
  </Employment>
  <Education>
    <Edu.Level>Bachelor</Edu.Level>
    <Edu.StartDate>1990-09-15Z</Edu.StartDate>
    <Edu.EndDate>1994-05-10Z</Edu.EndDate>
    <Edu.Degree>Bachelor of Science</Edu.Degree>
    <Edu.Major>Mechanical Engineering</Edu.Major>
    <Edu.Minor />
    <Edu.GPA>3.2</Edu.GPA>
    <Edu.GPAScale>4</Edu.GPAScale>
    <Edu.School>Midwest State University</Edu.School>
    <Edu.Location>
      <Location>
        <Loc.CountryRegion>US </Loc.CountryRegion>
        <Loc.State>IA </Loc.State>
        <Loc.City>Ames</Loc.City>
      </Location>
    </Edu.Location>
  </Education>
  <Address>
    <Addr.Type>Home</Addr.Type>
    <Addr.Street>567 3rd Ave</Addr.Street>
    <Addr.Location>
      <Location>
        <Loc.CountryRegion>US </Loc.CountryRegion>
        <Loc.State>MI </Loc.State>
        <Loc.City>Saginaw</Loc.City>
      </Location>
    </Addr.Location>
    <Addr.PostalCode>53900</Addr.PostalCode>
    <Addr.Telephone>
      <Telephone>
        <Tel.Type>Voice</Tel.Type>
        <Tel.IntlCode>1</Tel.IntlCode>
        <Tel.AreaCode>276</Tel.AreaCode>
        <Tel.Number>555-0114</Tel.Number>
      </Telephone>
      <Telephone>
        <Tel.Type>Fax</Tel.Type>
        <Tel.IntlCode>1</Tel.IntlCode>
        <Tel.AreaCode>276</Tel.AreaCode>
        <Tel.Number>555-0132</Tel.Number>
      </Telephone>
    </Addr.Telephone>
  </Address>
  <EMail>Shai@Example.com</EMail>
  <WebSite />
</Resume>
</Resumes>

How to fix DT_Text and DT_NText Read Only in Script Component

$
0
0

I have a script component that I have written and works as long as the Output columns on the script are string types.  When I change the output column type to text (since the size could be essentially unlimited) it gives an error in the script component that the property is read only.

Here is the code line that fails with Property Payments is read only.

Output0Buffer.Payments = fieldValues(i)

If I change the column payments to DT_Wstr it works without issue, but I want to use text incase the value is large.

Here is the error if you try to run the actual script even though I know it has an error.

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

Package Validation Error

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

Error at Data Flow Task [Script Component [85]]: Error 30526: Property 'Payments' is 'ReadOnly'.
Line 86   Column 13 through 69
Error 30526: Property 'Ops' is 'ReadOnly'.
Line 155   Column 13 through 65

Error at Data Flow Task [Script Component [85]]: Error 30526: Property 'Payments' is 'ReadOnly'.
Line 86   Column 13 through 69
Error 30526: Property 'Ops' is 'ReadOnly'.
Line 155   Column 13 through 65

Error at Data Flow Task [DTS.Pipeline]: "component "Script Component" (85)" failed validation and returned validation status "VS_ISBROKEN".

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

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

 (Microsoft.DataTransformationServices.VsIntegration)

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

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

Design of Fact Table

$
0
0

Hello,

I am relatively new to BI and am wondering the pros and cons of a particular design of a fact table and associated dimensions.  In the first case below the fact table would have one row with fields T, N, M for which the codes would come from a dimension (the Tis etc just demonstrate the idea -- would normally be an integer key in place).  

In the second case I have two dimensions - one for the Criteria (T,N, or M) and another table for the actual Criteria values.  This approach would require numerous rows for each ID - again the fact table would just be populated with keys from the two dimensions rather than the actual values seen below.  

Is either of these just plain wrong or are both valid but one is better than the other?   

Thanks kindly for any consideration. 



Problem opening an Excel rowset in SQL/T-SQL

$
0
0


In SSMS ((SS 2008 R2) when I run:

SELECT * FROM OPENROWSET ( 'Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\test\xltest.xls;HDR=YES;IMEX=1', 'SELECT * FROM [Sheet1$]' ) From this article:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/3ffcbe7c-cdce-43cd-97b1-ea480bbbfff9/openrowset-excel

I get error: Msg 7403, Level 16, State 1, Line 1 The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered. However, over in SSIS, the Excel Connection Manager connection string property (which works!) is: Provider=Microsoft.ACE.OLEDB.12.0;Data Source= C:\test\xltest.xls;Extended Properties="EXCEL 12.0 XML;HDR=NO"; Showing that Microsoft.ACE.OLEDB.12.0 is registered on this machine. What do I need to do in SQL/T-SQL to have the code work?



SSIS Package fails to run on Integration Server

$
0
0

I have an SSIS package I created and ran successfully, locally on my desktop.  I then copied the package to the Integration Server, running SQL 2012 and imported the package.  The import worked fine but when I go to execute the package I get the following error:

Failed to acquire connection "MyConnection".  Connection may not be configured correctly or you may not have the right permissions on this connection.

The Package Execution Progress window says that the package is attempting to configure from the XML file "MyConfig.dtsConfig" 

I attempted to access the database server that the SSIS Package is trying to access from my integration server, with the credentials that are in my config file and I was able to successfully connect.  

Can someone point me in the right direction on how to start trying to solve this issue?

Thanks

Bob

Importing multiple excel sheets to SQL Server

$
0
0

Problem description

I have an excel sheet with three tabs which I wish to import to SQL Server.

The first tab has 34 columns and the other 2 tabs have only 32 columns so I cannot use a foreach loop container to successfully import given the slightly different column structure in the sheets.

I am trying to find the easiest way to resolve this problem – would it be possible to loop over the sheets and create txt / csv files in a data flow task and then use a bulk import task within a foreach loop container ? Or is there a simpler / better method ?

Many thanks

Scott

Can SSIS be used to pick up files dynamically from an FTP folder?

$
0
0

I get 4 files dumped into an FTP folder each day.  Each comes in with a date, in this format: '20140320' & the filename, which is always the same convention for these four files.  Can I run SSIS on a daily basis, like at 9AM, to scan through the files in the folder, and import the ones that were dropped in today (today's files always have yesterday's date).

Thanks!!


Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Why Is My Custom Task Showing "Task Failed To Load"?

$
0
0

I developed a custom task to wrap an old program.

Running on dev machine via VS2012, works fine.

Deployed to the server, and now it shows the above error during validation, even when I run it by right-clicking and selecting "Run Package"...

What sort of troubleshooting steps am I looking for?

Run the SSIS Package using sql server Agent--Memory utilization Problem

$
0
0

Hi,

I have Created one SSIS Package it was working fine in BIDS but in SQL Server Agent it takes all the server memory and server gets very slow now.

in that ssis package i am using merge join,sorting tasks.Can you please suggest me how to handle in the memory usage for this..pls refer the below screen


Viewing all 24688 articles
Browse latest View live


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