We often use oracle command lines. The following describes how to use oracle command lines to start a database in Linux to report errors. It is helpful for you to learn about oracle command lines.
When debugging our test server, oracle on the machine is always unable to start. After debugging, the problem is finally solved.
When the oracle command line in linux starts the database, the TNS error: the net service name is not incorrectly ......, This is because the environment variable is not set with SID error, or has already been set, but the environment variable is not automatically loaded when you switch to the oracle user, the operation steps are as follows:
- # Su oracle
-
- $ Echo $ ORACLE_SID // if the correct SID is not printed, it indicates that the environment variable is set incorrectly or not loaded.
- $ Cd/home/oracle // enter the oracle user's home directory
- $ Source. bash_profile // load the oracle personal attribute File
- $ Echo $ ORACLE_SID // if it is still not printed, the SID variable is definitely not set. Directly VI this file and then set
- $ Cd $ ORACLE_HOME/bin // enter the bin directory under the oracle Installation Directory
- $./Lsnrctl start // start the listener
- $./Sqlplus/nolog // log on to sqlplus
- SQL> startup // start the database instance. If an error is prompted, you do not have the permission to switch to the sysdba user.
- SQL> conn'/as sysdba '// switch to sysdba user
- SQL> startup // start the database instance
After starting, you can exit and solve the problem.
Implementation of oracle command line Logon
Oracle tablespace creation syntax
This section describes Oracle partition indexes in detail.
Implementation of oracle re-Indexing
Complete Oracle File System Parsing