如何删除保存在SQL Server上的SSIS包?

时间:2023-01-06 10:28:39

I have an SSIS package that I've saved under Maintenance Plans on SQL Server 2005. Though I can select SSIS packages, I am not sure how I can delete them.

我有一个SSIS包,我已经在SQL Server 2005的维护计划下保存了。虽然我可以选择SSIS包,但我不确定如何删除它们。

4 个解决方案

#1


8  

It sounds like you are trying to delete the package from Database Engine --> Management --> Maintenance Plans. Try connecting to "Integration Services" instead of the Database engine and look for the package you want to delete under Running Packages or Stored Packages.

听起来您正试图从数据库引擎 - >管理 - >维护计划中删除该包。尝试连接到“Integration Services”而不是数据库引擎,并在“运行包”或“存储的包”下查找要删除的包。

From there you should be able to right click and delete.

从那里你应该能够右键单击并删除。

#2


4  

Depending on what version of SQL Server you are using, there is a system table that contains the packages. In my 2005 version the table is called msdb.dbo.sysdtspackages90. You can also look for tables such as msdb.dbo.sysdtspackages or msdb.dbo.sysssispackages. To delete a package simply delete it from this table.

根据您使用的SQL Server版本,有一个包含这些包的系统表。在我的2005版本中,该表名为msdb.dbo.sysdtspackages90。您还可以查找msdb.dbo.sysdtspackages或msdb.dbo.sysssispackages等表。要删除包,只需将其从此表中删除即可。

#3


4  

If you are looking for a scripted method to remove the packages from SQL Server you can do the following:

如果要查找脚本方法从SQL Server中删除软件包,可以执行以下操作:

The following code will delete a package deployed as "\Maintenance Plans\DatabaseBackup-Full-All" from a server named "MYSQLSERVER01"

以下代码将从名为“MYSQLSERVER01”的服务器中删除部署为“\ Maintenance Plans \ DatabaseBackup-Full-All”的软件包

DTUTIL /SQL "\Maintenance Plans\DatabaseBackup-Full-All" /DELETE /SourceServer MYSQLSERVER01 >> rollback.log

The following code will deploy a package located in the current directory on the filesystem named "DatabaseBackup-Full-All.dtsx" to a server named "MYSQLSERVER01" as "\Maintenance Plans\DatabaseBackup-Full-All"

以下代码将位于名为“DatabaseBackup-Full-All.dtsx”的文件系统上当前目录中的程序包部署到名为“MYSQLSERVER01”的服务器,作为“\ Maintenance Plans \ DatabaseBackup-Full-All”

DTUTIL /FILE "DatabaseBackup-Full-All.dtsx" /COPY SQL;"\Maintenance Plans\DatabaseBackup-Full-All" /QUIET /DestServer MYSQLSERVER01 >> release.log

These code samples are run from the command line. I have also included the >> release.log and >> rollback.log so that you can save the execution log to a file.

这些代码示例从命令行运行。我还包括>> release.log和>> rollback.log,以便您可以将执行日志保存到文件中。

Don't forget to cd into whatever directory has you Package File to run the script as is, or update the code above to have the complete (local or unc) file path of your package.

不要忘记cd到任何包文件目录中按原样运行脚本,或者更新上面的代码以获得包的完整(本地或非文件)文件路径。

#4


0  

John DaCosta's solution worked for me. I wrote the following query to output the deletion commands and pasted the results into a command shell window:

John DaCosta的解决方案对我有用。我编写了以下查询来输出删除命令并将结果粘贴到命令shell窗口中:

SELECT CONCAT('DTUTIL /SQL "\', f.foldername, '\', name, '" /DELETE /SourceServer MyServerName')
FROM msdb.dbo.sysssispackages s
JOIN msdb.dbo.sysssispackagefolders f
    on s.folderid = f.folderid
WHERE ownersid <> 0x01

#1


8  

It sounds like you are trying to delete the package from Database Engine --> Management --> Maintenance Plans. Try connecting to "Integration Services" instead of the Database engine and look for the package you want to delete under Running Packages or Stored Packages.

听起来您正试图从数据库引擎 - >管理 - >维护计划中删除该包。尝试连接到“Integration Services”而不是数据库引擎,并在“运行包”或“存储的包”下查找要删除的包。

From there you should be able to right click and delete.

从那里你应该能够右键单击并删除。

#2


4  

Depending on what version of SQL Server you are using, there is a system table that contains the packages. In my 2005 version the table is called msdb.dbo.sysdtspackages90. You can also look for tables such as msdb.dbo.sysdtspackages or msdb.dbo.sysssispackages. To delete a package simply delete it from this table.

根据您使用的SQL Server版本,有一个包含这些包的系统表。在我的2005版本中,该表名为msdb.dbo.sysdtspackages90。您还可以查找msdb.dbo.sysdtspackages或msdb.dbo.sysssispackages等表。要删除包,只需将其从此表中删除即可。

#3


4  

If you are looking for a scripted method to remove the packages from SQL Server you can do the following:

如果要查找脚本方法从SQL Server中删除软件包,可以执行以下操作:

The following code will delete a package deployed as "\Maintenance Plans\DatabaseBackup-Full-All" from a server named "MYSQLSERVER01"

以下代码将从名为“MYSQLSERVER01”的服务器中删除部署为“\ Maintenance Plans \ DatabaseBackup-Full-All”的软件包

DTUTIL /SQL "\Maintenance Plans\DatabaseBackup-Full-All" /DELETE /SourceServer MYSQLSERVER01 >> rollback.log

The following code will deploy a package located in the current directory on the filesystem named "DatabaseBackup-Full-All.dtsx" to a server named "MYSQLSERVER01" as "\Maintenance Plans\DatabaseBackup-Full-All"

以下代码将位于名为“DatabaseBackup-Full-All.dtsx”的文件系统上当前目录中的程序包部署到名为“MYSQLSERVER01”的服务器,作为“\ Maintenance Plans \ DatabaseBackup-Full-All”

DTUTIL /FILE "DatabaseBackup-Full-All.dtsx" /COPY SQL;"\Maintenance Plans\DatabaseBackup-Full-All" /QUIET /DestServer MYSQLSERVER01 >> release.log

These code samples are run from the command line. I have also included the >> release.log and >> rollback.log so that you can save the execution log to a file.

这些代码示例从命令行运行。我还包括>> release.log和>> rollback.log,以便您可以将执行日志保存到文件中。

Don't forget to cd into whatever directory has you Package File to run the script as is, or update the code above to have the complete (local or unc) file path of your package.

不要忘记cd到任何包文件目录中按原样运行脚本,或者更新上面的代码以获得包的完整(本地或非文件)文件路径。

#4


0  

John DaCosta's solution worked for me. I wrote the following query to output the deletion commands and pasted the results into a command shell window:

John DaCosta的解决方案对我有用。我编写了以下查询来输出删除命令并将结果粘贴到命令shell窗口中:

SELECT CONCAT('DTUTIL /SQL "\', f.foldername, '\', name, '" /DELETE /SourceServer MyServerName')
FROM msdb.dbo.sysssispackages s
JOIN msdb.dbo.sysssispackagefolders f
    on s.folderid = f.folderid
WHERE ownersid <> 0x01