Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Sunday, March 25, 2012

Can't start a job that was created by user A from user B

Hello all,
I have a job I created with user A, but I need user B to be able to execute
this job programatically. I've given user B permission to EXECUTE the
"msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
error thrown. The following is the error I get when I run it with user B.
This error does not appear when I run it with user A.
The specified @.job_name ('MyJobName') does not exist.
After doing some research by looking at the system sprocs, I found that the
error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
researched that sproc and then found the system code that is throwing the
error, listed below.
-- Check if the job name is ambiguous
IF ((SELECT COUNT(*)
FROM msdb.dbo.sysjobs_view
WHERE (name = @.job_name)) > 1)
BEGIN
RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
@.name_of_name_parameter)
RETURN(1) -- Failure
END
I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
were returned. So it appears that the view is filtering the results by user
and the job is not found which is causing the error.
Do you guys know of a way I can make this work? I would appreciate any help.
Thanks!
Johnny
Hi Johnny,
Only members of the sysadmin fixed role or the jobowner can start a job.
HTH
Adam
Adam J Warne, MCDBA
"Johnny" wrote:

> Hello all,
> I have a job I created with user A, but I need user B to be able to execute
> this job programatically. I've given user B permission to EXECUTE the
> "msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
> error thrown. The following is the error I get when I run it with user B.
> This error does not appear when I run it with user A.
> The specified @.job_name ('MyJobName') does not exist.
> After doing some research by looking at the system sprocs, I found that the
> error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
> researched that sproc and then found the system code that is throwing the
> error, listed below.
> -- Check if the job name is ambiguous
> IF ((SELECT COUNT(*)
> FROM msdb.dbo.sysjobs_view
> WHERE (name = @.job_name)) > 1)
> BEGIN
> RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
> @.name_of_name_parameter)
> RETURN(1) -- Failure
> END
>
> I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
> were returned. So it appears that the view is filtering the results by user
> and the job is not found which is causing the error.
> Do you guys know of a way I can make this work? I would appreciate any help.
> Thanks!
> Johnny
>
|||Thanks. I didnt want to do that but I guess I have no choice.
Johnny
"Adam Warne" wrote:
[vbcol=seagreen]
> Hi Johnny,
> Only members of the sysadmin fixed role or the jobowner can start a job.
> HTH
> Adam
> --
> Adam J Warne, MCDBA
>
> "Johnny" wrote:

Can't start a job that was created by user A from user B

Hello all,
I have a job I created with user A, but I need user B to be able to execute
this job programatically. I've given user B permission to EXECUTE the
"msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
error thrown. The following is the error I get when I run it with user B.
This error does not appear when I run it with user A.
The specified @.job_name ('MyJobName') does not exist.
After doing some research by looking at the system sprocs, I found that the
error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
researched that sproc and then found the system code that is throwing the
error, listed below.
-- Check if the job name is ambiguous
IF ((SELECT COUNT(*)
FROM msdb.dbo.sysjobs_view
WHERE (name = @.job_name)) > 1)
BEGIN
RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
@.name_of_name_parameter)
RETURN(1) -- Failure
END
I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
were returned. So it appears that the view is filtering the results by user
and the job is not found which is causing the error.
Do you guys know of a way I can make this work? I would appreciate any help.
Thanks!
JohnnyHi Johnny,
Only members of the sysadmin fixed role or the jobowner can start a job.
HTH
Adam
--
Adam J Warne, MCDBA
"Johnny" wrote:

> Hello all,
> I have a job I created with user A, but I need user B to be able to execut
e
> this job programatically. I've given user B permission to EXECUTE the
> "msdb.dbo.sp_start_job" sproc and the user is able to execute it but with
an
> error thrown. The following is the error I get when I run it with user B.
> This error does not appear when I run it with user A.
> The specified @.job_name ('MyJobName') does not exist.
> After doing some research by looking at the system sprocs, I found that th
e
> error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'.
I
> researched that sproc and then found the system code that is throwing the
> error, listed below.
> -- Check if the job name is ambiguous
> IF ((SELECT COUNT(*)
> FROM msdb.dbo.sysjobs_view
> WHERE (name = @.job_name)) > 1)
> BEGIN
> RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
> @.name_of_name_parameter)
> RETURN(1) -- Failure
> END
>
> I performed a SELECT * query to the sysjobs_view view with user B and 0 ro
ws
> were returned. So it appears that the view is filtering the results by use
r
> and the job is not found which is causing the error.
> Do you guys know of a way I can make this work? I would appreciate any hel
p.
> Thanks!
> Johnny
>|||Thanks. I didnt want to do that but I guess I have no choice.
Johnny
"Adam Warne" wrote:
[vbcol=seagreen]
> Hi Johnny,
> Only members of the sysadmin fixed role or the jobowner can start a job.
> HTH
> Adam
> --
> Adam J Warne, MCDBA
>
> "Johnny" wrote:
>

Can't start a job that was created by user A from user B

