Problem Running SSIS From C#
Jul 18, 2007
I am having a problem running a SSIS Script from within a C# program. Script was running fine and then one day it stopped running and is giving me the following errors and nothing has changed.
2007-07-18 14:27:52,098 [1] ERROR reporting.Processor [(null)] - Problem with DTS Script
2007-07-18 14:27:52,895 [1] ERROR reporting.Processor [(null)] - {Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError}
The SSIS runs fine from the process on my machine, from SQL Server on my machine and from SQL Server on the server. But when I run it from the C# executable I get the above errors. This process also runs other SSIS scripts and they all work fine. I am using the following code to execute the script. Can anybody give me some ideas on how to troubleshoot this problem.
Package package = app.LoadFromSqlServer("\Maintenance Plans\SCRA2", "ppntt240", "load_abc", "bcp123", null);
DTSExecResult result = package.Execute();
Variables vars = package.Variables;
int rowcount = Convert.ToInt32(vars["count"].Value);
String rowcount2 = "0000000000" + rowcount.ToString();
string fullcnt = rowcount2.ToString().Substring(rowcount2.Length - 10, 10);
if (result == DTSExecResult.Failure)
{
Console.WriteLine("Task failed or abended");
log.Error("Problem with DTS Script");
log.Error(package.Errors);
}
else
{
Console.WriteLine("Task ran successfully");
View 16 Replies
ADVERTISEMENT
Jan 22, 2007
running ssis package with ssis run time compoenents and sql server 2000...
Is it possible to run ssis packages that point to servers on sql server 2000
without installing sql server 2005 ?
Can we just install runtime for ssis and run the packages ?
Please explian with links if possible
thanks a lot
View 18 Replies
View Related
Aug 30, 2006
Hey, I've a few jobs which call SSIS packages. If I run the SSIS package, it runs fine but if I try to run the job which calls this package, it fails. Can someone help me troubleshoot this issue? None of my jobs that call an SSIS package work. All of them fail.
Thank you
Tej
View 7 Replies
View Related
Jun 6, 2007
Hello,
If my SSIS runs every day, how can I "know" that I'm running it for the first time?
I need an SQL Select1 statement to execute the first day that my flow starts (to get all the old data) and after that SQL Select2 statement should always execute (to get the latest data).
How is this possable?
Thank you.
View 14 Replies
View Related
Aug 18, 2006
I'm trying to run a SSIS package (dtsx) from inside an sql job (SQL Server agent). This works fine if the user running (run as) the step is a local admin on the server. If it's not, I get the error message "The package could not be loaded. The step failed". This happens even if the user has all possible serverroles such as "sysadmin" etc in SQL.
So, my question is, is there any way to load an SSIS package without being local admin on the machine? In case it is, what is needed?
regards Andreas
View 3 Replies
View Related
Aug 27, 2007
Folks -
Did you have any success when running bat files (Execute Process Task) from SSIS through SQL Server Agent jobs? My package will succeed when I run it from my machine, when I ask the DBA to run it manually from the Server but not when we run from a job.
The job will hang and the bat file does not seem to be executed. The executable property does evaluate to the right path and the package owner does have write/execute permissions in the folder where the bat file is located.
Everything I could find close to that is under <http://support.microsoft.com/kb/918760>. Would you shed any light on this? When I run the same bat file from a DTS through SQL Server Agent job, it will work with no issues. Any help would be very much appreciated.
Thanks.
View 13 Replies
View Related
Nov 8, 2006
I have an issue when a job is scheduled to run a SSIS package. The package (exporte a table to a text file) runs fine from microsoft visual studio but when i create a job and run it, i get the following error:
[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'VOLCANOAdministrator', error code 0x534. [SQLSTATE 42000] (ConnIsLoginSysAdmin)
View 5 Replies
View Related
Sep 20, 2006
Is there any way to check from SQL code if a specific SSIS stored package is running like a SQL system view or stored procedure? Management studio option works fine but not if you need to determine if a specific package already is running or not?
View 3 Replies
View Related
Feb 23, 2007
I need to be able to run SSIS packages form an asp.net (win 2k3) web server. Wrox has a book out "Professional SQL Server 2005 Integration Services" where they call the dtsx package directly using the following vb.net snipette:
Imports Microsoft.SqlServer.Dts.DtsClient
Dim ssisConn As New DtsConnection
ssisConn.ConnectionString = String.Format("-f ""{0}""", strMyFilePath)
ssisConn.Open()
As you would expect this works great on a workstation that has BIDS installed on it but does not work on a web server where sql client tools are not installed. Without install sql tools on the server what needs to be done to get this functioning as coded? How about calling packages that are installed on the server?
If anyone knows of any sites or books that cover this in detail I would appreciate the info. I only seem to be able to find bits and pieces.
thanks in advance
View 4 Replies
View Related
Dec 8, 2005
My boss want to close access to xp_cmdshell for any logins including sa.
View 1 Replies
View Related
Feb 27, 2008
Can a SSIS Package be run as a job or a maintance tool. I need it to run nightly. Also in that same job can sql queries be added as well.
Thank you
Dee
View 27 Replies
View Related
May 16, 2007
have one script that works fine. I am doing the exact same thging with this new script and it runs fine from C# on my desktop and runs fine from SS on the server but comes back with a failure when trying to run from C# on the server. Is there any additional info I can retrieve about the problem? All I am getting right now is "Failure" from the result field.
if (result == DTSExecResult.Failure)
{
Console.WriteLine("Task failed or abended");
log.Error("Problem with DTS Script");
log.Error(result);
}
else
View 5 Replies
View Related
Apr 9, 2008
Hi i get a error when i run my SSIS package. Here is the message
Error: 0xC02020A1 at import file, Flat File Source [1]: Data conversion failed. The data conversion for column "su_supplier_code" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
Error: 0xC020902A at import file, Flat File Source [1]: The "output column "su_supplier_code" (61)" failed because truncation occurred, and the truncation row disposition on "output column "su_supplier_code" (61)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
The funny thing about this is when i run the job a 2nd time it works fine.
Has any one any idea about this error or why the job would work fine the 2nd ?
View 1 Replies
View Related
Jun 18, 2008
Hello,
I'm new here and hope you will be able to help me.
I have created several SSIS packages with Visual Studio 2005.
They all work fine in debug mode.
I have been able to make them work with a ODBC connection by using a ADO.NET connection.
Then I exported them to the file system in my SQL Server 2005 database and created a task in SQLAgent to run them.
All the packages using the ODBC connection fail with the following error :
Login failed for user XXX
Error : 18456; Severity : 14 , State : 8
This error is a password mismatch.
I tried several database users and checked the passwords multiple times.
It looks like SQL Agent is not able to retrieve the password although it is stocked in both the ODBC connection and the SSIS connection.
Can you help me?
Thanks,
Ares
View 19 Replies
View Related
Mar 7, 2007
hi frnds,
i have SSIS package, i would like to schedule the SSIS package inorder to run automatically once in a day.
can anyone suggest me the solun. pls its urgent.
thnkx in adavance..
View 3 Replies
View Related
Apr 17, 2008
Hey guys I have a simple SSIS package up and running locally i.e i have Visual Studio 2005 and SQL Server 2005 installed.
Now If i wish to deply this SSIS package to a new server what do i require to be installed on the new server.
I.e SQL server 2005 will be there but will i also need Visual Studio 2005 to be installed ?
Also to actually run the package do i only need the .sln file
View 8 Replies
View Related
Mar 13, 2007
I am able to run it from the file system but when I try running it from SQL Server I get an error message that it cannot load package. I am using the following code.
Package package = app.LoadFromSqlServer("trans_hist", Properties.Resources.dbServerName, Properties.Resources.userId, Properties.Resources.password, null);
View 6 Replies
View Related
Jun 12, 2007
I am running into an error when running a package using a scheduled job under SQL Server Agent account. I am getting following error:
Date 6/12/2007 4:19:15 PM
Log Job History (VistaODSFeed)
Step ID 0
Server 006-DEVSQL2005
Job Name VistaODSFeed
Step Name (Job outcome)
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
The job failed. Unable to determine if the owner (ACIsnasir) of job VistaODSFeed has server access (reason: Could not obtain information about Windows NT group/user 'ACIsnasir', error code 0x6ba. [SQLSTATE 42000] (Error 15404)).
ACIsnasir is not the account under which SQL Server Agent service runs. However ACIsnasir has sa priveleges. not sure why am I getting ACIsnasir in the error and not the account under which sql server agent runs.
ideas?
View 1 Replies
View Related
Sep 16, 2007
I run an ssis task with right click in the BIDS.
the task transform data of the tables between sql2005 DB to another sql2005 DB.
this is the error I get:
Code Snippet
An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description:
"Communication link failure".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description:
"TCP Provider: The semaphore timeout period has expired.
".
helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".
Task failed: CopyTables2
i have a similar task, only diffrent tables that being transfered, same settings. this task run succesfully.
for the task that fails it takes a long time to run (something like half an hour, maybe more) and then it falils. the task that succeeds finish fast (something like 5 minutes). the data in the tables that being transeferred in the good task is much smaller than the data in the tables in the failed task.
Anyone knows the reason to the error.
Thanks.
View 14 Replies
View Related
Oct 4, 2007
I have a SSIS package that I have scheduled to run (under SQL Server Agent jobs) and when I check its history, it shows it being invoked regularly, and with no errors. The problem is, nothing is actually happening. I can load up the job in MS Visual Studio, and run it, and it runs fine, and takes care of the data transfer. The data is not getting transferred when it runs as a job under SQL Server Agent though the logs show that job was run, and completed with no errors.
I have another package that is similarly configured and does run correctly, and I have been checking the two packages to see what the difference in configuration is, but I don't see anything. All the package in question is, is a single foreach container that gets all the files in a directory, adds them as flatfiles to a database, and then moves them to an archiving directory.
View 3 Replies
View Related
Sep 5, 2007
I have a SSIS package that reads from a remote directory on another server that is on the same domain. When I run the package under my domain user, it runs fine, however when I try to start the SQL job which has the package as the first step, the job fails. I created a proxy account with domain user credentials, set it to be active under "SSIS Package Execution" and set the SSIS package to run as the proxy account, but I get the following error message:
"Unable to start execution of step 1 (reason: Could not get proxy data for proxy_id = 2). The step failed."
I'm not sure what to do at this point, so any help would be appreciated.
View 8 Replies
View Related
Sep 10, 2007
Hello,
I created a ssis package to transfer data between tables of sql2005 DB to another sql2005 database.
when i run it from BIDS with right click -- > execute package i get this error:
Code Snippet
Error: 0xC002F325 at CopyTables1, Transfer SQL Server Objects Task: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".
anyone can help here.
Thanks.
View 4 Replies
View Related
Mar 11, 2008
Has anyone figured out a way to create an ssis package that runs a report in ssrs 2005?
View 4 Replies
View Related
Sep 5, 2006
When I run an SSIS package from the MSDB in SQL Server Management Studio it never shows up under 'Running Packages'.
I have confirmed that the package is indeed running.
I've also tried to check the packages running on the server programatically by using the GetRunningPackages() method. This too returns nothing when clearly packages are running.
Any ideas?
Malcolm Barclay
Disney Consumer Products UK
View 4 Replies
View Related
Apr 18, 2006
Hi there,
if I have some packages (.dtsx) that are depolyed to Server A and I have SQL Agent installed on Server B - if I run a run a package from SQL Agent, does it run on Server A or Server B?
Thanks in advance.
View 1 Replies
View Related
Aug 4, 2006
I have a package that I want to run as a scheduled job in sql server 2005. The job runs fine in the studio. I am convinced that it is not a password or security issue as I set the protectionlevel to do not save sensitive data and can still run the job in the studio. The User running the job has SA privileges as does the SQL Server Agent. The job reads a flat file, runs it through a script and than inserts the rows into a table. The job runs successfully only if the flat file is empty. The job history says: The return value was unknown. The process exit code was -1073741795. The step failed.
There are no OnError lines in the logging.
Anyone have any Ideas or tricks to try.
View 9 Replies
View Related
Jul 9, 2007
When I run a newly created SSIS package remotely from my Vista Business PC, it runs an older version of the package, pointing to the wrong location that I initially configured in the flat file connection manager and I get errors, however when I run that same package from the server, it runs just fine.
Does anyone know what I need to do to clean that up?
thanks,
Anatoli
View 7 Replies
View Related
Mar 15, 2008
I have created an ssis package for importing some table data of one db to other db . Both taget and destination tables are exactly same . I was able to run the package sucussfully from BI Studio , that time the datas were exported currectly .
I created a an sqlserver agetn job with the package as step . I want it to run this once in a week .
When i tried to run this package , I am getting the following error message
Started: 1:20:07 PM
Error: 2008-03-15 13:31:33.91
Code: 0xC0202009
Source: Data Flow Task Destination 6 - ReservationManualStatus [456]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
End Error
Error: 2008-03-15 13:31:34.19
Code: 0xC020901C
Source: Data Flow Task Destination 6 - ReservationManualStatus [456]
Description: There was an error with input column "LastModified" (480) on input "Destination Input" (469). The column status returned was: "Conversion failed because the data value overflowed the specified type.".
End Error
One thing is , this error message is not consistent all the time ,
I am getting the similar message only but from different tables making problem each time i run .
One thing common is , it alwayse pointing to date type fields.
Plese help me to get out of this problem
Thanks in advance
View 4 Replies
View Related
Mar 29, 2006
Can someone tell me what are the security watchouts there are in running SSIS or the SQL Server Agent? I am having trouble running a job on a package that runs fine through Integration Services. The only difference seems to be that SQL Server Agent is running the job on the schedule.
Does SQL Server Agent need to have certain rights?
Do I need to be part of a certain group besides Admin?
Does the package need to have a particular security for someone to run the job?
I was finally able to get the package set but now I can't schedule the thing to work.
View 1 Replies
View Related
Aug 2, 2007
I am running this code my question is when it runs ExecuteNonQuery() it doesn't wait for package to complete It just returns "Package succeeded' - The way you can test if you run this code 2 times one after another. ExecuteNonQuery() breaks with error -
SQLServerAgent Error: Request to run job RunSsisPkg (from User DomainUser) refused because the job is already running from a request by User DomainUser.
How can I check before return package is running and wait to complete before return?
using System;
using System.Data;
using System.Data.SqlClient;
namespace SSISRun
{
class Program
{
static void Main(string[] args)
{
SqlConnection jobConnection;
SqlCommand jobCommand;
SqlParameter jobReturnValue;
SqlParameter jobParameter;
int jobResult;
jobConnection = new SqlConnection("Data Source=(local);Initial Catalog=msdb;Integrated Security=SSPI");
jobCommand = new SqlCommand("sp_start_job", jobConnection);
jobCommand.CommandType = CommandType.StoredProcedure;
jobReturnValue = new SqlParameter("@RETURN_VALUE", SqlDbType.Int);
jobReturnValue.Direction = ParameterDirection.ReturnValue;
jobCommand.Parameters.Add(jobReturnValue);
jobParameter = new SqlParameter("@job_name", SqlDbType.VarChar);
jobParameter.Direction = ParameterDirection.Input;
jobCommand.Parameters.Add(jobParameter);
jobParameter.Value = "PackageName";
jobConnection.Open();
jobCommand.ExecuteNonQuery();
jobResult = (Int32)jobCommand.Parameters["@RETURN_VALUE"].Value;
jobConnection.Close();
switch (jobResult)
{
case 0:
Console.WriteLine("Package succeeded.");
break;
default:
Console.WriteLine("Package failed.");
break;
}
}
}
}
View 10 Replies
View Related
Aug 16, 2007
I have the following setup:
1. Clustered Microsoft SQL Server 2005 (Build 3790: Service Pack 2) with .net 2.0 - Server A
2. Separate server containing the SSIS services (Per Microsoft - SSIS isn't cluster aware). - Server B
I am getting the following error when I run a SSIS package through a scheduled job on the Server A:
Description: The task "Set dynamic file name variable" cannot run on this edition of Integration Services. It requires a higher level edition.
I found the following post that fixes the issue, but I don't want to install SSIS on the SQL Cluster (Server A) because it isn't cluster aware.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=67276&SiteID=1
This package runs fine locally from Visual Studio or from Server B. All of my other SSIS packages run fine on the Server A through the SQL Agent. This package fails on a script task that is setting some dynamic variables. Do I need to install some additional components or service packs to SQL Server on Server A?
I don't want to install SQL Server on the Server B and run the jobs through that agent because we don't have the money for a separate license.
View 10 Replies
View Related
Sep 12, 2007
Hello.
I run a ssis package of transferring data between sql2005 databases.
I get this error:
Code Snippet
Error: 0xC002F325 at CopyTables2, Transfer SQL Server Objects Task: Execution failed with the following error:
"ERROR : errorCode=-1071636471 description=An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description:
"Could not continue scan with NOLOCK due to data movement.".
helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".
Task failed: CopyTables2
i run the package currently with right click on the package on the BIDS.
what is the reason for this error? how can I check it?
Thanks.
View 6 Replies
View Related
Sep 26, 2007
Hi
I want to run a SSIS package, that reads from a flatfile and writes to a SQL2005 DB table, from a webpage created in VS2005.
Basically I keep running into the same error, no matter what settings I use in IIS or the web.config (impersonation on or off) for the specific webpage.
The package loads, get's some variables passed and executes. No DTS errors are triggered. I added an eventlistener to pick up events of the package itself.Outcome:
"Microsoft.SqlServer.Dts.Runtime.PackageConnection manager "*******"SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login failed for user ''. The user is not associated with a trusted SQL Server connection.".
"The SSIS package connection manager to SQL2005 is setup to use windows authentication which of course runs fine when ran directly from VS2005 or with dtsexec because it passes my security credentials which have the appropiate rights.
The webpage uses forms authentication and impersonates properly when told to do so in the web.config. (checked)
Somehow no security credentials seem to get passed to or through the ssis package when it's ran.
I've seen many posts on the subject but can't really find a solution to run an SSIS package from a webpage.
Is there any way of running an ssis package from a webpage hosted on a webserver running IIS (5.1)?
At the moment I'm not limited to any setup. I just want to have it working.
Code to load and execute the package:
Try
pkgLocation = _
"*******package.dtsx"
pkg = app.LoadPackage(pkgLocation, Nothing)
pkg.Variables("User::varFileName").Value = ****pkg.Variables("User::CID").Value = **********
pkgResults = pkg.Execute(Nothing, Nothing, EventListener, Nothing, Nothing)Catch ex As DtsException
End Try
The Eventlistener that captures the failure of the logon attempt of the connection manager inside the package:Public Overrides Function OnError(ByVal source As Microsoft.SqlServer.Dts.Runtime.DtsObject, _
ByVal errorCode As Integer, ByVal subComponent As String, ByVal description As String, _ByVal helpFile As String, ByVal helpContext As Integer, _
ByVal idofInterfaceWithError As String) As BooleanDim message As String = source.ToString & subComponent & description
Return False
End Function
View 1 Replies
View Related