Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92651856
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-10 13:21:02

 来源:Oracle    作者:John Smiley

--------------------------------------------------------------------------------

附录

使用 SQL*Plus 访问数据库

以 oracle 身份登录到 Linux。设置环境。

设置 Oracle 环境变量:

$ export ORACLE_BASE=/u01/app/oracle
$ export ORACLE_SID=demo1
$ export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
$ export PATH=$PATH:$ORACLE_HOME/bin

运行 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 Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>

使用 Oracle Enterprise Manager 10g 数据库控制

在 Web 浏览器中,连接到安装过程中提供的 URL。

例如:

(如果服务器不在 DNS 中,则必须使用 IP 地址代替主机名。)

用户名:SYS

口令:<安装过程中选择的口令>

连接为:SYSDBA

单击

欢迎走入 Oracle Enterprise Manager 10g 数据库控制的精彩世界!

启动和停止 Oracle Enterprise Manager 数据库控制:

$ emctl start dbconsole
$ emctl stop dbconsole

使用 iSQL*Plus 访问数据库

iSQL*Plus 是历史悠久的 SQL*Plus 交互式工具的基于 Web 的版本,用于访问数据库。要使用 iSQL*Plus,请单击 OEM 控制台 Related Links 部分中的 iSQL*Plus 链接,或将浏览器指向安装过程中提供的 iSQL*Plus URL。

例如:

(如果数据库服务器不在 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 idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  188743680 bytes
Fixed Size                   778036 bytes
Variable Size             162275532 bytes
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 Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

列出 Oracle 进程:

$ ps a                                   
            
            
阅读(486) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~