Hello all,
I have a job I created with user A, but I need user B to be able to execute
this job programatically. I've given user B permission to EXECUTE the
"msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
error thrown. The following is the error I get when I run it with user B.
This error does not appear when I run it with user A.
The specified @.job_name ('MyJobName') does not exist.
After doing some research by looking at the system sprocs, I found that the
error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
researched that sproc and then found the system code that is throwing the
error, listed below.
-- Check if the job name is ambiguous
IF ((SELECT COUNT(*)
FROM msdb.dbo.sysjobs_view
WHERE (name = @.job_name)) > 1)
BEGIN
RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
@.name_of_name_parameter)
RETURN(1) -- Failure
END
I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
were returned. So it appears that the view is filtering the results by user
and the job is not found which is causing the error.
Do you guys know of a way I can make this work? I would appreciate any help.
Thanks!
JohnnyHi Johnny,
Only members of the sysadmin fixed role or the jobowner can start a job.
HTH
Adam
--
Adam J Warne, MCDBA
"Johnny" wrote:
> Hello all,
> I have a job I created with user A, but I need user B to be able to execute
> this job programatically. I've given user B permission to EXECUTE the
> "msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
> error thrown. The following is the error I get when I run it with user B.
> This error does not appear when I run it with user A.
> The specified @.job_name ('MyJobName') does not exist.
> After doing some research by looking at the system sprocs, I found that the
> error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
> researched that sproc and then found the system code that is throwing the
> error, listed below.
> -- Check if the job name is ambiguous
> IF ((SELECT COUNT(*)
> FROM msdb.dbo.sysjobs_view
> WHERE (name = @.job_name)) > 1)
> BEGIN
> RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
> @.name_of_name_parameter)
> RETURN(1) -- Failure
> END
>
> I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
> were returned. So it appears that the view is filtering the results by user
> and the job is not found which is causing the error.
> Do you guys know of a way I can make this work? I would appreciate any help.
> Thanks!
> Johnny
>|||Thanks. I didnt want to do that but I guess I have no choice.
Johnny
"Adam Warne" wrote:
> Hi Johnny,
> Only members of the sysadmin fixed role or the jobowner can start a job.
> HTH
> Adam
> --
> Adam J Warne, MCDBA
>
> "Johnny" wrote:
> > Hello all,
> >
> > I have a job I created with user A, but I need user B to be able to execute
> > this job programatically. I've given user B permission to EXECUTE the
> > "msdb.dbo.sp_start_job" sproc and the user is able to execute it but with an
> > error thrown. The following is the error I get when I run it with user B.
> > This error does not appear when I run it with user A.
> >
> > The specified @.job_name ('MyJobName') does not exist.
> >
> > After doing some research by looking at the system sprocs, I found that the
> > error is thrown from a call made to 'msdb.dbo.sp_verify_job_identifiers'. I
> > researched that sproc and then found the system code that is throwing the
> > error, listed below.
> >
> > -- Check if the job name is ambiguous
> > IF ((SELECT COUNT(*)
> > FROM msdb.dbo.sysjobs_view
> > WHERE (name = @.job_name)) > 1)
> > BEGIN
> > RAISERROR(14293, -1, -1, @.job_name, @.name_of_id_parameter,
> > @.name_of_name_parameter)
> > RETURN(1) -- Failure
> > END
> >
> >
> > I performed a SELECT * query to the sysjobs_view view with user B and 0 rows
> > were returned. So it appears that the view is filtering the results by user
> > and the job is not found which is causing the error.
> >
> > Do you guys know of a way I can make this work? I would appreciate any help.
> > Thanks!
> >
> > Johnny
> >sql

Friday, February 24, 2012

Can't Login to Sql Server 2005

HELP! I was working on a SSIS package trying to execute a SQL Transfer
Object task when it errored out saying it didn't have permission to
access the database. So I tried to manually scipt the Create Database
option and it gave me the same message. Then I was kicked out
completely and it won't let me back into the server not matter what
login I use. I'm using Windows Authentication mode only. So I'm at a
total loss. Any ideas? Thanks
EdHi
Have you checked the server itself? Can you connect with Management Studio?
John
"ed.brunet@.gmail.com" wrote:
> HELP! I was working on a SSIS package trying to execute a SQL Transfer
> Object task when it errored out saying it didn't have permission to
> access the database. So I tried to manually scipt the Create Database
> option and it gave me the same message. Then I was kicked out
> completely and it won't let me back into the server not matter what
> login I use. I'm using Windows Authentication mode only. So I'm at a
> total loss. Any ideas? Thanks
> Ed
>

Can't Login to Sql Server 2005

HELP! I was working on a SSIS package trying to execute a SQL Transfer
Object task when it errored out saying it didn't have permission to
access the database. So I tried to manually scipt the Create Database
option and it gave me the same message. Then I was kicked out
completely and it won't let me back into the server not matter what
login I use. I'm using Windows Authentication mode only. So I'm at a
total loss. Any ideas? Thanks
EdHi
Have you checked the server itself? Can you connect with Management Studio?
John
"ed.brunet@.gmail.com" wrote:

> HELP! I was working on a SSIS package trying to execute a SQL Transfer
> Object task when it errored out saying it didn't have permission to
> access the database. So I tried to manually scipt the Create Database
> option and it gave me the same message. Then I was kicked out
> completely and it won't let me back into the server not matter what
> login I use. I'm using Windows Authentication mode only. So I'm at a
> total loss. Any ideas? Thanks
> Ed
>