{"id":14069663,"url":"https://github.com/dbworker/dbcollect","last_synced_at":"2025-07-30T06:32:12.197Z","repository":{"id":224202051,"uuid":"358266675","full_name":"dbworker/dbcollect","owner":"dbworker","description":"database utility to collect db info.","archived":false,"fork":false,"pushed_at":"2024-04-04T03:32:27.000Z","size":1149,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-13T07:16:04.341Z","etag":null,"topics":["database","health-check","oracle","tool"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbworker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-15T13:20:26.000Z","updated_at":"2022-01-23T16:01:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"664f46b4-2fe1-4d0f-8fd5-94bb9302dacc","html_url":"https://github.com/dbworker/dbcollect","commit_stats":null,"previous_names":["dbworker/dbcollect"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbworker%2Fdbcollect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbworker%2Fdbcollect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbworker%2Fdbcollect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbworker%2Fdbcollect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbworker","download_url":"https://codeload.github.com/dbworker/dbcollect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228102064,"owners_count":17869773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","health-check","oracle","tool"],"created_at":"2024-08-13T07:07:07.355Z","updated_at":"2024-12-04T11:30:27.641Z","avatar_url":"https://github.com/dbworker.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# 1. dbcollect\n`dbcollect` help DBA to collecting database info, which later will be processed by [dbtools](https://marketplace.visualstudio.com/items?itemName=dbworker.dbtools), to auto check db's health and export reports.\n\nUsually, for health-check task, DBA  collecting info, checking info and  writting reports(.doc) for each db manually.\n\nNow, these tools help doing most of foundation work in health check:\n- [dbcollect](https://github.com/dbworker/dbcollect) help collecting database info from many v$_* views, alert log, etc.\n- [dbtools](https://marketplace.visualstudio.com/items?itemName=dbworker.dbtools) is a vscode's extension, \n  - help exporting many health check reports automatically;\n  - use **rule-based check**([dbtools-rule](https://github.com/dbworker/dbtools-rule/blob/main/oracle_rule.ini)), check database's health and show problems on vscode IDE.\n\nFor example, dbcollect will dump some data like this\n```\n\u003cDB_HEALTH_CHECK_DATA versoin=\"0.3.0\"\u003e\n\u003cDATABASE type=\"Oracle\"\u003e\n  \u003cINSTANCE\u003e\n    \u003cHC_DB_NAME          v=\"TESTDB\"/\u003e\n    \u003cHC_DB_ID            v=\"8810916561\"/\u003e\n    \u003cHC_DB_VERSION       v=\"11.2.0.4.0\"/\u003e\n    ...\n```\ndbtools use these xml data to check db's health(show in gif):\n![iamge](https://gitee.com/dbworker/dbtools-rule/raw/HEAD/dbtools-usage-sample.gif)\n\n\nCurrently dbcollect support Oracle(\u003e= 11g) on (Linux, AIX).\n\n\n\n# 2. How to use dbcollect\n\nDownload or clone dbcollect.git to you pc, then upload to database host (Linux or AIX) with 'oracle' user.\n\nOpen a terminal, login db host as user `oracle`, change to dbcollect folder\n```\ncd /path/to/dbcollect\n```\nthen\n- (1) Firstly change to `config/` directory and modify `*.toml` file, pls refer to example toml.\n```\ncd config\nvi xxx.toml\n```\n\n- (2) If you run many instances or pdbs in one host, repeat step 1, one db by one toml file.\n```\nvi yyy.toml\n```\n\n- (3) change to dbcollect directory, run shell command\n```\ncd ..\nsh hccdump.sh\n```\nIf everything ok, after running you will get packed output file `*.tar.gz` in `data/` directory.\n\n(Later you will download *.gz to your pc, unzip it, and open `dbtools` to process it.)\n\n# 3. dbcollect tree view\n```\n-dbcollect/\n|----config/\n|    |----*.toml      # database info\n|----data/\n|    |----aix11g_testrac1.tar.gz  # example, AIX + oracle11g + rac\n|    |----lnx19c_cdbrac1.tar.gz   # example, linux + oracle19c + CDB$ROOT\n|    |----lnx19c_pdb1.tar.gz      # example, linux + oracle19c + PDB1\n|    |\n|----dump.log         # dumping log.\n|----hccdump.sh       # main script to collect db info\n|----script/\n|    |----dump_*      # child scripts called by hccdump.sh\n|----tomb/\n|    |----data2021XXXXXXXXXX/  # old data move to here, content same to *.tar.gz\n|    |    |----aix11g_testrac1/\n|    |    |    |----1-host.xml      # host info\n|    |    |    |----2-database.xml  # db info\n|    |    |    |...\n|    |    |    |----attachment/\n|    |    |    |    |----alert_TESTDB1.log\n|    |    |    |    |----awr_2021XXXXXXXX.txt\n|    |    |    |    |----config.toml  # content same to config/*.toml, used by dbtools\n\n```\n\n# 4. FAQ\n\n## 4.1 Field meaning in config/*.toml\n\nconfig/*.toml was used by dbcollect , then packed in dump file and transfer to dbtools.\n\n(1)`customer` and `doctitle` used by dbtools to export doc\n- export doc name is in form like  \"customer_doctitle.doc\"\n- doc first page will replace placeholder-tag using : customer, doctitle\n- to avoid unrecognizable char(GBK,Japan), should use only ASCII char\n```\ncustomer=\"CMCBANK\"\ndoctitle=\"TEST1_TESTDB1 Database Health Check Report\"  # must be unique, should be meaningful\n```\n\n\n(2) `db_alias` used as folder name by dbcollect to store dump file\n- for manual reading, should be meaningful, and only ASCII char\n- must be unique in customer's hundreds database\n```\ndb_alias=\"TESTDB1\"   # used as meaningful folder name\n                     # must be unique to distinguish from other db\n```\n\n(3) `ORACLE_SID` be used to connect to oracle\n```\ndb_type=\"Oracle\"     # used by hccdump to fill in xml\nORACLE_SID=\"TESTDB1\" # used by hccdump to connect to oracle\n```\n\n## 4.2 Output filename has unrecognizable char\nRecommend use ASCII char in config file *.toml.\nDon't use local language character set, such as GBK.\n\n\n# 5. Known issues\n\ncurrently v0.3.0 has some fault:\n- on PDB, some values are same to CDB$ROOT (see example file lnx19c_pdb1.tar.gz).\n- if database has large object number, some queries will slow\n    - HC_TABLE_USE_LONG\n    - HC_BIG_TABLES  \n(you can manually disable related sql on script)\n\n\n# 6. Future plan\n\n- refine PDB info\n- item for flashback, v$recovery_area_usage\n- top transaction (top sql already in AWR)\n\n# 7. Release history\n\n**v0.3.2 at 30-Seq-2022**\n- add items `HC_SEQ_HIGH_PCTUSED_COUNT` and `HC_HIGH_PCTUSED_SEQS` to monitor sequences whether close to max limit.\n\n\n**v0.3.1 at 20-Seq-2021**\n- add script `hccdump_sun.sh` to support SunOS.\n\n\n**v0.3.0 at 20-May-2021**\n- add more dump item\n- in alert file, some unimportanted log was removed ( not valid for oracle12.2's uniform time format ).\n- fix issue on v$rman_status ( [issue#1](https://github.com/dbworker/dbcollect/issues/1) )\n- fix special char (\u003c, \u0026) on .xml ( [issue#2](https://github.com/dbworker/dbcollect/issues/2) )\n- fix dump alert log on AIX\n- fix dump crs log\n\n\n**v0.2.2 at 20-Apr-2021**  \n(no formally build release)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbworker%2Fdbcollect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbworker%2Fdbcollect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbworker%2Fdbcollect/lists"}