简体   繁体   English

如何使用Powershell查看哪些sql server数据库有维护计划?

[英]How can I use Powershell to see which sql server databases have maintenance plans?

I am trying to use Powershell to find out which sql server databases have maintenance plans setup, so that I can export this information to a report. 我正在尝试使用Powershell来找出哪些sql server数据库有维护计划设置,以便我可以将此信息导出到报告中。 I have been using gwmi to retrieve other information that I require for the same report. 我一直在使用gwmi检索同一报告所需的其他信息。

I have looked on Google, but can't seem to find anything relevant. 我看过谷歌,但似乎找不到任何相关的东西。 I am not a sql server expert, so I am not sure if maintenance plans have files that i could search for or if there is any other way using wmi. 我不是一个SQL服务器专家,所以我不确定维护计划是否有我可以搜索的文件,或者是否有任何其他方式使用wmi。 I am running the powershell script from a workstation that does not have any version of sql server installed. 我从没有安装任何版本的sql server的工作站运行powershell脚本。

Any advice would be great 任何建议都会很棒

Maintenance plans are not accessible via SMO, but if they're implemented in SSIS you can look at those packages. 无法通过SMO访问维护计划,但如果在SSIS中实施维护计划,您可以查看这些包。 Have a look here & here . 看看这里这里

If you've never gotten into this sort of thing before, you probably want to have an experienced DBA walk you through it, at least at first. 如果您以前从未接触过这类事情,那么您可能希望让经验丰富的DBA引导您完成这项工作,至少在开始时如此。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server 2008中的远程维护计划 - Remote Maintenance Plans in SQL Server 2008 如何在SQL Server Management Studio中找出哪些数据库的哪些表中具有给定名称的列? - How can i find out which tables in which databases have a column with a given name in SQL Server Management Studio? 如何查看SQL Server中更改了哪些表? - How can I see which tables are changed in SQL Server? 如何找出哪些查询(或计划)使用 Azure SQL 或 SQL 服务器上的特定索引? - How to find out which queries (or plans) use a particular index on Azure SQL or SQL Server? SQL维护计划中使用了哪些数据库? - Which databases are used within a SQL maintenance plan? 在sql server 2012的管理下找不到维护计划文件夹 - cannot find maintenance plans folder under managment in sql server 2012 我可以使用哪个SQL命令来查看SQL Server上表的结构? - Which SQL command can I use to see the structure of a table on SQL Server? 如果给出了SQL Server对象列表,如何确定每个对象驻留在哪些数据库中? - If given a list of SQL Server objects, how can I determine which databases each object resides in? Django:我有一个失败的save()。如何查看生成的SQL? - Django : I have a save() which is failing. How can I see the SQL that's generated? SQL Server 2000:如何确定一个存储过程已缓存了多少个计划? - SQL Server 2000: How can I tell how many plans a stored procedure has cached?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM