ActiveX Script Transformation Column In SSIS But How???

May 15, 2006

Dear all,

I€™ve made a SSIS package which might take source columns from a plain text file and copy them to the Sql table.
A long time ago, when you did the process I did by dts and that stuff included a pump task which had ActiveX Script transform column with VbScript stuff inside so that, how do I for to do the same with SSIS??

I€™ve got a couple of tasks: Flat File Source and OleDb Source Destination but it€™s useless at all for that goal.

Does anyone have ever used or faced this hended?

Thanks for any input,

View 7 Replies


ADVERTISEMENT

SSIS - Activex Script In Transformation.

Feb 6, 2008

I have a flatfile source to which different flatfiles will be passed as input,this is connected to an OLEDB destination which changes along with the sourcefile.
But when the new file is given as input, the OLEDB mappings are not getting refreshed.It is showing an error.

Actually this was implemented in DTS, and they have used an activex script for the transformation.
what shd I use in SSIS?

Please help me..

Sharmada

View 9 Replies View Related

ActiveX Transformation, If-then-els

Oct 22, 2007

I am moving data from Access to SQL Server.

I have a term date field (datetime) whose source values in Access are '1/1/1700'

I am using an Active X Transformation task to change those values to '1/1/1753'

Here is my code



If DTSSource("TERM_DATE").value < '1/1/1753'
then DTSDestination("TERM_DATE").value = '1/1/1753'
else DTSDestination("TERM_DATE") = DTSSource("TERM_DATE")

can't figure out whats wrong

Mike




View 3 Replies View Related

ActiveX&&amp;VB.net Versus Transformation Tasks

Jun 25, 2007

Hello all -


Working on DTS packages we used to have two different ways of exporting data to spreadsheet... We could do it by a single transformation task or either writing an ActiveX script, after running a procedure.

I am able to cover the first way already, while dealing with SSIS... But, I wonder if it is worth to research on how I would write a vb.net code to load data into a spreadsheet (considering we are advised to try vb.net instead of ActiveX while working on these new packages).

It is always a huge discussion to know what is the best way of doing something so my point here is to hear some of you and decide if I just keep exporting data by doing transformation tasks or if I will ever go trying to deploy a vb.net code to do that... What is the best on performance, etc...?


Thanks in advance for all your help as always.

View 4 Replies View Related

SSIS - Derived Column Transformation

Feb 7, 2008

Hello All,

Can someone help me out in providing the STEPS to solve this problem. My scneario is, I've a table which has got 2 fields and 5 default row values have been filled in. Now, using the above, duirng package runtime, it need to dynamically create additional field and has to store values like for.e.g (0001 America). I'm getting the following error while executing the ssis package.

1. [DTS.Pipeline] Warning: Component "Derived Column" (1170) has been removed from the Data Flow task because its output is not used and its inputs have no side effects. If the component is required, then the HasSideEffects property on at least one of its inputs should be set to true, or its output should be connected to something.
2. [DTS.Pipeline] Warning: Source "OLE DB Source Output" (87) will not be read because none of its data ever becomes visible outside the Data Flow Task.

Please suggest with your valuable solution at the earliest.

Thanks
Vaiydeyanathan.V.S

View 3 Replies View Related

SSIS Changing Column Order During Transformation

May 16, 2006

First let me say, I really can't believe this chain of events myself--and they are happening to me.

I am upgrading several DTS packages to SSIS on what will be my new production server. These packages create tables, export them to a flat file, and ftp them off to other locations.

What is happening (on the SSIS side) is that the OLE DB Source is reordering some of the columns on its own (moving them to the end of the table/file. Then when my pickup/load routines run, the data is out of place and they fail.

Can anyone please explain what is happening here with the mapping. I have evaluated the table and the columns are in the order that I expect. When I preview the source table in the OLE DB Source Editor the columns are in the correct order/alignment, but when them in the OLE DB Source Editor --Columns section within BIDS the order is changed arbitrarily.

I have been somewhat successful (2 out of 3) in being able to re-map the data, but this last table just doesn't want to change.

Thanks in advance for any help and/or information you can provide

View 13 Replies View Related

SSIS - Derived Column Transformation Editor Expression

Aug 23, 2007

I am trying to put the following as an expression in the SSIS Derived Column Transformation Editor.

DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0)

It is not allowing it. This works fine in a regular SQL statement.

Does anyone know how I can get this to work?

View 14 Replies View Related

Ho Do I Get The Details From A DTS Transform Data Task Into An SSIS Derived Column Transformation?

Mar 7, 2008

i have too many DTS packages to migrate to SSIS, and while examining a DTS package in BIDS (converted with the migration utility) i tried to edit the resulting migrated package, which opened the DTS interface with the two connection icons joined by the big fat arrow with a gear on it...not exactly what i had in mind, iow, it looks like SSIS on the outside, but its still DTS on the inside.
So I stripped out a series of components from a more complex package hoping that simplifying it would reveal the contents of old DTS Transformations tab at least partially set up in a Derived Column transformation.
Can i get there from here, or must i recreate every stinking definition in a derived column manually from the ground up?
thanks very much for your help

View 2 Replies View Related

SQL Server 2008 :: SSIS Derived Column Transformation Failing On Converting Blank Rows

Jul 30, 2015

I have flat file source from which data is imported to a Sql table.The target column is int and input column is string .The column has some numeric values and some blank values.when I tried to convert into int values it fails.

View 7 Replies View Related

ActiveX In SSIS

Nov 19, 2007

I migrated the DTS from 2000, and the migrated SSIS which includes ActiveX script is 11KB, takes 00:00.125 running. I rewrote the SSIS using some new features provided in BIDS, and the new package is 50KB, takes 00:00:6.016 running. Is that normal or maybe because of the efficiency of my code?

thanks.

View 1 Replies View Related

Cast/Convert Mmddyy In String To New DB_DATETIMESTAMP Column In Derived Column Transformation

Mar 5, 2007

Hi,
I have dates in "mmddyy" format coming from the sources and they are older dates of mid 80s like 082580 for instance.

When I cast it this way (DT_DBTIMESTAMP) Source_Date , It says ok but throws a runtime error.

When I hardcode a date in same format, (DT_DBTIMESTAMP) "082580" , It becomes red (an indication of syntax error) . Please note that we use double quotes in expressions in Derived Column Transformation; So an anticipation that using double quotes over single ones would be the syntax problem would be wrong.



Any help in this will sincerely be appreciated.


Thanks

View 7 Replies View Related

SSiS ActiveX Conversion

Apr 8, 2008

Can you assist me with converting the code below to VB ?

Function Main()
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open "C:FTPOUTGOINGFTP_MarkOff.xls",,,,""
objExcel.Workbooks(1).SaveAs "C:FTPOUTGOINGFTPMarkoff.xls",,"password"
objExcel.Workbooks.Close
Set objExcel = Nothing
Main = DTSTaskExecResult_Success
End Function

View 6 Replies View Related

ActiveX Transformations Gone From SSIS?

May 29, 2007

In good old fashioned DTS there was the ability to perform custom transformations using activeX / vbscripty type language - does this still exist or are we stuck with the derived column editor?

View 3 Replies View Related

ActiveX Script Task - SSIS

Apr 3, 2006

Within a SQL 2000 DTS Package I have an ActiveX Script that would go within my transform tasks and update the queries by concatenating a "Where" clause with a date from a database table. This way I could keep track of when the last time I updated the table so that I could only bring down the rows since the last run. How can this be done within SSIS? I've been looking and I'm getting confused. Any help would be greatly appreciated.

View 2 Replies View Related

SSIS ActiveX Script Will NOT Error

Oct 26, 2006

My ActiveX code wrote:
Function Main()
msgbox "Hello" & DTSTaskExecResult_Failure & DTSTaskExecResult_Success
Main = DTSTaskExecResult_Failure
End Function


However - it displays "Hello10" - but SSIS will not throw an error - it executes successfully.
Any ideas?

View 5 Replies View Related

Activex Script Not Working After Migrating To SSIS

Jan 3, 2008

Hi,
In my script 'm using
Set oPkg = DTSGlobalVariables.Parent
Set oBeginStep = oPkg.Steps("DTSStep_DTSExecuteSQLTask_1")

I guess becoz of using DTSGlobalVariables.Parent in activex,the script is not working.
Can anyone please suggest a solution to run it in SSIS.


Thanks in Advance

View 3 Replies View Related

Error In While Execting ActiveX Scrip In SSIS

Nov 30, 2007

HI Experts,
I am having 2 severs (SQL2000 & SQL2005), there is already one DTS package in SQL 2000, now i have migrated DTS package to SSIS package. Now the problem is DTS package is having ActiveX script and it was executing perfectly in 2000 server but after migrated to 2005 server if i am executing the coverted SSIS package it is giving one error and the error is displaying here.

Error 1 Validation error. DTSTask_DTSDataPumpTask_1: OLE DB Destination [181]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Microsoft OLE DB Provider for SQL Server Copy" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. SearsCDCC_Transfer (1).dtsx 0 0

and i am also displaying the ACtiveX code as well and here oma11pngrdb02 is 2000 server and sant01pngrdb is 2005 server.

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Dim gsErrorFile
gsErrorFile = "\oma11pngrdb02App_Data_ReportingSearserrors2.txt"

Function Main()
Main = DTSTaskExecResult_Success
set objftp = CreateObject("ftpx.aspftp")
objftp.sServerName = "10.1.3.175"
objftp.sUserID = "COS.FTP"
objftp.sPassword = "SENDFILE"

if objftp.bConnect then
dim fname, lfname

