Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlserver): 修复sqlserver授权异常问题 #9084 #9087

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ func ImportSqlserverPrivilege(account TbAccounts, rules []TbAccountRules, bkClou
if backendSQL, err = GenerateSqlserverSQL(account, rules, address, bkCloudId, s.InstanceRole); err != nil {
return err
}
if len(backendSQL) == 0 && s.InstanceRole == backendSlave {
// slave节点有可能不需要执行授权SQL,所以返回正常
if len(backendSQL) == 0 {
// 返回正常,跳出
slog.Info(
fmt.Sprintf("[%s] no grant sql execute in slave instance [%s]", account.User, address),
fmt.Sprintf("[%s] no grant sql execute in instance [%s]", account.User, address),
)
return nil
continue
}
var queryRequest = QueryRequest{[]string{address}, backendSQL, false, 60, bkCloudId}
_, err = OneAddressExecuteSqlserverSql(queryRequest)
Expand Down
Loading