Buscar este blog

viernes, 15 de febrero de 2013

Modificar Permisos en DTS

Los usuarios que necesitan tener permisos para ejecutar, modificar los DTS. En la versión SQL Server 2008 hay que modificar el sp de sistema 'sp_add_dtspackage' comentariar parte del sp. '/* */'

--// We will use the original owner_sid for all new versions - all must have the same owner.
 --// New packages will get the current login's SID as owner_sid.
 DECLARE @owner_sid VARBINARY(85)
 SELECT @owner_sid = MIN(owner_sid) FROM sysdtspackages WHERE id = @id
 IF @@rowcount = 0 OR @owner_sid IS NULL
 BEGIN
 SELECT @owner_sid = SUSER_SID()
 END /* ELSE BEGIN
 --// Only the owner of DTS Package ''%s'' or a member of the sysadmin role may create new versions of it.
 IF (@owner_sid <> SUSER_SID() AND (ISNULL(IS_SRVROLEMEMBER(N'sysadmin'), 0) <> 1))
 BEGIN
 RAISERROR (14586, -1, -1, @name)
 RETURN(1) -- Failure
 END
 END
 */

No hay comentarios:

Publicar un comentario