91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

DBA運維工具OLazy怎么使用

發布時間:2022-10-21 14:58:25 來源:億速云 閱讀:136 作者:iii 欄目:編程語言

本文小編為大家詳細介紹“DBA運維工具OLazy怎么使用”,內容詳細,步驟清晰,細節處理妥當,希望這篇“DBA運維工具OLazy怎么使用”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學習新知識吧。

OLazy說明

OLazy工具是輔助、幫助簡化DBA運維工具,將日常用到的眾多命令集于一身,DBA只需要敲簡單的命令即可查看相應的數據,如:tbs:查看表空間相關信息。

其主要特性是無客戶端方式,無需部署在數據庫服務器上。

該腳本是通過Python開發。

支持11g及以上版本

如需要Q:785165816

工具部分截圖


  • 查看表空間使用信息

  • DBA運維工具OLazy怎么使用

  • 查看幫助命令

OLazy> help

用法:
Lazy 命令 參數1 參數2 
注意:首次使用必須初始化(init)并添加數據庫配置信息
---------------------------------------------------------------------------------------------
  init                                                                  --初始化表結構
  get_session_of_sid 或  gsos                                            --根據SID查看會話信息
  standby_archive_dest 或  sad                                           --查看備庫的歸檔路徑信息
  backup_set_info 或  bsi                                                --查看RMAN備份集信息
  rman_session 或  rmans                                                 --查看正在運行的RMAN會話信息
  list_backup 或  lbak                                                   --查看最近10天的RMAN備份信息
  table_frag 或  tf                                                      --查看表的碎片程度
  user_role_privs  或  urp                                               --查看用戶/角色的權限
  undo_advice  或  ua                                                    --Undo優化助手
  flash_recovery_area_usage  或  frau                                    --查看快速恢復區使用情況
  profile  或  pf                                                        --查看數據庫Profile配置
  instance_efficiency  或  ie                                            --查看實例命中率
  archivelog_size  或  als                                               --查看最近10天的歸檔日志大小
  unbind_sql  或  us                                                     --查看TOP 10 非綁定變量SQL
  diskreads_sql  或  ds                                                  --查看TOP 10 物理讀SQL
  logicalreads_sql  或  lrs                                              --查看TOP 10 邏輯讀SQL
  elapsed_sql  或  es                                                    --查看TOP 10運行時間SQL
  db_patch  或  dbp                                                      --查看數據庫PATCH信息
  db_growth  或  dbg                                                     --查看數據庫大小增長情況
  high_freq_sql  或  hfs                                                 --查看TOP 10執行頻率高的SQL
  rollback_trans  或  rt                                                 --查看使用回滾段的會話
  rollback_session  或  rs                                               --查看使用回滾段的事務
  sort_sql  或  ss                                                       --查看TOP 10排序高的SQL
  buffer_pool_hit  或  bph                                               --查看緩沖區命中率
  dict_hit  或  dh                                                       --查看數據字典命中率
  full_scan  或  fs                                                      --查看全表掃描SQL
  version_sql  或  vs                                                    --查看TOP 10 高版本SQL
  rollback_segs  或  rs                                                  --查看無效對象
  invalid_object  或  io                                                 --查看無效對象
  invalid_job  或  ij                                                    --查看無效JOB
  user_info  或  ui                                                      --查看用戶信息,如:默認表空間、狀態
  auto_task  或  at                                                      --自動維護任務狀態
  pdb_info  或  pi                                                       --查看PDB容器信息
  sga_usage  或  su                                                      --SGA使用情況
  index_health  或  ih                                                   --索引健康檢查
  index_monitor  或  im                                                  --監控索引使用情況
  hot_table  或  ht                                                      --查看TOP 10熱表(按插入次數排序)
  invalid_index  或  ii                                                  --查看無效索引
  db_option  或  do                                                      --查看數據庫組件安裝情況
  db_registry  或  dr                                                    --查看數據庫已安裝的組件狀態
  sysmetric_summary  或  ss                                              --查看相鄰兩次快照之間的DB TIME、Elapsed time
  host  或  h                                                            --查看數據庫、主機狀態
  addhost  或  ah                                                        --新增數據庫、主機
  lshost  或  ls                                                         --查看已配置數據庫、主機信息
  rmhost  或  rm                                                         --刪除指定數據庫、主機信息
  reconfig  或  re                                                       --修改指定數據庫、主機配置信息
  active                                                                --查看活動會話
  session_total                                                         --查看活動會話數
  dbs                                                                   --查看數據庫的TPS/QPS/負載/物理讀
  sqltext [sql_id]                                                      --根據sql_id獲取sql語句
  param [pattern]                                                       --查看初始化參數
  _param [pattern]                                                      --查看隱藏參數
  event                                                                 --查看等待事件
  invalid [owner]                                                       --查看無效對象
  desc tabname [owner]                                                  --查看表結構
  datafile                                                              --查看數據文件
  tablespace                                                            --查看表空間信息
  running_sql                                                           --查看正在執行的相同sql數量
  size segname [owner]                                                  --查看表/索引大小
  idxdesc    tabname owner                                              --查看索引結構
  allsqltext                                                            --查看所有正在執行的sql
  lock       [sid]                                                      --根據sid獲取鎖信息
  lockwait                                                              --查看鎖的堵塞用戶和被堵塞用戶
  objlike    pattern [owner]                                            --模糊查看對象名
  tstat      tabname owner                                              --查看表統計信息
  istat      tabname owner                                              --查看索引統計信息
  ipstat     indname owner                                              --查看分區索引信息
  longops                                                               --查看長時間運行的會話
  depend     objname [owner]                                            --查看對象的主外鍵關系
  hold                                                                  --查看鎖的持有者
  segment    [size]                                                     --查看指定大小的段信息
  tabpart    tabname [owner]                                            --查看表分區
  objsql     objname owner                                              --查看涉及到某個對象的sql語句
  unusable   [owner]                                                    --查看沒有使用的索引
  ddl        owner object_type name                                     --查看對象的創建語句(DDL)
  get_kill_sh sql_id username                                           --獲取kill會話的shell命令
  snapshot  或  ss                                                       --查看快照
  createsnapshot  或  css                                                --創建快照
  dropsnapshot  或  dss [days]                                           --刪除快照
  awr                                                                   --自動在本地生成AWR報告
  tsfree                                                                --查看表空間使用率
  stopmrp  或 spm                                                        --停止Standby MRP進程
  startmrp  或 stm                                                       --啟動Standby MRP進程
  mrp                                                                   --查看Standby 進程
  gap                                                                   --查看GAP信息
  archivelog_applied 或 aa                                               --查看歸檔日志應用情況
  redo_freq                                                             --查看REDO切換頻率
  resource_usage 或 ru                                                   --查看資源使用情況
  default_tablespace 或 dt                                               --查看用戶的默認表空間
  diskgroup 或 dg                                                        --查看磁盤組信息
  diskgroup_attribute 或 da                                              --查看磁盤組屬性信息
  crs                                                                   --查看crs服務狀態
  votedisk                                                              --查看votedisk狀態
  crs_stat_res 或 csr                                                    --查看CRS資源狀態
  dg_lag 或 lag                                                          --查看standby 延遲
  db_summary 或 dbs                                                       --查看數據庫概要信息
  os_summary 或 oss                                                       --查看操作系統概要信息
  server_summary 或 ss                                                   --查看服務器概要信息
  control_file 或 cf                                                     --查看控制文件信息
  top_mem_process 或 tmp                                                 --查看操作系統消耗內存TOP 10進程
  top_cpu_process 或 tcp                                                 --查看操作系統消耗CPUTOP 10進程
  run_o_sql 或 ros                                                       --執行指定的SQL查詢語句
  run_linux_cmd 或 rlc                                                   --執行指定的操作系統命令
