Oracle starts listening, views listening, and stops listening commands, and oracle listens
Start listening: lsnrctl start
View listener: lsnrctl status
Stop listening: lsnrctl stop
1. oracle data servers include instance processes and databases;
Instance processes include: memory structure (sga), background process (pmon), smon (system Monitoring system monitor, 3 seconds of Space sorting), dbwr (dirty data processing) lgwr (write the redo buffer file to log), ckpt (checkpoint, synchronize data, first write logs, dirty data), and other processes );
Databases include data files, control files, and redo log files. Parameter files, password files, and archive files are optional, depending on the database status;
2. pga: includes user process and server process. user process communicates with oracle instances through server process.
3. sga = share pool + database buffer cache + redo log buffer + other structures (large pool, java pool optional)
Shared_pool = library cache (SQL sharing, buffering SQL Execution plans, using the least recently used algorithm) + data dictionary cache (row cache, data dictionary );
Database buffer cache (db_cache_size): oracle uses the block size as the most basic data read/write unit.
Redo log buffer cache:
4. Change parameters:
Alter system set shared_pool_size = 64 m;
Alter system set db_cache_size = 64 m;
Alter system set large_pool_size = 64 m;
5. OS verified users:
Create user id
Create group (ora_dba, ora_databasename_dba, ora_oper, ora_databasename_oper)
Add user id to group id
Edit sqlnet. ora (sqlnet. authentication_services = (CNT ))
6. Forget the system/sys password:
Delete E: oracleproduct10.2.0db _ 1databasepwdtestdb. ora;
Use the command: orapwd file = d: pwdtestdb. ora password = admin1 entries = 10; set the password to admin1;
Or:
Sqlplus/@ testdb as sysdba
Alter user sys identified by new password;
Alter user system identified by new password;
7. block (block) extend (Disk Area) segment (segment) tablespace (tablespace)
8. The network service configuration information is recorded in the D: oracleproduct10.2.0db _ 1 NETWORKADMIN nsnames. ora file.
Database startup command
1. Start the TNS Listener
C: Documents and SettingsAdministrator> lsnrctl start
2. Start Oracle Services
C: Documents and SettingsAdministrator> net start OracleServiceOrcl
3. Log On As sysdba
SQL> connect system as sysdba
4. Start isqlplus
C: Documents and SettingsAdministrator> isqlplusctl start
5. Start database control
C: Documents and SettingsAdministrator> emctl start dbconsole
If a startup error occurs, it is likely that the IP address has been modified. You can take the following measures:
Set oracle_hostname = Host Name
Emca-config dbcontrol db for corresponding configuration.
6. https: // localhost: 1158/em/
<Open console output>
1. show all
Serveroutput OFF
2. set serveroutput on
Startup and shutdown Modes
Oracle Database startup and shutdown Methods
There are several startup methods:
1. startup nomount
Non-installation startup. In this mode, you can execute: re-build the control file and re-build the database.
Read the init. ora file and start the instance, that is, start the SGA and background processes. To start the process, you only need the init. ora file.
2. startup mount dbname
Install and start. In this mode, run:
Database Log archiving,
Database media recovery,
Online or offline data files,
Locate the data file and redo the log file.
Execute "nomount", open the control file, and confirm the location of the data file and the on-line log file,
However, data files and log files are not verified at this time.
3. startup open dbname
Run "nomount" first, then "mount", and then open all database files including the Redo log file,
In this way, you can access data in the database.
4. startup, which is equal to the following three commands
Startup nomount
Alter database mount
Alter database open
5. startup restrict
Constraint-based startup
This method can start the database, but only allow access by users with certain privileges
When a non-authorized user accesses the service, the following prompt is displayed:
ERROR:
ORA-01035: ORACLE only allows users with restricted session Permissions
6. startup force
Force start Mode
When the database cannot be closed, you can use startup force to close the database.
Shut down the database first, and then execute the normal database startup command
7. startup pfile = parameter file name
Startup method with initialization parameter file
Read the parameter file first, and then start the database according to the settings in the parameter file.
Example: startup pfile = E: Oracleadminoradbpfileinit. ora
8. startup EXCLUSIVE
========================================================== ====
There are three startup methods:
1. shutdown normal
Close the database normally.
2. shutdown immediate
Close the database immediately.
Run shutdown immediate in SVRMGRL, and the database is not closed immediately,
However, it is disabled only after Oracle executes some cleanup tasks (terminating sessions and releasing session resources ),
When you use shutdown to close a database, shutdown immediate can be used to close the database.
3. shutdown abort
Directly shut down the database, and the session accessing the database will be suddenly terminated,
If a large number of operations are being performed in the database, it takes a long time to restart the database after the shutdown abort command is executed.