SQL server jobs run showing run twice

I have one production server which is SQL server 2012 Enterprise. I found something really strange.
1. For server jobs, once a while the job history showing running twice.
2. One of the job run duration is positive which is correct. Another job run duration is negative which is not correct obviously. Does someone see this problem before? What is the root course for this? What is the approach to troubleshoot this problem?
Any suggestions or ideas would be appreciated.

For some reasons, I was not allowed to past image here. Here are text info instead:
Date  5/12/2014 4:15:00 PM
Log  Job History (Coupa_PaymentProcess)
Step ID  1
Server  HAL-HOU01-SQL11
Job Name  Coupa_PaymentProcess
Step Name  Coupa_PaymentProcess_SSIS
Duration  00:02:43
Sql Severity 0
Sql Message ID 0
Operator Emailed 
Operator Net sent 
Operator Paged 
Retries Attempted 0
Message
Executed as user: HALCONRESOURCES\Svc.ogsys.sql. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  4:15:00 PM  Error:
2014-05-12 16:16:20.83     Code: 0xC0019004     Source: Coupa_Payment_Process      Description: The expression for variable "PaymentArchPath" failed evaluation. There was an error in the expression. 
End Error  DTExec: The package execution returned DTSER_SUCCESS (0).  Started:  4:15:00 PM  Finished: 4:17:43 PM  Elapsed:  163.661 seconds.  The package executed successfully.  The step succeeded.
Date  5/12/2014 4:15:00 PM
Log  Job History (Coupa_PaymentProcess)
Step ID  1
Server  HAL-HOU01-SQL11
Job Name  Coupa_PaymentProcess
Step Name  Coupa_PaymentProcess_SSIS
Duration  -3976.20:33:55
Sql Severity 0
Sql Message ID 0
Operator Emailed 
Operator Net sent 
Operator Paged 
Retries Attempted 0
Message
Executed as user: HALCONRESOURCES\Svc.ogsys.sql. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  4:15:00 PM  Error:
2014-05-12 16:16:23.20     Code: 0xC0019004     Source: Coupa_Payment_Process      Description: The expression for variable "PaymentArchPath" failed evaluation. There was an error in the expression. 
End Error  DTExec: The package execution returned DTSER_SUCCESS (0).  Started:  4:15:00 PM  Finished: 4:12:17 PM  Elapsed:  163.926 seconds.  The package executed successfully.  The step succeeded.

