Skip to content

Commit

Permalink
Merge pull request #525 from actiontech/fix_issue_524
Browse files Browse the repository at this point in the history
fix issue #524
  • Loading branch information
HuangWeiCen authored May 13, 2022
2 parents 53567a1 + 323389f commit 1fecd98
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sqle/server/auditplan/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,17 @@ func (at *OracleTopSQLTask) collectorDo() {
at.logger.Warnf("get instance fail, error: %v", err)
return
}
// This depends on: https://github.com/actiontech/sqle-oracle-plugin.
// If your Oracle db plugin does not implement the parameter `service_name`,
// you can only use the default service name `XE`.
// TODO: using DB plugin to query SQL.
serviceName := inst.AdditionalParams.GetParam("service_name").String()
dsn := &oracle.DSN{
Host: inst.Host,
Port: inst.Port,
User: inst.User,
Password: inst.Password,
ServiceName: at.ap.InstanceDatabase,
ServiceName: serviceName,
}
db, err := oracle.NewDB(dsn)
if err != nil {
Expand Down

0 comments on commit 1fecd98

Please sign in to comment.