After importing an empty database to the database, we found that the occupied table space was very large. After the shrink space cascade was executed, we found that the actual occupied space was less than 1%.
However, an error message is displayed when the tablespace size is reduced.
Alter database datafile 'd: \ ora_tablespace \ gcomm2.dbf 'resize 5000 m;
Tip: ORA-03297: file contains used data beyond requested resize Value
Cause 1: the size of the
Tags: style color ar using SP strong file data onSQL Server allows the user to set the database initial and maximum values, which can be configured by auto-grow or auto-shrink. With these configurations, we can prevent application modifications that could be caused by database space problems, or when SQL Server disk space is exhausted. In general, if the database is not very busy, the default setting is auto-grow, which can satisfy most of the require
Label:Recently discovered Web sites are inaccessible because the database server disk has no more space left. The log file was found to be 70%, and shrinking the log file failed.The reason for the online lookup is that no backup cannot shrink the log file.A temporary solution:Back up the transaction log, and then shrink the log file. (You can also shrink a log fi
Label:One, Check Database Integrity Task Check the allocation and structural integrity of the user and system tables, and indexes in the database, by running the D BCC CHECKDB Transact-SQL statement. Running DBCC ensures that any integrity problems with the database is reported, thereby allowing them to be addressed Later by a system administrator or database owner. Include indexes Check the integrity of the index pages as well as the table data pages. View TSQL Code -- include Inedexes
DBCC CH
table. The occupied space is test1: 17 m, Test2: 9 m.
Now we can compare the execution plan:
Analyze table test1 compute statistics; analyze table Test2 compute statistics;
The execution plans of two tables of the same size are quite different. In this case, we can still see the difference in small data volumes. In this case, the production system may have millions of data records, this efficiency difference is more obvious.
These tables are deleted every day in our system, and
1 move Experiment
SQL> Create Table my_objects_move tablespace assm as select * From all_objects where rownum
Table created
SQL> select Value
2 from V $ mystat, V $ statname
3 where V $ mystat. Statistic # = V $ statname. Statistic #
4 and V $ statname. Name = 'redo size ';
Value
----------
2317832
SQL> Delete from my_objects_move where object_name like '% C % ';
7546 rows deleted
SQL> Delete from my_objects_move where object_name like '% u % ';
2959 rows deleted
SQL> commit;
Commit complete
1 move ExperimentSQL> create table my_objects_move tablespace ASSM as select * from all_objects where rownum
Table created
SQL> select value
2 from v $ mystat, v $ statname
3 where v $ mystat. statistic # = v $ statname. statistic #
4 and v $ statname. name = 'redo size ';
VALUE
----------
2317832
SQL> delete from my_objects_move where object_name like '% C % ';
7546 rows deleted
SQL> delete from my_objects_move where object_name like '% U % ';
2959 rows deleted
SQL> commit;
Commit complete
Recently a friend went to the computer city to buy a 16G u disk, the computer with the Golden Hill poison PA's U disk authentication test results show that the actual capacity of only 4 G, and suggested that it is shrinking u disk. Friends immediately went to buy a U disk where to find business, merchant wrong, obediently changed a true 16G capacity of U disk. What is the shrinking U disk? Today to share with you about the shrinking U disk knowledge and detection methods.
Tags: manual ado An operation understanding data file settings. com colDatabase shrinkage:Personal understanding, the database in the process of ordinary long-term operation of the log files will always be in a certain proportion in the increase, data files in the database after deleting a large amount of data does not necessarily reduce disk space, repeated operations will appear wasted space, so the shrinking database will be reflected.Suppose the database is set to
During the use of virtual machines, the size of Virtual Disks will increase. Even if you delete files from the disk, the size of the virtual disk will not be reduced. VMware has released the shrink feature in VMware Tools. After VMware Tools is installed, the Virtual Disk size can be effectively reduced when the guest operating system is windows without snapshot. However, if the guest operating system is Linux, the effect of this method is not good, a
1. OverviewNot only can you set the navigation bar in your Web site, but you can also set the navigation menu. Because the menu content is more, the same page display is more cluttered, so many designers have adopted a shrinking menu form.2. Technical HighlightsThis example mainly applies javascript to control the function of displaying and hiding the table, and realizes the function of the shrinking navigation menu. Click the navigation hyperlink to display the contents of the current menu, hid
The first step:ALTER DATABASE DbName set recovery simple;Step Two:DBCC SHRINKFILE (' dbname_log ');Step Three:ALTER DATABASE DbName set recovery full;--------------------------------------------------------------------------------------------------------------- ----------------------------------------------------Explain:In general, DBCC SHRINKFILE (' logical name of the log file of the database '); This one sentence can shrink the specified file. In o
Oracle's online segment contraction (on-line Segment Shrink) refers to the online defragmentation of fragments in the space, which has the following characteristics:
Online, that is, DML is almost unaffected during segment compression (only a short time before the end, DML will be blocked)
In-place operation, no extra space required
Index remains available after shrink completes
It can not only recover
server|sqlserver| Data | Database with command line:
For database log files, such as: Database name: PUB; log file name Pub_log, currently 100M, to compress to 10M
First step: Truncate the transaction log
In SQL Query Analyzer, perform the backup LOG PUB with TRUNCATE_ONLY
Step two: Shrink the database log to a specified size
In SQL Query Analyzer, perform DBCC SHRINKFILE (pub_log,10)
With Enterprise Manager:
Right-click the database you want to
Recently there is a table (with the varchar (max) field) that takes up 240G of space and the space is not released after hundreds of thousands of of the historical data has been deleted. Then use DBCC CLEANTABLE (0,TB_NAME,100) to release the space left by the variable-length field after deleting the record, noting that the third parameter is the number of rows per transaction, It is strongly recommended that the default is 0 and the entire operation will be handled as a transaction! Full lock T
In SQL SERVER 2008, BACKUP Log with TRUNCATE_ONLY is no longer supported, and to shrink the database log, you first need to truncate the file by setting the database recovery mode to simple.The statements are as follows:Use DATABASENAME;GO--Truncate The log by changing the database recovery model to simple.ALTER DATABASE DATABASENAME SET RECOVERY simple;GO--Shrink The truncated log file to 1 MB.DBCC Shrinkf
A year ago, I do not know where to see the development of the auxiliary plug-in, installed, and then has been unknowingly used, one day re-installed system, the plug-in is gone, and can not remember his name,Search online for "auto-shrink Code", "VS Development essentials plugin" and so on have not been able to find this plugin. He was discovered by accident today.He is: C # outline 2012Especially write this article, share with you.When the code under
Recently in the application of the Android Market, see a lot of market category QQ app Bao do is the most perfect,In the project to implement its download management implementation, and the interface is as follows:Anti-compilation is used Expandablelistview, and how to load all the first deployment, and not click to shrink it?1, first load all expand:Mdownloadlistview.setadapter (Mdownloadadapter); for (int i = 0; i Reminder: Don't forget to determine
Check the data in the morning to find that there is only a few megabytes of hard disk space for a single piece of data. Habitual check log file, found that the log file unexpectedly increased to more than 350 GBBack up the log first, then shrink-------no change. (In fact, the log backup every 1 hours 1 block, normal running.)---------------------------------------------------------------------------Check log space usage and cannot truncate cause:DBCC
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.