---------------------------------------------------------------------------------------------

示例

OLazy> dbs
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| ID | IP             | OS_TYPE | SSH_PORT | OS_USER | DB_TYPE | DB_ROLE | DB_USER | DB_NAME | DB_VERSION | DB_PORT |     COMMONT      |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| 2  | 192.168.0.145  | linux   | root     | 52312   | oracle  | PRIMARY | sys     | orcl    | 11         | 1521    | develop database |
| 5  | 172.16.100.11  | linux   | root     | 8345    | oracle  | STANDBY | sys     | orcl    | 11         | 1521    | standby databse  |
| 6  | 172.17.100.6   | linux   | root     | 1912    | oracle  |   RAC   | sys     | orcl1   | 11         | 1521    | product database |
| 8  | 134.175.97.121 | linux   | root     | 1912    | oracle  | PRIMARY | sys     | helowin | 11         | 1521    |   Tencent yun    |
| 10 | 172.16.100.190 | Linux   | root     | 22      | ORACLE  | primary | sys     | LEI     | 19         | 1521    |    Docker 19c    |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
請輸入需要修改的IP對應ID:10
+------------------------------+-----------------------------------------+
| Items                        |                  VALUE                  |
+------------------------------+-----------------------------------------+
| Host IP                      |              172.16.100.190             |
| Open Mode                    |                READ WRITE               |
| DB Version                   |                  19.0.0                 |
| Log Mode                     |               NOARCHIVELOG              |
| Nls Characterset             |                 AL32UTF8                |
| Nls Nchar Characterset       |                AL16UTF16                |
| Uptime/sysdate/Time Zone     | 2020-01-08 (星期三) 02:27:01 上午+00:00 |
| HostName                     |               6a5cd3f9fb6c              |
| DB Name                      |                   LEI                   |
| Instance Name                |                   LEI                   |
| Instance Number              |                    1                    |
| DBID                         |                2212487362               |
| Global Name                  |                   LEI                   |
| Platform Name                |             Linux x86 64-bit            |
| Flashback On                 |                    NO                   |
| Cluster Database             |                  FALSE                  |
| DG                           |                    0                    |
| Database Role                |                 PRIMARY                 |
| Cluster Database Instances   |                    1                    |
| Thread#                      |                    1                    |
| Startup Time                 |           2020-01-08 01:59:00           |
| Block Size                   |                   8192                  |
| Uptime                       |          28 minutes, 5 seconds          |
| SCN Headroom                 |                 11911.1                 |
| Compatible                   |                  19.0.0                 |
| DB Created                   |           2020-01-08 01:42:26           |
| SGA Target                   |                   2 GB                  |
| Tablespace Nums              |                    5                    |
| DB Time Zone                 |                  +00:00                 |
| Default temp Tablespace      |                   TEMP                  |
| Default Permanent Tablespace |                  USERS                  |
| Undo Tablespace              |                 UNDOTBS1                |
| Total Users                  |                    36                   |
| Total DB Sizes               |                 1.68 GB                 |
| CDB?                         |                   YES                   |
| NUMBER OF PDBS               |                    1                    |
+------------------------------+-----------------------------------------+
OLazy> ss
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| ID | IP             | OS_TYPE | SSH_PORT | OS_USER | DB_TYPE | DB_ROLE | DB_USER | DB_NAME | DB_VERSION | DB_PORT |     COMMONT      |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| 2  | 192.168.0.145  | linux   | root     | 52312   | oracle  | PRIMARY | sys     | orcl    | 11         | 1521    | develop database |
| 5  | 172.16.100.11  | linux   | root     | 8345    | oracle  | STANDBY | sys     | orcl    | 11         | 1521    | standby databse  |
| 6  | 172.17.100.6   | linux   | root     | 1912    | oracle  |   RAC   | sys     | orcl1   | 11         | 1521    | product database |
| 8  | 134.175.97.121 | linux   | root     | 1912    | oracle  | PRIMARY | sys     | helowin | 11         | 1521    |   Tencent yun    |
| 10 | 172.16.100.190 | Linux   | root     | 22      | ORACLE  | primary | sys     | LEI     | 19         | 1521    |    Docker 19c    |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
請輸入需要修改的IP對應ID:10
+---------------------------------+-------------------------------------------+
| Items                           |                   Value                   |
+---------------------------------+-------------------------------------------+
| Server Model                    |          VMware Virtual Platform          |
| Manufacturer                    |                VMware,Inc.                |
| Serial                          |  VMware-421d63e1ad61e5a4-811fb4e988255830 |
| BIOS                            |       Phoenix Technologies LTD/6.00       |
| CPU_MODE                        | Intel(R) Xeon(R) CPU E7-4820 v4 @ 2.00GHz |
| 64 bit                          |                    YES                    |
| Maximum Memory Capacity         |                    33GB                   |
| MemTotal                        |                   31 GB                   |
| Total Memory slots/unused slots |                  160/126                  |
| Memory Speed                    |                  Unknown                  |
| Memory Model                    |                                           |
+---------------------------------+-------------------------------------------+
OLazy> 
OLazy> OSS
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| ID | IP             | OS_TYPE | SSH_PORT | OS_USER | DB_TYPE | DB_ROLE | DB_USER | DB_NAME | DB_VERSION | DB_PORT |     COMMONT      |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
| 2  | 192.168.0.145  | linux   | root     | 52312   | oracle  | PRIMARY | sys     | orcl    | 11         | 1521    | develop database |
| 5  | 172.16.100.11  | linux   | root     | 8345    | oracle  | STANDBY | sys     | orcl    | 11         | 1521    | standby databse  |
| 6  | 172.17.100.6   | linux   | root     | 1912    | oracle  |   RAC   | sys     | orcl1   | 11         | 1521    | product database |
| 8  | 134.175.97.121 | linux   | root     | 1912    | oracle  | PRIMARY | sys     | helowin | 11         | 1521    |   Tencent yun    |
| 10 | 172.16.100.190 | Linux   | root     | 22      | ORACLE  | primary | sys     | LEI     | 19         | 1521    |    Docker 19c    |
+----+----------------+---------+----------+---------+---------+---------+---------+---------+------------+---------+------------------+
請輸入需要修改的IP對應ID:10
+--------------+-------------------------------------------+
| Items        |                   Value                   |
+--------------+-------------------------------------------+
| OS           |                 GNU/Linux                 |
| OS Release   |   CentOS Linux release 7.6.1810 (Core)    |
| Kernel       |           3.10.0-957.el7.x86_64           |
| HostName     |                   docker                  |
| CPU Model    | Intel(R) Xeon(R) CPU E7-4820 v4 @ 2.00GHz |
| Memory       |                  31.26 GB                 |
| Selinux      |                  enabled                  |
| LANG         |                zh_CN.UTF-8                |
| Current Time |            2020-01-08 10:31:04            |
| Last Reboot  |                   10:02                   |
| Uptime       |       5 days, 28 minutes, 25 seconds      |
| Inernet?     |                    YES                    |
| Firewall?    |                  Running                  |
+--------------+-------------------------------------------+

讀到這里,這篇“DBA運維工具OLazy怎么使用”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

dba
AI

东安县| 财经| 福建省| 万安县| 湛江市| 双牌县| 扬州市| 齐齐哈尔市| 南澳县| 手机| 年辖:市辖区| 宁武县| 乃东县| 龙井市| 苏尼特右旗| 绥阳县| 交口县| 基隆市| 德惠市| 个旧市| 黔西| 镇赉县| 长葛市| 扎囊县| 新巴尔虎右旗| 丹巴县| 衡南县| 古丈县| 金山区| 磐石市| 峨边| 鹤庆县| 荔浦县| 石首市| 屏东市| 铜川市| 博兴县| 娄烦县| 泾阳县| 宁远县| 清水县|