Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



dbo.sp_dts_deletepackage

 

sp_dts_deletepackage is no longer supported in SQL 2008. You can use sp_ssis_deletepackage.

Could not find stored procedure 'sp_dts_deletepackage'.
 




Syntax
CREATE PROCEDURE [dbo].[sp_dts_deletepackage]
  @name sysname,
  @folderid uniqueidentifier
AS
  DECLARE @sid varbinary(85)
  DECLARE @writerolesid varbinary(85)
  DECLARE @writerole nvarchar(128)
  SELECT
      @sid = [ownersid],
      @writerolesid = [writerolesid]
  FROM
      sysdtspackages90
  WHERE
      [name] = @name AND
      [folderid] = @folderid AND
      [packageformat] = 0
  IF @sid IS NOT NULL
  BEGIN
      --// The row exists, check security
      IF @writerolesid IS NOT NULL
      BEGIN
          SELECT @writerole = [name] FROM sys.database_principals WHERE [type] = 'R' AND [sid] = @writerolesid
          IF @writerole IS NULL SET @writerole = 'db_dtsadmin'
      END
      IF @writerole IS NULL
      BEGIN
          IF (IS_MEMBER('db_dtsadmin')<>1) AND (IS_SRVROLEMEMBER('sysadmin')<>1)
          BEGIN
              IF (@sid<>SUSER_SID()) OR (IS_MEMBER('db_dtsltduser')<>1)
              BEGIN
                  RAISERROR (14307, -1, -1, @name)
                  RETURN 1  -- Failure
              END
          END
      END
      ELSE
      BEGIN
          IF (IS_MEMBER(@writerole)<>1)
          BEGIN
              IF (@sid<>SUSER_SID()) OR (IS_MEMBER('db_dtsltduser')<>1)
              BEGIN
                  RAISERROR (14307, -1, -1, @name)
                  RETURN 1  -- Failure
              END
          END
      END
  END
  DELETE FROM sysdtspackages90
  WHERE
      [name] = @name AND
      [folderid] = @folderid AND
      [packageformat] = 0

 
Last revision
See also

  sp_delete_job_references (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash