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

Is it possible to use a Golang SQL Server Driver to pull SSIS information

$
0
0

Scenario: I'm trying to do work on some SSIS manipulations in Golang. I've seen that there is a mssql driver denisenkom/go-mssqldb. My main goal is to either "watch" or locally copy the .dtsx files to the machine running Go. 

1. I'm not sure if this is something that is possible with this driver? Maybe there's a different driver I should be using
2. If this is the right driver, then I'm not sure what commands I should be mimicking from something like SSMS. 
3. Any other feedback/assistance on this would be super helpful!


ssis audit

$
0
0

Hello,
ssis package loads data.
For auditing I have added a derived column transformation task with expression:
@[System::ServerExecutionID]
Derived column name --> Execution ID

in destination I have mapped this column to the destination column but the destination column shows as 0
Do you know why please?
Is this because I am running the package from VS to test?
Thank you


Help Writing a filename variable

$
0
0

Hi,

    I have a requirement to take an excel file and load it into a SQL Server table everyday. The issue is that the file name changes everyday, having the title and date for each day. Example: "Redlight_02-03-20". I have searched the SSIS forums, from which I got some help, but I can't figure out whats wrong with my specific expression:

@[User::FileName]="\\\\SVR-14\\Planning\\download\\Redlight 2020\\Redlight_"+  RIGHT("0" + (DT_WSTR,2)DATEPART("dd",GetDate()),2) + "-" +RIGHT("0" + (DT_WSTR,2)DATEPART("mm",GetDate()),2) + "-" +(DT_WSTR,2)DATEPART("yy",GetDate()),2)+".xls"

Which should result into this: SVR-14\Planning\download\Redlight 2020\Redlight_02-03-20.xls

Any help on creating this variable would be greatly appreciated. Thanks!


UMAIR AHMED

Execute Process Task to WinSCP a file

$
0
0

So I have an Execute Process Task to WinSCP a file. Only our remote server has been granted access to the Secured FTP Site. So I am trying to run the Execute Process Task to WinSCP the file locally specifying the Executable in a Variable

@WinSCPExecutableFullyQualifiedPathName and defined as...

\\servername\c$\WinSCP\WinSCP\WinSCP.com

I have defined the Site on the Remote Server using the WinSCP UI and have designated that exact name in the open command

option batch abort
option confirm off
open sitename.location.com
lcd C:\
option transfer binary
put "%1%" "%2%"
close
exit

When I execute the SSIS Package locally, it opens up the command window when it reaches that point, it says...

Searching for host...

Network error: Connection to "sitename.location.com" timed out

I know this works because when I remote desktop into the remote server and access WinSCP I do indeed see that Site name.

Is this an issue trying to execute the WinSCP.com remotely?

\\servername\c$\WinSCP\WinSCP\WinSCP.com

Can anyone help me here? I'm kind of at my wits end about this.

Thanks for your review and am hopeful for some feedback.

How To Delete Bottom N Rows From Excel File in SSIS Package

$
0
0

Hi,

I need to load data from excel file to SQL database but my excel file bottom 2 rows having company information which i need to delete while loading into SQL database using script task.

I am able to delete bottom 2 rows, if source is flatfile using below script in script task but same script is not working for Excel file.

Declared below 2 variables in ssis package.

User::VarFilePath: Contains source file path

User::VarDeleteBottomNRows: Holds the rows to be deleted from bottom (i.e. 2)

#region Namespacesusing System.IO;using System.Linq;#endregionpublicvoid Main() {// TODO: Add your code herestring FilePath = Dts.Variables["User::VarFilePath"].Value.ToString(); Int32 DeleteBottomNRows = Convert.ToInt32(Dts.Variables["VarDeleteBottomNRows"].Value);string[] lines = System.IO.File.ReadAllLines(FilePath); Array.Reverse(lines); lines= lines.Skip(DeleteBottomNRows).ToArray(); Array.Reverse(lines); System.IO.StreamWriter file =new System.IO.StreamWriter(FilePath); foreach (string line in lines) { // MessageBox.Show(line.ToString()); file.WriteLine(line); } file.Close(); Dts.TaskResult = (int)ScriptResults.Success; }Please suggest how to fix this issue using script task.

