SSIS Script For Monitoring Windows Service
May 25, 2006I 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
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
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
Hi
Does any body knows how to convert this VBScript Code to VBDotNet (SQL SERVER 2005 INTEGERATION). Below Codes Returns a list of all the services installed on a computer, and indicates their current status (typically, running or not running).Its in VBScript Format.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "
ootcimv2")
Set colRunningServices = objWMIService.ExecQuery("Select * from Win32_Service")
For Each objService in colRunningServices
Wscript.Echo objService.DisplayName & VbTab & objService.State
Next
Regards
Deepu M.I
Need some help...
When we tried to run mulitple packages one after the other from a windows service, first one succeeds but later ones are throwing below error :
"The script threw an exception: The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.
A deadlock was detected while trying to lock variable "System:ackageName, User::BusinessDate, User::Environment, User:ortfolioName" for read access. A lock could not be acquired after 16 attempts and timed out."
Later, we tried to create separate AppDomains for each package and execute via console application, but ended up with below error (The below expressions were defined in OnError Event) :
"The result of the expression "@[User::ReportErrorFrom]" on property "FromLine" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
The result of the expression ""Error At :" + @[System:ourceName] + "" +
"Error Description : "+ @[System::ErrorDescription] + "" " on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property."
At last, we tried to span a separate process (System.Diagnostics.Process) for each package. this seems working but taking very long time:
A package that normally takes 2 min, is taking 60 min.
We also tried creating an SSIS Package that executes mulitple packages. But only first package is getting executed, and second one is throwing below error (Here the variable it is trying to lock is of first package):
"Failed to lock variable "UniqueInstrumentsQuery1" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Please help us with some work around for this. Thanking you in advance,
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
Hi!
We have next problem in production.
We have one target that accepts messages from many initiators. Some time target can not get message from some initiator. It may be due hardware problem, for example technitian switch off router. In general service broker succeed to receive all messages when hardware problem was solved (if it takes less than retantion time on initiator side). I would like to build some job that would look at queue of target and could say (or trigger) that from the initiator A for some period of time target did not get any message or did not succeed to close conversation or it constantly have some connectivity problem (like duplicated message).
Any idea?
Is there a way for a .NET application to receive a notification when a service broker queue has been updated with a new message? I tried using SqlDependency on an SB queue but I got an "invalid" error in my notification handler.
Such a notification would be much better than having to poll the queue every N seconds.
Thanks
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()
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
Has anybody developed a ASP.Net app that interfaces to SSIS? If so, what was your experience? Any pitfalls, tips, etc? We have a requirement to launch and monitor SSIS packages via a web interface.
View 1 Replies View RelatedI 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.
Hi,
Has anyone monitored the execution of SSIS packages with MOM? Are there extreme benefits over just utilizing the built in execution and event logs, as well as the Windows Event Viewer?
What is the recommended way to monitor SSIS execution?
Thanks,
- Joel
Hi
I want my package to monitor a directory for a file and when it detects one it will start processing the file. Any help would be appreciated
Regards
Ants
We are in plan to build a Monitoring tool using PowerShell and Performance Monitor which could monitor 10 to 20 servers. Do you have any reference of any existing tool using Performance Monitor to monitor the SQL Server and available for free? I didn't want to put some effort, if something is available already.
View 2 Replies View RelatedHas anyone come up/determined a generic way to capture and log indicative information within a data flow in SSIS - e.g., a number of rows selected from the source, transformed, rejected, loaded, various timestamps around these events, etc.? I am trying to avoid having to build a custom solution for each of the packages that I will have (of which there will be dozens). Ideally, I'd like to have some sort of a generic component (such as a custom transformation) that will hide the implementation details and provide a generic interface to the package.
It is not too difficult to achieve something similar on the control flow level, but once you get into data flows things get complicated.
Any ideas will be greatly appreciated.
Hi All,
View 1 Replies View RelatedI 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
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
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
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!
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
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
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?
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?
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
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
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 View RelatedHow to find out the SP available for sql server 2000 with win xp
View 8 Replies View RelatedHi
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
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 RelatedHi,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 RelatedHello,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 RelatedHi,
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]