1. Single Table transfer tablespaceScenario: If a table user is stored in the tablespace oldspace, you must move the table user to the tablespace newspace. Execute the statement:Alter table user move tablespace newspace;Commit; 2. All tables under
Vi Analyze_table.sh######################################## ######################################## ################## This for normal analyze, Added only after each step the following operations,# The default is 40% of the table, all indexes of
Archive logs record database operation records, which are the basis for data recovery. If the archive mode is enabled for the database, a large number of archive logs will be generated. Of course, if there is an RMAN backup, logs that have been
When PL/SQL developer is used to develop oracle stored procedures, a very confusing problem is that the stored procedures can be compiled after compilation, that is, there are errors after compilation, there is a small Red Cross in the name of
A lock is a mechanism used by a database to control concurrent access to shared resources.
The lock is used to protect the data being modified.
Other users can update the data only after the transaction is committed or rolled back.
Advantages of
Flash back with SQL * Plus.
1. Shut down the database.
SQL> shutdown abort;
2. Start the database to the Mount mode.
SQL> startup mount;
3. Data flash back.
SQL> recover database until time '2017-11-20: 07: 00: 00 ';
(Another available
------ Create a type Create or replace type whiteListType as object (Spid number,Spname varchar2 (200 ),Spcode varchar2 (200 ),Listname varchar2 (200 ),Mdncount number ----- Create a reference Create or replace type "WHITE_LIST_TYPE_ARRAY" IS array (
Any real number can be expressed as: S = A. B * 10n (N power of 10 ). Then we only need to store A. B (Data Part), n (highest bit. However, oracle also stores the symbol bit (which is required for negative numbers ).Create table test_number (num_col
Public class OraDatabase{Private OracleConnection OraConn; Private void Open (){If (OraConn = null){OraConn = new OracleConnection (ConnectionInf. GetSFISConString ());}If (OraConn. State = System. Data. ConnectionState. Closed)OraConn. Open
Fault description: the following error is reported when the master database is started after the oracle dataguard environment is set up: Wed Feb 8 23:12:38 2012LGWR: Error 16047 creating archivelog file 'standby'Wed Feb 8 23:12:38 2012Errors in file/
In the past, I remember that Mysql Command terminals can insert or update databases in batches. Write down the PL/SQL Deverloper Method for Batch Data Processing today. 1. log on to PL/SQL Developer2. Choose menu File> New> command window.3, SQL> @
For the development of Oracle databases, we may sometimes encounter some strange problems, which are different from other databases. Here I have listed some interesting questions.Problem 1: solving the time problem in Oracle The default date type of
First of all, the system tables provided by databases of different versions are different. You can view the tables provided by the database of this version according to the data dictionary.Like this:Select * from dict where table_name like '%
Paging query statement:Select * from (Select A. *, rownum rn from (Select * from table table_name)Where rownum = 20;Select * from table_name indicates the original query statement that does not flip pages. Rownu = 21 control the range of each
Oracle time issue continuation string -- Time Format continuation previous article: oracle time issue ( http://www.bkjia.com/database/201202/119154.html ) TO_CHAR is to convert the date or number to the string TO_DATE. It is to convert the string to
Sometimes oracle reports the following error when executing a large transaction: Pl/SQL code ORA-01555: snapshot too old (rollback segment too small) this indicates that the random rollback segment allocated by oracle to this transaction is too
Complex query of a single Oracle table
select avg(sal),max(sal),deptnofrom empgroupby deptno;
select avg(sal),max(sal),deptnofrom empgroupby deptnohavingavg(sal)>2000orderby deptno;
Query employees whose salaries are higher than 500 or whose
When dbms_stats Imports and Exports table statistics in SQL tuning, incorrect or outdated statistics result in incorrect execution plans being used. Of course, in this case, we can collect the latest statistics to achieve the goal of optimization.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service