Linux下的启动oracle的EM的命令
1 su - oracle
2 $sqlplus / as sysdba
3 sql>startup
2.启动监听
1 $lsnrctl
2 LSNRCTL>start
3.启动EM
4:操作示例: 因为我不知道我的数据库示例是否已经启动了。于是下面示例是重启了数据库,查看了监听是否已经启动
1 [oracle@localhost ~]$ sqlplus / as sysdba;
2
3 SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 3 15:24:51 2018
4
5 Copyright (c) 1982, 2011, Oracle. All rights reserved.
6
7
8 Connected to:
9 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
10 With the Partitioning, OLAP, Data Mining and Real Application Testing options
11
12 SYS@orcl> startup force
13 ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
14 ORACLE instance started.
15
16 Total System Global Area 1221992448 bytes
17 Fixed Size 1344596 bytes
18 Variable Size 939527084 bytes
19 Database Buffers 268435456 bytes
20 Redo Buffers 12685312 bytes
21 Database mounted.
22 Database opened.
23 SYS@orcl> quit
24 Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
25 With the Partitioning, OLAP, Data Mining and Real Application Testing options
26 [oracle@localhost ~]$ lsnrctl
27
28 LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 03-APR-2018 15:25:46
29
30 Copyright (c) 1991, 2011, Oracle. All rights reserved.
31
32 Welcome to LSNRCTL, type "help" for information.
33
34 LSNRCTL> status
35 Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
36 STATUS of the LISTENER
37 ------------------------
38 Alias LISTENER
39 Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
40 Start Date 27-MAR-2018 21:12:41
41 Uptime 6 days 18 hr. 13 min. 8 sec
42 Trace Level off
43 Security ON: Local OS Authentication
44 SNMP OFF
45 Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
46 Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
47 Listening Endpoints Summary...
48 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
49 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
50 Services Summary...
51 Service "orcl" has 1 instance(s).
52 Instance "orcl", status READY, has 1 handler(s) for this service...
53 Service "orclXDB" has 1 instance(s).
54 Instance "orcl", status READY, has 1 handler(s) for this service...
55 The command completed successfully
56 LSNRCTL> quit
57 [oracle@localhost ~]$ emctl start dbconsole;
58 Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
59 Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
60 https://localhost.localdomain:1158/em/console/aboutApplication
61 Starting Oracle Enterprise Manager 11g Database Control ....... started.
62 ------------------------------------------------------------------
63 Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/localhost.localdomain_orcl/sysman/log
64 [oracle@localhost ~]$ cat /u01/app/oracle/product/11.2.0/db_1/localhost.localdomain_orcl/sysman/log
65 cat: /u01/app/oracle/product/11.2.0/db_1/localhost.localdomain_orcl/sysman/log: Is a directory
66 [oracle@localhost ~]$ cd /u01/app/oracle/product/11.2.0/db_1/localhost.localdomain_orcl/sysman/log
67 [oracle@localhost log]$ ls
68 emagentfetchlet.log emagent.log emagent.trc emdctl.log emoms.log nfsPatchPlug.log patchAgtStPlugin.log
69 emagentfetchlet.trc emagent_perl.trc emdb.nohup emdctl.trc emoms.trc pafLogs secure.log
70 [oracle@localhost log]$ cat emagent.log
71 2016-11-30 03:45:56,404 Thread-3040471936 Starting Agent 10.2.0.4.4 from /u01/app/oracle/product/11.2.0/db_1 (00701)
72 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalONNECT_DATA in expression ((gc_cr_recv < _gc_cr_recv) ? 0 : (gc_cr_recv - _gc_cr_recv))/__intervalONNECT_DATA=(SID=%SID%)))
73 (00104)
74 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalCT_DATA in expression ((gc_cur_recv < _gc_cur_recv) ? 0 : (gc_cur_recv - _gc_cur_recv))/__intervalCT_DATA=(SID=%SID%)))
75 (00104)
76 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalrvalCT_DATA in expression ((gc_cr_serv < _gc_cr_serv) ? 0 : (gc_cr_serv - _gc_cr_serv))/__intervalrvalCT_DATA=(SID=%SID%)))
77 (00104)
78 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalCT_DATA in expression ((gc_cur_serv < _gc_cur_serv) ? 0 : (gc_cur_serv - _gc_cur_serv))/__intervalCT_DATA=(SID=%SID%)))
79 (00104)
80 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalATA in expression ((msg_sent_dir < _msg_sent_dir) ? 0 : (msg_sent_dir - _msg_sent_dir))/__intervalATA=(SID=%SID%)))
81 (00104)
82 2016-11-30 03:45:59,914 Thread-3040471936 Undefined column name __intervalinterval in expression ((msg_recv_act < _msg_recv_act) ? 0 : (msg_recv_act - _msg_recv_act))/__intervalinterval=%SID%)))
83 (00104)
84 2016-11-30 03:46:00,457 Thread-3040471936 [Load Balancer Switch] InstanceProperty (snmpTimeout) is marked OPTIONAL but is being used (00506)
85 2016-11-30 03:46:03,365 Thread-3040471936 EMAgent started successfully (00702)
86 2018-04-03 15:26:15,247 Thread-3040008400 Starting Agent 10.2.0.4.4 from /u01/app/oracle/product/11.2.0/db_1 (00701)
87 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalONNECT_DATA in expression ((gc_cr_recv < _gc_cr_recv) ? 0 : (gc_cr_recv - _gc_cr_recv))/__intervalONNECT_DATA=(SID=%SID%)))
88 (00104)
89 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalCT_DATA in expression ((gc_cur_recv < _gc_cur_recv) ? 0 : (gc_cur_recv - _gc_cur_recv))/__intervalCT_DATA=(SID=%SID%)))
90 (00104)
91 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalrvalCT_DATA in expression ((gc_cr_serv < _gc_cr_serv) ? 0 : (gc_cr_serv - _gc_cr_serv))/__intervalrvalCT_DATA=(SID=%SID%)))
92 (00104)
93 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalCT_DATA in expression ((gc_cur_serv < _gc_cur_serv) ? 0 : (gc_cur_serv - _gc_cur_serv))/__intervalCT_DATA=(SID=%SID%)))
94 (00104)
95 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalATA in expression ((msg_sent_dir < _msg_sent_dir) ? 0 : (msg_sent_dir - _msg_sent_dir))/__intervalATA=(SID=%SID%)))
96 (00104)
97 2018-04-03 15:26:16,791 Thread-3040008400 Undefined column name __intervalinterval in expression ((msg_recv_act < _msg_recv_act) ? 0 : (msg_recv_act - _msg_recv_act))/__intervalinterval=%SID%)))
98 (00104)
99 2018-04-03 15:26:17,203 Thread-3040008400 [Load Balancer Switch] InstanceProperty (snmpTimeout) is marked OPTIONAL but is being used (00506)
100 2018-04-03 15:26:21,110 Thread-3040008400 EMAgent started successfully (00702)
101 [oracle@localhost log]$
本地访问地址:https://localhost:1158/em/console/aboutApplication