2 Replies Latest reply: May 15, 2014 10:08 AM by Bill Watson RSS

    Notification

    ZJSoule _

      Good Afternoon all,

       

      Is there any way that Datapump can send out a notification if the pump has been shutdown for some reason?  I'm assuming no, but it never hurts to ask.

        • Notification
          Olly Bond

          Hello Zach,

           

          If Pump's down, it can't notify anyone. But it should trigger an event in Windows that another system - e.g. Tivoli - can deal with. If you check your Windows event log on the DataPump server, and show some examples to the IT team, perhaps they'll have something in place that can pick the events and route them helpfully.

           

          HTH,

           

          Olly

            • Notification
              Bill Watson

              you could build a vbscript solution to email you whenever the datapump or mssql services stop running. I have something similar that ensures the services are set to auto start. you could tailor this quite easily i think to email a specific address if the services are stopped or disabled.

               

              save the following as maintainservices.vbs and create a scheduled task to run it however often you want to check. It will create a log file in the same directory as the script so you can check the output.

               

              Dim strComputer

              Dim objFSO, objLogFile, objWMIService

              Dim colListofServices

               

              Set objFSO = CreateObject("Scripting.FileSystemObject")

              Set objfile = objfso.CreateTextFile("MAINTAINSERVICES.LOG", True)

               

              objfile.writeline("Process Started: " & now())

               

              strComputer = "."

              Set objWMIService = GetObject("winmgmts:" _

                  & "{impersonationLevel=impersonate}!
              " & strComputer & "\root\cimv2")

               

              'make sure associated processes are running/automatic

              Set colServiceList = objWMIService.ExecQuery("Associators of " _

                 & "{Win32_Service.Name='MSSQLSERVER'} Where " _

                      & "AssocClass=Win32_DependentService " & "Role=Antecedent" )

                    

              For each objService in colServiceList

                   objfile.writeline("Service Name: "& objService.name)

                   objfile.writeline("Current Start Mode: "& objService.startmode)

                       If not (objService.StartMode = "Automatic") Then

                               errReturnCode = objService.ChangeStartMode("Automatic")

                               objfile.writeline("Changed Start Mode: "& objService.startmode & " (" & errReturnCode & ")")

                       end if

                       errReturnCode = objService.StartService()

                       objfile.writeline("Service Started: "& errReturnCode)

              Next

              Wscript.Sleep 5000

               

              'make sure sql server is running/automatic

              Set colServiceList = objWMIService.ExecQuery _

                      ("Select * from Win32_Service where Name='MSSQLSERVER'")

              For each objService in colServiceList

                   objfile.writeline("Service Name: "& objService.name)

                   objfile.writeline("Current Start Mode: "& objService.startmode)

                       If not (objService.StartMode = "Automatic") Then

                            errReturnCode = objService.ChangeStartMode("Automatic")

                            objfile.writeline("Changed Start Mode: "& objService.startmode & " (" & errReturnCode & ")")

                   end if

                   errReturnCode = objService.StartService()

                   objfile.writeline("Service Started: "& errReturnCode)

              Next

               

              Wscript.Sleep 5000

               

              objfile.close

              set objfso = nothing

              set objwmiservice = nothing

              /code