一、Stopping Grid Control and All Its Components 1.停止OMS服务 [oracle@ocm2 oms10g]$ cd /u01/app/oracle/OracleHomes/oms10g/bin/ [oracle@ocm2 bin]$ ./emctl stop oms Oracle Enterprise Manager 10g Release 10.2.0.1.0 Copyright (c) 1996, 2005 Or
一、Stopping Grid Control and All Its Components1.停止OMS服务 [oracle@ocm2 oms10g]$ cd /u01/app/oracle/OracleHomes/oms10g/bin/ [oracle@ocm2 bin]$ ./emctl stop oms Oracle Enterprise Manager 10g Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. Oracle Management Server is Down. [oracle@ocm2 bin]$
2.停止Application Server Control Console [oracle@ocm2 bin]$ ./emctl stop iasconsole Oracle Enterprise Manager 10g Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping Oracle 10g Application Server Control ... ... Stopped. [oracle@ocm2 bin]$
3.切换目录至OPMN并停止Application Server components [oracle@ocm2 oms10g]$ cd opmn/ [oracle@ocm2 opmn]$ cd bin/ [oracle@ocm2 bin]$ pwd /u01/app/oracle/OracleHomes/oms10g/opmn/bin [oracle@ocm2 bin]$ ./opmnctl stopall opmnctl: stopping opmn and all managed processes... [oracle@ocm2 bin]$
4.切换目录并停止agent
[oracle@ocm2 bin]$ pwd /u01/app/oracle/OracleHomes/agent10g/bin [oracle@ocm2 bin]$ ./emctl stop agent Oracle Enterprise Manager 10g Release 10.2.0.1.0. Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. Stopping agent ... stopped. [oracle@ocm2 bin]$
5.停止Repository数据库 [oracle@ocm2 bin]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jul 22 18:15:48 2014
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining options
SYS@EMREP> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SYS@EMREP> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining options [oracle@ocm2 bin]$
6.停止Repository数据库监听程序 [oracle@ocm2 bin]$ lsnrctl stop
LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 22-JUL-2014 18:17:53
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm2.localdomain)(PORT=1521))) The command completed successfully [oracle@ocm2 bin]$
停止结束
二、Starting Grid Control and All Its Components
1.启动Repository数据库对应的监听程序和数据库(注意SID) [oracle@ocm2 bin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 22-JUL-2014 18:20:06
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.2.0 - Production System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm2.localdomain)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm2.localdomain)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.2.0 - Production Start Date 22-JUL-2014 18:20:06 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm2.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully [oracle@ocm2 bin]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jul 22 18:20:30 2014
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to an idle instance.
SYS@EMREP> startup ORACLE instance started.
Total System Global Area 285212672 bytes Fixed Size 1260420 bytes Variable Size 125830268 bytes Database Buffers 155189248 bytes Redo Buffers 2932736 bytes Database mounted. Database opened. SYS@EMREP> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, Oracle Label Security, OLAP and Data Mining options [oracle@ocm2 bin]$
2.切换路径并启动OMS [oracle@ocm2 bin]$ cd /u01/app/oracle/OracleHomes/oms10g/bin/ [oracle@ocm2 bin]$ pwd /u01/app/oracle/OracleHomes/oms10g/bin [oracle@ocm2 bin]$ ./emctl start oms Oracle Enterprise Manager 10g Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. opmnctl: opmn started Starting HTTP Server ... Starting Oracle Management Server ... Checking Oracle Management Server Status ... Oracle Management Server is Up. [oracle@ocm2 bin]$
3.切换路径启动OracleAS Web Cache [oracle@ocm2 bin]$ pwd /u01/app/oracle/OracleHomes/oms10g/opmn/bin [oracle@ocm2 bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.ocm2.localdomain -------------------+--------------------+---------+--------- ias-component | process-type | pid | status -------------------+--------------------+---------+--------- DSA | DSA | N/A | Down HTTP_Server | HTTP_Server | 17072 | Alive LogLoader | logloaderd | N/A | Down dcm-daemon | dcm-daemon | 17039 | Alive OC4J | home | N/A | Down OC4J | OC4J_EMPROV | N/A | Down OC4J | OC4J_EM | 17116 | Alive WebCache | WebCache | N/A | Down WebCache | WebCacheAdmin | N/A | Down
[oracle@ocm2 bin]$ ./opmnctl startproc ias-component=WebCache opmnctl: starting opmn managed processes... [oracle@ocm2 bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.ocm2.localdomain -------------------+--------------------+---------+--------- ias-component | process-type | pid | status -------------------+--------------------+---------+--------- DSA | DSA | N/A | Down HTTP_Server | HTTP_Server | 17072 | Alive LogLoader | logloaderd | N/A | Down dcm-daemon | dcm-daemon | 17039 | Alive OC4J | home | N/A | Down OC4J | OC4J_EMPROV | N/A | Down OC4J | OC4J_EM | 17116 | Alive WebCache | WebCache | 17205 | Alive WebCache | WebCacheAdmin | 17197 | Alive
[oracle@ocm2 bin]$
4.切换路径并启动agent
[oracle@ocm2 bin]$ pwd /u01/app/oracle/OracleHomes/agent10g/bin [oracle@ocm2 bin]$ ./emctl start agent Oracle Enterprise Manager 10g Release 10.2.0.1.0. Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. Starting agent ..... started. [oracle@ocm2 bin]$
最后确认ias-component全部已经启动 [oracle@ocm2 bin]$ cd /u01/app/oracle/OracleHomes/oms10g/opmn/bin/ [oracle@ocm2 bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.ocm2.localdomain -------------------+--------------------+---------+--------- ias-component | process-type | pid | status -------------------+--------------------+---------+--------- DSA | DSA | N/A | Down HTTP_Server | HTTP_Server | 17072 | Alive LogLoader | logloaderd | N/A | Down dcm-daemon | dcm-daemon | 17039 | Alive OC4J | home | N/A | Down OC4J | OC4J_EMPROV | N/A | Down OC4J | OC4J_EM | 17116 | Alive WebCache | WebCache | 17205 | Alive WebCache | WebCacheAdmin | 17197 | Alive
[oracle@ocm2 bin]$ ./opmnctl startproc ias-component=DSA opmnctl: starting opmn managed processes... [oracle@ocm2 bin]$ ./opmnctl startproc ias-component=LogLoader opmnctl: starting opmn managed processes... [oracle@ocm2 bin]$ ./opmnctl startproc ias-component=OC4J opmnctl: starting opmn managed processes... [oracle@ocm2 bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.ocm2.localdomain -------------------+--------------------+---------+--------- ias-component | process-type | pid | status -------------------+--------------------+---------+--------- DSA | DSA | 18173 | Alive HTTP_Server | HTTP_Server | 17072 | Alive LogLoader | logloaderd | 18197 | Alive dcm-daemon | dcm-daemon | 17039 | Alive OC4J | home | 18326 | Alive OC4J | OC4J_EMPROV | 18324 | Alive OC4J | OC4J_EM | 17116 | Alive WebCache | WebCache | 17205 | Alive WebCache | WebCacheAdmin | 17197 | Alive
[oracle@ocm2 bin]$

MySQL和SQLite的主要區別在於設計理念和使用場景:1.MySQL適用於大型應用和企業級解決方案,支持高性能和高並發;2.SQLite適合移動應用和桌面軟件,輕量級且易於嵌入。

MySQL中的索引是數據庫表中一列或多列的有序結構,用於加速數據檢索。 1)索引通過減少掃描數據量提升查詢速度。 2)B-Tree索引利用平衡樹結構,適合範圍查詢和排序。 3)創建索引使用CREATEINDEX語句,如CREATEINDEXidx_customer_idONorders(customer_id)。 4)複合索引可優化多列查詢,如CREATEINDEXidx_customer_orderONorders(customer_id,order_date)。 5)使用EXPLAIN分析查詢計劃,避

