Presentation is loading. Please wait.

Presentation is loading. Please wait.

Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.

Similar presentations


Presentation on theme: "Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks."— Presentation transcript:

1 Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks

2 Configure SQL Server Service SQL Server Service is the service that runs the database engine Options that can be changed are –Connections –Database –Memory –Processor –Server Use Enterprise Manager or sp_configure to change the options

3 General properties - EM

4 Connections properties - Table 12-1

5 Database Settings - Table 12-2

6 Memory properties - Table 12-3

7 Processor properties - Table 12-4

8 Server Settings properties Table 12-5

9 Sp_configure Displays or changes settings for the current server. Syntax is sp_configure [[@configname =] 'name'] [,[@configvalue =] 'value'] e.g. USE master EXEC sp_configure 'recovery interval', '3'

10 SQL Server Agent This is the agent that runs scheduled jobs and tasks in SQL Server Can use either local system account or domain user account (preferred) Additional permissions are required as listed in Table 12-6 In Enterprise Manager, located under Management container Typically the same account running SQL Server should also run the agent

11 SQL Server Agent

12 Event log - Right click on Agent

13 Mail options in SQL Server SQL Server can send emails!! You need to create a mail profile You need to use a domain user account for SQL Server login Two types of mail services in SQL SQL Mail is the mail service of SQL Server service SQLAgent Mail is the mail service of SQL Server Agent xp_sendmail is used to send email

14 SQL Mail configuration

15 SQL Mail stored procedures xp_startmail xp_stopmail sp_processmail xp_findnextmessage xp_readmail xp_deletemail xp_sendmail

16 Linked Servers Linked Server let you run distributed queries from different databases on different servers This is different than registering servers in EM which can only be another SQL Server Any OLE DB datasource can be linked e.g. Oracle, Access, Sybase etc Use the stored procedure sp_addlinkedserver to add a server

17 Supported OLE DB providers MS OLE DB Provider for SQL Server –Connection to SQL Server MS OLE DB Provider for Oracle –Connection to Oracle servers MS OLE DB Provider for Jet –Connection to Microsoft Access, Excel spreadsheet, and Jet-format databases MS OLE DB Provider for ODBC –Connection to ODBC data sources MS OLE DB Provider for Indexing Service –Connection to operating system file source

18 Linked Server properties General properties –Server name –Server type –Product name –Provider string –Location –Catalog

19 Syntax for Linked Server SQL Server –LinkedServerName.Database.Owner.Ta ble Oracle –LinkedServerName…Owner.Table Access –LinkedServerName...Table

20 Misc. Topics ODBC DSN let you access data from other sources We can use Access as an example SQL Server does support XML which lets you export data in a different format SQL Server works with IIS Server to achieve this

21 In Class Exercises Configure SQL Mail and SQL Agent Mail on your SQL Servers Pages 423 - 426 Pages 434 -435 Create an ODBC datasource that points to Northwind database on your SQL Server. Page 226 has info Create a blank db in Access and link data from the ODBC source Review the work with me to get credit

22 Events, Alerts and Jobs Events are when something typically an error occurs on the SQL Server e.g. Pubs database log fills up Alerts would be a message sent to an Operator that an event has occurred e.g. Pubs db log is full Jobs would be the steps taken by the SQL Server to remedy the problem e.g. Truncating the pubs db log Here is the process

23

24 Operators The Operator is the person or group notified about the status of a job The methods of notification include –Email –Pager –Net Send Fail-Safe Operator is notified as a last resort Operator can be created using EM or T-SQL stored procedures

25 Operator properties - EM

26 Notifications properties

27 What is a Job? Jobs are the steps that automate admin tasks like backing up database Jobs can be created using –Enterprise Manager –Create Job Wizard –T-SQL statements Jobs are owned by the creator Jobs either succeed or fail Jobs can be run manually but are often scheduled to run on their own

28 Job General properties - EM

29 Job steps

30 Job schedule

31 Notifications properties

32 In Class Exercises Page 447 - Instead of SelfPaced CPU use your machine name Page 458 Page 463 Page 469 Review the results with me Take a break

33 Alerts Alerts are defined to provide event notification Alerts can be existing or user defined User defined messages are numbered 50,000 or higher Performance counters can be used to define an alert With an alert, you execute a job and notify an operator Can be created using EM or T-SQL

34 Event Alert - By Error

35 Event Alert - By Severity

36 Performance condition Alert

37 Alert Response

38 Database Maintenance Plan Wizard Select databases Data optimization Database integrity check Backup plan Backup disk directory Transaction log backups Reporting Maintenance plan history Maintenance plan name

39 MSXOperator - Master Server

40 TSX servers - Target Server

41 More Exercises Pages 478 - 479 Pages 482 - 484 Pages 504 - 506 (optional) –For this work with someone else and use their machine as Target Review the results before you leave Next week Chapter 14 Final Project also due next week


Download ppt "Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks."

Similar presentations


Ads by Google