Similar Messages

  • Alternative step on Biztalk "terminator" process, regarding disabling all sql server jobs prior to running.

    I am getting errors in one of the BT jobs, they recommend running a terminator tool available from MS ... One of the requirements is to disable all the sql server jobs, my question is: Can I just stop the sql server agent? Or this won't do it ....
    Thanks
    Bico Bielich

    Hi,
    I assume that you are talking about issue identified by Monitor BizTalk Server job.
    Why you want to stop the sql server agent? There could be other Non-BizTalk jobs running too.
    You just need to make sure that you have a BizTalk Backup of your databases, all the BTS hosts have been stopped,
    BTS SQL Agent jobs have been disabled.
    Refer: 
    http://blogs.msdn.com/b/biztalkcpr/archive/2011/02/10/using-biztalk-terminator-to-resolve-issues-identified-by-biztalk-msgboxviewer.aspx
    Pls follow the link and perform action based on the respective issue reported by the
    Monitor BizTalk Server job.
    Rachit

  • Sql server job is succeeding even though it should fail

    Hi,
    I created a sql server job with one job step for a SSIS package using Powershell.
    When I run the job (manually), it shows "success" state, but it should fail (because of the bad configuration parameters).
    But if I go to job properties, and then edit job step properties (don't have to make any changes here, just clicking ok button is enough)
    then the job run will fail as expected.
    I am not sure why it is not failing first time?
    Any help is appreciated.
    Thanks
    -Bhargavi

    I set "QuitWithFailure" option for the 'OnFailAction' of the job.
    $jobStep.OnFailAction = "QuitWithFailure" 
    Here is the code:
           write-Host ""
            Write-Host "Create job for $tenantid"
            $jobName = "Auto-"+$tenantid
            $job = New-Object Microsoft.SqlServer.Management.SMO.Agent.Job($server.JobServer,$jobName)
             #Delete the job if it already exists
            if($Server.JobServer.Jobs.Contains($jobName))
                 write-host "Deleting job $jobName"             
                $sqlCommand.CommandText = "EXEC msdb.dbo.sp_delete_job @job_name = N'$jobName', 
               @delete_unused_schedule=1;"
                $result = $sqlCommand.ExecuteNonQuery()               
            $job.Create()
            #Create job step
            Write-host "Creating job step for $jobName"
            $jobStep = New-Object Microsoft.SqlServer.Management.Smo.Agent.JobStep($job, $jobName)
            $jobStep.Subsystem= [Microsoft.SqlServer.Management.Smo.Agent.AgentSubSystem]::SSIS                                                                                                                                     
            $jobStep.Command = "/ISSERVER \SSISDB\"+$ssisFolderName+"\"+$ssisProjectName+"\Test.dtsx"+" /SERVER "+$instanceName
            $jobStep.OnSuccessAction = "QuitWithSuccess"
            $jobStep.OnFailAction = "QuitWithFailure"     
            $jobStep.Create()
            $job.ApplyToTargetServer($instanceName)
            $job.StartStepID =$jobStep.ID
            $job.Alter()

  • Executing SSIS packages through SQL Server Jobs.

    Hi,
    I have an SSIS package which generates xml and text files and ftps it to an ftp site. When i run the package from BIDS it works successfully but when i run it from a job it fails. My SSIS package connects to DB server A and though i'm creating a job on DB
    server A but my folder structure and the package resides in server B from where i'm connecting to DB server A through Management Studio. I'm using File system in SQL server Agent Job to call the package. When i execute the job i get following error:
    Executed as user: I\A. ...er Execute Package Utility  Version 9.00.3042.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  5:08:05 PM  Error: 2011-06-21 17:08:05.11         
    Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.  End Error  Error: 2011-06-21 17:08:05.11         Description:
    Failed to open package file "E:\P\H\R\Tools\R\R\R.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the
    result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has .  The step failed.
    Could you please tell me where am i going wrong?
    Thanks,
    Deepti
    Deepti

    Hi Christa Kurschat,
    I'm running the job under proxy account. And that account has sysadmin permissions.
    I used following script to create proxy account and run my package under that account:
    I. Create job executor account
    Highlight Security->New Login, say to make login as devlogin, type your password, default database can be your target database.
    Server roles: check �sysadmin�
    User mapping: your target database
    Msdb database: you make sure to include
    SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole
    Then click OK
    II. Create SQL proxy account and associate proxy account with job executor account
    Here is the code and run it the query window.
    Use master
    CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
    Use msdb
    Sp_add_proxy @proxy_name='MyProxy', @credential_name='MyCredential'
    Sp_grant_login_to_proxy @login_name=' devlogin', @proxy_name='MyProxy'
    Sp_grant_proxy_to_subsystem @proxy_name='MyProxy', @subsystem_name='SSIS'
    III. Create SSIS package
    In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package (DTS) and make sure you can execute this package
    in SQL Server Business Intelligence Development Studio. Compile/build this package.
    IV. Create the job, schedule the job and run the job
    In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job�, name it , myJob.
    Under Steps, New Step, name it, Step1,
    Type: SQL Server Integration Service Package
    Run as: myProxy
    Package source: File System
    Browse to select your package file xxx.dtsx
    Click Ok
    Schedule your job and enable it
    I followed these steps.
    Thanks,
    Deepti
    Deepti

  • SQL Server jobs fail if I signout the Remote Desktop connection

    I have some SSIS jobs running in the production server which we usually take that server by Windows' Remote Desktop Connection to monitor the jobs. The problem in our case is If we sign out the server in remote connection, all the sql server jobs getting failed
    until we reestablish a remote connection but the jobs work fine if we close the remote connection explicitly by the (x) mark on the Remote Connection interface
    Any idea on this issue

    always same error like the following
    Code: 0xC0014009     Source: Connection manager "Invoice"     
    Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.  End Error  Error: 2015-01-12 08:00:05.26     Code: 0x0000020F     Source: DFT GetData  [2]  
    Description: The AcquireConnection method call to the connection manager Invoice failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error:
    2015-01-12 08:00:05.26     
    Code: 0xC0047017     Source: DFT GetData SSIS.Pipeline     
    Description:  Data failed validation and returned error code 0x80004005.  End Error  Error: 2015-01-12 08:00:05.27     
    Code: 0xC004700C     Source: DFT GetData SSIS.Pipeline     
    Description: One or more component failed validation.  End Error  Error: 2015-01-12 08:00:05.28     
    Code: 0xC0024107     Source: DFT GetData      
    Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  8:00:00 AM  Finished: 8:00:06 AM  Elapsed:  5.678 seconds.  The package execution
    failed.  The step failed.

  • Firing SQL Server Job Through Java

    Hi All
    How can I fire a SQL Server Job from Java. I am from data warehousing background and new to java. I process my cubes though a package in DTS and have encapsulated the package in a job.
    I can connect to the SQL Server where the package & job reside.
    Regards
    Abhinav

    Can it be called like a stored procedure? If so (and probably it can) look into CallableStatement... a good first step would be to see how to run it through SQl statements in an admin tool (like QueryAnalyzer) to see how it can be invoked.
    If it can be invoked through SQL at all you can call it in Java. Also be aware of permission issues.

  • What is the commands for SQL server job to ftp file to remote server?

    I created the job to bcp data out and create file on file system. after that, I need to ftp the file over to another box. how can I do it from sql server job?
    JulieShop

    I would like to suggest a SSIS package with a
    FTP Task instead.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SQL Server Job Monitoring

    Hi,
    I am looking at implementing Grid Control monitoring on our SQL Server estate.
    One of the items we need to monitor for is SQL Server jobs which have failed (including job name and date).
    Does anyone have an idea of how this can be done. I'm sure I must be missing a trick here as it would seem strange that this information is being collected but can't be put into a metric or notification.
    Any assistance or pointers greatly appreciated!

    Could you please clarify what exactly is your question and what phase are you in implementing monitoring SQL Server usign Grid Control?
    Are you just about to install the plug-in for SQL Server or you are already trying to configure monitoring SQL Server jobs? I'm asking this because you mentioned "I am looking at implementing Grid Control monitoring on our SQL Server estate." which implies you are just planning to implement.
    Try reading metalink note 367797.1. You'll find lots of information and other metalink notes which may resolve your problem.
    If you can clarify your exact problem, the better.

  • Running Cmdexec in SQL Server Job

    Hi Everyone,
    I wanted to run a scripts in a job to clean up my folders in SQL Server 2005. The scripts is as below:
    for /f %%i in ('dir /b /s /AD F:\ASCC_FileStore\CITIntegration') do cscript D:\Scripts\BizTalk\BizTalk_WMI.vbs -maintainfolder "%%i"
    No error was happening when it was executed in a batch file.
    but when I ran it in a SQL job, I got below error:
    %%i was unexpected at this time.
    Could you please give me some advice? Thank you very much.
    regards,
    Oliver

    Hi Oliver_Wang,
    According to your description, if you want to delete files with a SQL Agent job in SQL Server, you can also use xp_cmdshell
     command. Here is a full SQL query that is used for deleting the files.
    ----------------------------------- Enabling the COMMAND SHELL ------------------------------
    --Script to enable the XP_CMDSHELL
    -- To allow advanced options to be changed.
    EXEC sp_configure 'show advanced options', 1
    GO
    -- To update the currently configured value for advanced options.
    RECONFIGURE
    GO
    -- To enable the feature.
    EXEC sp_configure 'xp_cmdshell', 1
    GO
    -- To update the currently configured value for this feature.
    RECONFIGURE
    GO
    ----------------------------------- Deleting the files in ------------------------------------
    -- Suppose we need to delete all .txt files under the path (such as "D:\temp\Testing\")
    xp_cmdshell 'DEL D:\temp\Testing\*.txt'
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Running SSIS 2005 in SQL Server Job Agent 2012

    Hi Guys,
    I'm trying to create a job in SQL 2012 that calls an SSIS 2005 package, however i'm getting some issue.  I researched the issue a bit and got this link . The given link suggested to use dtexec as SQL 2012 try to convert it in the memory.
    I used the dtexec  but I'm still getting an issue.
    "Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 9.00.1399.06 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  4:11:19 PM  Error:
    2015-04-13 16:11:26.24     Code: 0xC0012024     Source: OTH Market Exist?      Description: The task "OTH Market Exist?" cannot run on this edition of Integration Services. It requires a higher level edition.  End
    Error  Error: 2015-04-13 16:11:26.24     Code: 0xC0012024     Source: Arcticle CSV Exist?      Description: The task "Arcticle CSV Exist?"
    cannot run on this edition of Integration Services. It requires a higher level edition.  End Error  Error: 2015-04-13 16:11:26.24     Code: 0xC0012024     Source: BV Market Exist?      Description:
    The task "BV Market Exist?" cannot run on this edition of Integration Services. It requires a higher level edition.  End Error  Error: 2015-04-13 16:11:26.51     Code: 0xC002F210     Source: No Input
    Files Email Execute SQL Task     Description: Executing the query "DECLARE @result int;  EXEC @result = security.dbo.spSendEmail  
    @Subject='[GFK Import & Export] - All Input Files Are Missing',  
    @Message ='Processing has been stopped due to missing input files',  
    @ToID =25,   @ccID =0,  
    @Attachment =''" failed with the following error: "Database 'security' does not exist. Make sure that the name is entered correctly.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,
    It seems that I do need to upgrade my packages to run in SQL 2012 unless if there's another way without upgrading it that would be great.
    I just want to get the confirmation if possible or not
    Many thanks guys.

    Hi Vaibhav,
    I created 2 jobs. the first job calls a simple package that execute a single SQL. It ran
    successfully when I execute the said job using this command 
    DTEXEC /FILE "\"C:\TFS\WDSHE SSIS Packages from DTS\GFK_Test_package.dtsx\"" /DECRYPT stud10 /CHECKPOINTING OFF /REPORTING E
    2nd Job, calls a complex package which contains several execute process tasks. this job fails with the error mentioned at the top.
    Now, I modified the simple package in the first job and add an Execute Process Task.
    I'm started to get an issue
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 9.00.1399.06 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  4:51:57 PM  Error: 2015-04-13
    16:52:01.32     Code: 0xC0012024     Source: Unzip BV ZIP      Description: The task "Unzip BV ZIP" cannot run on this edition of Integration Services. It requires a higher level edition.  End Error  DTExec:
    The package execution returned DTSER_FAILURE (1).  Started:  4:51:57 PM  Finished: 4:52:01 PM  Elapsed:  4.212 seconds.  Process Exit Code 1.  The step failed.
    Have you had a similar issues before?
    I will try to install the SSIS service and see how I go. thanks for the link

  • SQL Server job failed. The Job was invoked by Schedule 11 (NAV Backup 1). The last step to run was step 1 (Subplan_1)

    Date 07-01-2014 10:00:00 PM
    Log Job History (NAV Backup 1.Subplan_1)
    Step ID 1
    Server NAVSRV
    Job Name NAV Backup 1.Subplan_1
    Step Name Subplan_1
    Duration 00:02:26
    Sql Severity 0
    Sql Message ID 0
    Operator Emailed
    Operator Net sent
    Operator Paged
    Retries Attempted 0
    1122

    About your question on How and Who changed it, i told that nobody changed it. I found in this way.
    1122
    I also Saw the plan and the path of Database and database log was ok , i mean PHARMANEXT_LOG_95ABA2F6-DC67-4CFC etc...
    was exactly like in the C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
    Maybe is something wrong with my backup script, but i dont think so because before 23 of december
    everithing was ok. After this date it failed.
    Anyway check this script of "Remove SQL log" , the one that you think is a culprit:
    DECLARE @name VARCHAR(50)
    DECLARE @fileName VARCHAR(256)
    DECLARE db_cursor CURSOR FOR 
    SELECT name 
    FROM master.dbo.sysdatabases 
    WHERE name NOT IN ('master','model','msdb','tempdb') 
    OPEN db_cursor  
    FETCH NEXT FROM db_cursor INTO @name  
    WHILE @@FETCH_STATUS = 0  
    BEGIN  
    SET @filename = @name + '_log' 
    Exec ('Use [master] alter database [' + @name + '] set recovery simple')
    Exec ('Use [master] alter database [' + @name + '] set recovery FULL')
            Exec ('Use [' + @name + '] DBCC SHRINKFILE ("' + @filename + '",1)')
           FETCH NEXT FROM db_cursor INTO @name  
    END  
    CLOSE db_cursor  
    DEALLOCATE db_cursor
    go
    Hello,
    You have created a cursor which will take all user databases and change recovery model to Simple and then to full what this will cause it will break the log chain and you might loose your RPO and RTO.This operation truncates the log .Please stop this job
    immediately.It is worst you can do to your Database recovery and availability.After this you are trying to shrink .
    As pointed out it is seriously not advised to shrink data file.And if you have proper trn log backup it manages the growth of log file
    Hope this helps
    Keep looking for any such activity which might change anything in your database
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL server 2005 SP3 can run SAP B1 2005A SP01 PL51

    Hi All,
    I could successfully install SAP B1 2005A SP01 PL51 in the SQL server 2005 SP3.
    In this link:
    http://service.sap.com/smb/sbo/platforms
    you won't find it such info.
    Why I upgrade, it is caused by the printing error issue using citrix.
    Anyone of you that have problem after run the B1 on that SQL, pls share.
    Someone who need webex file that shows the install process can request it to me. Let me know.
    Rgds,

    Hi Arshdeep,
    Thx for your reply. I just wonder why SAP did not inform the availability SP3 from Microsoft and the explanation about the inapplicable of SP3 for SAP B1 in the B1 platform link.
    I have  tested without using any steps and any other procedures. Practice is a good lesson to learn for me. Nevertheless, one concern from modern customers are the compatibility or adaptibility of SAP B1 to Microsoft product especially SQL since it is one of database platform.
    Old-fashioned customer will disregard that because they will think as long as my SAP B1 and SQL server still run well, I don't care..
    Rgds,

  • Automated SQL Agent jobs do not run

    Hi all
    I am having serious issues in running SSIS packages automatically.
    Furthermore, when I assign a job to run the SSIS package manually (SSMS -> Start Job at Step....), it runs through the job very quickly and displays "success", when in actual fact, it hasn't done anything.
    I have tested my package in BIDS and all works fine.
    Can anyone give me a clue as to what may be going wrong please?
    Many thanks in advance.

    Hi divvyboy,
    Based on your description, the issue may be caused by one of the following factors:
    Data source connection issue. This can occur because the SQL Server Agent Service Account or the proxy account lacks permissions to access the data source.
    Package Protection Level issue.
    For the solution in each scenario, please refer to the following link:
    http://social.technet.microsoft.com/Forums/sqlserver/en-US/e13c137c-1535-4475-8c2f-c7e6e7d125fc/how-do-i-troubleshoot-ssis-packages-failed-execution-in-a-sql-agent-job?forum=sqlintegrationservices.
    If the issue persists, please post the error details from the SQL Server Agent job history.
    Regards,
    Mike Yin
    TechNet Community Support

  • SQL Agent Job Fails To Run A SSIS Package

    Hi,
    I have a SSIS Package which basically truncates the table and re-loads it from an excel file .The job runs fine if i run it manually on visual studio.However, i try to shcedule a SQL Agent job and it fails with the following error
     Description: The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.  An OLE DB record is available.  Source: "Microsoft
    OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".  End Error  Error: 2014-10-22 14:47:41.15     Code: 0xC001002B     Source: Package1 Connection manager "Excel
    Connection Manager 1"     Description: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. 
    I am exactly not sure what it means?
    Can someone please help me with any suggestions on this.
    Thanks.

    Thanks for trying that option . It looks like there is an issue with the driver . Can you try to install/uninstall the driver once again from http://www.microsoft.com/en-us/download/details.aspx?id=13255.
    You can try this URL , where he has the similar problem 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8a40d329-0611-44e2-ae51-3bd9b0901754/ssis-the-requested-ole-db-provider-microsoftaceoledb120-is-not-registered?forum=sqlintegrationservices
    Please mark this as answer if this helps to solve your problem

  • SharePoint farm - SQL Server - MSSQLSERVER service is running as "Local System" - Can I change it to Domain User account?

    Hi there,
    In my SharePoint 2010 farm - on the SQL Server:
    The MSSQLSERVER service is running under Local System.
    1. Can I change it to run as a normal Domain User account?
    2. Does it need any extra privileges?
    3. Is it a safe thing to do?
    Brief description will be very useful.
    Thanks so much.

    You need to create Service account with password never expire option+ User never change password
    Then you need to go through below recommendation from Microsoft
    Security Considerations for a SQL Server Installation
    Planning for Services, Accounts, and Connections
    Hope you got starting point
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for

  • ISync does not synch w/ palm

    iSync crashes while synching with palm. Loading “Conflict Notifier” Notifier 'Conduit Conflict Notifier' version 1.0.0 Notifier Conduit Conflict Notifier OK Loading “Install Conduit” Conduit “Install” version 3.0.0 Sync type is Install/Restore OK Ins

  • Creating a list of unique values within a range.

    I have a huge data set I am working with and need to do two things. First I need to get rid of any repeat entires, which there are many. Second, and more importantly, I need to generate a list of unique values within a column for which I have no idea

  • GL Account Text not displayed in Login Language

    Hi All We are having EN and NL as the login languages in our SAP ECC 6.0. We create  GL account in login language EN and maintain the English version description for  Short and Long text in "key word/translation" tab and  maintain  NL  short and Long

  • Best way to update an OLTP table ?

    Hi, We have an OLTP table with huge data. We need to update a status column from 'N' to 'Y' for almost 70% of rows based on some condition. This table may be accessed by hundreds of sessions at a time. So, what is the best way to do the same. Rgds, R

  • Hide the flash files under CMC folders

    How to hide the flash files which are in a particular folder in Infoview so that only few users have access to view them.