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 - Production on 10-1? -2012 16:12:50
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
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 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 :
vi /etc/hosts localhost.localdomain localhost
::1 localhost localhost.localdomain

# 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



©2019-2020 Toolsou All rights reserved,
The 11th Blue Bridge Cup python The real topic of the University Group National Games JavaSwing To achieve a simple Lianliankan games 【Spring Source code analysis 】42-@Conditional Detailed explanation element-ui Step on pit record 2019PHP Interview questions ( Continuously updated )PHPJava Misunderstanding —— Method overloading is a manifestation of polymorphism ? First issue 500 100 million , Set up a new Department , What is Tencent going to do ? Google chrome The browser can't open the web page , But what if other browsers can open it ? Regression of dependent variable order categories (R language )【Golang Basic series 10 】Go language On conditional sentences if