How To Launch Package From A Windows Service
May 20, 2006
I'm developing a Windows Service to watch for an e-mail and then launch a package. It extracts some parameters from the e-mail that I then need to pass to the package. What is the best way to launch the package from the service? Should I run it in a new thread? I don't want the service to have to wait for the package to complete. How would I pass the parameters? Should I use dtexec? If the service fails or is stopped and the package is still running, it would terminate the package also, correct? Any way to avoid that? Thanks.
View 3 Replies
ADVERTISEMENT
Jun 23, 2006
I am attempting to write a Windows service that watches a database for uploaded files to import. When a new file is found, the corresponding SSIS package is run from the file system with variables passed through. I started development as a Windows app and copied the functionality to a service.
The app runs fine. The service does not. I get a "Failure" each time a package is executed. Everything is identical behind the scenes with the obvious exceptions that OnStart and OnStop handlers are buttons in the app. I added a script task at the beginning of one of the SSIS packages to notify me that it is even running at all. It doesn't even hit that initial task.
Again, the app will run all packages just fine. The data is imported and the results return as "Success."
The following is the code executing the package. Any help is appreciated. I've been banging my head on this one for a few days now. (Is there a tag to format a code sample?)
Dim pkgLocation As String
Dim pkg As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult
pkgLocation = sPackageFolder & PackageName & ".dtsx"
pkg = app.LoadPackage(pkgLocation, Nothing)
Dim vars As Variables = pkg.Variables
vars("ImportId").Value = ImportId
vars("ProductionServer").Value = ProductionServer
vars("ProductionDatabase").Value = ProductionDatabase
vars("SourceFileName").Value = FileName
vars("SourceFilePath").Value = FilePath
pkgResults = pkg.Execute()
View 3 Replies
View Related
Mar 26, 2008
HI,
Recently i had to maintain few SSIS packages. One of the packages keeps running indefinitely to monitor a folder for new files using FileSystemWatcher. Once new file is arrived, it simply renames file and calls another package for further processing. My first impression was that windows service might be a better choice for such functionality.
Any idea about these two approaches to implement this functionality i.e Continuously running a package using indefinite loop as compared to a windows service.
Thanks
Saeed
View 3 Replies
View Related
Sep 12, 2007
When running an integration services package from a windows service I get the "Object ... has been disconnected or does not exist at the server." exception after aproximately six minutes of execution.
This is *not* my windows service failing. I can loop indefinately while tracing to a log file within the service and it will run forever. While calling the mypackage.execute(...) method however, after six minutes (give or take) the exception is thrown...
my code looks something like this:
<code>
dim foo as Microsoft.SqlServer.Dts.Runtime.Application
mypackage = foo..LoadPackage(strimportPkgFilename, pkgevents)
results = myPackage.Execute(Nothing, Nothing, pkgevents, Nothing, Nothing)
</code>
<error>
A first chance exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
Exception in: frmMyForm.DoImports
Message: Object '/b76f98a0_5bd9_49d8_a524_eeb49d55b303/bqbhkjnaofq_ifr_cwz+srid_1.rem' has been disconnected or does not exist at the server.
</error>
oddly, this same code works perfectly if I run it within a windows form application no matter how long it takes.
It also runs fine if the package can complete in under six minutes.
Any suggestions?
Mark
View 2 Replies
View Related
Oct 10, 2007
I just installed a copy of sql2005 express, and need to use windows authentication. the ad helper service bombs on startup, any helpfull suggestions would be appreciated.
thanks
View 2 Replies
View Related
Aug 18, 2006
does anyone know an easy way (or any way for that matter) to run a DTS package from an asp.net page?
View 1 Replies
View Related
Mar 13, 2006
Hi all,
I'm trying to launch a SIS package from a VBA macro in excel...now I launch the dtexec.exe from a shell but a have this error:
Started: 10.14.33
Could not load package "Package1" because of error 0xC0014062.
Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired). The SQL statement that was issued has failed.
Source:
Started: 10.14.33
Finished: 10.14.49
Elapsed: 16.594 seconds
but all credential are correct...
any ideas ???
thanks in advance
Wolly
View 3 Replies
View Related
Oct 10, 2006
Hi all. How can I create a Stored Procedure that will launch a DTS package that I have already built dynamically ?
I have a string already built and I need to put it in a SP because my application is php (linux) and the database is SQL Server on a Windows machine.
I will use php to execute the stored proc, which is the only way to access it.
My string looks like this :
C:Progra~1Micros~380ToolsBinnISQL.EXE -S [MyServer] -U [Username] -P [Password] -Q "ISQL_Batch 'D:DDFIImporteIMPICAFI.bat [user] [Schema] [Pwd] '" -n -d [database]
(Words in [] are only to show that I will put other values)
Thanks
CFGilles
View 2 Replies
View Related
May 18, 2006
Dear all,
I am looking for any snippet of code where you can launch a SSIS package by DMO or VB 6.0. I read that it was posible to call dts.runtime assembly from VB 6.0 but at first it might be converted or something like that.
Issue comes from the moment that we€™ve got an ASP 3.0 scheduler for hundreds of dts and now we have to migrate them to sql25k.
Thanks in advance for any info regarding this,
View 5 Replies
View Related
May 22, 2006
Dear all,
I wrote this post others times but the answer did not satisfied so that I'd like to know if really anyone has ever used or experienced with this possibility. No by .Net language rather than Vb 6.0 or ASP or even instanciacing DMO library.
According this link http://support.microsoft.com/?kbid=817248 it seems possible but I haven't idea if possible keeping in mind that it has been made by yourself no for others... So that, I mean, these assemblies comes along with Sql Server 2005 installation.
Thanks a lot for your support,
View 13 Replies
View Related
Jun 27, 2007
Is it possible to launch an SSIS package after a SQL event takes place? I need to run a package after a customer order is placed. Can a trigger in SQL launch the package?
View 1 Replies
View Related
Jan 9, 2001
I have prepared several DTS packages which must be launched by a custom external application. What is the best way to provide access to this application? What are the minimum security requirements? Currently, they are local packages; I understand that some utility is offered by saving them as .DTS files, but I don't know the pros & cons. Are there advantages to using the Repository? The app should be able to do its work from a different box on the same network as the server. (Ultra-super-secret security isn't an issue, but I don't want to have give our developers sa-level access unless necessary.)
View 2 Replies
View Related
Oct 4, 2006
Please help. I'm completely new to SSIS, and I was hoping someone could point me in the right direction(s).
I am developing a winforms client app, and I need to be able to provide the user with the ability to import data in CSV format into our application's database.
I'd like to use SSIS if possible, as long as what I am trying to do isn't near impossible.
I'm thinking of a UI where the user can specify a flat file (CSV) to upload and be processed by an SSIS package on a remote database server.
This package will be responsible for validating the CSV file and inserting data into the database as appropriate.
Is there a way I can:
launch an SSIS package remotely, from a winforms app on the client machine that is not running SQL server (preferably asynchronously) -- and pass it some parameters, including the import file itself
(optionally) provide progress feedback to the client pc to let them know it is being processed
display a nice SSRS report on the client upon completion that tells them exactly what the success/failure of the import was (how many rows processed, which ones failed and why, etc)
Any helpful examples, links, etc would be most appreciated.
Thanks in advance!
View 1 Replies
View Related
Sep 27, 2007
All,
I am looking at implementing some sort of throttling whereby "expensive" reports are setup as Subscriptions (and hence are run by the Windows Service), while all other requests go the Web Service.
My question is:
Do the two systems share any underlying systems? I understand (of course) that they use the same DB, etc. etc. However, I can't quite tell whether there is an underlying engine that is a common base or if they really just spin up different instances of the same objects and essentially each host the application separately?
Any help is greatly appreciated!
Mark
View 4 Replies
View Related
Sep 26, 2007
I am doing some research to see if the Service Broker technology would help my company with our Enterprise application. Here is our scenario: We have a 3 tier system. The first tier needs to contact the second tier asynchronously. Hence, using queues is a good option. However, the process that needs to happen on the second tier is mostly process intensive with little database updates. Is it still worth our time to use Service Broker?
I like the concept of Activation that Service Broker provides. But, from what I am reading most of the documentation describes activation as a way to call another stored proc. I definitely dont' want to do any process intensive work on the SQL server. So here comes my question...
How would I use a windows service to listen to the activation event from the Service Broker. I could have multiple windows services watching the same queue (scalable). Would I have to handle collisions myself? If so, I think I would rather keep it simple, and just use a simple table as my queue.
Thanks for your comments in advance...
Vijay.
View 3 Replies
View Related
Mar 27, 2006
We are using the whole BI-package from Microsoft - from SQL, DTS-package,Raporting Service and Analyze Service.
It should be very helpful to be able to create a metadata databases where you could find all releations between different objects (tables,views,reports,cubes,DTS-package,Databases.
Just to get answer for: 'where is view xxx used', 'what are Report xxx depending upon'.
While everything exists in different SQL databases it should possible to do.
Has anyone any comments or the same needs ?
View 1 Replies
View Related
Mar 2, 2004
I want to monitor the transaction log files for growth to limits and be able to automatically shrink the log... I had to do it manually the last time I had to do it with my current setup.. Is there away without having to run a windows service for monitoring the file size or drive space left?
Example; current transaction log is ~8gigs at full limit... reduced was ~5gigs, this is just 1 transaction log for 1 database on server.
Morgan
View 3 Replies
View Related
Jul 24, 2007
Greetings. I'm wondering if y'all typically turn off filesystem indexing (IE: uncheck "Allow indexing service to index this disk for fast file searching") on the drives that hold your ldf and mdf files? Do any mssql services depend on this functionality?
Thanks,
Amy
View 1 Replies
View Related
Jan 11, 2007
The problem is integrating an ADO connection into a Service in C#. The peculiar thing is that the same thing works well in an application but throws a problem in the Service i.e. the Service doesnt want to start...
The problem is at establishing the connection - but the same thing works just fine in an Windows application.
string MySqlConnString = "SERVER=N16\SQLEXPRESS; TRusted_connection=yes; database = EventTrack2007";
MySqlConnection = new SqlConnection();
MySqlConnection.ConnectionString = MySqlConnString;
MySqlConnection.Open();
Thank you!
View 9 Replies
View Related
Jul 13, 2006
The Sql Mobile site on MSDN recommends that you do not host SQL Everywhere when running as a service. Is this a recommendation, if so why, or is it simply not possible. My understanding is that when hosteed in a IIS hosted application a not supported exception is throw.
If anyone has any ideas on this or pointers to some resources i would appreciate them.
Thank You
View 1 Replies
View Related
May 2, 2006
I've done a bit of work with the External Activator but I think it may be a bit overkill for what I need to do (which is RECEIVE messages from a single queue and process them with managed code). I've tried creating a Service Broker Interface service that retrieves messages from this queue, but I notice that if I set the timeout to -1 to watch for messages indefinitely, the Service never completes the OnStart code.
I notice if I change the service's timeout to something greater than 0, the message is retrieved, but this defeats the purpose of using a Windows Service app, which I want to continuously monitor the queue. I noticed the External Activator spawns a thread to start monitoring an EventNotification queue, which I can bypass since I want to monitor the notification's target queue.
Rushi, can you point me in the right direction to create a Windows Service that constantly monitors a queue? Also, I'd like the ability to monitor multiple databases (the queue name would be the same) as well, so if that is not feasible from a Windows Service please let me know.
Also, am I sacrificing scalability by NOT using the External Activator and switching to a Windows Service (I believe the External Activator will spawn multiple instances of the processing executable)?
Thanks,
Chris
View 5 Replies
View Related
Dec 1, 2006
I'm building a Windows Service which keeps getting denied access to SQL Server 2k. The Service operates as a System User rather than an individual user profile.
I've tried Trusted_Connection=yes and Integrated Security=SSPI but these are both denied.
Any ideas what the connection string to connect to SQL Server 2k from a Wndows Service is?
View 4 Replies
View Related
Jul 9, 2007
hi all.
please help with my dilemma.
this is my task:
i should write a service that will run every 1 hour.
this service should check a folder.
inside this folder there are some xml files, all of them in the same format exactly.
when the service encounters with this xml file, it should open it,pull some data out of it, and update a table in the db.
NOW - I HAVE 2 OPTIONS, AND THIS IS THE DILEMMA:
should i write a clr function to do this task, or should i just write a standard c# windows service, that will open a connection to the db when it should perform update?
what are the advatages?
View 3 Replies
View Related
Feb 11, 2008
I've got a report that shows the current status of sql activity on my servers for our ERP application. The one thing I've been wanting to do is to add the ability to check if a certain windows service on another server is running. Is this possible in Reporting Services 2005?
Thanks,
Ian
View 1 Replies
View Related
Nov 24, 2006
Hi,
I'm currently writing a windows service which will generate XML documents for FTP upload. When running the service the goal is to get records from a stored procedure, then generate the XML documents.
When running the service (lokal service account) the connection fails; instead of using the supplied connection string, it defaults to the LocalService account. How can this be solved?
Thanks in advance
View 6 Replies
View Related
Oct 12, 2006
How to find out the SP available for sql server 2000 with win xp
View 8 Replies
View Related
May 24, 2006
Hi
I would like to use SSIS Script for Monitoring Windows Service...
If Windows Service Up / Down. I should be able to Notified by
Using SSIS Script(SQL SERVER 2005).
Please Help me
Thanks & Regards
Deepu M.I
View 1 Replies
View Related
Oct 26, 2007
Hi
I am in weired move kindly help me out..I created report using sql server 2005 Reporting services..At one stage it is working fine with proper parameter but due to bad input parameter my report goes in hang mode..so i went to my DB server and restart my reporting service and then MSSQLSERVER I dont remember sequence (may be vice versa) now I am not able to get report when i am passing right parameter..I went to google and only I came to know that due to sequence of restart of services will cause this error..
error like..Application error:
Report Server Windows Service (MSSQLSERVER) cannot connect to the report server database.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Syste error:
The SQL Server Integration Services service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Kindly help me out.
T.I.A
View 5 Replies
View Related
Jul 23, 2005
I'm getting Not associated with a trusted SQL Server connectionerrors on a .Net windows service I wrote, when it's running on myapplication server.It's not a problem with mixed mode security. I'm set for mixed mode andI've been running the service on the app server for over a month withno problem. My database is running on a second server and both areunder the same domain.The problem has occurred twice over the last two months.The windows service queries a table every 30 seconds, looking forrecords to process. It's using a connection string and the user id issetup and working in SQL. That when it's generating the error.I've changed the connection string user id to sa and I still get theproblem. (server=xxx;database=yyy;user=sa;pwd=xyz)The windows service is running under the domain/Administrator account.I can run the windows service from a workstation with no problem. Butwhen I start it up on the application server, I get the 'notassociated' error back from Sql Server.I'm trying to figure out where the problem is, and why it'sintermittent. Is it rights, policy, security? Why does it work for awhile then then error out?Any suggestions or help is appreciated.Thanks,Eric
View 2 Replies
View Related
Jul 27, 2005
Hi,I tried to Develop one Report in SQL Reporting Service. I haveinstalled SQL Reporting Serivice in Windows 2003 machine. SQL ServerDatabase is in another machine, running on Windows 2000. I developedand deployed the report and all went fine.When I tried to see the report through the Report Service Manager WebPage it is comming properly. But When I tried to See the report inanother web page, I'm not able to see the images. But the Data isgetting Displayed and only Image is not comming. When I exported thereport to Excel, the Image is comming over there.I am using Report Viewer control (Which came as Sample Program) inthe ASPX Page to render the report. I'm using SQL Server 2000 with SP3aand SQL Server 2000 reporting Service with SP1.I tried setting the Mime Time for the GIF image and even "*.*" inthe Mime Type settings of IIS 6.0. Even then its not displaying theimage.Can any one help me out in solving the problem?Thanks in Advance.With RegdsKrish
View 1 Replies
View Related
Jul 20, 2005
Hello,I hope you guys can help me with a problem that I am facing...I have started the MSSqlServer service and SQLServerAgent serviceswith a domain username and password.There are periodic password resets to this user. Security policieswithin the company dictate that the password for this domain accountcannot be permenant.Would there be any way to automatically reset the pwd in theseservices instead of manually changing them each time?Thanks
View 1 Replies
View Related
Nov 17, 2006
Hi,
On the page http://www.microsoft.com/sql/editions/compact/default.mspx it is recomended that you dont use SQL Server Compact Edition if "you want to run as a service" - is this refering to the host application or to the fact the SQL Server Compact Edition is an embedded database rather than the more traditional SQL Server client/server architecture?
If its the former is this likely to change at any point in the future? Also what sort of problems are likely to occur if we did run it from within a windows service?
Many thanks,
- James
*EDIT [Changed capitalization]
View 4 Replies
View Related