Discover sql server maintenance cleanup task, include the articles, news, trends, analysis and practical advice about sql server maintenance cleanup task on alibabacloud.com
In the use of the process, we often encounter a very large database log, here are two ways to deal with ...
Method One
In general, the contraction of the SQL database does not greatly reduce the size of the database, its primary role is to shrink the log size, you should do this periodically to avoid the database log too large
1, set the database mode to Simple mode: Open SQL Enterprise Manager, in the c
Tags: database log repository truncate recovery data alter DIV modeMEDIA Database nameALTER DATABASE media set RECOVERY easy with no_wait
ALTER DATABASE Media set RECOVERY simple--simplified mode
DBCC SHR Inkfile (N ' Media_log ', one, truncateonly) --11 is size 11M
ALTER DATABASE MEDIA SET RECOVERY full with NO_WAIT
alter DATABASE MEDIA SET RECOVERY Full--Revert to complete mode
Ext.: http://blog.csdn.net/hehe520347/article/details/48497229How to truncate logs for
1, DBCC FREEPROCCACHE;2. DBCC FREESYSTEMCACHE (' All ') | DBCC FREESYSTEMCACHE (' pool_name ');3, declare @dbid as int = db_id (' Studio '); DBCC FLUSHPROCINDB (@dbid);4. Disconnecting the database5. Turn Auto_Close on or off6. Use the following commandAlter DATABASE .... collationALTER DATABASE .... Modify NameALTER DATABASE .... MODIFY FilegroupALTER DATABASE .... Set onlineALTER DATABASE .... set offlineALTER DATABASE .... SET EmergencyALTER DATABASE .... Set READ_ONLYALTER DATABASE .... Set
Each version of SQL Server has gradually become more and more self aligning and maintainable. However, requirements for basic maintenance, such as deleting index fragments, updating statistics, checking database consistency, and making backups are still not disappearing. As you can imagine, the maintenance of an index
A maintenance plan can be used in SQL Server 2005 to automatically back up the database, reducing the workload of the database administrator. Here's how to use it:(1) Start SQL Server Management Studio and select Manage-maintenance
the New Task Step dialog box, enter the name of the output file that reports the fragmentation analysis results: 6. Click the OK button to return to the new Job dialog box; 7. On the schedule page of the New Task dialog box, click New Schedule and enter the appropriate plan for running the SQL Server
Using a maintenance plan for SQL Server 2008 enables you to automatically back up the database and automatically remove the functionality of outdated backups.First, the environmentOs:microsoft Windows Server 2003 R2Soft:microsoft SQL Ser
SQL Server Performance Tuning 3 (Index) MaintenanceHeat1 reviews Brook Stream GrassSQL Server Performance Tuning 3 (Index) MaintenanceObjectiveThe previous article describes how to improve the query performance of a database by building an index, which is really just the beginning. Subsequent to the lack of proper maintenanc
Studio, right-click, select new = "task; 3. In the General page of the New Task dialog box, enter the task name and other details: 4. On the steps page of the New Task dialog box, click New and enter the SQL command for the user database. 5. On the Advanced page of
When you restore a database from a database backup, you find that the log file actually has more than 120 g, not through the SQL management, resolute use DBCC statement cleanup success! Free space! and clear and speed!
First of all, it's important to look at the type of backup data, or not to clean up
Select Name, Recovery_model_desc from sys.databases
After execution, you can see the category of Recover
Tags: server error code base SYS about MDA tar Restart Center Error symptoms: D:\Program Files\Microsoft SQL Server\mssql.1\mssql\log below Erroelog, hit with text, view run dimension plan unsuccessful is the generated error log details: 2011-08-11 14:16:48-! [298] SQL Server
Start a server, is exactly the cloud host, the environment inside is pre-configured, but in the configuration planning tasks, but found that mssql2005 plan backup can not do, will error:
Copy Code code as follows:
SQL Server Create Maintenance plan failed (SQL
netcom, in the management-Database Mail set its good, want to have SMS prompt, need 136 mobile mailbox, in the settings can be opened. To send messages automatically, you need to have the alert system-mail profile enabled in the Mail agent properties.30. The Messenger service enables the database to be automatically net send to another computer. Then in cmd you can net send 192.168.1.5 Fdfas. The operator automatically sends information to the operator when the job is completed when it is autom
options
Minimum--Minimum value for configuration options
Maximum--Maximum value of configuration options
Value_in_use--The running value currently used by the configuration option
Description--Description of configuration options
Is_dynamic--equals 1 indicates a variable that needs to execute the reconfiguration statement to take effect
Is_anvanced--equals 1 indicates a variable that requires the show advanced statement to take effect
--You can also use sp_configure to
Scheduled maintenance plans:
Use the New fill (empty) factor to rebuild the index to restructure the data and the data on the index page. This ensures that the database page contains equally distributed data and available space, which allows for faster growth in the future. Remove an empty data page from the database page to compress the data file. Update index statistics to ensure that the query is optimized and the table distribution data is worth t
ObjectiveAn earlier article introduced indexes to improve query performance in a database, which is just the beginning. Perhaps assuming a lack of proper maintenance, index the performance of your previously established and even become a drag-and-drop database of accomplices.Looking for fragmentsThe elimination of fragmentation index maintenance is probably the most common
This article belongs to the managing SQL Server AlwaysOn series articleObjective:The previous series has covered SQL Server AlwaysOn knowledge points, installation demos, and considerations. But this is not the end, but more is the starting point. It's like you can't give birth to a child, you have to keep it (manageme
SQL Server Performance Tuning 3 Index MaintenancePreface
The previous article introduced how to improve database query performance by creating indexes, which is just the beginning. If you do not need proper maintenance in the future, the indexes you have previously created may even become a drag-and-drop attack and a helper for database performance degradation.Se
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.