fname = "$IOMH04.PRDFFTAP.ST462330"
lfname = "\oma11pngrdb02App_Data_ReportingSearscdccfile.txt"
If objFTP.bGetFile (fname, lfname ) then
Main = DTSTaskExecResult_Success
Else
logError("Error getting file: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure
End If
Else
logError("Error connecting: " & objFTP.sErrorDesc)
Main = DTSTaskExecResult_Failure

end if
End Function

Function logError(sErrorMsg)
Dim objErrorFile, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objErrorFile = objFSO.OpenTextFile(gsErrorFile, 2,True)
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.writeLine FormatDateTime(Now(),vbShortdate) & " " & FormatDateTime(Now(),vbShorttime)
objErrorFile.writeLine sErrorMsg
objErrorFile.writeLine "Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! Error!! "
objErrorFile.close
Set objErrorFile = Nothing
Set objFSO = Nothing
End Function


Can any one give me the solution as early as possible, and your help is soo Appreciable

View 4 Replies View Related

Outputting Status To Job Log From SSIS ActiveX Component

Apr 29, 2008



I have an ActiveX component in my SSIS package, and it is written in VB. Something is going wrong, and I'm not sure what. I works fine when run from Visual Studio, but when I move it to our server and try to run it from a job there, it fails. I'd like to know WHERE in the component it is failing, so I'd like to send output to something as it goes along, so I can see how far it is getting.

How do I send text to an output or log file?

I can't use MsgBox, because, of course, when it runs as a job, it is putting that message box up on the server, where there is no-one to respond to it, so it hangs. I'm in the process of converting it from a DTS to SSIS, and it does have several instances of MsgBox now. And it's locking up -- on one of them.

I have logging turned on for the job step, and it is writing to a dbo.sysdtslog90 table, but all it tells me is that it is starting that ActiveX script task.


What can I replace the MsgBox with, so that it outputs somewhere to a file? Is there a simple command, like WScript.Echo or Console.WriteLine (neither of which I can get to work)?

Thank you for any help you can provide.

View 7 Replies View Related

DTS To SSIS Conversion (ActiveX Script Has Compilation Errors)

Oct 12, 2015

I am re-writing old DTS packages(from sql 2005) to convert them to SSIS packages(sql 2014) and in one of the script task, the old activex script does not run.

The script is :

'************************
' Visual Basic ActiveX Script
'************************
Function Main()
mydate = now()
yrs = ""
mth = ""
mth = Month(mydate) - 1
yrs = Right(Year(mydate), 4)
If Month(mydate) = 1 Then mth = "12"

[code].....

Not sure how to proceed forward? I am quite new to package migration

View 0 Replies View Related

Integration Services :: DTS ActiveX Script To SSIS Conversion

Oct 13, 2015

I am re-writing old DTS packages(from sql 2005) to convert them to SSIS packages(sql 2014) and in one of the script task, the old activex script does not run.

The script is :

'************************
'  Visual Basic ActiveX Script
'************************
Function Main()
    mydate = now()
    yrs = ""
    mth = ""
    mth = Month(mydate) - 1

[Code] ...

Not sure how to proceed forward? What is the SSIS counterpart of above script, step by step?

View 2 Replies View Related

About ActiveX Script Error In Ssis Package In SQL Server 2005

Feb 27, 2007

when i run activex Script it's shows this error

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438

View 2 Replies View Related

How To Retrieve Global Variables In An ActiveX Script Task Using VBScript In SSIS

Oct 27, 2006

I need to retrieve the Global Variables set in my package configuration file within an ActiveX Script Task within an SSIS package. In DTS, I could access the Global Variables to execute a SQLXMLBulkLoad for the following statement:

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

Function Main()

Response.Expires=-1

set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString =
"provider=SQLOLEDB.1;server=ABC123;database=MyDB;Trusted_Connection=Yes;"
objBL.KeepIdentity = False
objBL.CheckConstraints = False

objBL.Execute DTSGlobalVariables("gv_XSDSchemaFile").Value, DTSGlobalVariables("gv_XMLFullPath").Value

Main = DTSTaskExecResult_Success
set objBL=Nothing

End Function
=========================================

I have tried using the Script Task to write this in VB.NET, however the MSXML4.0 is not exposed within the limited object model of the Script Task Designer. I have written a Data Flow Object using the XML Source, however it requires quite a bit of effort to have the Data Flow Component parse the XML (with 10 hierarchical nodes), transform each and provide a SQL Server Destination. This works, however the XML Source Component requires a hardcoded reference to the XSD Schema file and does not allow for a Global Variable to used. (They do provide this functionality for the XML file source though).

My requirement is to allow for the Global Variable to be passed for the Schema file at runtime. The only way I can think of is to recreate what I was doing in DTS where I could simply pull in the XML and XSD Global Variables and execute the SQLXMLBulkLoad in VB Script.

Any ideas on how to write this in VBScript within the ActiveX Script Task in SSIS?...

Michael

View 1 Replies View Related

ActiveX Script In A SSIS Package - Calling An FSO To Create/manipulate Files

Jul 3, 2007

I have a SQL2000 DTS package that executes vbscript to loop through a recordset which:

- runs a stored procedure and populated tables

- builds a recordset from the populated tables to write records to an Excel file

- writes status to text files with either the error or success notices



I use FSO to set up the success and error files, but the scheduled job in SQL2005 which calls the SSIS package returns the following error:

"Retrieving the file name for a component failed with error code 0x0015F74C"



I can successullly run this (vbscript) in both the SSIS package via the BI Development Studio and in MS Access (exactly the same code in both) - but not as a SSIS package called in a scheduled job in SQL2005.



I am at an impasse with this ... any and ALL assistance would be GREATLY appreciated.



TIA,



Bob

View 1 Replies View Related

Help In Derived Column Transformation

Nov 3, 2007

Hi All

I m designing SSIS having Data Flow as

Flat File > Derived Column Transformation > Destination Table

but while transfering record from text file to table i need some logic here

my text file is
"ID"|"Name"
1012|"10AA"
1013|"10BB"

logic is 10 should be replace by variable VID = 98

I defined this veriable as int

My ID column in database is int and Name column is varchar(50)

I try here expression like
ID != 98 ? @[User::VID] : ID
it work fine

but for varchar column I am not able to do
I got error when i write expression
SUBSTRING(Name,1,2) != "98" ? [DT_STR, 50, 1252] "(@[User::VID])" + rest of value of column : [Name]

my final output in table should be like
ID..Name
98..98AA
98..98BB


Please help me out

T.I.A

View 2 Replies View Related

Derivied Column Transformation

Jan 11, 2008

Hi,

Just a quick one - Is it possible to perform two transformations on one field eg:

If the field contains nothing make it zero

([Column 154] == "") ? "0" : [Column 154]

If the field is 0 make it 01/01/1900

[Column 283] == "0" ? (dt_dbtimestamp)"01/01/1900" : (dt_dbtimestamp)[Column 283]

How would i combine the two?

Many Thanks,
Slash

View 5 Replies View Related

Help Me With Derived Column Transformation

Mar 14, 2007

I have this expression
(Registered_Units == Limited_Units) ? 0 : (Painted_Units / (Registered_Units - Limited_Units)) * 100)

