« Home « Chủ đề SQL căn bản

Chủ đề : SQL căn bản


Có 40+ tài liệu thuộc chủ đề "SQL căn bản"

Brad’s Sure Guide to SQL Server Maintenance Plans- P17

tailieu.vn

Chapter 3: Getting Started with the Maintenance Plan Wizard. Figure 3.26: The first maintenance task of the Maintenance Plan ran successfully.. Only once you've achieved successful test executions for each of the steps in the Maintenance Plan are you ready to put this Maintenance Plan into production. If you get any errors, be sure to identify and fix the problems...

Brad’s Sure Guide to SQL Server Maintenance Plans- P18

tailieu.vn

Job Schedule Properties. in light of the fact that the task will be executed as a job from within the SQL Server Agent. In this section, we'll discuss the logistics of creating a job schedule. In order to begin this process, click on the Change button shown in Figure 4.1, and the Job Schedule Properties screen, shown in Figure 4.3,...

Brad’s Sure Guide to SQL Server Maintenance Plans- P19

tailieu.vn

By default, when you choose this option, a job is to be executed every 1 hour. If you want to prevent jobs from running during certain parts of the day, simply change the Starting at and Ending at times. The final choice you can make is to specify when your job schedule is to begin and, optionally, to end, using...

Brad’s Sure Guide to SQL Server Maintenance Plans- P20

tailieu.vn

Chapter 5: Check Database Integrity Task. When and How Often to Run Integrity Checks. As a DBA, you do not want to allow corruption to creep unnoticed into your databases, so it is essential that the Check Database Integrity task is scheduled to run on a regular basis. Here are my specific recommendations on when, and how often, the Check...

Brad’s Sure Guide to SQL Server Maintenance Plans- P21

tailieu.vn

Chapter 6: Shrink Database Task. In Chapter 3, I recommended that you never use the Shrink Database task, and that advice stands firm. why I advise against doing it using the Shrink Database task in the Wizard. When a new database is created using default settings, the initial size of the MDF and LDF files will be small, their autogrowth...

Brad’s Sure Guide to SQL Server Maintenance Plans- P22

tailieu.vn

The Rebuild Index task does a very good job of rebuilding indexes to remove logical fragmentation and empty space, and updating statistics. As such, it is very important that you schedule this task to run regularly.. On the other hand, the Rebuild Index task is resource intensive. Any queries trying to access this index in order to return the required...

Brad’s Sure Guide to SQL Server Maintenance Plans- P23

tailieu.vn

For this example, we are going to keep things simple, so let's assume we want to perform the Rebuild Index task for all user databases. In this case, choose the option shown in Figure 7.2, and then click OK.. Figure 7.2: To keep things simple, select the "All user databases". The Define Rebuild Index Task screen reappears, and the two...

Brad’s Sure Guide to SQL Server Maintenance Plans- P24

tailieu.vn

issues because it results in index fragmentation, the very thing we are trying to eliminate with the Rebuild Index task. In order to mitigate this problem, DBAs often decrease the fill factor to perhaps 90, meaning that data pages will be 90% full, leaving 10% free space.. Also, don't assume that my example of a fill factor of 90 is...

Brad’s Sure Guide to SQL Server Maintenance Plans- P25

tailieu.vn

After the Reorganize Task runs, it produces a text report similar to the following:. Reorganize Index (HAWAII). Reorganize index on Local server connection Databases: AdventureWorks. Reorganize Index Task Rebuild Index Task Removing. Performs a less thorough index defragmentation than Rebuild Index.. Speed Generally takes longer to run than the Rebuild Index Task.. Generally runs faster than the Reorganize Index Task.....

Brad’s Sure Guide to SQL Server Maintenance Plans- P26

tailieu.vn

Chapter 8: Reorganize Index Task. In our example, we'd run the Reorganize Index task as a direct replacement of the Rebuild Index task, in other words, at 2 a.m. In general, I recommend you run the Reorganize Index task after the Check Database Integrity task, but before any of the backup tasks. In addition, your backups will be of the...

Brad’s Sure Guide to SQL Server Maintenance Plans- P27

tailieu.vn

Configuring the Update Statistics Task. Now that we know what the Update Statistics task does, let's learn how to configure it. The Define Update Statistics Task screen in the Maintenance Plan Wizard is shown in Figure 9.1.. Figure 9.1: The Update Statistics Task screen has both familiar and unfamiliar configuration options.. The first part of the Define Update Statistics Task...

Brad’s Sure Guide to SQL Server Maintenance Plans- P28

tailieu.vn

starts a job that copies local MDF and LDF backups from off the local SQL Server instance to another server location (preferably offsite).. As discussed in the introduction, if you find yourself wanting to add multiple SQL Server Agent jobs to the plans you're creating using the Wizard, you're probably better off avoiding the Wizard in the first place, and...

Brad’s Sure Guide to SQL Server Maintenance Plans- P29

tailieu.vn

The History Cleanup task is very straightforward. An Overview of the History Cleanup Task. As such, the DBA is responsible for cleaning up old records from msdb that are no longer of any value, and the History Cleanup task is designed to make that job easy.. When the History Cleanup task runs using its default settings, it executes the following...

Brad’s Sure Guide to SQL Server Maintenance Plans- P30

tailieu.vn

The basic purpose of a backup of a SQL Server database is to make a copy of the data so that it can be used to restore a database in the event of a disaster, such as system failure, damage to the database, corruption of the data it contains, and so on.. Of all the Maintenance Plan tasks that you...

Brad’s Sure Guide to SQL Server Maintenance Plans- P31

tailieu.vn

For the typical database, using one of the above strategies will allow you to perform full backups nightly. Configuring the Back Up Database (Full) Task. The Define Back Up Database (Full) Task screen, shown in Figure 12.1, is more complex than most of the Maintenance Plan Wizard screens we have seen up to this point.. The first thing I want...

Brad’s Sure Guide to SQL Server Maintenance Plans- P32

tailieu.vn

A striped backup can, under certain conditions, speed up the backup process. However, like backup devices, this option is not used very often, because there are many better ways to boost backup performance that are faster, save disk space, and are easier to administer. As you have probably already guessed, I recommend that you don't use this option in your...

Brad’s Sure Guide to SQL Server Maintenance Plans- P33

tailieu.vn

Chapter 12: Back Up Database (Full) Task. also that the full database backup job will be completed before people come to work in the morning. As discussed in Chapter 4, when you schedule jobs using the Maintenance Plan Wizard, you have to take an initial guess as to when a job should run so that it doesn't interfere with other...

Brad’s Sure Guide to SQL Server Maintenance Plans- P34

tailieu.vn

Chapter 13: Back Up Database (Differential) Task. This is because, as we have already learned, the Wizard does not allow us to include multiple instances of the same task within the same Maintenance Plan. At a minimum, we will have to create one Maintenance Plan for those databases that don't require differential backups, and one Maintenance Plan for those databases...

Brad’s Sure Guide to SQL Server Maintenance Plans- P35

tailieu.vn

On the downside, the more transaction log backups you take, the more administrative effort it requires, and the more server resources are used.. While there is no perfect transaction log backup interval, taking transaction log backups on an hourly basis is a fairly good compromise. Of course, if you can't afford to lose an hour's worth of data, and/or your...

Brad’s Sure Guide to SQL Server Maintenance Plans- P36

tailieu.vn

The Maintenance Cleanup task within the Maintenance Plan Wizard is designed to remove older files that have been safely copied to a separate offsite location, and which you no longer need to store locally. While it has the ability to delete older report text files (files with a TXT extension), full and differential backups files (files with a BAK extension),...