以oracle用户登录系统,若是是root用户,利用su - oracle切换用户
以oracle用户cd到oracle的bin目次,
cd $ORACLE_HOME/bin,如下:
[oracle@localhost ~]$ cd $ORACLE_HOME/bin
[oracle@localhost bin]$ pwd
/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@localhost bin]$
以nolog体例运行sqlplus,如下
[oracle@localhost bin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 26 14:02:52 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL>
以sysdba毗连数据库,如下
SQL> conn /as sysdba
输入用户名sys 和暗码
启动数据库实例,如下
SQL> startup;
期待半晌,比及database opened就是打开数据库实例当作功了。
利用号令shutdown abort ;或者 shutdown immediate ; 封闭数据库
退出数据库毗连,如下:
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
以oracle用户cd到oracle的bin目次,
cd $ORACLE_HOME/bin,如下:
[oracle@localhost ~]$ cd $ORACLE_HOME/bin
[oracle@localhost bin]$ pwd
/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@localhost bin]$
启动数据库监听办事,如下:
[oracle@localhost bin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 26-NOV-2015 14:07:10
Copyright (c) 1991, 2009, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
若是oracle用户的情况变量没有设置装备摆设,[oracle@localhost ~]$ vi .bash_profile,添加如下内容:
.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
umask 022
ORACLE_BASE=/home/oracle/app/oracle/
export ORACLE_BASE
ORACLE_HOEM=/home/oracle/app/oracle/product/11.2.0/dbhome_1/
export ORACLE_HOME
ORACLE_SID=orcl
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/lib:/usr/lib
export PATH
DISPLAY=localhost:0.0
~
~
~
~
Type :quit<Enter> to exit Vim 1,1 All
0 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!