Linux下Oracle用到的一些命令

一、Linux

1、netstat –atnl 属Linux命令,查看主机端口。

[oracle@localhost ~]$ netstat –atnl

2、export DISPLAY=:0.0 属Linux命令,设置图像显示。

3、xhost + 属Linux命令,测试图形显示。

[oracle@localhost ~]$ xhost +

access control disabled, clients can connect from any host

4、export LC_CTYPE=en_US.UTF-8 属Linux命令,设置语言,防止乱码。

[oracle@localhost ~]$ export LC_CTYPE=en_US.UTF-8

5、lsnrctl status 检查监听状态,可以看到当前启动的监听以及数据库服务。

[oracle@localhost ~]$ lsnrctl status

6、lsnrctl help 显示监听命令帮助

[oracle@localhost ~]$ lsnrctl help

二、Oracle

1、netca 创建监听

[oracle@localhost ~]$ netca

2、dbca 创建数据库

[oracle@localhost ~]$ dbca

3、sqlplus SQL*PLUS管理数据库

[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 5 16:55:01 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> 

以上是无用户登录。

SQL> connect / as sysdba

Connected to an idle instance.

SQL>

以上登录

SQL> startup

ORACLE instance started.

Total System Global Area  264241152 bytes

Fixed Size                  1218868 bytes

Variable Size              88082124 bytes

Database Buffers          171966464 bytes

Redo Buffers                2973696 bytes

Database mounted.

Database opened.

SQL>

以上启动环境变量里面配置的那个数据库SID

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

退出SQL*PLUS

猜你喜欢

转载自lanmaokyle.iteye.com/blog/1553209