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

Is SSIS the "right" way to export to a EDI X12 flat-file?

$
0
0

Hi

Most of the documentation I've found deals with parsing an EDI file.   I need to *write* to an EDI file, not read it.

The flat-file end result should look like this (note the 3 headers and 3 footers ):

ISA^00^          ^00^          ^ZZ^SUPPLIER       ^ZZ^ABCCorpT    ^151125^1002^U^00602^000000002^0^P^>~
GS^PT^SUPPLIER^ABCCorpT^20151125^1002^2^X^006020~
ST^867^0002~
BPT^00^20151125100241^20151125^SS~
CUR^SE^CAD~
...
...
...
SE^18908^0002~
GE^1^2~
IEA^1^000000002~


The data is coming from SQL Server.  The columns are all different for each row, and there are loops (eg. N1, N2, N4 fields for address may all get repeated if shipping and address are different)

If SSIS is capable of producing this, can anyone refer me to a walkthrough or tutorial that shows how to serialize data into this format?

Sidenote:  I understand that it's possible in Biztalk, we 

Extract (Parse) the data from SQL Server as Xml  
Map (xslt transformation) to the EDI Schema
Serialize XML into EDI

Is Biztalk overkill, and/or is SSIS underkill?

Thanks for any guidance..

Cheers!



Thanks! Dan


SQL Agent Job Failed , with Script component package in a step

$
0
0

Hi ,

SQL Agent Job Failed , with Script component package in a step.

Need help.

Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Dts.Pipeline.DoesNotFitBufferException: The value is too large to fit in the column data area of the buffer.    at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.SetString(Int32 columnIndex, String value)     at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.set_Item(Int32 columnIndex, Object value)     --- End of inner exception stack trace ---     at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)     at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)    at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)  End Error  Error: 2016-02-11 22:06:54.44    Code: 0xC0047038     Source: Populate PimCoreSellerDetails SSIS.Pipeline     Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Script Component returned error code 0x80131604.  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.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  10:06:53 PM  Finished: 10:06:54 PM  Elapsed:  0.859 seconds.  The package execution failed.  The step failed.

Thanks,

Som

How To Convince Mgt to Enable MSDTC

$
0
0

Good morning, oh esteemed SSIS Superiors!

In another thread, I detailed a need to use TransactionOption to make use of Sequence Containers.

I learned that, in order to use that setting, I must have MSDTC enabled on my local box and the server.

If this service is not running, then an error, "Failed to acquire connection 'Connection'. Connection may not be configured correctly or you may not have the right permissions on this connection," occurs when I haveTransactionOption set to "Required."

I was easily able to set MSDTC on my local box, but management has decided NOT to enable MSDTC on the server, blocking my use of Sequence Containers.

These seem to be useful tools, but I don't have the experience with the package to be able to advocate enabling MSDTC sufficiently. Seems that the ability to roll back events in a failed sequence wasn't enough - though, it seems to be a pretty darn good argument to this novice.

So, my question for the group is, what other arguments might I use to gently nudge management into turning on MSDTC without their being aware of being nudged?

How to use "%" in value, for a @FileName variable with chaning name on the file. (SSIS)

$
0
0

Hi,

I have Filenames with names ABC1501, ABC1502, ABC1503... The last 4 numbers are for years and month and will change every month.

I want to set the value for a variable to "ABC%" but it doesn't work. 

Is it any other symbols that works in SSIS?

I'm using the variable in a script task.

Best regards

Baden 

Help to configure flat file connection manager to use a variable for the connection string

$
0
0

Greetings to All,

I'm currently going through the available Microsoft's SSIS Tutorial Create A Simple ETL Package. Lesson 1: Creating the Project and Basic Package was successfully completed.

Lesson 1 specifies to add and configure a Flat File Connection Manager; this connection selects a single data file.

Lesson 2 of the tutorial, Adding Looping, now calls to modifying the Flat File Connection Manager that was created on the previous lesson. A Foreach Loop container was added in the Control Flow Tab, enumerator was configured, and the variable was created to map the enumerator.

However, when I go to the Properties of the Flat File Connection Manager, I go to the Properties Expression Editor and select "ConnectionString," I don't see a Variables node so I end up having to cancel.  I only see Mathematical Functions, String Functions, Date/Time Functions, NULL Functions, Type Casts, Operators.

Any ideas how I can get to the Variables node?

Thank you for your help in advance,

To run a SSIS package outside of SQL Server Data Tools you must install Move File to Archive of Integration Services or higher

$
0
0

I am testing SSIS package that I upgraded from VS2005 project to VS2013 project. This is very simple package which just processes files and updates database based on those files. And I am getting odd error and I cant find solution for that.

Issue is my package runs fine and it does exactly what it suppose to do (extracting data from file and inserting into table). But part of this operation is to move file to archive. And I am getting this error"Description: To run a SSIS package outside of SQL Server Data Tools you must install Move File to Archive of Integration Services or higher." 

I have used VS2013 with SSDT BI for 2014 and SSIS Designer version matches with dtexec utility in my dev test VM (12.0.2000.8 x64 bit). Below is output from CLI.

I am sure it has something to do with some missing component but I just can't figure out what. Any help is appreciated.

Microsoft (R) SQL Server Execute Package Utility
Version 12.0.2000.8 for 64-bit
Copyright (C) Microsoft Corporation. All rights reserved.

Started:  10:45:58 AM
Progress: 2016-02-11 10:45:59.20
   Source: Truncate StagingTable
   Executing query "TRUNCATE TABLE StagingTable".: 100% complete
End Progress
Progress: 2016-02-11 10:45:59.25
   Source: Insert into Staging
   Executing query "exec dbo.staging  @xml_fileName,NULL,'C...".: 100
% complete
End Progress
Progress: 2016-02-11 10:45:59.25
   Source: Move to MasterXML
   Executing query "exec dbo.insertXML".: 100% complete
End Progress
Error: 2016-02-11 10:45:59.25
   Code: 0xC000F427
   Source: Move File to Archive
   Description: To run a SSIS package outside of SQL Server Data Tools you must
install Move File to Archive of Integration Services or higher.
End Error
Progress: 2016-02-11 10:45:59.30
   Source: Execute SQL get_next_file
   Executing query "exec get_next_file".: 100% complete
End Progress
Progress: 2016-02-11 10:45:59.51
   Source: Execute SQL notify_users
   Executing query "exec notify_users".: 100% complete
End Progress
DTExec: The package execution returned DTSER_SUCCESS (0).
Started:  10:45:58 AM
Finished: 10:45:59 AM
Elapsed:  1.172 seconds

SSIS data conversion Numeric[DT_NUMERIC]

$
0
0

ETL from SQL to Excel 

I used the Data conversion tools to transfer the data from SQL to Excel

the issue is in the numeric field, when transfer to the excel, the columns  show up as text field

in the data conversion the output columns datatype some are Numeric[DT_NUMERIC],four-byte signed integer [DT_I4] or double-precision float [DT_R8] .. 

but those field in EXCEL_DESTINATION  under External Columns Datatype come as Unicode string [DT_WSTR].. the issue here is when i change this data type to Numeric[DT_NUMERIC] or any . Dot accept it or dont save it.. when I close and open again the data type still show [DT_WSTR]

SSIS package - dynamic query, how to set database name dynamic ?

$
0
0

Hi below is my query - need to set up dynamic values for the below in SSIS package:

for SIT it should be SIT, UAT it should be UAT and PROD should be PROD. How can Iachieve this in SSIS package ?

select t2.USER_,T5.NetWorkAlias, T5.Name,T5.Company,t5.ENABLE,T1.AOTNAME, t1.NAME RoleName,
         T4.CREATEDBY, T4.CREATEDDateTime, T6.SUPERVISOR, T3.DATAAREA RoleLegalEntity
              from  AX_UAT_model.dbo.SECURITYROLE T1
       join AX_UAT.dbo.SECURITYUSERROLE T2
              on T1.recid = T2.SECURITYROLE
       left outer join AX_UAT.dbo.SECURITYUSERROLECONDITION T3
              on t3.SECURITYUSERROLE = t2.RECID
       join SYSUSERINFO T4
              on T2.USER_ = T4.Id
       join UserInfo T5
              on T5.Id = T4.Id
       left outer join BSRSUPERVISOR T6
              on T6.USERINFO = T5.Id
order by t2.user_


MBH


SSIS - SQL command doesnt work, error ?

$
0
0

Hi - when I am using below query in my SQL command in SSIS, its throwing error as below. What is the way for me to run this query correctly ?

I need to use this below query and generate a flatFile....how can I achieve this ?

it has a variable called @CompanyErpID

Declare @CompanyERpId varchar(50)
Set @CompanyERpId = '1158'


