* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Troubleshooting SQL Server 2000
Survey
Document related concepts
Serializability wikipedia , lookup
Microsoft Access wikipedia , lookup
Oracle Database wikipedia , lookup
Ingres (database) wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Relational model wikipedia , lookup
Database model wikipedia , lookup
Transcript
IT390 Business Database Administration Unit 10: Troubleshooting SQL Server 2000 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 1 Objectives • Troubleshoot basic Microsoft SQL Database Server problems. • Apply SQL Server troubleshooting to resolve network problems. • Explain the commands to check network connections. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 2 Monitoring the Database Server • Monitoring is the process by which you can check if your database server is properly working. • The performance of a database deteriorates if maintenance tasks are not frequently performed on the database. • SQL Server provides you with various tools to monitor your database server to achieve optimal performance. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 3 Can you… ? • Differentiate between Response Time and Throughput Time. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 4 Can you… ? List the factors that affect the performance of an SQL database server. Much more painful than proper maintenance! © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 5 Monitoring Performance Factors A network administrator should check the usage of the following server resources: Central processing unit (CPU) Memory Storage capacity Network usage (A topic which has a larger scope!) © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 6 SQL Server Monitoring Tools • SQL Server 2000 provides the following tools to monitor the factors that can hamper the performance of SQL Server 2000: T-SQL commands SQL Server 2000 Error Log Current Activity Window SQL Profiler © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 7 Class Activity • Which SQL commands can you use to obtain information on CPU usage? YIKES!! © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 8 Solution You can use the following SELECT syntax to get the SQL server processes and their corresponding threads: SELECT spid, lastwaittype, dbid, uid, cpu, physical_io, memusage, status, loginname, program_name from master..sysprocesses ORDER BY cpu desc GO © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 9 Troubleshooting SQL Server 2000 • A database server might face various problems, such as network congestion, memory allocations, and permission problems on various database objects. • SQL Server provides various debugging tools for diagnosing and rectifying errors, such as DBCC commands and Enterprise Manager. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 10 Performance Tuning: Techniques and Tools • • • • • Performance tuning involves measures to enhance database performance. You can enhance performance of a database by taking small measures, which do not require much effort on your part except that you need to perform them at the right time. Some of these measures are: Indexing Creating large tables Defining optimized data retrieval queries In addition, you can use the Performance Monitor and Query Analyzer tools to monitor the performance of a database. HOW? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 11 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 12 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 13 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 14 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 15 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 16 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 17 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 18 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 19 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 20 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 21 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 22 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 23 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 24 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 25 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 26 © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 27 Class Activity You are the DBA at PQR Inc. You are frequently receiving errors in SQL Server 2000. How can you view the root cause of these errors? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 28 Viewing SQL Server Error Log • You can view SQL Server Error Log using Enterprise Manager. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 29 Class Activity • What is the significance of the Current Log File? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 30 Answer The Current Error Log is the most recent error log located under Program Files\Microsoft SQL Server\Mssql\Log. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 31 Viewing an Error Log Message You can view an error message by double-clicking any item in the SQL Server Error Log file. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 32 Troubleshooting / Tools for Database Configurations • SQL Server provides database settings that can be used to troubleshoot some common problems, such as multiple users accessing the database at a critical time. • You can use Enterprise Manager to change database settings under ‘Properties’ / Options tab. • You can also use the sp_dboption system stored procedure to change database settings. • Alternatively, you can use DBCC commands to change database settings. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 33 Class Activity • What are the following DBCC commands used for? DBCC CHECKCATALOG DBCC CHECKTABLE DBCC CHECKDB © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 34 Solution • What are the following DBCC commands used for? DBCC CHECKCATALOG © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 35 Solution (cont.) • What are the following DBCC commands used for? DBCC CHECKTABLE © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 36 Solution (cont.) • What are the following DBCC commands used for? DBCC CHECKDB © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 37 Class Activity John is a DBA at XYZ Inc. The database server at XYZ is facing network problems. What can be the causes of this problem? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 38 Monitoring the Network • A database server can also face problems due to network errors thus causing congestion. There can be several kinds of these network errors, such as: Bandwidth crunch (exhaustion) Subnet masking Congestion Orphaned sessions © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 39 Orphaned Session • Stays open on the server-side even after the client has disconnected. • Occurs when the client cannot free the network connection(s) that it is holding even when the session is terminated. • Takes up an SQL Server network connection, and prevents other clients from connecting to the Server. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 40 Class Activity What are the 2 primary commands to check for database network connectivity over named pipes? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 41 Activity Answer • Use the net view command: net view \\servername © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 42 Activity Answer • Use the net use command: net use [device_name | *] [\\computer_name\share_name[\volume]] [password | *]] [/user:[domain_name\]user_name] [[/delete] | [/persistent:{yes | no}]] © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 43 Summary • Performance tuning involves measures to enhance the performance of a database. •There are tools that can monitor the performance of a database. Some of these tools are: Performance Monitor Query Analyzer © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 44 Summary • A Database Administrator should be able to use basic SQL Server Tools and Troubleshooting such as logs and the DBCC command. • A Database Administrator should use the commands to check Network conductivity. © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 45 Summary Did you understand the key points from the Lesson? Do you have any questions? © 2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 10 Slide 46