I have a script that I typically use to sync AG logins. However, I need to implement it to run automatically using SQL Credential and Password. Does anyone know how I can adjust the below script to use a SQL login and password?
我有一个脚本,我通常用来同步AG登录。但是,我需要使用SQL凭据和密码将其实现为自动运行。有人知道我如何调整下面的脚本以使用SQL登录和密码吗?
Get-DbaAvailabilityGroup -SqlInstance 'My-AG' | Sync-DbaAvailabilityGroup -Exclude SpConfigure, CustomErrors, Credentials, DatabaseMail, LinkedServers `
, LoginPermissions, SystemTriggers, DatabaseOwner, AgentCategory, AgentOperator, AgentAlert, AgentProxy, AgentSchedule
更多回答
I removed the <sql> tag since this isn't related to the SQL language. Instead you can add a tag for the dbms you're using.
我删除了标记,因为它与SQL语言无关。相反,您可以为您正在使用的DBMS添加一个标记。
优秀答案推荐
我是一名优秀的程序员,十分优秀!