Solved

migrating SSIS from 2005 to 2008

Posted on 2012-12-28
7
195 Views
Last Modified: 2013-02-08
I have script task in a package. It works fine on SQL2005. It doesn't work on SQL 2008. It does not give error message, just can not find the file.This is the code:

Imports System
Imports System.Data
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

      Public Sub Main()

        If System.IO.File.Exists(Dts.Variables("FilePath").Value.ToString()) Then
            Dts.Variables("FileExists").Value = True
        Else
            Dts.Variables("FileExists").Value = False
        End If
        Dts.TaskResult = Dts.Results.Success
      
End Sub

End Class
Any ideas what could be the problem ?

Thank you
0
Comment
Question by:crcsupport
7 Comments
 
LVL 8

Assisted Solution

by:venk_r
venk_r earned 200 total points
ID: 38727436
I think you might need to download DTS Run time librabries from microsoft for backward compatibility as sql 2008 doesnt support it anymore.

http://msdn.microsoft.com/en-us/library/ms143755(v=sql.105).aspx
0
 
LVL 25

Accepted Solution

by:
TempDBA earned 100 total points
ID: 38729711
What happens when you run it manually?
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 100 total points
ID: 38730064
venk_r,

The author is using SSIS not DTS.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 8

Assisted Solution

by:venk_r
venk_r earned 200 total points
ID: 38730151
asperkins,
Im sorry . I missed that .

crcsupport,
Please try using
namespace System.IO
and see if it works.
0
 
LVL 21

Assisted Solution

by:Alpesh Patel
Alpesh Patel earned 100 total points
ID: 38734058
For that Just Open script task and Script editor and close it. It will resolve your issue.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38868022
Please do.  There is nothing relevant here at all.

Anthony
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL 2008 R2 syntax 11 36
TSQL - How to declare table name 26 43
Text file into sql server 5 34
SQL Database Restore 2008 R2 1 14
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question