Calling .net Assembly In DTS Package
Sep 26, 2006
Hi everyone,
I want to call the .net assembly(DLL) in a DTS package. Can anyone help me as to how to achieve this. I read numerous articles on internet, but couldn't find the one that can help me with this problem.
Any help or directing me to an article will be greatly appreciated.
Thanks.
Vinki
View 9 Replies
ADVERTISEMENT
Dec 14, 2007
Hi,
I have got a simple C# assembly which call a ASP.net web service and executes a webmethod, now i want to call this assembly from sql server 2005 within the sql server function. can any body let me know how to do it.
Thanks
View 1 Replies
View Related
May 15, 2008
Hi everyone,
i am trying to register a assembly in SSAS which i actually did fine as per BOL by right clicking on assembly folder and pointing to the dll file. And then i tried to call the function from management studio using Call command and Select statement...both outputs a error which looks like
Executing the query ...
Query (1, 6) The '[TestKPIMeasures].[KPIMeasures].[getKPIData]' function does not exist.
Execution complete
Let me explain my scenario so that you ll get a better picture. I have a cube named 'FourH KPI values' and i have registerd the below as dll file.
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.AnalysisServices.AdomdClient;
using System.Reflection;
using System.Reflection.Emit;
namespace TestKPIMeasures
{
public class KPIMeasures
{
public static System.Data.DataTable getKPIData(String Connstring, String ExecCommand, String kpimeasures)
{
CellSet cellset;
//DataSet ds = new DataSet("KpiDataSet");
DataTable dt = new DataTable("KpiMeasures");
// ds.Tables.Add("KpiMeasures");
try
{
//Create AdomdConnection object
AdomdConnection asConnection = new AdomdConnection(Connstring);
asConnection.Open();
String[] keyindicators = kpimeasures.Split(',');
string commandText = ExecCommand;
AdomdCommand command = new AdomdCommand(commandText, asConnection);
DataColumn column = new DataColumn();
column = new DataColumn("KPI Name");
column.DataType = typeof(string);
dt.Columns.Add(column);
column = new DataColumn("KPI value");
column.DataType = typeof(string);
dt.Columns.Add(column);
column = new DataColumn("KPI goal");
column.DataType = typeof(string);
dt.Columns.Add(column);
column = new DataColumn("KPI status"); column.DataType = typeof(string);
dt.Columns.Add(column);
foreach (string item in keyindicators)
{
command.Parameters.Clear();
command.Parameters.Add(new AdomdParameter("Value", item));
command.Parameters.Add(new AdomdParameter("Goal", item));
command.Parameters.Add(new AdomdParameter("Status", item));
command.Parameters.Add(new AdomdParameter("Trend", item));
cellset = command.ExecuteCellSet();
DataRow row = dt.NewRow();
row["KPI NamE"] = item;
row["KPI value"] = cellset.Cells[0].FormattedValue;
row["KPI goal"] = cellset.Cells[1].FormattedValue;
row["KPI status"] = cellset.Cells[2].FormattedValue;
dt.Rows.Add(row);
}
}
catch (Exception ex)
{
throw ex;
}
return dt;
}
}
}
Now i am trying to call the assembly from management studio,
CALL TestKPIMeasures.KPIMeasures.getKPIData("Provider=MSOLAP.3;DataSource=D64ETL01;Initial Catalog=FourH KPI values", "SELECT{KPIValue(@Value), KPIGoal(@Goal), KPIStatus(@Status)} ON COLUMNS FROM [Key Performance Indicators]", "Test measure,Test measure 2,KPI 3")
also tried Select statment...still no luck
Can anyone tell me what i am missing out.......Thanks in advance
View 8 Replies
View Related
Jul 26, 2006
Hi,
I create a dll assembly with the strong name in VB.Net environment.
Created assembly is registered also.
SQL Server 2005 configuraton level is set at "80"
I want to call that assembly from stored procedure with the database config level at "80"
But when i execute the stored proecure i get the following error
Error Source: "ODSOLE Extended Procedure"
Description: "Invalid Class String"
My Code in VB.Net is given below:
Imports System
Imports System.Reflection
Imports System.Globalization
Imports System.IO
Imports System.data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports Microsoft.SqlServer.Server
Imports Microsoft.VisualBasic
Imports System.Diagnostics
Imports GreatDataAccess
Namespace Test
Public Class clsTest
Public Shared Sub GenTest()
''''............ some code is here
End Sub
End Class
End Namespace
Stored Procedure
CREATE PROCEDURE [dbo].[PPGenerateFile]
AS
BEGIN
Declare @retVal INT
Declare @comHandler INT
declare @errorSource nvarchar(500)
declare @errorDescription nvarchar(500)
declare @retString nvarchar(100)
-- Intialize the COM component
EXEC @retVal = sp_OACreate Test.clsTest, @comHandler OUTPUT
IF(@retVal <> 0)
BEGIN
--Trap errors if any
EXEC sp_OAGetErrorInfo @comHandler,@errorSource OUTPUT, @errorDescription OUTPUT
SELECT [error source] = @errorsource, [Description] = @errordescription
Return
END
-- Call a method into the component
EXEC @retVal = sp_OAMethod @comHandler,'GenTest()',@retString
IF (@retVal <>0 )
BEGIN
EXEC sp_OAGetErrorInfo @comHandler,@errorSource OUTPUT, @errorDescription OUTPUT
SELECT [error source] = @errorsource, [Description] = @errordescription
Return
END
select @retString
END
Please Help me to solve this problem.
View 21 Replies
View Related
Apr 17, 2008
Hi,
I am trying to access a .Net assembly in script component, which internally uses Microsoft Enterpise library dll's.
The problem I am facing is when I copy the config sections needed for the Enterprise library from web.config to dtsdebughost.exe.config file and run the package, It ends in failure with below message
"Error: The script files failed to load."
My dtsdebughost.exe.config looks like below:
Code Snippet
<configuration>
<startup>
<requiredRuntime version="v2.0.50727"/>
</startup>
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add fileName="LogMedtrack-Error.log" rollSizeKB="5000" timeStampPattern="dd-MMM-yyyy"
rollFileExistsBehavior="Overwrite" rollInterval="Day" formatter="Default Formatter"
header="----------------------------------------" footer="----------------------------------------"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Rolling Flat File Trace Listener" />
</listeners>
<formatters>
<add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}
)}"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Default Formatter" />
</formatters>
<logFilters>
<add categoryFilterMode="AllowAllExceptDenied" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.CategoryFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Category Filter" />
<add minimumPriority="0" maximumPriority="2147483647" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.PriorityFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Priority Filter" />
</logFilters>
<categorySources>
<add switchValue="All" name="Tracing">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Rolling Flat File Trace Listener" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings" />
</specialSources>
</loggingConfiguration>
<exceptionHandling>
<exceptionPolicies>
<add name="Business Policy">
<exceptionTypes>
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
postHandlingAction="NotifyRethrow" name="Exception">
<exceptionHandlers>
<add logCategory="Tracing" eventId="100" severity="Error" title="Agility Application Log."
formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
name="Logging Handler" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
</exceptionPolicies>
</exceptionHandling>
</configuration>
Please let me konw, If there is anything wrong I am doing or is there any other way to handle the situation
Regards,
Kalyan
View 1 Replies
View Related
Aug 25, 2015
I have a SSRS 2012 report which references a custom c# assembly.  This report exists in multiple environments (alpha, beta and  production ) which are each associated with different data sources.
Is there a way for the assembly to determine the datasource used by the calling report so it can also connect to it?
View 2 Replies
View Related
Apr 20, 2007
I created a CLR function based on following VB code:
Imports Microsoft.SqlServer.Server
Public Partial Class SqlClrVB
<Microsoft.SqlServer.Server.SqlFunction()> _
Public Shared Function GetTotalPhysicalMemory() As Integer
GetTotalPhysicalMemory = My.Computer.Info.TotalPhysicalMemory
End Function
End Class
The VB code was complied into a DLL called totalmem.dll and call following TSQL to map it into a SQL function:
create assembly totalmem from '!WORKINGDIR! otalmem.dll'
WITH PERMISSION_SET=UNSAFE
go
create function fnGetTotalMem()
returns int
as external name totalmem.SqlClrVB.GetTotalPhysicalMemory
go
When I call this function, it returned following error:
select dbo.fnGetTotalMem()
Msg 6522, Level 16, State 2, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'fnGetTotalMem':
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException:
at Microsoft.VisualBasic.MyServices.Internal.ContextValue`1.get_Value()
at My.MyProject.ThreadSafeObjectProvider`1.get_GetInstance()
at SqlClrVB.GetTotalPhysicalMemory()
.
Anyone knows why I'm hitting this error? I didn't reference any System.Web interface why it needs to load System.Web assembly? The same code runs OK if I compile it as a separate VB application out side of SQL Server 2005.
Thanks much,
Zhiqiang
View 2 Replies
View Related
Mar 6, 2008
I have a SSIS job, one of the last steps it performs is to execute a SQL 2000 DTS package. This has to be done as a SQL 2000 DTS package as it is performing rebuilds of SQL 2000 Analysis Services dimensions and cubes. We've found that when the DTS fails the SSIS job is happily completing showing as a success, we would prefer to know it went wrong.
As far as I'm aware SSIS merely starts the DTS off and doesn't care about it's result. I've taken a look in to turning on the logging for the execute DTS package and thought that the ExecuteDTS80PackageTaskTaskResult would give me the answer I need...but is merely written to the log not available as an event-handler. It also looks like it is not safe to put a SQL task in as the next item to go look at the SQL 2000 system tables to look at the log for the DTS package as the SSIS documentation warns that the DTS package can continue to run after the execute DTS package task has ended.
Ideally I want any error raised within the DTS package to cascade up to be an error in the SSIS job, I can then handle it appropriately. I cannot find a way to do this. Is there a way?
If not, can anyone suggest how in the remainder of the SSIS tasks I can be sure that the DTS has completed before I start any other tasks that will check for the SQL 2000 log of its execution?
View 5 Replies
View Related
Jul 14, 2006
I need to pass variables from the parent package to the child package. I got this to work in a small test case. But in the actual project, I get an error when I try to do that. The parent package's log has this error :
Error: Error 0xC0012050 whike loading package file "c:.......". Package failed validation from the ExecutePackage task. The package cannot run..
There's nothing more to go on here in the log.
Any ideas ?
-chiraj
View 4 Replies
View Related
Feb 22, 2008
I work with February CTP of SqlServer 2008.
I have an Assembly with several UDTs inside. Version of assembly is 1.0.*
I use CREATE ASSEMBLY statement to register this assembly, and it runs without any errors. Then I rebuild CLR solution without doing any changes in source code. In that case the only difference between new and old assemblies is version (difference in fourth part of version).
Then I try to update assembly in SqlServer. I use
ALTER ASSEMBLY <name>
FROM <path>
WITH PERMISSION_SET = UNSAFE, UNCHECKED DATA
statement for this. Statement runs with error:
Msg 6509An error occurred while gathering metadata from assembly €˜<Assembly name>€™ with HRESULT 0x1.
I found the list of condition for ALTER ASSEMBLY in MSDN:
ALTER ASSEMBLY statement cannot be used to change the following:
· The signatures of CLR functions, aggregate functions, stored procedures, and triggers in an instance of SQL Server that reference the assembly. ALTER ASSEMBLY fails when SQL Server cannot rebind .NET Framework database objects in SQL Server with the new version of the assembly.
· The signatures of methods in the assembly that are called from other assemblies.
· The list of assemblies that depend on the assembly, as referenced in the DependentList property of the assembly.
· The indexability of a method, unless there are no indexes or persisted computed columns depending on that method, either directly or indirectly.
· The FillRow method name attribute for CLR table-valued functions.
· The Accumulate and Terminate method signature for user-defined aggregates.
· System assemblies.
· Assembly ownership. Use ALTER AUTHORIZATION (Transact-SQL) instead.
Additionally, for assemblies that implement user-defined types, ALTER ASSEMBLY can be used for making only the following changes:
· Modifying public methods of the user-defined type class, as long as signatures or attributes are not changed.
· Adding new public methods.
· Modifying private methods in any way.
But I haven€™t done any changes in source code, so new version of assembly satisfies all this conditions.
What could be the reason for such behavior?
P.S. I€™ve got the same error, if I add or change any method in assembly before rebuilding.
View 9 Replies
View Related
Jan 8, 2007
hi,
i'm trying to call a dts package from vb.net.
i got 2 examples which both don't work.
first one gives me a [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied error.
source code:Dim serverName As String = "SERVERNAME"Dim oPackage As New DTS.Package()Dim oStep As DTS.StepDim pVarPersistStgOfHost As Object = Nothing
oPackage.LoadFromSQLServer(serverName, "USERID", "PASSWORD", DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _ "DTSPASSWORD", Nothing, Nothing, "DTSPACKAGENAME", pVarPersistStgOfHost)
For Each oStep In oPackage.Steps oStep.ExecuteInMainThread = TrueNext
oPackage.Execute()
Dim err As LongDim source, description, message As StringFor Each oStep In oPackage.StepsIf oStep.ExecutionResult = DTSStepExecResult.DTSStepExecResult_Failure Then oStep.GetExecutionErrorInfo(err, source, description) message = String.Format("ErrorCode: {0}, Source: {1}, Description: {2}", err.ToString(), source, description)Else message = "Success"End IfNext
oPackage.UnInitialize()oPackage = Nothing
second example tries to create a dts package dynamically. this time i get the error that the CustomTask can not be casted, somehting about the QueryInterface.
source code:Dim oPackage As New Package2()Dim oConnection As Connection2Dim oStep As Step2Dim oTask As TaskDim oCustomTask As BulkInsertTask
oConnection = oPackage.Connections.[New]("SQLOLEDB")oStep = oPackage.Steps.[New]()oTask = oPackage.Tasks.[New]("DTSBulkInsertTask")oCustomTask = CType(oTask.CustomTask, BulkInsertTask) <-- error
With oConnection .Catalog = "CATALOG" .DataSource = "SERVERNAME" .ID = 1 .UseTrustedConnection = True .UserID = "USERID" .Password = "PASSWORD"End With
oPackage.Connections.Add(oConnection)oConnection = Nothing
With oStep .Name = "InsertGemal" .ExecuteInMainThread = TrueEnd With
With oCustomTask .Name = "InsertGemal" .DataFile = "D:ImportGemal.dat" .ConnectionID = 1 .DestinationTableName = "Gemal" .FieldTerminator = ";" .RowTerminator = "
"End With
oStep.TaskName = oCustomTask.Name
With oPackage .Steps.Add(oStep) .Tasks.Add(oTask) .FailOnError = TrueEnd With
oPackage.Execute()
oPackage.UnInitialize()oPackage = Nothing
any help highly appreciated!
t.i.a.,ratjetoes.
View 3 Replies
View Related
Aug 18, 2004
I'm new to using DTS packages and I'm running into a problem. Hopefully someone can help me out. I have an ASP.NET page that needs to call a DTS package. Everything seems to be working right up until I call opkg.Execute. The package seems to run but nothing happens. After further investigation I have found what looks like a permissions issue. this is the message I'm getting"
Error Number:
-2147467259 {Integer}
Error Description:
"The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data." {String}
This is obviously a permissions issue. I'm just not sure who the DTS package is running as and where to set the permissions.
Any ideas????
Thanks
View 1 Replies
View Related
Aug 31, 2001
How to do this?thanks :-)
View 1 Replies
View Related
Sep 15, 2000
Does anyone know the command that can be used to call a dts package directly from VB?
regards,
reshma
View 1 Replies
View Related
May 27, 2004
I have a DTS package created in a databasse and need to call that DTS package from a stored procedure.Is there a way that I can do it?
View 2 Replies
View Related
Mar 22, 2002
Hi all,
I want to call dts package from visual basic. The dts package will do a backup of the database.
I am not sure how this can be achieved.
Any help will be great
Thanks
View 1 Replies
View Related
Sep 14, 2007
I am working on a package that will sense a text file in a folder. From this text file I will be extracting the file name which will tell me what task I need to run. How can I create a package that, depending upon what the file name is, call a specific package. To be more clear, I will have 3 different flat files that is each in a standard form. Their names will be unique. To transform their data will require different ETL logic. I will be using a loop to constantly check to see if a file has been put into the directory. I just need to know how I can direct the input file to the proper ETL task.
View 3 Replies
View Related
Feb 15, 2008
Hello All
I have tried to execute SSIS Package using,
Using a Web Service or Remote Component to Run a Remote Package Programmaticallyas per following msdn example.
http://msdn2.microsoft.com/en-us/library/ms403355.aspx
my SSIS .dtsx file is on the Server having SQL Server & SSIS Installed. (Database Server)
and asp.net web service & web application is on another server, which is Application Server.
the .dtsx does simple process like executing existing Sql view from Database Server to the .csv file on the Application Server.
when I implemented the Code explained in msdn its works fine from my development machine.
but as soon as i tried to execute from running from the website, it gives following error.
The following exception occurred: Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.
I am sure this forums must have been answered already for the this kind of problem.
If anyone can guide me for the above problem, ASAP pls.
thanks
View 6 Replies
View Related
Aug 30, 2000
I have a DTS package written to import data from a txt file into a SQL Server 7.0 table
but before importing the data i need to delete the existing data from the table...
for this i need to use the stored procedure to delete data first...
how do i run the dts package from the stored procedure..does anyone know the command for this...
regards,
reshma
View 2 Replies
View Related
Nov 30, 2000
Can you call run an excel macro as part dts step. I would imagine it would be some active script, but am not sure.
Any Ideas ?.
I am running SQL 7.0 sp2, excel 97.
View 1 Replies
View Related
Sep 2, 2004
Hi All,
My name is kanishk. I am facing some issue in calling the DTS package from Visual Basic code.
The brief history of issue is :
We have a application which uses Ms-Access as front end and MS-Sql server 2000 as backend. Perviously we has MS-Access 97 version and MS-Sql 2000 .In this comination the DTS package was working fine.
Now We have changes the fornt end to MS-Access 2002. Here the DTS package is not working .
Can you please help me out to get the proper syntax to call the DTS package from VB code.
View 3 Replies
View Related
Jun 18, 2015
We had a scenario where we used to run the Process from front end thru application. on the back ground the the process call the SP & from there it calls the SSIS package then again to SP.
after SSIS package ran succesfully it will be updated on a table with sucess then call the SP & deletes the entry from the other table but in one scenario Package was success but the entry was not getting deleted as the process takes almost 2-3 hours loading 60 millions records. but the process was running in SQL 2008 but once we upgraded to SQL 2012 its not working for one application. its not returning any error as timeout also. we tried changing the server level setting for remote query time out also to 0 but no luck .
View 0 Replies
View Related
Apr 10, 2007
I am using the following code to run my SSIS package:
Package package = app.LoadFromSqlServer
("\EPSROI\dts_Client_Eligibility_Import", "SQL32", "username",
"password", null);
Variables vars = package.Variables;
vars["InputFile"].Value = txtInput.Text;
vars["OutputFile"].Value = txtOutput.Text;
vars["Client"].Value = cboClientName.SelectedValue.ToString();
vars["Chopper"].Value = Chopper;
DTSExecResult result = package.Execute();
It runs fine on my machine; however, on anyone elses machine "result" comes back as "failure". We have figured out that it is loading the package and variables fine but failing before the first step of the package. Does anyone know why this would be? Or how to fix it? I am totally stumped considering it works fine on my machine.
Thanks.
Danielle
View 3 Replies
View Related
Jan 17, 2008
am trying to execute a dtsx package using xp_cmdshell
when testing, this works fine
DECLARE @returncode int
EXEC @returncode = master..xp_cmdshell 'dtexec /f "C:WorkWarehouseDev.ETLLoadGroup_Daily.dtsx"'
PRINT @returncode
then change it to look at the live one
DECLARE @returncode int
EXEC @returncode = master..xp_cmdshell 'dtexec /f "C:WorkWarehouse.ETLLoadGroup_Daily.dtsx"'
PRINT @returncode
doesnt work - it tries to execute the WarehouseDev version
any ideas ??
n.b. didnt know if this should be in this forum or a t-sql forum - apologies if its in wrong place !!
View 4 Replies
View Related
Oct 3, 2007
Hello
I have a SSIS-Package stored in the SQL Server. This package works fine when i execute it from the SQL Server. But if I try to execute the package from a COM+-Application, nothing happens.
Here is my code snipped:
Public Function ExecutePackage €¦
Dim myPackage As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult
'----- Execute the package from SQL Server
myPackage = app.LoadFromSqlServer("\PackageName", "ServerInstance", Nothing, Nothing, Nothing)
pkgResults = myPackage.Execute()
€¦
End Function
In a Windows Forms Application I can execute the package with this code snipped succesfully. Therefor I think that the problem is my COM+-Application.
Can anybody help me?
Thank's
Jürgen Paulus
View 4 Replies
View Related
Jan 2, 2008
Can you call a SSIS package from Web services?
I would like to create a web services that can call a SSIS package ( generate a text file)..
If it is possible, Can someone show me code examples?
View 6 Replies
View Related
Feb 12, 2008
Hi All,
I'm trying to call a SSIS package as my data source for SQL reporting service but I keep getting the error "Cannot create a connection to data source 'DsSSIS'.
My DsSSIS consists of the following in the connection string.
="/file c:FarmBillTesting.dtsx /Set Package.Variables[User::FilterValue].Properties[Value];" & Parameters!FilterValue.Value.ToString()
I have tried everything that I know to make this work but I have been unable to do so. Any help from the group would be great.
Thanks
Ham
View 3 Replies
View Related
Sep 30, 2006
Hi,
I was looking at a previos thread in this very queston and the answers given to it, I tried a SSIS package that works fine on its own but on creating a new job and invoke it, the JOB fails ,it says its not able to locate the file specified,
I tried copying the package to the server machine wher am creating the job,but again the same error; and when i try to alter the protection level of the SSIS package to Server Storage its throwing an error like '' This protection level cant be applied to this destination,The system can't verify that the destination supports storage capacity. this error occurs when saving to XML."
I am using OLE DB Destination in the dataflow task of the SSIS package I ve created. Please guide whr am going wrong. Some detailed steps which has some screenshots depicting step by step procedure of creating a JOB that calls a SSIS package will be highly helpful
Thanks in Advance,
View 4 Replies
View Related
Dec 7, 2005
I have written package which goes through a directory and load all the files with certain criteria. I have set the package to run using package configuration. It does work fine.
View 4 Replies
View Related
Oct 26, 2007
hi,
when calling an SSIS package from a trigger causes it to run for ever. Know why??
In Detail;
Consider that there are two tables with the same schema in a db. Lets name that Test1 and Test2.
I develope a package whihc will transform data from Test1 to Test2. I initiate this package from a Trigger for Insert on Test1. For eg.
CREATE TRIGGER Trigger_Test1
ON Test1
AFTER INSERT
AS
BEGIN
EXEC xp_cmdshell 'dtexec /FILE "C:TestTestPackage1.dtsx"'
END
This runs for ever when a record is inserted into the Test1 table.
But, when the trigger is on someother table , everything works fine.For eg, if the trigger is on the table TT1 & this trigger initiates the same package while inserting a record into TT1, everything is fine.
Can anyone help me on this.
Thanks
Man
View 4 Replies
View Related
Feb 29, 2008
I am trying to get a function I created in VB 5 for Access and Excel to work in SQL 2005. I was able to update the old VB code to work in VB 2005. I compiled and made a .dll, and I was able to register the new Assembly in SQL Server. When I try to create the Function, I get an error:
CREATE FUNCTION dbo.Temperature(@FluidName char, @InpCode Char, @Units Char, @Prop1 varchar, @Prop2 varChar)
RETURNS VarChar
AS EXTERNAL NAME FluidProps.[FluidProps.FluidProperties.Fluids].Temperature
Error returned:
Msg 6573, Level 16, State 1, Procedure Temperature, Line 21
Method, property or field 'Temperature' of class 'FluidProps.FluidProperties.Fluids' in assembly 'FluidProps' is not static.
Here is the code (part of it) in the VB class:
Header:
Imports Microsoft.SqlServer.Server
Imports System.Data.SqlClient
Imports System.Runtime.InteropServices
Imports System.Security
Imports System.Security.Permissions
Namespace FluidProperties
'Option Strict Off
'Option Explicit On
Public Partial Class Fluids
Function:
Function Temperature(ByRef FluidName As Object, ByRef InpCode As Object, ByRef Units As Object, ByRef Prop1 As Object, Optional ByRef Prop2 As Object = Nothing) As Object
Call CalcProp(FluidName, InpCode, Units, Prop1, Prop2)
Temperature = ConvertUnits("-T", Units, T, 0)
End Function
If I change the Function Temperature to Static, I get an error that functions cannot be Static. Its been a long time since I created the code and am having a hard time in my older age of getting the cobwebs out to make it work.
I have no problem getting the function to work if I call it from a VB form....so what do I need to do to get it to work on data in my SQL server?
Thanks
Buck
View 20 Replies
View Related
Jan 12, 2006
I previously had an ASP.NET 1.1 site running on my IIS 6.0 server (not the default website) with Reporting Services running in a subdirectory of that website. I recently upgraded to ASP.NET 2.0 for my website and was greeted with an error when trying to view a report. The error was very non-descript, but when I checked the server logs, it recorded the details as "It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process."
First of all, I could not figure out where and how to do this. Secondly, I decided to try to also change the Reporting Services folders to run ASP.NET 2.0 and when I did, I was greeted with the following message when attempting to view a report:
"Failed to load expression host assembly. Details: StrongName cannot have an empty string for the assembly name."
Please help.
View 7 Replies
View Related
Feb 24, 2008
All, I am developing the data mart refresh task in SSIS. I wanted to call the package in command prompt. I need help. Can any one give any tips on it. Thanks and appricate in advance.
Regards
Govind
View 2 Replies
View Related