I suddenly thought of this problem recently and recorded it to consolidate my knowledge.
Tables, temporary tables, and table variables are used by many people. truncate Table @ table variables may report errors. I believe many people have encountered them, but there are few people who really think about why, after all
This is because the table with the truncate operation is still executing, and no commit is finished, at which point you can query V$locked_object to get which user's transaction is operating this table.
Experimental SimulationFirst, use the Scott user to enter the database and do the following for the existing table T1
PRM? DULfororacle restores the table truncated by truncate OracleDBA: PRM disaster recovery tool and Schema-level data recovery. PRMForOracleDatabase-schema-level oracle database data recovery features, PRM is ParnassusDataRecoveryManager is an enterprise-level Oracle Database disaster recovery tool. PRM can
PRM? DUL for oracle recover the table truncated by
When truncate an Oracle table, an error occurs:ORA-00604: A recursive SQL Level 1 error occurredORA-00904: "CURRENT_SCN": Invalid identifierThe analysis is due to the fact that a materialized view is built on the table:Select log_owner,log_table from All_mview_logs;Log_owner log_table---------------- ---------------Newsadmin Mlog$_ann_basinfoAfter deleting the materialized view Log
In Oracle, after delete is used to delete data, the storage capacity of the database is not reduced, and after a table is deleted using delete, the query speed of this table is the same as before deletion, it will not change.
Because oralce has an HWM high water mark (or high water level line), it is the highest water level line used by a table in oracle. After t
Delete from tablename
Truncate table tablename
All records in the table can be deleted --
I used to know this command, but I don't know how it works and its performance. Today I am reading a book and posting it to share it with you.
The delete statement deletes a row from the table each time, and saves the delete
; new linked server
3.1: In the regular label column
Name Sybase,
Server type Choose another data source, select in the name of the provider
Microsoft OLE DB Provider for ODBC
Data source: Fill in the DSN name 1.70
3.2: Security column
Local Login Fill SA
Remote users and remote passwords fill in Sybase username and password
3.3: Use this security context to establish a connection
R
In the actual working environment, if you Truncate several data dictionary tables in the database during the operation, the database will no longer be available.
In the actual working environment, if you Truncate several data dictionary tables in the database during the operation, the database will no longer be available.
In the actual working environment, if you T
Label:1. TRUNCATE TABLE XXX In the test, I hate the primary key of a table has been growing, always feel the most comfortable starting from 1, ^_^, TRUNCATE table can help me, compared to the delete from, it makes the data table f
Tags: differences between SQL rollback AMP Records Delete solutionPlease indicate the difference between delete from TableA truncate TABLE TableA in SQL ServerAnswer: Both can be used to delete all records in the table. The difference is that truncate is a DDL operation that moves the HWK so that the HWK value is 0 an
As we all know, drop table will seriously consume server I/O performance. If the size of the table to be dropped is large, it may even affect the normal online operation.
First, let's take a look at why a table with a large drop capacity affects online services.
Run drop table directly. mysql deletes all
Address: http://steve-111.iteye.com/blog/750326
A few days ago, I accidentally truncate a table, and the data in the table is very important. In addition, the table data is not backed up, and the data backed up is not the latest. For a moment, I do not know what to do. I have found a lot of information on the Internet,
1. Thedrop table name Eg:drop table dbo. Sys_test2.truncate table name eg:truncate table dbo. Sys_test3.Delete from table name where column name = value Eg:delete from dbo. Sys_test where test= ' Test 'Second, Drop,
Yesterday, successfully helped the customer recover a failed database.
The reason for the failure is that the technician truncate several data dictionary tables in the database, which directly results in the database being unavailable.
The database environment is an Oracle 9.2.0.7 RAC environment. The database is not backed up because of the large transaction volume of the database.
Site inspection confirmed that the main truncated
First,syntax in SQL1. Thedrop table name Eg:drop table dbo. Sys_test2.truncate table name eg:truncate table dbo. Sys_test3.Delete from table name where column name = value Eg:delete from dbo. Sys_test where test= ' Test 'Second,dr
In the DBA's maintenance Management, index invalidation is a common problem, such as move, CTAs, swap partitions and so on will cause the index invalidation, the following experiment is to verify the drop partition, truncate partition partition on the local index and global index, in common, TRUNCATE TABLE tables are not invalidated by indexes.
Basic Environment
In the actual working environment, if you Truncate several data dictionary tables in the database during operation, the database will no longer be available, this article will give a detailed explanation of a related case.
The example is as follows:
Database environment: Oracle Database 9.2.0.7 RAC. (Note: the database is not backed up because the transaction volume of the database is large ).
Truncated tables found after check:
SQL> select object_nam
ASSM level Three bitmap can be said to be the basic skills of DBA knowledge, here with the test method to verify the next level three bitmap principle.
1. The tables needed to establish the experimental environment
Sql> create tablespace A1 datafile '/oracle/app/oracle/oradata/ora11/a1.dbf ' size 20m;Tablespace created.Sql> create user A1 identified by A1 default Tablespace A1;User created.Sql> Grant DBA to A1;Grant succeeded.Sql> Connect A1/A1Connected.Sql> CREATE
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.