1. with oracle User login linux
2. with sysdba Sign in ：sqlplus / as sysdba
3. Start the database , Enter the command ： startup
4. close database , Enter the command ： shutdown immediate
4. input exit introduction sqlplus.
be careful ： The first 2 Step by step sysdba Sign in sqlplus It may be reported “ORA-12162: TNS:net service name is incorrectly
specified” Error of , The reason may be that there is no configuration ORACLE_SID environment variable .
ORA-12541:tns: No sniffer solution
Preliminary cause analysis
In general, most of these problems are caused by modifying the name of the server where the database is located .
1, If the previous database is running normally , The error was reported all of a sudden , It may be due to some exception that the database listening is suspended ;
2, If the error is reported initially , It may be that monitoring is not configured or there is a problem with monitoring parameter configuration ;
3, It may be caused by the software itself BUG cause .
1, View the status of current monitoring
$ lsnrctl status
LSNRCTL for Linux: Version 220.127.116.11.0 - Production on 10-1? -2012 16:12:50
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
2, stay oracle Find in the installation directory listener.ora and tnsnames.ora file , Then open it .
3, take host Change to machine name , Often changed to 127.0.0.1 It doesn't solve the problem , Must be changed to machine name .
4, Restart monitoring
$ lsnrctl stop
$ lsnrctl start
Host name and IP configuration file
Of /etc/hosts It's configuration ip Address and its corresponding host name file , Here you can record the local or other host's ip And its corresponding host name . different linux edition , This configuration file may also be different .
View main profile information ：
127.0.0.1 localhost.localdomain localhost
::1 localhost localhost.localdomain
# 127.0.0.1 network IP address
# localhost.localdomain Host name or domain name
# localhost Host name alias
# ::1 Local host (IPV6) Loopback address of
2, Dual computer interconnection
When only two hosts are interconnected , At this time, both hosts need to set their own ip, At the same time in each other's hosts Add your own ip And host name .
3, Host name modification tool hostname
Displays the host name ：
[oracle@server15 ~]$ hostname
Temporarily set the host name ：
[oracle@server15 ~]$ hostname test100
be careful ： adopt hostname Tool to set the host name is only temporary , The next time you restart the system , This host name will not exist .
Display host IP：
[oracle@server15 ~]$ hostname -i
linux Open firewall , Method of closing
1, Permanent effect after restart
open ：chkconfig iptables on
close ：chkconfig iptables off
2, Immediate effect , Failure after restart
open ：service iptables start
close ：service iptables stop