After years of experience with oracle, I found myself and some people around me have some bad development and operation methods in oracle usage, which can be used for reference.
I. oracle programming:
1. The oracle code writing format is not
Set linesize 300; SET the Row Height
Set pagesize 50; SET the number of entries displayed on each page
Conn system/manager as sysdba; Log On AS SYSTEM
Show user; displays the current USER
SELECT * FROM tab; displays all tables of the current
With the development of databases, today's databases can store a large amount of data, and the memory is getting bigger and bigger. However, no matter how large your memory is, the memory is always insufficient, and paging is required, detailed
1. Set the initialization parameter job_queue_processes.SQL> alter system set job_queue_processes = n; (n> 0)Job_queue_processes: the maximum value is 1000.
View the job queue background processSQL> select name, description from v $ bgprocess;
2.
You can use the profile file to define user attributes. For example, you can create a profile file for the product user.SQL codeCreate profile product_profile limit SESSIONS_PER_USER 1;
-- Only one user can be setSQL codeSession profile alter user
After a large amount of data is deleted from an Oracle table, even if there are only a few rows of records in the table, the query using select count (*) from table will not immediately come out because the table has a large space, query is slow.
Note the following when deleting an online redo log file group:① When the log group is active or current, it cannot be deleted.② After a log group is deleted at the database level, files on the operating system will not be deleted by the level chain.
1 dbms_random.random [common method (random acquisition of a piece of data)]Java codeSelect * from (select t. * from T t order by dbms_random.random) where rownum
2 internal function sys_guid ()Java codeSelect * from (select t. * from T t order by
The knowledge about Oracle and DB2 data storage modes is what we will introduce in this article. Let's take a look at this part. "There is no sequence for storing data in Oracle normal tables, that is, heap tables. Oracle indexes organize tables to
Oracle Table query and precautions
△Query the specified column (remove duplicate rows) select distinct deptno, job from emp; △name must be capitalized select deptno, job from emp where ename = 'Smith '; △ process null values using nvl function
Small and Medium databases rman catalog Backup recovery solution (1) Oracle databases are usually the first choice for large databases and large enterprises for database stability, high availability, cross-platform and massive database processing.
Common RMAN commands common rman commands crosscheckreportobsolete
1. SHOW command: 1.1, RMAN> show all; display rman parameter configuration 2. REPORT command: 2.1. RMAN> report schema the physical structure of the target database 2.2. RMAN> report
Oracle value functions
1. absolute value: abs () select abs (-2) value from dual; 2. take the entire function (large): ceil () select ceil (-2.001) value from dual; (-2) 3. take the entire function (small): floor () select floor (-2.001) value from
Physical consistency and logical consistency check (DBV, rman) DBV tool features: Read-only, can be checked online without modification, do not need to close the database. The control file and log file cannot be checked, but the data file can be
How to Use clustering index is a type of re-organization of the actual data on the disk to sort by the value of one or more specified columns. Because the index page pointer of the clustered index points to the data page, using the clustered index
[One Moss per day]-Index Skip Scan Feature (212391.1) INDEX Skip Scan, that is, Index quick Scan, usually refers to the first column without composite INDEX in the predicate, however, scanning INDEX blocks is faster than scanning table data blocks.
Solve the problem of system slowdown after oracle is installedOracle Database is a resource-consuming software. The memory occupied by a single instance service must be at least MB Based on the memory allocated during installation. In addition,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.