It gives me 0.00, although those 3 columns have values.

if I cast it like this

(Registered_Units == Limited_Units) ? 0 : ((((DT_DECIMAL,2)Painted_Units) / ((DT_DECIMAL,2) (Registered_Units - Limited_Units))) * 100)

It gives me correct answer in whole number but .00 after decimal.


Any clue how to fix it ?

View 3 Replies View Related

Derived Column Transformation

Sep 20, 2007

Hello.
I am using Derived Column transformation for calculating the age of individual and then adding the column to my final destination. In SQL, the DOB is varchar(50) and the output column I am creating should be Integer.
Here is the expression I am using for calculating the age:
(DATEDIFF("DAY",(DT_DBTIMESTAMP)TRIM(DOB),(DT_DBTIMESTAMP)TRIM([Service Date])) / 365.25)

In SQL, I have no problems getting the age of a person, but I am having difficulties using Derived Column Transformation.
I get the following error when executing my package:

Error: 0xC0049067 at Data Flow Task, Derived Column [2086]: An error occurred while evaluating the function.Error: 0xC0209029 at Data Flow Task, Derived Column [2086]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (2086)" failed because error code 0xC0049067 occurred, and the error row disposition on "output column "_AGE" (2877)" 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.

Any assistnace would be greatly appreciated.

View 11 Replies View Related

Import Column Transformation

Oct 20, 2006

I have a SQL Server table that has a "Text" type column. RTF files are stored in this column. On a monthly basis, new or updated RTF files are dropped into a shared folder. I need to upload these into the SQL Server table. Reviewing some of the entries in this forum, I know I probably should be using the Import Column Transformation, but for the last week I can't get it to work successfully.

Another column in the table contains the unique file name(varchar). At runtime the user inputs the fully qualified path to the RTF files which I store in an SSIS variable. Within the package I use a Derived Column Transformation to concatenate these two elements and then pass them as input to the Import Column. I'm expecting the RTF file to come out as output.

How does the Import Column match up the file with the proper table row? Do I need to provide the looping mechanism or does the Import Column handle that?

I've been searching for a working example with no luck. Can someone provide or point to a good sample?

Thanks.

View 3 Replies View Related

Decrypting Column In Transformation

Oct 2, 2007

I have a OLE DB Source that has a varbinary column of encrypted data. The sorce table is on a hosted SQL Server database where I cannot install a asymetric key. The SSIS package is running on a local SQL Server box that does have the asymetric key installed and working. Can you recommend the best way to transform this column is SSIS using a connection to the local SQL Server box that has the installed public key?

