使用 SQL*Plus 访问数据库
运行 SQL*Plus:
$ sqlplus
SQL*Plus:Release 10.1.0.2.0 - Production on Sat Jun 5 16:59:21 2004
Copyright (c) 1982, 2004, Oracle.All rights reserved.
Enter user-name:/ as sysdba
Connected to:
Oracle Database 10g Enterprise Edition> With the Partitioning, OLAP and Data Mining options
SQL>
================================
使用 Oracle Enterprise Manager 10g 数据库控制
在 Web 浏览器中,连接到安装过程中提供的 URL。
例如:
http://IP:5500/em(如果服务器不在 DNS 中,则必须使用 IP 地址代替主机名。)
用户名:SYS
口令:
连接为:SYSDBA
单击
================================
启动和停止 Oracle Enterprise Manager 数据库控制:
$ emctl start dbconsole
$ emctl stop dbconsole
使用 iSQL*Plus 访问数据库
iSQL*Plus 是历史悠久的 SQL*Plus 交互式工具的基于 Web 的版本,用于访问数据库。要使用 iSQL*Plus,
请单击 OEM 控制台> iSQL*Plus URL。
例如:
http://ds1.orademo.org:5560/isqlplus(如果数据库服务器不在 DNS 中,则必须使用 IP 地址代替主机名
。)
用户名:SYSTEM
口令:
单击 。
在 Workspace 框中输入 SQL 命令,然后单击 Execute。
==================================
启动和停止 iSQL*Plus:
$ isqlplusctl start
$ isqlplusctl stop
启动和停止监听器:
监听器接受客户端的连接请求,并在验证证书后创建数据库连接。要使用 OEM 或 iSQL*Plus,必须先启动监
听器。
$ lsnrctl start
$ lsnrctl stop
启动和停止数据库:
启动和停止数据库的最简单方法是从 OEM 控制台启动和停止。要从命令行执行此操作,请在以 oracle 身份
登录后使用 SQL*Plus,如下所示:
启动:
$ sqlplus
SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:27:48 2004
Copyright (c) 1982, 2004, Oracle.All rights reserved.
Enter user-name:/ as sysdba
Connected to an> SQL> startup
ORACLE instance started.
Total System Global Area 188743680 bytes
Fixed>
Variable> Database Buffers 25165824 bytes
Redo Buffers 524288 bytes
Database mounted.
Database opened.
SQL> exit
关闭数据库:
Shutdown:
$ sqlplus
SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:25:55 2004
Copyright (c) 1982, 2004, Oracle.All rights reserved.
Enter user-name:/ as sysdba
Connected to:
Oracle Database 10g Enterprise Edition> With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
===============================================
启动网页管理界面的操作
假如数据库有多个实例, 在命令行界面设置当前数据库实例如下:
$ export ORACLE_SID=test # test 是启用网页管理的实例
$ emctl start dnconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control> Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://localhost.localdomain:5505/em/console/aboutApplication # 这个网址就是控制台管理地址在浏
览器里直接输入即可
Starting Oracle Enterprise Manager 10g Database Control ..................................
started.
------------------------------------------------------------------
Logs are generated in directory /opt/app/oracle/10g/localhost.localdomain_user/sysman/log