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

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


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

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

tailieu.vn

Figure 15.3: It would be very rare to only want to delete a single file.. It allows you to delete BAK , TRN , or TXT files based on the filename extension. This works well, because BAK , TRN , and TXT files almost always have unique names assigned to them, and using an extension is the easiest way to...

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

tailieu.vn

Execute T-SQL Statement task – allows you to run any custom T-SQL code as part of your Maintenance Plan.. Notify Operator task – makes it easy for you to create a Maintenance Plan that will notify you if any problem occurs when a Maintenance Plan executes.. Starting the Maintenance Plan Designer. Starting the Maintenance Plan Designer is as simple as...

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

tailieu.vn

Figure 16.5: The right-hand side of the screen is dominated by the design surface (highlighted in red) where you visually create Maintenance Plans using the Maintenance Plan Designer.. Starting at the top of Figure 16.5, we see the Designer menu bar (covered later), and then a name textbox that is automatically filled in with the name you gave to the...

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

tailieu.vn

At the top of the right-hand side of the screen, for each Maintenance Plan that you have open in the Designer, is a menu bar, as shown in Figure 16.10.. Figure 16.10: A lot of functionality is hidden in this small section of the screen.. The next two options pertain to the Maintenance Plan as a whole and allow you...

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

tailieu.vn

Chapter 16: Introduction to the Maintenance Plan Designer. If you decide to generate a text file report, you have two additional options.. This is the default option and is identical to the option provided when configuring text file reports using the Maintenance Plan Wizard, where a new file is created each time a report is created. This option forces all...

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

tailieu.vn

Figure 17.3: We have seen this database selection screen many times before.. The Check Database Integrity Task screen should now look as shown in Figure 17.4.. Figure 17.4: A specific database, AdventureWorks, has been selected, although we can't see the database name from this screen.. As discussed in Chapter 5, this makes the task a little more resource-intensive but, in...

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

tailieu.vn

Figure 17.12: The Update Statistics Task configuration settings.. Once again, these options are identical to those shown and described in the Configuring the Update Statistics Task section of Chapter 9, and so will not be covered again here.. In Chapter 6, I explained why I strongly advise you avoid using the Shrink Database task found in the Maintenance Plan Wizard....

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

tailieu.vn

Next, select the first task instance, which, in our example, is intended to clean up old BAK files, and bring up its configuration screen, as shown in Figure 17.20.. Figure 17.20: The Maintenance Cleanup Task configuration screen.. Back Up Database Task. Using the Maintenance Plan Wizard, the process of backing up database files involved configuring up to three separate tasks:....

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

tailieu.vn

If you want to prevent the code from taking an inordinate amount of time to run, you can set a value here, in seconds, which determines when the T-SQL code in this task times out, and the task is aborted. Another point to notice about this task is that you can't specify a database, as you can with most of...

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

tailieu.vn

In this chapter, we will take an in-depth look at each of these important features of the Maintenance Plan Designer.. As noted previously, a single Maintenance Plan can be made up one or more subplans. in a given subplan, based on the outcome of what is called "task branching.". In other words, you cannot modify the action of tasks in...

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

tailieu.vn

Figure 18.4: The schedule for Subplan_1 has been set.. The next task is to create a second subplan, then add a second instance of the Back Up Database task to the new subplan, configure the task to perform transaction log backups, and then to schedule the subplan appropriately. To add a new subplan, click on the Add Subplan icon in...

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

tailieu.vn

Figure 18.10: Notice that the green arrow starts at the Backup Database Task and points at the Maintenance Cleanup task.. The conditions are imposed inside the precedence arrow itself and, in fact, the green color of this arrow in Figure 18.10 indicates that the arrow is, by default, imposing an "on success". condition on the execution of the Maintenance Cleanup...

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

tailieu.vn

It has been quite a long journey through the Designer to get to the point where we are ready to design, create, test, and schedule a full Maintenance Plan.. In this chapter, we'll walk through the full process of creating from scratch, and deploying, a Maintenance Plan that could be used to perform the following essential database maintenance tasks:. The...

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

tailieu.vn

Add the Maintenance Plan Tasks. Our next task is to drag and drop the appropriate Maintenance Plan tasks to the design surface of the appropriate subplan. Daily Full Backup Subplan. One Back Up Database task, to perform the full backup of AdventureWorks.. One Notify Operator task, to notify the operator, should the full backup fail.. Highlight the Daily Full Backup...

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

tailieu.vn

You might want to use fewer of them, perhaps only receiving notification of the success or failure of those tasks you deem most critical, but I like to be notified if any one of the steps within the subplan fails. I also find it reassuring to receive a mail confirming that the whole plan ran successfully, hence the seventh instance...

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

tailieu.vn

The easiest way to do this is to first order the tasks on the design surface in the proper order, and then draw the green connecting arrows. Setting precedence is always done two tasks at a time, so start with the first two tasks and work your way down. So, for example, we start out by linking the Check Database...

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

tailieu.vn

Figure 19.12: Configuring the Reporting and Logging screen can be done any time throughout the Maintenance Plan design process, although I have saved it for last.. For example, in the Maintenance Plan we just created, a report text file will be written to disk every time a subplan executes. Save the Maintenance Plan. Once we are done creating the Maintenance...

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

tailieu.vn

Figure 19.15: In this example, each subplan has a single Maintenance Plan Task.. If, instead, you selected the Single schedule for the entire plan or no schedule option in the Wizard, then there will only be a single subplan containing all of the Maintenance Plan tasks, as shown in Figure 19.16. Figure 19.16: Precedence was decided when you ordered the...

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

tailieu.vn

Compare and synchronize SQL Server database schemas. Compare and synchronize SQL Server database contents. We rely on these products for every deployment.". It has also streamlined our daily update process and cut back literally a good solid hour per day.". "SQL Response enables you to monitor, get alerted, and respond to SQL problems before they start, in an easy-to-navigate, user-friendly,...