在MySQL中使用事務可以確保數據一致性。 1)通過STARTTRANSACTION開始事務,執行SQL操作後用COMMIT提交或ROLLBACK回滾。 2)使用SAVEPOINT可以設置保存點,允許部分回滾。 3)性能優化建議包括縮短事務時間、避免大規模查詢和合理使用隔離級別。

選擇PostgreSQL而非MySQL的場景包括:1)需要復雜查詢和高級SQL功能,2)要求嚴格的數據完整性和ACID遵從性,3)需要高級空間功能,4)處理大數據集時需要高性能。 PostgreSQL在這些方面表現出色,適合需要復雜數據處理和高數據完整性的項目。

MySQL數據庫的安全可以通過以下措施實現:1.用戶權限管理:通過CREATEUSER和GRANT命令嚴格控制訪問權限。 2.加密傳輸:配置SSL/TLS確保數據傳輸安全。 3.數據庫備份和恢復:使用mysqldump或mysqlpump定期備份數據。 4.高級安全策略:使用防火牆限制訪問,並啟用審計日誌記錄操作。 5.性能優化與最佳實踐:通過索引和查詢優化以及定期維護兼顧安全和性能。

如何有效監控MySQL性能?使用mysqladmin、SHOWGLOBALSTATUS、PerconaMonitoringandManagement(PMM)和MySQLEnterpriseMonitor等工具。 1.使用mysqladmin查看連接數。 2.用SHOWGLOBALSTATUS查看查詢數。 3.PMM提供詳細性能數據和圖形化界面。 4.MySQLEnterpriseMonitor提供豐富的監控功能和報警機制。

MySQL和SQLServer的区别在于:1)MySQL是开源的,适用于Web和嵌入式系统,2)SQLServer是微软的商业产品,适用于企业级应用。两者在存储引擎、性能优化和应用场景上有显著差异,选择时需考虑项目规模和未来扩展性。

在需要高可用性、高級安全性和良好集成性的企業級應用場景下,應選擇SQLServer而不是MySQL。 1)SQLServer提供企業級功能,如高可用性和高級安全性。 2)它與微軟生態系統如VisualStudio和PowerBI緊密集成。 3)SQLServer在性能優化方面表現出色,支持內存優化表和列存儲索引。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

Atom編輯器mac版下載
最受歡迎的的開源編輯器

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!