Showing posts with label choosing. Show all posts
Showing posts with label choosing. Show all posts

Friday, March 23, 2012

Package runs fine in Debug.. fails outside of debug

I created a package that runs fine while in debug... but when I run outside of debug (just choosing Debug.. Start without debugging) I get an error of:

Message: The task "Formulate SQL Query and Destination" cannot run on this edition of Integration Services. It requires a higher level edition.

I am on SP1 on my workstation and the only SSIS server I have. I am not doing anything fancy in my script.. I have created other packages and ran outside of debug mode without issue. I did uninstall SQL2005 and SSIS from my workstation as it was eating up too many resources.

The script I am running is (removed some of the SQL etc to shorten it):

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Imports System.IO

Public Class ScriptMain

Public Sub Main()

' Create the SQL

Dim SQL As String

SQL += "SELECT "

SQL += " -- Lots of stuff"

SQL += "FROM "

SQL += CStr(Dts.Variables("gvSourceTableName").Value) & " "

SQL += "WHERE "

SQL += " stuff = '" & CStr(Dts.Variables("gvCurrentSymbol").Value) & "' "

SQL += "ORDER BY date"

Dts.Variables("lvSQLQuery").Value = SQL

' MsgBox(CStr(Dts.Variables("lvSQLQuery").Value))

' Create the filename

Dim Dir As String

Dim FileName As String

Dim FullFileName As String

Dir = CStr(Dts.Variables("gvDestinationRoot").Value) & "\" & CStr(Dts.Variables("gvRunID").Value) & "\"

FileName = CStr(Dts.Variables("gvCurrentSymbol").Value) & "--.txt"

FullFileName = Dir & FileName

If Not Directory.Exists(Dir) Then

Directory.CreateDirectory(Dir)

End If

Dts.Variables("gvDestinationFile").Value = FullFileName

' MsgBox(CStr(Dts.Variables("gvDestinationFile").Value))

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

FYI.. tried reinstalling 2005 SP1 on my workstation... still receiving the error message.|||This looks familiar. Try going to the SQL Server 2005 installer and install Integration Services on your local machine. The messages I've received that were similiar to this were solved by that. I believe you have the designer installed on your machine, but not the integration services engine. Good luck.|||Thanks, when I uninstalled SQL 2005 I must have took the SSIS stuff with it.. reinstalled SSIS server components and patch and works great now.|||

Chris Honcoop wrote:

Thanks, when I uninstalled SQL 2005 I must have took the SSIS stuff with it.. reinstalled SSIS server components and patch and works great now.

You're welcome. You know, you'd think that a better error message could be raised... maybe something that actually says you don't have SSIS installed... oh well.

Package Name Sorting

SISS packages do not sort by name in BIDS and they do not sort by name when deployed to a SSIS server if choosing to store in sql server. The packages do sort by name when stored in file system. We have more than 100 packages on the server and just could not keep up with the locations. The only thing I can do is to create many folders. But even folders have no way to be sorted. Do I miss something here?

Try this: http://solidqualitylearning.com/blogs/erik/archive/2005/08/08/1269.aspx

Or this: http://www.sqldbatips.com/showarticle.asp?ID=78 (Jasper has updated it to make it work in BIDS as well as SSMS)

-Jamie

|||

Jamie,

Thanks for your reply. I tried both solutions in BIDS. The first one works, but it seems too much work. The second one would be a good choice if I could make it work.

When I try to sort the packages in a project folder called 'Test Packages', I continue to get the follow error message in the output window "Access to the path ....Visual Studio 2005\Projects\Integration Services Project\Test Packages\Test Packages.dtproj.old' is denied.' I understand the program is trying to create a new sorted dtpproj file to replace the old one. Do you know what I need to do to make this work? Since the projected is in the source safe, does that make the difference?

Thanks.

Jane

|||

Sorry, I've never used it. Try asking Jasper - I'm sure he won't mind helping out.

-Jamie

|||It is probably a read-only file, and perhaps caused by some form of source control. Jasper makes the source code available, so feel free to come up with a better method.