安装软件之后我们再来创建数据库
配置监听器
-bash-3.00$ netca
图17
完成之后查看进程 ps -ef | grep /fantlam 可以看到监听程序已经运行起来了
-bash-3.00$ ps -ef | grep /fantlam
oracle 751 632 0 19:39:33 pts/1 0:00 grep /fantlam
oracle 749 1 0 19:36:46 ? 0:00 /fantlam/oracle/bin/tnslsnr LISTENER -inherit
创建数据库
-bash-3.00$ dbca
图24
基本上按默认走
图25
起个数据库名,注意提示
图27
设置口令
图29
图32
选择字符集
图34
图35
完成
图36
等待创建
图37
为scott用户解锁
图38
这样数据库就创建完毕
查询oracle数据库字符集
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
数据库在系统启动时候默认没有自启动
手动启动数据库
SQL*Plus: Release 10.2.0.2.0 - Production on Fri Jan 29 19:12:06 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1279820 bytes
Variable Size 117442740 bytes
Database Buffers 167772160 bytes
Redo Buffers 2912256 bytes
Database mounted.
Database opened.
启动监听器
-bash-3.00$ lsnrctl start
LSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 29-JAN-2010 19:36:44
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /fantlam/oracle/bin/tnslsnr: please wait...
TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
System parameter file is /fantlam/oracle/network/admin/listener.ora
Log messages written to /fantlam/oracle/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=unknown)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=unknown)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
Start Date 29-JAN-2010 19:36:46
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /fantlam/oracle/network/admin/listener.ora
Listener Log File /fantlam/oracle/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=unknown)(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
-bash-3.00$
-bash-3.00$ ps -ef | grep /fantlam
oracle 751 632 0 19:39:33 pts/1 0:00 grep /fantlam
oracle 749 1 0 19:36:46 ? 0:00 /fantlam/oracle/bin/tnslsnr LISTENER -inherit
关闭数据库方法
SQL> shutdown immediate;