1.1.
Basic Concepts
Database: Service process (Database read-write log process, etc.)+ memory (memory occupied)+ database files (database, etc.).
table Space: The place where the data table is stored. A table space will have a corresponding . db file corresponding to
Example: You ate database after the process and the specific memory for him to read and write operations, this particular thing is an example. That is, the database concept of the rich process + memory, just this service process has been hit a SID This particular token.
Service: is used to mount the instance, of course there is no instance, the database service can also be run alone. When a server this time the option to load. But most of the things we call services are examples.
mode: Oracle also has a concept that this one, a schema is a database user of all the objects collectively.
a tablespace is a logical partition of a database, and a table space can belong to only one database. All database objects are stored in the specified table space. It has the following functions: (1) controlling the quota of table space occupied by the user, (2) controlling the disk space occupied by the user, (3) flexibly placing the table space, improving the input and output performance of the database; 5) log files and data are opened to improve the security of the database.
1.2.
Switch Users
Su-oracle, the equivalent of re-login, at this time the user's home directory and PATH information will change.
Su Oracle, the user's home directory and path remain the original user's home directory and pathafterswitching to Oracle identity.
1.3.
Date conversion Statements in the database
Selec sysdate,to_date (' 2008-11-10 10:36:11 ', ' yyyy-mm-dd hh24:mi:ss ') from dual;
Select To_char (update_date, ' Yyyy-mm-dd hh24:mi:ss ') from Td_topo. T_hn_temp_u2000_device;
1.4.
database listening, logon, restart and other operations
Su-oacle # Switch to Oracle user
Lsnrctl Stop (TDSYSDB) stops monitoring
Lsnrctl Start monitoring, if also reported is not listening, turn off the firewall
1.5.
database Startup and shutdown operations
Su-oracke switching to Oracle users
Sqlplus/as sysdba to log in to the database sysdba user
Sql>shutdown immediate; Close the database
Sql>quit exiting the database
Sql>startup/ Start Database
1.6.
To Modify a database password
Su-oracle
Sqlplus/as SYSDBA
Alter profile default limit Password_reuse_time unlinited;
Alter profile default limit Passdord_reuse_max unlimited;
Alter user system identified by T_DPWDS8;
1.7.
PL/SQL configuration
Tools -> Preferences->oracle-> Connections-> Check the connection
Plsql Configure the method for the four-bit Oracle :
http://blog.csdn.net/chen_zw/article/details/9292455/
1.8.
query statement does not match Chinese problem
Execute the following query statement in the database to find out the current Chinese encoding
Select Userenv (' language ') from dual;
Simplified Chnese_china. Al32utf8
My Computer -> Properties-> Advanced system Settings-> Environment Variables-> System Variables- > New
nls= ' simplified Chnese_china. Al32utf8 '
after the increase is complete, restart PL/SQL can
1.9.
database name, db instance name
To view the database name:
Show parameter db_name;
To view the DB instance name:
Show parameter instance_name;
To view the database listener name:
Cat/opt/oracle/oradb/home/network/admin/listener.ora
1.10.
basic Information table in database
To view the details of each table space:
SELECT * from Dba_data_files;
SELECT * from Dba_tablespaces;
To view all user information:
SELECT * from Dba_users;
1.11.
PL/SQL encoding Setup issues
Solve in PL/SQL, Chinese and date are garbled problems.
My Computer -> Properties-> Advanced system Settings-> Advanced-> Environment Variables
the environment variable the value of Nls_lang is set to:Chinese_china. ZHS16GBK or american_america. Al32utf8(do not mix the language with the code such as
Chinese_china. Al32utf8)
close and log back in PL/SQL client, making the settings effective.
Oracle Database FAQ Summary (i)