PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Grant pemission to run a job (no more)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Grant pemission to run a job (no more)

Réponse
 
LinkBack Outils de la discussion
Vieux 29/08/2008, 21h35   #1
Ray_s
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Grant pemission to run a job (no more)

Hi,
on sql 2005, I want to grant a particular user (login) the permission to run
a single sql job and nothing else. Is this possible, and how to do that?

Thanks


  Réponse avec citation
Vieux 30/08/2008, 17h36   #2
Russell Fields
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Grant pemission to run a job (no more)

Ray,

If that user is the owner of the job, then he can start it whenever he
wants. Of course, that probably does not satisfy your requirement, so
another approach is to use RAISERROR.

You can create a stored procedure to use RAISERROR to raise an alert. The
alert can be configured to start a job. You also have to create a message
number with logging.

USE msdb
EXEC msdb.dbo.sp_add_job @name = N'Make Something Special Happen', ...
USE master
EXEC sp_addmessage @msgnum=90001, @severity=10,
@msgtext=N'Starting -- Make Something Special Happen',
@with_log = 'True'
USE msdb
EXEC msdb.dbo.sp_add_alert
@name=N'Start Make Something Special Happen',
@message_id=99901, @severity=0,
@enabled=1, @delay_between_responses=0,
@include_event_description_in=1,
@database_name=N'DBNameWhereTheStoredProcExists',
@job_Name=N'Make Something Special Happen'

The stored procedure would then contain the following code:
RAISERROR 99901,10,1

The upside is that the job remains owned by the proper account and the user
needs no elevation of rights to start it. The downside of this is that
anyone who knows the alert error number can RAISERROR for it. So you don't
actually need a stored procedure, but that could be a way of limiting who
knows the error number. (Especially if you create it as an encrypted stored
procedure.)

RLF

"Ray_s" <NoOne@Hotmail.com> wrote in message
news:OmYEw5gCJHA.1228@TK2MSFTNGP02.phx.gbl...
> Hi,
> on sql 2005, I want to grant a particular user (login) the permission to
> run a single sql job and nothing else. Is this possible, and how to do
> that?
>
> Thanks
>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h37.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07141 seconds with 10 queries