select @encryptedstuff = 0xA19B9F77E5319283311F325D6D29265721A8451148DCD33FA37DF34737C29690BEE35F99972AD7D40F31E8EFE81A30A9B830ABCD1B6BE386462071D67198CE6E52E15FAD84CA62AA35F847948F40B3F8CF4F50D5F2A14D0CCD9FF990F3C1701784F0A8771B93D329144528455937511EF2691BB42A0D4505AC8F9296BF6700801ECE05B102F0CC6DAF204F4EA4C8317AAEDDEC7D83BCD78BA1718C9E55C840AEA280D8BC9CC58D8E05AAE0AE5AC4B7DA0CE7D5DF1DDCAEEA1FB7431ACDF20BBDB2F29ECD744FDEE3D688920E56BEF5508D8224D0DE6AAE8FF944E389D376138885FC4300AFD281C8CC677CDA1762B56D8D1363C7878EAA7A65FC10B8AE168E75

SELECT CONVERT(nvarchar(50),DecryptByAsymKey(AsymKey_ID('rsakey'), REVERSE(@encryptedstuff), N'P4ssw0rd'))



Each row of the OLE DB Source contains a varbinary column with the ecrypted data. I need to to transform that one column and end up with a new record set that contains all of the columns from the OLE DB Source plus a new decrypted column.

Thanks,

Steve

View 4 Replies View Related

Derived Column Transformation

Oct 15, 2007

I would like to transform trans_type

if transtype =1 then Y
if trasntype = 2 then N
if transtype = 3 then U

What is the correct syntax to do this in derived column editor?

View 8 Replies View Related

SSIS Data Transformation

Jan 31, 2008

I have begun using SSIS and I am a little taken aback by the complexity of it especially since I just want to do a simple data transformation such as in DTS.
Are there any tutorials for data transformation for SSIS on the web/this forum and what if I want to do a simple transformation from Access to SQL Server?

View 1 Replies View Related

Transformation Script In SSIS

Sep 10, 2007

Hey all - got a problem that seems like it would be simple (and probably is : )

I'm importing a csv file into a SQL 2005 table and would like to add 2 columns that exist in the table but not in the csv file. I need these 2 columns to contain the current month and year (columns are named CM and CY respectively). How do I go about adding this data to each row during the transformation? A derived column task? Script task? None of these seem to be able to do this for me.

Here's a portion of the transformation script I was using to accomplish this when we were using SQL 2000 DTS jobs:


'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************

' Copy each source column to the destination column
Function Main()
DTSDestination("CM") = Month(Now)
DTSDestination("CY") = Year(Now)
DTSDestination("Comments") = DTSSource("Col031")
DTSDestination("Manufacturer") = DTSSource("Col030")
DTSDestination("Model") = DTSSource("Col029")
DTSDestination("Last Check-in Date") = DTSSource("Col028")
Main = DTSTransformStat_OK
End Function
***********************************************************
Hopefully this question isnt answered somewhere else, but I did a quick search and came up with nothing. I've actually tried to utilize the script component and the "Row" object, but the only properties I'm given with that are the ones from the source data.

thanks in advance!


"Lord, beer me strength."

View 2 Replies View Related

Inner Join Transformation In SSIS

Jul 12, 2006

hi all,

My issue is the inner join transformation in SSIS.
See i ll explain my problem clearly now.....

Actually i m just checkin if the inner join performed in business intelligence studio usin the inner join transformation and the inner join performed in the management studio using queries are same. Logically both the resultset should match isn't but in my case it is not so. It is very important for me to figure out where the problem is because i m goin to use lotsa inner join transformations in my current project.

I ll appreciate if someone can help me to figure out this problem. May be you can also tell me the detailed steps in adding the inner join transformation and also how it works.

Thank you,

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved