First, the basic operation of the table1. User Management1.1 User of the system in the initial stateUnder System users, execute the following query statement to see all users of the current systemSELECT * from Dba_users;1.2 Create a userSql> create
Use the Dept table under the Scott account;SELECT * FROM Dept order by Deptno;Ten ACCOUNTING NEW YORKDALLASSALES CHICAGOOPERATIONS BOSTONFor demonstration convenience, insert a piece of data:INSERT INTO Dept (Deptno, dname, loc) VALUES ("SYSTEM", '
--View disk statements that consume the most disk read and write ratesSELECT *From (select v.sql_id,V.child_number,V.sql_text,V.elapsed_time,V.cpu_time,V.disk_reads,Rank () Over (order by v.disk_reads Desc) Elapsed_rankFrom V$sql v) awhere
Incremental backup:2 levels, level 0, and level 1, 0 levels of backup contain all block,1 level backup changes in the data file block, when performing an incremental backup, the first to do a 0-level backup, as the basis for incremental backup.(1)
oracle024 Oracle's storage structurestorage structure-the storage structure of tablesTablespace: Consists of one or more files, and the spatial capacity of the tablespace is the sum of multiple file sizesTables and data files create a middle tier
Maintenance principle of Big data scale
1. If this table is often crud, the best way is to regularly collect statistics to pass to the Oracle optimizer for improved performance. For example, the Dbms_stats.gather_table_stats command.
Can be
1, the optimization of the sql,sql with the Hotspot table execution time is too long to hold the latch of time. For statements that return fewer results, you should check the use of indexes and partitioning criteria. For example, we query tables
Use the Linesize command to set the number of characters a row of data can hold, with a default number of 80. If the value of the linesize is smaller,Then a row of data in the table will need to be displayed on the screen, and if the value of
1 Dynamic SQL is the concatenation of strings of SQL, using variables instead of specific values, 100,000 statements can be hash Chen a sql_id, can only parse onceFor I in 1..100000LoopExecute immediate' INSERT into T values (: x) ' Using I;End Loop;
Same Databasetwo different users user1 User2user1 there is a table table1create synonym inside the user2create synonym sy1 for user1.table1;once created, direct access is OK.select * from Sy1;data can be taken.but put it in a stored procedure.CREATE
#!/bin/bash# echo "Copy file:"# read-p "Please input the server share your OS installation media and Oracle software:" Server# Mkdir/installyationmedia# SCP [email protected]${server}:/iso/*/installationmedia# if [-e/installationmedia/*.iso]{# echo "
SGA size at Oracle10G startup
The size of the SGA started in Oracle 10g Database is determined by sga_target and sga_max_size. The following three cases are discussed:
Sga_target = sga_max_size
Parameter file value
*.sga_target=599785472
Start
SQL>
Oracle purchase price research, oracle purchase price
If you are an architect, in addition to technical selection, it is more important to choose a cost-effective database. oracle is currently the top database, therefore, it is necessary to
OracleCBO evaluates like data volume
There are two forms of Like Statement, which is evaluated by 5% of the total data volume.
SQL> drop table test purge; SQL> create table test as select * from dba_objects; SQL> exec dbms_stats.gather_table_stats
Oracle Spool commands
Run the spool command to copy the output results of SQL * plus to a specified file or query the results.
Send to the printer and use the spool off command until it is executed.The spool command syntax is as follows:
Spool
Calling the Oracle stored procedure in javaCalling the Oracle stored procedure in java
This article describes how to call the stored procedure of Oracle through java.1. Write the Stored Procedure
Create or replace procedure sp_pro3 (sp_name VARCHAR2,
Auto-incrementing sequence and stored procedure in Oracle
Oracle does not have auto-increment columns. In this case, you must manually write a method or use a sequence or trigger.
Easy to use (personal habits)
1. create sequence salary_seq2.3.
Oracle creates tablespaces and users1. Connect to the database# Su-oracle$ Conn/as sysdba2. Create a tablespaceSQL> create tablespace doiido datafile '/main/oracle/oradata/doiido. dbf' size 1024 M autoextend on next 1024 M maxsize 10240 M extent
Oracle modify listening port 1521
In oracle, the default listening port number is 1521. Once someone scans this port number, it will know that this server is an oracle database server. This poses an extremely high security risk, how to modify the
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.