=========创建一个新数据库,SID为mcky=========
[oracle@localhost dbs]$ env | grep ORA
ORACLE_SID=orcl ORACLE_BASE=/oracle ORACLE_HOME=/oracle/11g # 当前系统上已经有一个数据库了,SID为orcl
[oracle@localhost dbs]$ export ORACLE_SID=mcky
[oracle@localhost dbs]$ env | grep ORA
ORACLE_SID=mcky ORACLE_BASE=/oracle ORACLE_HOME=/oracle/11g
[oracle@localhost oradata]$ dbca
# 运行dbca,注意,运行DBCA需要图形化界面的支持
# 因此建议在Linux命令行中使用startx开启图形化界面
至此,成功使用DBCA创建了一个Database。
[oracle@localhost oradata]$ ps -ef | grep oracle
root 1516 1 0Sep08 ? 00:00:00 login --oracle oracle 11437 1 001:37 ? 00:00:02/oracle/11g/bin/tnslsnr LISTENER -inherit root 14314 1372 005:57 ? 00:00:00 sshd: oracle[priv] oracle 14332 14314 0 05:57 ? 00:00:00 sshd: oracle@pts/0 oracle 17067 1 010:18 ? 00:00:00/usr/libexec/gvfsd-burn --spawner :1.8 /org/gtk/gvfs/exec_spaw/1 oracle 17069 1 010:18 ? 00:00:00 gnome-terminal oracle 1707017069 0 10:18 ? 00:00:00 gnome-pty-helper oracle 1707117069 0 10:18 pts/3 00:00:00 bash oracle 17604 1 010:37 ? 00:00:00 ora_pmon_mcky oracle 17606 1 110:37 ? 00:00:05 ora_vktm_mcky oracle 17610 1 010:37 ? 00:00:00 ora_gen0_mcky ... oracle 25339 1 010:41 ? 00:00:00 oraclemcky(LOCAL=NO) oracle 25341 1 010:41 ? 00:00:00 oraclemcky(LOCAL=NO) oracle 2605516413 3 10:46 pts/2 00:00:00 ps -ef oracle 2605616413 0 10:46 pts/2 00:00:00 grep oracle # 可以查看到SID为mcky的数据库的进程了
[oracle@localhost oradata]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 910:48:31 2014 Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / assysdba
Connected.
SQL> select *from dual;
D
-
X
-- 数据库已经可以正常使用了
转载于:https://blog.51cto.com/wuyelan/1554944