sql-server-agent

The SELECT permission was denied on the object 'sysjobs', database 'msdb', schema 'dbo'

别等时光非礼了梦想. 提交于 2019-12-03 16:18:16
I'm getting the following error when trying to read a SQL Job. The SELECT permission was denied on the object 'sysjobs', database 'msdb', schema 'dbo' How can I fix this? You need to GRANT the SELECT permission for the user of your job. A simple GRANT . USE pubs GO GRANT SELECT ON authors TO public GO Further information about GRANT You use the "SQL Server Agent Fixed Database Roles" in msdb (MSDN link): don't assigned permission directly, it'll be a pain to manage And a "how to" for SSMS: "How to: Configure a User to Create and Manage SQL Server Agent Jobs (SQL Server Management Studio)" Note

Could not obtain information about Windows NT group user

浪子不回头ぞ 提交于 2019-12-03 14:25:15
问题 I am creating a SQL Server Replication using a script. When I try to execute The job failed. Unable to determine if the owner (STAR\moorer7) of job L3BPT2M-Atlas-14 has server access (reason: Could not obtain information about Windows NT group/user 'STAR\moorer7', error code 0x5. [SQLSTATE 42000] (Error 15404)). This is a job created by a script that defines replication. How do I debug this? 回答1: Active Directory is refusing access to your SQL Agent. The Agent should be running under an

Could not obtain information about Windows NT group user

我们两清 提交于 2019-12-03 04:13:53
I am creating a SQL Server Replication using a script. When I try to execute The job failed. Unable to determine if the owner (STAR\moorer7) of job L3BPT2M-Atlas-14 has server access (reason: Could not obtain information about Windows NT group/user 'STAR\moorer7', error code 0x5. [SQLSTATE 42000] (Error 15404)). This is a job created by a script that defines replication. How do I debug this? Remus Rusanu Active Directory is refusing access to your SQL Agent. The Agent should be running under an account that is recognized by STAR domain controller. We encountered similar errors in a testing

Can you run an SSIS task from .net?

断了今生、忘了曾经 提交于 2019-12-03 02:54:09
I have scheduled sql agent task which runs an SSIS package. I want to be able to run the SSIS package from .net. Is there a way to either run the SSIS package directly or at least run the SQL agent task which would in turn run the SSIS package. If it helps it is for a .net 3.5 web app written in C# Thanks! The options that are available to run a SSIS package are - Run package programmatically using SSIS Object Model. This is discussed in details in Books Online here . An Example: using System; using Microsoft.SqlServer.Dts.Runtime; namespace RunFromClientAppCS { class Program { static void

Cannot bulk load because the file could not be opened. Operating System Error Code 3

旧巷老猫 提交于 2019-12-03 01:04:27
I'm trying to set up a Stored Procedure as a SQL Server Agent Job and it's giving me the following error, Cannot bulk load because the file "P:\file.csv" could not be opened. Operating system error code 3(failed to retrieve text for this error. Reason: 15105). [SQLSTATE 42000] (Error 4861) Funny thing is the Stored Procedure works just fine when I execute it manually. The drive P: is a shared drive on Windows SQL Server from LINUX via Samba Share and it was set up by executing the following command, EXEC xp_cmdshell 'net use P: "\lnxusanfsd01\Data" Password /user:username /Persistent:Yes' Any

SQL Server Agent Job Set Up

蓝咒 提交于 2019-12-01 13:47:24
I'm a newbie to SQL and .Net and this question might be stupid too to ask but I still need help. I've a Database located on Server1. Now I got another Server, lets call it Server2 to work on my Development. Server1 on which my database is located seems to be a SQL Server Express installation so I don't see a SQL Server Agent in there. Server2 has a SQL Server Agent. So can I use Server2's SQL Server Agent and schedule queries to run automatically on Server1? Is this possible? If it is then can someone explain me how to do it. I've successfully run Jobs from SQL Express, there's no built in

How to get the last run job details in SQL

五迷三道 提交于 2019-12-01 08:39:56
How to get the last run job details in SQL Server Agent using SQL including the step details only for the last run job (not the job outcome) as i want to display this in an application Please help been stuck on this for ages This is the code I have been using below, this brings back all steps for all Jobs in the Job History, However, I just want to see the steps from the last run job thanks USE msdb Go SELECT j.name JobName,h.step_name StepName, CONVERT(CHAR(10), CAST(STR(h.run_date,8, 0) AS dateTIME), 111) RunDate, STUFF(STUFF(RIGHT('000000' + CAST ( h.run_time AS VARCHAR(6 ) ) ,6),5,0,':'),3

How to get the last run job details in SQL

北战南征 提交于 2019-12-01 05:40:51
问题 How to get the last run job details in SQL Server Agent using SQL including the step details only for the last run job (not the job outcome) as i want to display this in an application Please help been stuck on this for ages This is the code I have been using below, this brings back all steps for all Jobs in the Job History, However, I just want to see the steps from the last run job thanks USE msdb Go SELECT j.name JobName,h.step_name StepName, CONVERT(CHAR(10), CAST(STR(h.run_date,8, 0) AS

How to backup SQL Server Agent jobs?

你。 提交于 2019-11-30 19:03:01
How can I backup and restore SQL Server 2005 Agent job schedules? the msdb database is where all the jobs live, it is one of the system databases You can also script all the jobs out as a sql file and store them in svn or other source control if you'd like to track changes. 来源: https://stackoverflow.com/questions/1094040/how-to-backup-sql-server-agent-jobs

How to backup SQL Server Agent jobs?

こ雲淡風輕ζ 提交于 2019-11-30 03:10:14
问题 How can I backup and restore SQL Server 2005 Agent job schedules? 回答1: the msdb database is where all the jobs live, it is one of the system databases 回答2: You can also script all the jobs out as a sql file and store them in svn or other source control if you'd like to track changes. 来源: https://stackoverflow.com/questions/1094040/how-to-backup-sql-server-agent-jobs