Jam*_*mes -2 sql-server upgrade
我们需要快速迁移多个 SQL Server。我们需要一个过程来编写所有服务器级对象的脚本,例如链接服务器、登录名、作业、服务器角色。
我们正在寻找一种工具来编写所有服务器对象的脚本,或者至少列出所有服务器对象。
任何建议将不胜感激。
我们有跨不同防火墙的服务器,powershell 有时不起作用。谢谢你的建议。
使用很棒的 dbatools。
为什么 ?
dbatools 现在必须Export-DbaInstance导出如下(-Exclude如果您想排除某些内容,请使用):
All databases.
All logins.
All database mail objects.
All credentials.
All objects within the Job Server (SQL Agent).
All linked servers.
All groups and servers within Central Management Server.
All SQL Server configuration objects (everything in sp_configure).
All user objects in system databases.
All system triggers.
All system backup devices.
All Audits.
All Endpoints.
All Extended Events.
All Policy Management objects.
All Resource Governor objects.
All Server Audit Specifications.
All Custom Errors (User Defined Messages).
All Server Roles.
All Availability Groups.
Run Code Online (Sandbox Code Playgroud)
甚至有一篇博客文章详细介绍了上述方法的工作原理!