Thanks,

Visu

How to Use Same Flat file connection to multiple destination Task

$
0
0

Hi All,

I want to export 10 tables to flat files. I am using 10 Data Flow tasks to export, but for the destination i have to create 10 Flat file connections. Is it possible to use the same Flat file connection for all the 10 Flat file destinations?

Do you want to be acknowledged as Microsoft SQL Server Integration Services Guru? Submit your work to February 2020 competition!

$
0
0
TnWiki

What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

The winners are selected each month for glory and adoration by the global technical community. Winners will be announced in Microsoft's channels and communities channels including a dedicated blog post, Twitter, Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in February 2020 and must be in English. However, the original blog or forum content can be from beforeFebruary 2020.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.

Note! Articles must be original written by the user, and not a duplicate of existsting article in the Wiki.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.

PS: Above top banner came from James van den Berg.


Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
----------------------------
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

crear multiples archivos de excel

$
0
0

Buenas estoy trabajando en SSIS, tengo una tabla (sql) de ordenes por persona, cada orden tiene su tiempo especifico

Orden  Persona Hora

3          Juan     0.3

Mediante SSIS necesito generar dos archivos de excel por persona.

archivo 1: primeras 4 horas de Juan

archivo 2: segundas 4 horas de Juan

Esto quiere decir que si son 40 personas, habran 80 archivos de excel creados, alguna sugerencia de como crear esto mediante SSIS?

Saludos



OData Connection Error - Client and server cannot communicate

$
0
0

I'm trying to setup a OData connection to use to pull Sharepoint List data.  I have Visual Studio 2013 and SSDT 2014.  When I try to setup the connection and hit Test Connection, I get this error.  What would I need to change?  I'm using the suffix _vti_bin/listdata.svc where it's supposed to be and have tried both Windows Authentication and a static user name and password.  Is this a TLS issue?

===================================

Test connection failed

===================================

The underlying connection was closed: An unexpected error occurred on a receive. (System)

------------------------------
Program Location:

   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.SqlServer.IntegrationServices.OData.UI.ODataConnectionManagerForm.TestConnectionMiddle(Object callback)

===================================

The client and server cannot communicate, because they do not possess a common algorithm (System)

------------------------------
Program Location:

   at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
   at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
   at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
   at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
   at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.TlsStream.CallProcessAuthentication(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.WriteHeaders(Boolean async)

Conversion failed when converting date and/or time from character string.

$
0
0

Hello Folks i'm trying to union all two select stmts in which Closeddate and reopeneddates are varchar in one Table and date time in other Table. How to convert the field to be compatible with the other stmt without having Errors.

here is the sqlstmt

select * into ##Temp9

from

(select [Month],
[Year], 
[claimnumber],
[ClaimantSequence],
[Claimid1], 
[AgeofClaim], 
[SetupDate], 
[ClosedDate],
[ReopenedDate],
[ReopenedDaysOpen],
[LossStatusId], 
[ReceivedDate], 
[TotalLossPaid_ITD], 
[TotalExppaid_ITD], 
[totalpaid_ITD],
[totallossres_itd], 
[totalexpenseres_itd], 
[totalRes_ITD],
[totalIncrd_ITD],
[featurestatus], 
[lossst],
[lobtype],
[AM_incl_excl_flag], 
[agtgrp],
[handlingOfc], 
[lossdate], 
[lossYear], 
[examiner], 
[Count], 
NULL as [Reopened], 
[Tippett], 
[Supervisor], 
NULL as [Office],
[Region], 
[ClaimType],
[Status], 
[companyname],
[policy], 
[policysourceid],
[dateeffective],
NULL as [Lasttransactiondate], 
NULL as [ASL], 
NULL as[Source],
NULL as[Group],
NULL as[ExpIncurred], 
NULL as[ExpIncurredRatio], 
NULL as[Range],
'New' as Flag,'Pending' as Flag
 from [dbo].[ProductionPending2019] 
UNION ALL
 select [Month],
[Year], 
[claimnumber],
[ClaimantSequence],
[Claimid1], 
[AgeofClaim], 
[SetupDate], 
CONVERT(datetime,[ClosedDate]),
CONVERT(datetime,[ReopenedDate]),
[ReopenedDaysOpen],
[LossStatusId], 
[ReceivedDate], 
[TotalLossPaid_ITD], 
[TotalExppaid_ITD], 
[totalpaid_ITD],
[totallossres_itd], 
[totalexpenseres_itd], 
[totalRes_ITD],
[totalIncrd_ITD],
[featurestatus], 
[lossst],
[lobtype],
[AM_incl_excl_flag], 
[agtgrp],
[handlingOfc], 
[lossdate], 
[lossYear], 
[examiner], 
[Count], 
NULL as [Reopened], 
[Tippett], 
[Supervisor], 
NULL as [Office],
[Region], 
[ClaimType],
[Status], 
[companyname],
[policy], 
[policysourceid],
[dateeffective],
NULL as [Lasttransactiondate], 
NULL as [ASL], 
NULL as[Source],
NULL as[Group],
NULL as[ExpIncurred], 
NULL as[ExpIncurredRatio], 
NULL as[Range],
'New' as Flag
from [dbo].[ProductionNew2019])
a

How to parse XML files in SSIS?

$
0
0
Has anyone done pulling data from a XML file using SSIS ? While pulling , i need to apply conditions too based on the XML nodes from the XML file. How is it possible to get nodes from the XML file and applying conditions with the nodes ? Can you provide me an example ?

DTEXEC.EXE Argument for option "set" is not valid.

$
0
0

this is probably an easy one but i can't figure it out ....

simply executing an ssis package with an argument

DTEXEC.exe /FILE 'C:\test\CONTROLLER.dtsx' /SET '\Package.Variables[User::Email].Properties[Value]';'test'

DTEXEC.exe /FILE 'C:\test\CONTROLLER.dtsx' /SET "\Package.Variables[User::Email].Properties[Value]";'test'

or 

DTEXEC.exe /FILE 'C:\test\CONTROLLER.dtsx' /SET "\Package.Variables[User::Email].Value";"test"

or

DTEXEC.exe /FILE 'C:\test\CONTROLLER.dtsx' /SET "\Package.Variables[User::Email].Value";'test'

they all returned the following 

Argument ""\Package.Variables[User::Email].Value"" for option "set" is not valid.
test

this is the version of my dtexec 

Microsoft (R) SQL Server Execute Package Utility
Version 13.0.1601.5 for 32-bit
Copyright (C) 2016 Microsoft. All rights reserved.

any ideas what i might be doing wrong?

thanks

eddy


eddy.a

Managing event handler for a Foreach Loop Container - SSIS 2014-2016

$
0
0

Hi,

I've implemented a SSIS 2014 pkg with a Foreach Loop Container having some contained tasks.

I've created an OnPreExecute and an OnPostExecute event handlers for the above container to log the related execution.

In my log table it is written a row for each contained task, but I haven't created any event handlers for the Foreach Loop Container.

I need to log the Foreach Loop Container execution at the beginning of the first iteration and the end of the last iteration; so I expect to see only two rows written in my log table.

Any suggests to me in order to solve this issue, please? Thanks

Forcing a failure for an execute SQL task - SSIS 2014-2016

$
0
0

Hi,

I'm trying to force manually a failure for an execute SQL task in order to trigger an OnError event managed with the related handler.

I've used a script task inside an OnProgress event handler by setting Dts.TaskResult to failure and also I've set the ForceExecutionResult to failure but in both cases unsuccessfully.

Now, how could I try the right behaviour about the OnError event handler of my execute SQL task?

Thanks

SSIS Error Oracle.DataAccess.Client.OracleConnection

$
0
0

Hi,

I'm havinng an error on a SSIS job that execute a select query from Oracle.and returns this error message:

ADO NET Source has failed to acquire the connection {A7300166-E45B-403B-A1EC-E0BDE51ED35A} 
with the following error message: "The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.".

After 4 days that I deployed the package, it was executing perfectly and then suddenly on day 5 any select from Oracle returns this error above. And the provider used is ODP.Net.


Any ideia what could be the error? Could it be the Server Oracle or the Sql Server ?


Load data into multiple excel sheets depending on conditions dynamically

$
0
0
Hi 
I am working as ETL developer i have a situation please help me out. I have to create multiple sheet in one excel file with different queries. Like i have to check if the particular column is null then the record against this query should be in excel file and i have to check another column with other name if it is null or empty and then create a sheet for it and sheet should be created only if the query returns some result otherwise there should not be any empty sheet.  i have 8 different columns to check . 

To get the number of times a char is repeated in a string using functions

$
0
0
Hi, I have an application where I need to get the number of times a char is repeated in a string using functions can you please help me.

 

problems using ssis excel with null values

$
0
0

Hi, I have an excel file with one column that has decimal values or blank.

I need to insert that into SQL Server table value as decimal(20,19)

My problem that If first i try to insert that column as varchar the result is: 5.5555555555555497E-2

That value has a letter inside.

Another way that I tried was to insert the value as decimal but the blank values were inserted  as null and not like 0, so I received an error from SSIS. a decimal value must be 0 not null.

Regards

Not able to connect Integration Services through SSMS in SQL Server 2016

$
0
0

Hi Team, 

Please help on bellow issue

TITLE: Connect to Server
------------------------------
Cannot connect to <ServerName>.
------------------------------
ADDITIONAL INFORMATION:
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476
------------------------------
Connecting to the Integration Services service on the computer "<ServerName>" failed with the following error: "Class not registered".
This error can occur when you try to connect to a SQL Server 2005 Integration Services service from the current version of the SQL Server tools. Instead, add folders to the service configuration file to let the local Integration Services service manage packages on the SQL Server 2005 instance.

For help, click: http://go.microsoft.com/fwlink/?LinkId=506689
------------------------------
Connecting to the Integration Services service on the computer "<ServerName>" failed with the following error: "Class not registered".
This error can occur when you try to connect to a SQL Server 2005 Integration Services service from the current version of the SQL Server tools. Instead, add folders to the service configuration file to let the local Integration Services service manage packages on the SQL Server 2005 instance.

For your reference am added error screenshot.

Already I have provided all access to user.

 


Thanks Bala Narasimha

SSIS Failed to Establish Connection with Attunity Teradata connector 5.0 on VS2017 Prof

$
0
0

Hi All,

Need Advice with Teradata Attunity connector 5.0 with VS2017 Prof. 

Environment;

OS:Windows 10

Microsoft Visual Studio Professional 2017  with SSDT 15.8.0

Attunity Teradata connector 5.0 Installed on pc both 32bit and 64.

when i try to create connection manager with Teradata Attunity connector .. i get below Error

===================================

Error at MyTeradatabse [Connection manager "Teraconn"]: Failed to establish an ODBC connection with the database server. Verify that the Teradata ODBC Driver for Windows x86 is installed properly. SqlState = IM002 Message = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

 (Microsoft Visual Studio)

===================================

Test connection failed

===================================

Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft.SqlServer.DTSRuntimeWrap)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Runtime.ConnectionManager.AcquireConnection(Object txn)
   at Attunity.IntegrationServices.DataFlowUI.TeraDataUI.TeraConnectionDialog.testConBtn_Click(Object sender, EventArgs e)

===================================

Error HRESULT E_FAIL has been returned from a call to a COM component. (Microsoft.SqlServer.DTSRuntimeWrap)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSConnectionManager100.AcquireConnection(Object pTransaction)
   at Microsoft.SqlServer.Dts.Runtime.ConnectionManager.AcquireConnection(Object txn)

I have tried to test connection with 64bitRuntime = False .. still could not connect. I would really appreciate the advice

Jay

Viewing all 24688 articles
Browse latest View live


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