1. Switch to the database user on the console: su-Oracle
Ii. Input: lsnrctl start; start the listener;
3. Start the database;
4. operate databases, such as creating users, granting permissions, and creating tables;
5. Shut down the database;
6. Disable the listener;
Note: After the database is installed, it is generally a super-administrator role to enter the database platform, and then create a common user for Application System Login or development management.
Appendix 1: Listener startup disabled:
For oracle users, enter lsnrctl in the linux console to enter the: LSNRCTL> status;
Except:
Start: start the listener;
Stop: stop the listener;
And the following command:
Status; services; version; reload; available for running;
Appendix 2: Database startup and shutdown:
1. Connect to the sys user to enter the SQL> Status:
C: \\> sqlplus sys/change_on_install as sysdba;
Or:
C: \\> sqlplus/nolog
SQL * Plus: Release 9.2.0.1.0-Production on Monday April 26 09:42:00 2004
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
SQL> connect/as sysdba
Connected.
SQL>
2. Start the database:
Database startup uses the startup command. There are three cases:
First, start the database instance and open the database without parameters, so that you can use the database. In most cases, this method is used!
Type 2: With the nomount parameter, only the database instance is started, but the database is not opened. It is used when you want to create a new database, or when you need it!
Type 3: Use the mount parameter when renaming a database. In this case, the database is opened and can be used!
3. Shut down the database
Shutdown has four parameters. The meanings of the four parameters are as follows:
Normal: wait until all users are disconnected.
Immediate waits for the user to complete the current statement
Transactional waits for the user to complete the current transaction
Abort closes the database without waiting.
Normal requires that you close the database only after all connected users are disconnected. Sometimes it seems that the command is not running! New connections are not allowed after this command is executed.
Immediate disconnects the user after the user executes the statement being executed, and does not allow new users to connect.
Transactional disconnects after it supports executing the current transaction and does not allow new users to connect to the database.
Abort forcibly disconnects and closes the database.
Appendix 3: create a user:
After the listening service and database are started, log on to the system and enter the SQL> Status:
Run the following statement to create a user:
SQL> create user test identified by test; -- creates a user;
SQL> grant dbs to test; -- grant permissions;