Select a.UserId + '|"' + replace(a.UserId,'brightstar\','') + '"|"' + isnull(a.FirstName,'') + ' ' + isnull(a.LastName,'') + '"|"' + case when a.IsLocked = 0 then 'ACTIVE' else 'INACTIVE' end + '"|"' + d.Name  + '"|"' + e.Name  + '"'
from adm.[user] a
inner join adm.userbycompany b on a.UserId = b.Userid
inner join adm.claimsbyuser c on a.userid = c.UserId
inner join adm.Claim e on c.ClaimId = e.id
inner join adm.company d on b.companyId = d.id
where (companyErpId = @CompanyERpId or @CompanyERpId = '0')
order by d.CompanyERPId, isnull(a.FirstName,'') + ' ' + isnull(a.LastName,'')



MBH



Using send mail task with an outlook account?

$
0
0

Hi guys,

Is it possible to send an email from an outlook account using SSIS? I have a <username@outlook.pt> account with I use to log in into outlook.com email service.

I tried to configure the Send Email Task with the following connection string as expression, so I could include the password:

"SmtpServer=smtp-mail.outlook.com;Port=587;User ID=<username@outlook.pt>;Password=<password>;EnableSsl=True;"

Erorr: [Send Mail Task] Error: An error occurred with the following error message: "Mailbox unavailable. The server response was: 5.7.3 Requested action aborted; user not authenticated".

Am I doing something wrong?

Thank you


project parameters/packages stored in the file system

$
0
0

If I want to take advantage of  project parameters for SSIS packages instead of using a dtsconfig file do I have to store the SSIS packages in the database? Or can I still store SSIS packages in the file system and access the parameters?

Attunity Error in SSIS - "OCI Error Encouneterd"

$
0
0

I have SSIS BIDS (SQL Server 2008) (32 bit), and am using Attunity connector to connect to an Oracle DB. A while back we had our systems upgraded to windows 7 64 bit.

I have installed Oracle 11g client on my machine, added TNS entries for the above Oracle server connection and also pointed this path (path for TNSNames.ORA) in the "PATH" environment variable as well as "TNS_ADMIN" (which I created) environment variable.

Even after doing all this, I get the following error when validating the Attunity Oracle source connector, the error is as follows:

"OCI Error Encouneterd. ORA-12154: TNS could not resolve the connect identifier specified, Test connection failed".

I also researched that this might be due to paranthesis in the path for devenv.exe (BIDS).... So I went through the following post, installed JUNCTION, and created a junction pointing to the actual directory for devenv.exe.

http://danieladeniji.wordpress.com/2011/08/03/microsoft-sql-server-integration-services-attunity-error-oci-error-encountered-ora-12154-tnscould-not-resolve-the-connect-identifier-specified/

This too has not resolved the problem....

Any help appreciated!!

Why SSIS is taking long time for SQL 2014 sp1 Business Intelligence Edition (64-bit) version 12.0.4213

$
0
0

Why SSIS is taking long time for SQL 2014 sp1   Business Intelligence Edition (64-bit) version 12.0.4213

when we run the query for the fact table just take less than 2 min,  but the SSIS take for ever to load/Transfer the datas..

the server spec RAM 128 GB  and 8 proce

Thanks


SSIS package- how to set variable in query at runtime ?

$
0
0

In a query like below, how to make the variable in the query as dynamic ? Please anyone explain step by step

there are set of @CompanyERpId will be provided like (23. 2454, 876....) randomly.

Declare @CompanyERpId varchar(50)
Set @CompanyERpId = '12345'


Select a.UserId + '|"' + replace(a.UserId,'brightstar\','') + '"|"' + isnull(a.FirstName,'') + ' ' + isnull(a.LastName,'') + '"|"' + case when a.IsLocked = 0 then 'ACTIVE' else 'INACTIVE' end + '"|"' + d.Name  + '"|"' + e.Name  + '"'
from adm.[user] a
inner join adm.userbycompany b on a.UserId = b.Userid
inner join adm.claimsbyuser c on a.userid = c.UserId
inner join adm.Claim e on c.ClaimId = e.id
inner join adm.company d on b.companyId = d.id
where (companyErpId = @CompanyERpId or @CompanyERpId = '0')
order by d.CompanyERPId, isnull(a.FirstName,'') + ' ' + isnull(a.LastName,'')


MBH

SSIS ERROR

$
0
0

[SSIS.Pipeline] Error: Lookup  failed the pre-execute phase and returned error code 0xC020824E.

[Lookup 4 [152]] Error: OLE DB error occurred while populating internal cache. Check SQLCommand and SqlCommandParam properties.

Error: A buffer failed while allocating 2728 bytes.

Error: The system reports 93 percent memory load. There are 8379478016 bytes of physical memory with 522973184 bytes free. There are 4294836224 bytes of virtual memory with 23629824 bytes free. The paging file has 16757055488 bytes with 5860470784 bytes free.

I tried searching for similar error and tried almost all the suggested options but none of it solved my problem. I'm loading fact table with 780 million records and the package has about 8 lookup component to get the surrogate keys, dimension table in the lookup are also huge in size with around 40 to 50 million records in each one of them. Server is 64 bit and has 32 GB Ram.

Can someone suggest me how to go about this, I think lookup with such huge data is what messing up the cache memory is there a better way to get surrogate keys without lookup.

Any help is appreciated 

Thanks


sree


Export only data from excel file to database table that doesn't exist

$
0
0

Hi,

We are using sql server 2012. We get data from vendor in excel format (companyID, companyName, routing Number). We get this excel file every day. The data doesn't change much. Only some time routing number may be changed or new companies may be added. What I need to do is export this data into sql server table. First file is fine because there is no data in the table at all. When rest of the files are exported, logic should check table and export only those companies that doesn't exist in the table and update routing number of those companies whose number is changed. CompanyID is unique. Rest of the data shouldn't be exported from excel file. How can I achieve this in SSIS package.

I think one option is call SP from SSIS package and in SSIS package open excel file using bulk copy and join with table and insert only new records. Are there any options in SSIS package or any other elegant solution?

I appreciate your response.

Spunny

SSIS Report Format Issue

$
0
0

Hi All,

I want to generate a csv report with the following format in SSIS.

Some Static Text - 1


Data from SQL


Some Static Text - 2


Data From SQL

was thinking to create a report with these static texts in my report and generate the SQL data at runtime. But i can not fix the position of theSome Static text - 2 as the records from SQL can be 'n' in numbers.

I am newbie to SSIS, any help is much appreciated.


Removing Special character from string

$
0
0

Hi,

I am loading data from source flat file to target  flat file.

I am using one tool which used to cleanse the data and load in to target flat file.

once data pass through that tool , i observed that in some of the record particularly in one column specail character coming, due to that package failing while loading in to target flat file.

Below error I am geting

[MD Result [235]] Error: Data conversion failed. The data conversion for column "MD_CountyName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[MD Result [235]] Error: Cannot copy or convert flat file data for column "MD_CountyName".

Help me to remove these special character .

Below screen shot , specail characters are highlighted.


Thankx &amp; regards, Vipin jha MCP

Issue in executing SSIS package using ASP.Net web forms.

$
0
0

I have SQL Server Integration services 10.0(SQL Server 2008r2)and 11.0(SQL Server 2012) running. We are executing SSIS packageusing ASP.NET Webforms. Executing fine,no issues. But the problemis,

whenever we uninstall 2008r2, it's not working and getting some error below:

System.Exception: Error in  Personnel conversion process The requested OLE DB provider isnot registered.If the 32-bit driverisnot installed, run the packagein 64-bit mode. Errorcode: 0x00000000.

An OLE DB record is available.  Source:"Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description:"Class not registered".

System.Exception: Error in  Personnel conversion process The requested OLE DB provider isnot registered.If the 32-bit driverisnot installed, run the packagein 64-bit mode. Errorcode: 0x00000000.

An OLE DB record is available.  Source:"Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description:"Class not registered".

Failed to acquire connection "XXXX". Connection maynot be configured correctly or you may not have the rightpermissions on this connection.

whenever we uninstall 2012, it's not working and getting some error below:

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap,Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.(Exception fromHRESULT: 0x80131040)

Filename:'Microsoft.SqlServer.DTSRuntimeWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

   at Microsoft.SqlServer.Dts.Runtime.Application..ctor()

   at KPI.Phoenix.GEO.SSISExecuter.ExecuteDTS(String dtsPackagepath, String dtsPackageName, String templateFolderpath)

   at KPI.Phoenix.GEO.ImportExportExcel.ProcessInsertion(DataSet& objDS, Int32 iJurisID, String strType, Int32& totalcount, String MappingType, Boolean _validateFlag)

WRN:Assemblybinding loggingis turned OFF.

Toenableassembly bind failure logging,set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog](DWORD) to 1.

Note: Thereissome performance penalty associatedwithassembly bind failure logging.

To turn this featureoff, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I want to run the SSIS Package using ASP.NET Webforms.

It would be greatly appreciated your help me in resolving this.

Thanks

Lak's

excel multi-sheets

$
0
0

I am loading excel files with multi sheets into sql server table(s).

For example, there is only one dataflow task, in there, there are four sets of source to destination and each source being a sheet in the excel file.
On observation, I see that most of the time, the dataflow tasks (source to destinations) run in parallel but sometimes I get errors...

My question is could there be any locking of any sort if the data is being imported from multiple sheets into a sql server table?

Thanks

Viewing all 24688 articles
Browse latest View live




Latest Images