Can't Add SQL Agent job in the SQLserver

HI All,
We are trying to adding a job in one SQLSERVER2008R2.
Whenever I clicked ‘New’ to add a step, found following error:
creating an instance of the com component with clsid from the iclassfactory failed due to the following error c001f011
Can anyone suggest to resolve this issue.

Will this fix your issue?
FIX: You cannot create, add, or edit steps for an SQL Server Agent job in SQL Server Management Studio 2008 R2

Similar Messages

  • Can't edit SQL Agent job step

    Hello. In SQL 2005 Enterprise I've added a user to SqlAgentUseRole in msdb. They can create a job but cannot later go back and edit a step; everything is grayed out. I saw this article about an error in SQL 2008 that's been fixed in 2008 CU3.
    http://support.microsoft.com/kb/2315727
    I'm not sure if this is the same issue. If it's a different issue, does anyone know if it's been addressed in SQL 2012?
    Ken

    This issue is due to limited rights on SqlAgentUseRole in msdb, user can Create/modify/delete only owned jobs
    As mentioned in below link:
    http://technet.microsoft.com/en-us/library/ms188283.aspx
    Further, provide access on some msdb procedures as discussed in below thread:
    sp_update_job
    sp_update_jobschedule
    sp_update_jobstep
    http://social.msdn.microsoft.com/Forums/en-US/c62b61a0-7f66-4cb9-a5a6-577d5f73e8aa/permissions-to-modify-sql-agent-jobs?forum=sqlsecurity
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Backup SQL Agent Jobs - whats the difference between "create to" and "drop to" using "script job as"?

    Hi,
    This should be straightforward, but being new to SQL Server 2008, can someone advise the difference between "create to" and "drop to" using "script job as"?
    Thanks
    IT Support/Everything

    hello,
    "CREATE TO" create a CREATE statement for the job, e.g. to execute this script on a other server to create the same job there.
    "DROP TO" means you get a script to delete an existing job.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SSIS ETL does not pick the file from Share point when it execute through SQL Agent job

    I have created one SSIS packages, which pick the file from the Share point document library. its work successfully, once it execute through the VS project application. 
    But when i create a job in SQL Server Agent for this package then it does not pick the file and job getting fail. 
    Just for more update, SQL Server has been install in Cluster mode and using BIDS 2012 with SQl Server 2012.

    Hi PriyankGupta,
    SQL Server Integration Services is not cluster awareness, and does not support failover from one cluster node to another. So, in your clustered environment, make sure SSIS is installed on each node in the cluster. In other word, SSIS must be installed on
    the server where the SQL Server Agent job is created. 
    If you use any third party task/component or drivers, make sure they are installed on the SQL Server Agent job server. Besides, also pay attention to the protection level of the package as well as 32-bit or 64-bit runtime mode of the package. For more information,
    please see:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/e13c137c-1535-4475-8c2f-c7e6e7d125fc/how-do-i-troubleshoot-ssis-packages-failed-execution-in-a-sql-agent-job 
    If the issue persists, please post the error message in the job history for further analysis.
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS Package will only run as SQL Agent Job when I have remote desktop to server open.

    Hey guys, so I have another problem to add to the already massive 'SSIS/SQL Server Agent Job' pile. After days of searching, I can't seem to find anything specific to my problem though.
    The setup is as follows: a SSIS package that refreshes and saves excel files that are hosted on a server. The package runs fine on the local machine, using BIDS on the server, and will even work as a SQL Agent Job on the server IF there is a remote
    desktop connection to the server. To elaborate, if I simply run the job as you would normally do it will fail and give the below error. If I run the job while either myself, or a different machine, has a remote desktop connection to the server where the
    job is scheduled - it will run successfully.
    Below is the error from the History File of the job. Any help would be greatly appreciated.
      Source: Refresh Excel and Save      Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8000401A): Retrieving
    the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.     at ST_79772452677f4de1852d5ffbba3e5232.csproj.ScriptMain.ExcelRefresh(String FileName)    
    at ST_79772452677f4de1852d5ffbba3e5232.csproj.ScriptMain.Main()     --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&
    sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)    
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
    invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo
    culture, String[] namedParams)     at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)     at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
    UPDATE:
    In my previous post the Identity in DCOM Config file for Microsoft Excel was set as The Interactive User. The job was working only when I had a remote connection to the server open.
    If I set the Identity to 'This User' and use the username and password of the server login account, it will work as a scheduled job without needing an open remote connection to the server. So it works, great! but I have reservations setting this
    for all instances of Excel for the server. I'm sure other users have different accounts they use for running Excel. Any suggestions around this?

    Hi LiamSexton,
    It should be the server-side Automation of Office issue described in the following KB article:
    http://support.microsoft.com/kb/257757 
    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit
    unstable behavior and/or deadlock when Office is run in this environment.
    User Identity: Office applications assume a user identity when the applications are run, even when Automation starts the applications. The applications try to initialize toolbars, menus, options, printers, and some add-ins based on settings in the user
    registry hive for the user who launches the application. Many services run under accounts that have no user profiles (such as the SYSTEM account or the IWAM_[servername] accounts). Therefore, Office may not initialize correctly on startup. In this situation,
    Office returns an error on the CreateObject function or the CoCreateInstance function. Even if the Office application can be started, other functions may not work correctly if no user profile exists.
    To work around the issue, you can refer to the following alternative introduced in the article:
    Most server-side Automation tasks involve document creation or editing. Office 2007 supports new Open XML file formats that let developers create, edit, read, and transform file content on the server side. These file formats use the System.IO.Package.IO
    namespace in the Microsoft .NET 3.x Framework to edit Office files without using the Office client applications themselves. This is the recommended and supported method for handling changes to Office files from a service.
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS configuration Not Working With SQL agent Job

    Hi,
    I have created an SSIS configuration table in SQL Server where in I store all connection strings. This configuration is enabled within my package. To make even the DB where I store connection strings, I have an environment varibale. I thus have 2 configurations
    in the following order:
    1. env variable: Points to the DB where in my connection strings would be stored.
    2. SQl Server configuration:where I actually, store the connection strings.
    However , when I try to execute the package, it seems the SQL Server agent does not read from the Configuration tables at all.
    Can someone let me know how to enable this from within SQL Server agent? I do not store connection strings in a file, so I can't add any files within the configuration tab.
    Please let me know as to how do I enable configurations stored within SQL tables from SQL Server Agent jobs. I am using SQL Server 2008.

    Todd,
    Yes, I have enabled the configurations from within the package. When I open the package from BIDS, I do see information stating that package is trying to read from the environment variable and from the SQL Server.
    However, when the same package is used in a SQL Agent job, in the data sources tab, I see the connection string which I have set manually within the package, not the one which it should read from the Configuration table.
    E.g. in the design of my package, I am using Server A with Credential1, but within the Configuration table, against the same Connection, for the Same Server , I have stored Credential2.
    It should read the Credential2, as I have configuration enabled (as I can also verify from the messages within BIDS, upon opening the pacakge).
    However, it just reads the same Credential1, which has been supplied at design time.
    Not sure how can I access the Configuration stored within the SQL table from a SQL Agent job

  • Permissions to modify SQL Agent Jobs

    Permissions
    on SQL Server Agent
    I would
    like to assign the permission to user ,who can edit all SQL agent job(even own by others) without assigning the sysadmin role.
    is it possible?
    regards
    EA

    Hallo Ekbal,
    only granting access to the procs will not fit because internally these procs check whether the executing account is member of the sysadmin-role of of any other roles which need the required permissions.
    What you have to do is the development of a wrapper-proc which covers the execution with a different user. Get details concerning here:
    http://msdn.microsoft.com/en-us/library/ms178106(v=sql.90).aspx
    Long story short - you have to do the following steps if you execute the procedures in the context of a certificate:
    1. Create a certificate you want to use for the execution of the wrapper procs in msdb
    CREATE CERTIFICATE cert_Jobs
    ENCRYPTION BY PASSWORD = 'myUltracomplexPassword'
    WITH SUBJECT = 'Certificate for JobManagement',
    START_DATE = '20120101',
    EXPIRY_DATE = '29991231'
    2. Backup the certificate for later implementation in the master and implementation in master database
    BACKUP CERTIFICATE cert_JobHistory TO FILE = 'C:\temp\cert_JobHistory.cer';
    USE master;
    GO
    CREATE CERTIFICATE cert_JobHistory FROM FILE = 'C:\temp\cert_JobHistory.cer';
    3. Create a login based on the certifcate and make it a sysadmin
    CREATE LOGIN login_JobHistory FROM CERTIFICATE [cert_JobHistory];
    GRANT AUTHENTICATE SERVER TO [login_JobHistory];
    GO
    EXEC sp_addsrvrolemember @loginame = 'login_JobHistory', @rolename = 'sysadmin';
    4. create a user in msdb for the login, create a wrapper proc for sp_update_job
    USE msdb
    GO
    CREATE USER login_JobHistory FROM LOGIN [login_JobHistory];
    GO
    CREATE PROC dbo.proc_wrapper_update_job
    @paramter_list of sp_upate_job
    WITH EXECUTE AS OWNER
    AS
    BEGIN
    EXEC dbo.sp_update_job @parameter_list
    END
    5. add signature of certificate to the proc
    ADD SIGNATURE TO OBJECT::dbo.proc_wrapper_update_job
    BY CERTIFICATE [cert_JobHistory]
    WITH Password = ''myUltracomplexPassword';
    6. Grant EXECUTE-permission on the proc to dedicated users you want to manage the jobs
    IMHO this process is a bad workaround and - just my point of view - not practicable but I don't see any other solution than granting sysadmin privileges for the dedicated users. What you can do also is doing the modification to the mentioned procs but this
    is definitely not recommended because these procs are system procs and you will loose support from Microsoft!
    Get more details concerning execution of procedures by certificates by visiting the following links:
    AUTHENTICATE SERVER:
    http://support.microsoft.com/kb/906549
    Using certificates for execution of procs:
    http://msdn.microsoft.com/en-us/library/bb283630(v=sql.105).aspx
    Uwe Ricken
    MCSE - SQL Server 2012
    MCSA - SQL Server 2012
    MCITP Database Administrator 2005
    MCITP Database Administrator 2008
    MCITP Microsoft SQL Server 2008, Database Development
    db Berater GmbH
    http://www-db-berater.de
    SQL Server Blog (german only)

  • SQL Agent jobs status for multiple servers using Powershell.

    Hi All,
    I am following website link:
    http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/09/17/powershell-script-to-monitor-a-service-on-a-group-of-servers-html-formatted-email-output.aspx
    I require to gather status details about all the SQL Agent jobs in the environment on multiple SQL Servers.
    I tried to edit the script using:
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO")
    $sqlServerName = 'localhost\developer'
    $sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($sqlServerName)
    foreach($job in $sqlServer.JobServer.Jobs)
        $job | select Name, OwnerLoginName, IsEnabled, LastRunDate, LastRunOutcome, DateCReated, DateLastModified
    but SQL Agent jobs are not reflecting in the mail output...
    requesting help...!!
    Thanks in Advance.
    Hunt

    I've created a new script for you.  Let me know if you've any questions
    Create the function
    Function Get-SQLJobHTMLReport
    param(
    [String]$ComputerList,[string]$Outputfile,[String]$To,[String]$From,[string]$SMTPMail
    New-Item -ItemType file $Outputfile -Force
    # Function to write the HTML Header to the file
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString(‘yyyy/MM/dd’)
    Add-Content $fileName “<html>”
    Add-Content $fileName “<head>”
    Add-Content $fileName “<meta http-equiv=’Content-Type’ content=’text/html; charset=iso-8859-1′>”
    Add-Content $fileName ‘<title>Service Status Report </title>’
    add-content $fileName ‘<STYLE TYPE=”text/css”>’
    add-content $fileName “<!–”
    add-content $fileName “td {“
    add-content $fileName “font-family: Tahoma;”
    add-content $fileName “font-size: 11px;”
    add-content $fileName “border-top: 1px solid #999999;”
    add-content $fileName “border-right: 1px solid #999999;”
    add-content $fileName “border-bottom: 1px solid #999999;”
    add-content $fileName “border-left: 1px solid #999999;”
    add-content $fileName “padding-top: 0px;”
    add-content $fileName “padding-right: 0px;”
    add-content $fileName “padding-bottom: 0px;”
    add-content $fileName “padding-left: 0px;”
    add-content $fileName “}”
    add-content $fileName “body {“
    add-content $fileName “margin-left: 5px;”
    add-content $fileName “margin-top: 5px;”
    add-content $fileName “margin-right: 0px;”
    add-content $fileName “margin-bottom: 10px;”
    add-content $fileName “”
    add-content $fileName “table {“
    add-content $fileName “border: thin solid #000000;”
    add-content $fileName “}”
    add-content $fileName “–>”
    add-content $fileName “</style>”
    Add-Content $fileName “</head>”
    Add-Content $fileName “<body>”
    add-content $fileName “<table width=’100%’>”
    add-content $fileName “<tr bgcolor=’#CCCCCC’>”
    add-content $fileName “<td colspan=’4′ height=’25′ align=’center’>”
    add-content $fileName “</td>”
    add-content $fileName “</tr>”
    add-content $fileName “</table>”
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName “<tr bgcolor=#CCCCCC>”
    Add-Content $fileName “<td width=’10%’ align=’center’>ServerName</td>”
    Add-Content $fileName “<td width=’50%’ align=’center’>Name</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>OwnerLoginName</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>IsEnabled</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>LastRunDate</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>LastRunOutcome</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>DateCReated</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>DateLastModified</td>”
    Add-Content $fileName “</tr>”
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName “</body>”
    Add-Content $fileName “</html>”
    Function writeDiskInfo
    param($filename,$Servername,$name,$OwnerLoginName,$IsEnabled,$LastRunDate,$LastRunOutcome,$DateCReated,$DateLastModified)
    Add-Content $fileName “<tr>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$servername</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$name</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$OwnerLoginName</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$IsEnabled</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunDate</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunOutcome</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateCReated</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateLastModified</td>”
    Add-Content $fileName “</tr>”
    writeHtmlHeader $Outputfile
    Add-Content $Outputfile “<table width=’100%’><tbody>”
    Add-Content $Outputfile “<tr bgcolor=’#CCCCCC’>”
    Add-Content $Outputfile “<td width=’100%’ align=’center’ colSpan=8><font face=’tahoma’ color=’#003399′ size=’2′><center><strong> SQL Server Agent Job Details</strong></font></td>”
    Add-Content $Outputfile “</tr>”
    writeTableHeader $Outputfile
    #Change value of the following parameter as needed
    Foreach($ServerName in (Get-Content $ComputerList))
    $sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($ServerName)
    foreach($item in $sqlServer.JobServer.Jobs)
    Write-Host $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
    writeDiskInfo $Outputfile $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
    Add-Content $Outputfile “</table>”
    writeHtmlFooter $Outputfile
    Function sendEmail
    param($from,$to,$subject,$smtphost,$htmlFileName)
    [string]$receipients=”$to”
    $body = Get-Content $htmlFileName
    $body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
    $body.isBodyhtml = $true
    $smtpServer = $smtphost
    $smtp = new-object Net.Mail.SmtpClient($smtphost)
    $smtp.Send($body)
    write-output “Email Sent!!”
    $date = ( get-date ).ToString(‘yyyy/MM/dd’)
    sendEmail -from $From -to $to -subject “Service Status – $Date” -smtphost $SMTPMail -htmlfilename $Outputfile
    Get-SQLJobHTMLReport -ComputerList f:\powersql\server.txt -SMTPMail hq.abc.com -To [email protected] -From [email protected] -Outputfile F:\Powersql\jobs.htm
    --Prashanth

  • How can I edit the Alert Description for a SQL Agent Job monitor, specifically Job Duration.

    I'm setting up some sql agent job monitoring, I need to monitor for Job Duration. 
    This is easy enough, I just create the overrides and set the parameters and it alerts as expected, however there is no alert text. The alert does me no good with out an alert description. How can I change this?
    Paul Arbogast

    Paul
    It is not an easy way for your just copy that monitor and modify it. If you has interest, you may use MP2XMLDumper tool to export SQL server monitoring MP , modify relate moniotr and import it into SCOM.
    You can download  MP2XMLDumper tool  from
    http://blogs.technet.com/b/cliveeastwood/archive/2007/08/22/mp2xmldumper-version-2-0-export-opsmgr-mp-s-to-xml-using-mp-name-export-criteria.aspx 
    Roger

  • SQL Agent Job failing - not using credentials in the config file for Data source

    Hi
    We have an SSIS pkg, that is secheduled as SQL Agent job using proxy account. The pkg contanins data source for connecting different SQL servers and the proxy account do not have access to the external DBs. The data source credentials are stored in the Config
    file.
    Why the job is not using the credentials in the config file and try to use the proxy account and failing.
    Do the proxy account need access to all the external dbs in the pkg, and then what is the purpose of the config file.
    I am sorry, i am not SSIS person trying to understand. If any one can explain tha will be great!!
    Thank you!
    VR

    Please take a look at these URLs:
    Schedule a Package by using SQL Server Agent
    SSIS package does not run when called from a SQL Server Agent job step
    Cheers,
    Saeid Hasani
    Database Consultant
    Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
    [My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
    [Twitter] [Facebook] [Email]

  • How do I automatically backup SQL Agent jobs and SSIS packages on the mirror daily?

    I have seen this question asked before but I could not find a satisfactory answer. What is the best solution to get your SQL Agent jobs/schedules/etc. and your SSIS packages on the mirror server? Here's the details:
    Server A is the principal with 2 DBs mirrored over to server B. Everything is fine and dandy, DBs are synched and all good. In Disaster Recovery testing, we need to bring up server B, which now will serve as the principal. Server A is inaccessible. Now,
    we need all our jobs that are setup in server A to be in server B, ready to go, but disabled. We also need all our SSIS packages properly stored. Yes, we store our packages in the MSDB in server A.
    Now, I can see a few answers coming my way.
    1- Backup the MSDB to server B. When you bring server B up as principal in DR, restore the MSDB. All your jobs,schedules,steps, SSIS packages will be there. Is this possible? Can this be done on server B without rendering it incapable of serving as the principal
    for the mirrored DBs? My fear with this option is that there may be information in the MSDB itself about the mirroring state of the DBs? Or is all that in the Master DB? Have you tried this?
    2- Right click each job, script them out, re-create them on server B... No, thank you very much. :) I am looking for an AUTOMATED, DAILY backup of the jobs and SSIS packages. Not a manual process. Yes, we do change jobs and packages quite often and doing
    the job twice on two servers is not an option.
    3- Use PowerShell.. Really? Are we going back to scripting at the command prompt like that, that fast?
    Since I fear option number 3 will be the only way to go, any hints on scripts you guys have used that you like that does what I need to do?
    Any other options?
    Any help GREATLY appreciated. :-) I can be sarcastic but I am a good guy..
    Raphael
    rferreira

    I would go with option number 3. Once  you have a script simple run it....
    param([string]$serverName,[string]$outputPath) 
    function script-SQLJobs([string]$server,[string]$outputfile) 
        [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null 
        $srv = New-Object Microsoft.SqlServer.Management.Smo.Server("$server") 
        $db = New-Object Microsoft.SqlServer.Management.Smo.Database 
        $scrp = New-Object Microsoft.SqlServer.Management.Smo.Scripter($srv) 
        $scrp.Options.ScriptDrops = $FALSE 
        $scrp.Options.WithDependencies = $TRUE 
        $jobs = $srv.JobServer.get_Jobs() 
        $jobs=$jobs | Where-Object {$_.Name -notlike "sys*"}     
        foreach($job in $jobs) 
            $script=$job.Script() 
            $script >> $outputfile 
            "GO" >> $outputfile 
    ---script-SQLJobs "SQLSRV12" "C:\Jobs\test.txt" 
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance

  • While i am trying to start the sql server agent job getting the error

    Hi,
    when ever i am trying to executing the sql server agent job's through manual that time  i am getting the below error.

    Hi,
    when ever i am trying to executing the sql server agent job's through manual that time  i am getting the below error.
    I searched  net for this type of error and found that Latest SP can fix this issue.See below link
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/12181324-bc51-41a5-a8a5-608bfe2725e9/could-not-load-type-smoagentjobbasecollection?forum=sqlsmoanddmo
    Can you also refer to this link 
    http://www.sqldbadiaries.com/2010/12/20/could-not-load-file-or-assembly-error-while-using-tdp-makes-a-come-back/
    Also please see this connect also
    http://connect.microsoft.com/SQLServer/feedback/details/280907/sql-agent-job-actions-fail-from-job-activity-monitor
    hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Help finding the SQL agent job status messages

    I am building a report in SSRS which will show the status of all the SQL agent jobs ran on a particular day. IMHO, the status messages created in the job history are not that useful. So, I would like to show the status message which can found by following
    the path given below:
    Integration Services Catalog -> SSISDB -> Solution Name -> Projects -> Project Name -> Packages -> Right click Package Name-> Reports -> Standard Reports -> All Executions -> Click on All Messages
    If you follow the exact path, we find out the exact error related to last unsuccessful execution of the job.
    Can someone please tell me how to find it?
    The message from [msdb].[dbo].[sysjobhistory] is not helpful for me.

    Thank you all for your help. After taking cues from what you guys said..I have come up with this:
    USE [msdb]
    GO
    /****** Object:  StoredProcedure [dbo].[SQL_Agent_Jobs_Details]    Script Date: 3/24/2015 4:02:09 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[SQL_Agent_Jobs_Details](@JobName varchar(5000)
    ,@LastRunDate nvarchar(20)
    ,@LastRunStatus varchar(50)
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    DECLARE @SQL VARCHAR(8000)
    DECLARE @NewLastRunStatus INT
        -- Insert statements for procedure here
    SET @NewLastRunStatus = (SELECT CASE @LastRunStatus 
    WHEN 'Created' THEN 1
    WHEN 'Running' THEN 2
    WHEN 'Canceled' THEN 3
    WHEN 'Failed' THEN 4
    WHEN 'Pending' THEN 5
    WHEN 'Ended unexpectedly' THEN 6
    WHEN 'Succeeded' THEN 7
    WHEN 'Stopping' THEN 8
    ELSE 9
    END )
    SET @SQL = '
    SELECT DISTINCT 
    E.folder_name
    ,E.project_name
    ,S.JobName
    ,E.package_name
    ,E.environment_name
    --,E.execution_id
    ,E.executed_as_name
    --,E.operation_type
    --,E.process_id
    , CASE e.[status]
    WHEN 1 THEN ''Created''
    WHEN 2 THEN ''Running''
    WHEN 3 THEN ''Canceled''
    WHEN 4 THEN ''Failed''
    WHEN 5 THEN ''Pending''
    WHEN 6 THEN ''Ended unexpectedly''
    WHEN 7 THEN ''Succeeded''
    WHEN 8 THEN ''Stopping''
    ELSE ''Completed''
    END [Status]
    ,E.start_time
    ,E.end_time
    ,E.server_name
    ,E.machine_name
    ,EM.event_name
    ,EM.message_source_name
    ,EM.message_time
    ,case EM.[message_type] WHEN 120 THEN ''Error'' else ''TaskFailed'' END [message_type]
    ,EM.[message]
    ,EM.execution_path
    FROM     [SSISDB].[catalog].[executions] E
    LEFT OUTER JOIN
    [SSISDB].[catalog].[event_messages] EM ON E.[execution_id] = EM.[operation_id]
    LEFT JOIN
    [MSDB].DBO.SQL_Agent_Jobs_Packages S
    ON S.PackageName = E.package_name
    WHERE EM.message_type in(120,130) AND 1=1 
    --AND E.package_name = ''Anna_Maria_Daily_Contacts_Parent.dtsx'' 
    IF @JobName IS NOT NULL 
    BEGIN
    SET @SQL  = @SQL + '  AND S.JobName IN (' +''''+REPLACE(@JobName,',',''',''')+''')' 
    END
    IF (cast(@LastRunDate as date) IS NOT NULL AND cast(@LastRunDate as date)!='1900-01-01')
    BEGIN
    SET @SQL  = @SQL + ' AND CAST(isnull(EM.message_time, ''1900-01-01'') AS DATE) IN ('+''''+REPLACE(cast(@LastRunDate as date),',',''',''')+''')' 
    END
    IF @LastRunStatus IS NOT NULL 
    BEGIN
    SET @SQL  = @SQL + '  AND e.[status] IN (' +''''+REPLACE(@NewLastRunStatus,',',''',''')+''')' 
    END
    SET @SQL  = @SQL + ' ORDER BY E.start_time DESC,E.end_time DESC'
    --SELECT @SQL
    EXEC (@SQL)
    END
    You can use the above script to create a dynamic sproc which takes the above mentioned params.

  • Sql agent jobs based on the database and the user

    Dear All,
    I have a requirement of configuring an user who should only have access to one database out of all and also able to create, view and modify sql agent jobs only for the allowed database. For allowing to see the selected database to particular user I have
    granted permissions as per below,
    create LOGIN mhtc WITH PASSWORD='mhtc', CHECK_POLICY = OFF;
    USE master;
    GO
    DENY VIEW ANY DATABASE TO mhtc;
    USE master;
    GO
    ALTER AUTHORIZATION ON DATABASE::MHTC TO mhtc;
    GO
    but user not able to see sql agent jobs so I want to give necessary permission to this user to view,create and modify sql agent jobs only in allowed databases. Basically I want to separate users from each database and separate sql agent jobs based on the
    user and database.
    Your expert advices are highly appreciated.
    Thanks,
    Manjula

    I want to give necessary permission to this user to view,create and modify
    sql agent jobs only in allowed databases.
    Hello Manjula,
    SQL Server Agent Jobs are not created / dedicated for a user database. The Jobs are store in System database "msdb".
    See
    Implement SQL Server Agent Security for Details about required permissions.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication

    Hi ALl,
    I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
    . This package runs fine if i click the server connection properties type the password and save it.
    Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying 
    "Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
    Can someone please help me with any suggestions on how to do this?
    I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
    So, If someone can please throw any suggestions or ideas on this it would be great.
    Thanks

    You need to add password as a config item and set it from the file source or sql table
    see this as an example
    http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Internet Explorer Error while running VS2005 asp form from devt envt.

    Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30560: 'Or

  • Calling IP function in ABAP report

    Hi guys, I would like to execute a planning function of BIIP from an ABAP report. Which function module has to be used or is there a different approach? For the old BPS planning function there was the API_SEM_BPS.... Regards Stefan

  • Vendor Liabilities Aging

    Hi I need  the sql for vendor liabilities aging and add one field into the sql sentence with query Manager

  • IPod with clicking wheel help needed

    I went to turn on my iPod today and when i turned it on the Apple came up on the screen, but when it should have gone to the menu screen, the screen just shuts off. My ipod has a full charge and i use it almost everyday. Has anyone else experienced t

  • Deleting quicktime

    I'm trying to delete a previous version of quicktime however everytime I try to a window pops up then disappears within a second. Whats going on? I'm trying to install the newest version of itunes however during the middle of installation it states "